@vantageos/mosaic-blocks 0.5.9-alpha → 0.5.10-alpha
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/README.md +4 -3
- package/dist/index.cjs +217 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -2
- package/dist/index.d.ts +145 -2
- package/dist/index.js +215 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -20,7 +20,7 @@ import { Switch } from '@base-ui/react/switch';
|
|
|
20
20
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
21
21
|
export { Tooltip } from '@base-ui/react/tooltip';
|
|
22
22
|
|
|
23
|
-
declare const version = "0.5.
|
|
23
|
+
declare const version = "0.5.10-alpha";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Placeholder component — infra scaffold only.
|
|
@@ -6035,4 +6035,147 @@ declare namespace MosaicApprovalPrompt {
|
|
|
6035
6035
|
var displayName: string;
|
|
6036
6036
|
}
|
|
6037
6037
|
|
|
6038
|
-
|
|
6038
|
+
/**
|
|
6039
|
+
* MosaicToolToggleList — presentational per-tool enable switch + approval
|
|
6040
|
+
* level selector, grouped into host-supplied sections.
|
|
6041
|
+
*
|
|
6042
|
+
* Differentiator (this is the whole point of the component): the tool
|
|
6043
|
+
* catalogue is DATA, not code. adam's `AgentForm.svelte` (builder-web)
|
|
6044
|
+
* hardcodes six tool checkboxes with zero approval concept
|
|
6045
|
+
* (`~/AgentForm.svelte:49-56,177-190`); this library has never heard of a
|
|
6046
|
+
* single tool name. `tools`, `approvalLevels` and `sections` are all
|
|
6047
|
+
* required props supplied by the host — a new tool, a renamed approval
|
|
6048
|
+
* level, or a reshuffled "Teamwork" section ships without touching this
|
|
6049
|
+
* package.
|
|
6050
|
+
*
|
|
6051
|
+
* One row per tool: name + description + enable/disable MosaicSwitch +
|
|
6052
|
+
* approval-level MosaicSelect-style combobox (built directly on
|
|
6053
|
+
* @base-ui/react/select here, same primitive as MosaicSelect, to keep the
|
|
6054
|
+
* per-row aria-label wiring local). Rows are grouped under host-supplied
|
|
6055
|
+
* section headings (`sections[].title`), each section listing the
|
|
6056
|
+
* `toolIds` it owns — the grouping shape itself (e.g. a "Teamwork" section
|
|
6057
|
+
* bundling the four VantagePeers tools) is a hosting decision, not a
|
|
6058
|
+
* library concept.
|
|
6059
|
+
*
|
|
6060
|
+
* Controlled component: no internal persisted state beyond the CHANGE
|
|
6061
|
+
* event flowing straight to `onToggleTool` / `onChangeApproval`. The host
|
|
6062
|
+
* owns `tools` and re-renders with the updated `enabled` /
|
|
6063
|
+
* `approvalLevelId` after handling the callback.
|
|
6064
|
+
*
|
|
6065
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
6066
|
+
* Design tokens: --foreground, --muted, --muted-foreground, --border,
|
|
6067
|
+
* --card, --background, --popover, --popover-foreground, --accent,
|
|
6068
|
+
* --accent-foreground, --ring.
|
|
6069
|
+
* a11y: each switch's accessible name is a required per-tool callback
|
|
6070
|
+
* prop (`toggleAriaLabel`); each approval selector's accessible name is
|
|
6071
|
+
* likewise a required per-tool callback prop (`approvalSelectAriaLabel`).
|
|
6072
|
+
* Approval options render with role="option" (base-ui Select.Item), the
|
|
6073
|
+
* trigger with role="combobox" — both managed by @base-ui/react/select.
|
|
6074
|
+
* Bilingual: every user-facing string (section titles, tool names/
|
|
6075
|
+
* descriptions, approval-level labels, aria-labels) is host-supplied data
|
|
6076
|
+
* or a required prop — zero hardcoded copy, zero default.
|
|
6077
|
+
*
|
|
6078
|
+
* @example
|
|
6079
|
+
* <MosaicToolToggleList
|
|
6080
|
+
* sections={[
|
|
6081
|
+
* { id: "teamwork", title: "Travail d'équipe", toolIds: ["send_message", "check_messages"] },
|
|
6082
|
+
* ]}
|
|
6083
|
+
* tools={[
|
|
6084
|
+
* { id: "send_message", name: "send_message", description: "Envoyer un message", enabled: true, approvalLevelId: "never" },
|
|
6085
|
+
* { id: "check_messages", name: "check_messages", description: "Vérifier les messages", enabled: false, approvalLevelId: "always" },
|
|
6086
|
+
* ]}
|
|
6087
|
+
* approvalLevels={[
|
|
6088
|
+
* { id: "never", label: "Ne jamais demander" },
|
|
6089
|
+
* { id: "always", label: "Demander à chaque appel" },
|
|
6090
|
+
* { id: "first", label: "Demander la première fois" },
|
|
6091
|
+
* ]}
|
|
6092
|
+
* onToggleTool={(toolId, enabled) => updateTool(toolId, { enabled })}
|
|
6093
|
+
* onChangeApproval={(toolId, levelId) => updateTool(toolId, { approvalLevelId: levelId })}
|
|
6094
|
+
* toggleAriaLabel={(toolName) => `Activer/désactiver ${toolName}`}
|
|
6095
|
+
* approvalSelectAriaLabel={(toolName) => `Niveau d'approbation pour ${toolName}`}
|
|
6096
|
+
* />
|
|
6097
|
+
*/
|
|
6098
|
+
|
|
6099
|
+
/** One selectable approval level. Labels are host copy — no built-in set. */
|
|
6100
|
+
interface MosaicToolToggleListApprovalLevel {
|
|
6101
|
+
/** Stable identifier, matched against `tool.approvalLevelId`. */
|
|
6102
|
+
id: string;
|
|
6103
|
+
/** Host-supplied, host-localized display label. */
|
|
6104
|
+
label: string;
|
|
6105
|
+
}
|
|
6106
|
+
/** One tool row's data. The library knows nothing about any tool by name. */
|
|
6107
|
+
interface MosaicToolToggleListTool {
|
|
6108
|
+
/** Stable identifier, also referenced by `sections[].toolIds`. */
|
|
6109
|
+
id: string;
|
|
6110
|
+
/** Host-supplied display name (e.g. an MCP tool name). */
|
|
6111
|
+
name: string;
|
|
6112
|
+
/** Host-supplied short description of what the tool does. */
|
|
6113
|
+
description: string;
|
|
6114
|
+
/** Whether the tool is currently enabled. */
|
|
6115
|
+
enabled: boolean;
|
|
6116
|
+
/** Current approval level, matched against `approvalLevels[].id`. */
|
|
6117
|
+
approvalLevelId: string;
|
|
6118
|
+
}
|
|
6119
|
+
/**
|
|
6120
|
+
* A host-defined grouping of tools (e.g. "Teamwork" bundling the
|
|
6121
|
+
* VantagePeers tools). The section title and the grouping itself are
|
|
6122
|
+
* data — the library renders whatever grouping it is given.
|
|
6123
|
+
*/
|
|
6124
|
+
interface MosaicToolToggleListSection {
|
|
6125
|
+
/** Stable identifier for the section. */
|
|
6126
|
+
id: string;
|
|
6127
|
+
/** Host-supplied, host-localized section heading. */
|
|
6128
|
+
title: string;
|
|
6129
|
+
/** Ordered ids of the tools that belong to this section. */
|
|
6130
|
+
toolIds: string[];
|
|
6131
|
+
}
|
|
6132
|
+
interface MosaicToolToggleListProps {
|
|
6133
|
+
/** Host-defined groupings of tools, rendered in order. */
|
|
6134
|
+
sections: MosaicToolToggleListSection[];
|
|
6135
|
+
/** Full open catalogue of tools — a PROP, never a library constant. */
|
|
6136
|
+
tools: MosaicToolToggleListTool[];
|
|
6137
|
+
/** Open catalogue of approval levels — a PROP, never a library constant. */
|
|
6138
|
+
approvalLevels: MosaicToolToggleListApprovalLevel[];
|
|
6139
|
+
/** Called when a tool's enable switch is toggled. */
|
|
6140
|
+
onToggleTool: (toolId: string, enabled: boolean) => void;
|
|
6141
|
+
/** Called when a tool's approval level is changed. */
|
|
6142
|
+
onChangeApproval: (toolId: string, approvalLevelId: string) => void;
|
|
6143
|
+
/** Per-tool accessible name for the enable/disable switch. Required, no default. */
|
|
6144
|
+
toggleAriaLabel: (toolName: string) => string;
|
|
6145
|
+
/** Per-tool accessible name for the approval-level selector. Required, no default. */
|
|
6146
|
+
approvalSelectAriaLabel: (toolName: string) => string;
|
|
6147
|
+
/** Additional Tailwind classes on the root element. */
|
|
6148
|
+
className?: string;
|
|
6149
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
6150
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
6151
|
+
}
|
|
6152
|
+
/**
|
|
6153
|
+
* MosaicToolToggleList — production tool-permissions atom for
|
|
6154
|
+
* @vantageos/mosaic-blocks.
|
|
6155
|
+
*
|
|
6156
|
+
* Purely presentational: renders one row per tool (switch + approval
|
|
6157
|
+
* selector), grouped under host-supplied section headings, and reports
|
|
6158
|
+
* every change via callbacks. No network call, no internal persisted
|
|
6159
|
+
* state, no hardcoded tool catalogue.
|
|
6160
|
+
*/
|
|
6161
|
+
declare function MosaicToolToggleList({ sections, tools, approvalLevels, onToggleTool, onChangeApproval, toggleAriaLabel, approvalSelectAriaLabel, className, ref, }: MosaicToolToggleListProps): React.JSX.Element;
|
|
6162
|
+
declare namespace MosaicToolToggleList {
|
|
6163
|
+
var displayName: string;
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* toolToggleListVariants — pure CVA variant functions for MosaicToolToggleList.
|
|
6168
|
+
*
|
|
6169
|
+
* Isolated in their own module so they can be re-exported from the
|
|
6170
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
6171
|
+
*
|
|
6172
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
6173
|
+
*/
|
|
6174
|
+
/** Section header container. */
|
|
6175
|
+
declare const toolToggleListSectionVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6176
|
+
/** One tool row — enabled vs. disabled tone. */
|
|
6177
|
+
declare const toolToggleListRowVariants: (props?: ({
|
|
6178
|
+
enabled?: boolean | null | undefined;
|
|
6179
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6180
|
+
|
|
6181
|
+
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { Switch } from '@base-ui/react/switch';
|
|
|
20
20
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
21
21
|
export { Tooltip } from '@base-ui/react/tooltip';
|
|
22
22
|
|
|
23
|
-
declare const version = "0.5.
|
|
23
|
+
declare const version = "0.5.10-alpha";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Placeholder component — infra scaffold only.
|
|
@@ -6035,4 +6035,147 @@ declare namespace MosaicApprovalPrompt {
|
|
|
6035
6035
|
var displayName: string;
|
|
6036
6036
|
}
|
|
6037
6037
|
|
|
6038
|
-
|
|
6038
|
+
/**
|
|
6039
|
+
* MosaicToolToggleList — presentational per-tool enable switch + approval
|
|
6040
|
+
* level selector, grouped into host-supplied sections.
|
|
6041
|
+
*
|
|
6042
|
+
* Differentiator (this is the whole point of the component): the tool
|
|
6043
|
+
* catalogue is DATA, not code. adam's `AgentForm.svelte` (builder-web)
|
|
6044
|
+
* hardcodes six tool checkboxes with zero approval concept
|
|
6045
|
+
* (`~/AgentForm.svelte:49-56,177-190`); this library has never heard of a
|
|
6046
|
+
* single tool name. `tools`, `approvalLevels` and `sections` are all
|
|
6047
|
+
* required props supplied by the host — a new tool, a renamed approval
|
|
6048
|
+
* level, or a reshuffled "Teamwork" section ships without touching this
|
|
6049
|
+
* package.
|
|
6050
|
+
*
|
|
6051
|
+
* One row per tool: name + description + enable/disable MosaicSwitch +
|
|
6052
|
+
* approval-level MosaicSelect-style combobox (built directly on
|
|
6053
|
+
* @base-ui/react/select here, same primitive as MosaicSelect, to keep the
|
|
6054
|
+
* per-row aria-label wiring local). Rows are grouped under host-supplied
|
|
6055
|
+
* section headings (`sections[].title`), each section listing the
|
|
6056
|
+
* `toolIds` it owns — the grouping shape itself (e.g. a "Teamwork" section
|
|
6057
|
+
* bundling the four VantagePeers tools) is a hosting decision, not a
|
|
6058
|
+
* library concept.
|
|
6059
|
+
*
|
|
6060
|
+
* Controlled component: no internal persisted state beyond the CHANGE
|
|
6061
|
+
* event flowing straight to `onToggleTool` / `onChangeApproval`. The host
|
|
6062
|
+
* owns `tools` and re-renders with the updated `enabled` /
|
|
6063
|
+
* `approvalLevelId` after handling the callback.
|
|
6064
|
+
*
|
|
6065
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
6066
|
+
* Design tokens: --foreground, --muted, --muted-foreground, --border,
|
|
6067
|
+
* --card, --background, --popover, --popover-foreground, --accent,
|
|
6068
|
+
* --accent-foreground, --ring.
|
|
6069
|
+
* a11y: each switch's accessible name is a required per-tool callback
|
|
6070
|
+
* prop (`toggleAriaLabel`); each approval selector's accessible name is
|
|
6071
|
+
* likewise a required per-tool callback prop (`approvalSelectAriaLabel`).
|
|
6072
|
+
* Approval options render with role="option" (base-ui Select.Item), the
|
|
6073
|
+
* trigger with role="combobox" — both managed by @base-ui/react/select.
|
|
6074
|
+
* Bilingual: every user-facing string (section titles, tool names/
|
|
6075
|
+
* descriptions, approval-level labels, aria-labels) is host-supplied data
|
|
6076
|
+
* or a required prop — zero hardcoded copy, zero default.
|
|
6077
|
+
*
|
|
6078
|
+
* @example
|
|
6079
|
+
* <MosaicToolToggleList
|
|
6080
|
+
* sections={[
|
|
6081
|
+
* { id: "teamwork", title: "Travail d'équipe", toolIds: ["send_message", "check_messages"] },
|
|
6082
|
+
* ]}
|
|
6083
|
+
* tools={[
|
|
6084
|
+
* { id: "send_message", name: "send_message", description: "Envoyer un message", enabled: true, approvalLevelId: "never" },
|
|
6085
|
+
* { id: "check_messages", name: "check_messages", description: "Vérifier les messages", enabled: false, approvalLevelId: "always" },
|
|
6086
|
+
* ]}
|
|
6087
|
+
* approvalLevels={[
|
|
6088
|
+
* { id: "never", label: "Ne jamais demander" },
|
|
6089
|
+
* { id: "always", label: "Demander à chaque appel" },
|
|
6090
|
+
* { id: "first", label: "Demander la première fois" },
|
|
6091
|
+
* ]}
|
|
6092
|
+
* onToggleTool={(toolId, enabled) => updateTool(toolId, { enabled })}
|
|
6093
|
+
* onChangeApproval={(toolId, levelId) => updateTool(toolId, { approvalLevelId: levelId })}
|
|
6094
|
+
* toggleAriaLabel={(toolName) => `Activer/désactiver ${toolName}`}
|
|
6095
|
+
* approvalSelectAriaLabel={(toolName) => `Niveau d'approbation pour ${toolName}`}
|
|
6096
|
+
* />
|
|
6097
|
+
*/
|
|
6098
|
+
|
|
6099
|
+
/** One selectable approval level. Labels are host copy — no built-in set. */
|
|
6100
|
+
interface MosaicToolToggleListApprovalLevel {
|
|
6101
|
+
/** Stable identifier, matched against `tool.approvalLevelId`. */
|
|
6102
|
+
id: string;
|
|
6103
|
+
/** Host-supplied, host-localized display label. */
|
|
6104
|
+
label: string;
|
|
6105
|
+
}
|
|
6106
|
+
/** One tool row's data. The library knows nothing about any tool by name. */
|
|
6107
|
+
interface MosaicToolToggleListTool {
|
|
6108
|
+
/** Stable identifier, also referenced by `sections[].toolIds`. */
|
|
6109
|
+
id: string;
|
|
6110
|
+
/** Host-supplied display name (e.g. an MCP tool name). */
|
|
6111
|
+
name: string;
|
|
6112
|
+
/** Host-supplied short description of what the tool does. */
|
|
6113
|
+
description: string;
|
|
6114
|
+
/** Whether the tool is currently enabled. */
|
|
6115
|
+
enabled: boolean;
|
|
6116
|
+
/** Current approval level, matched against `approvalLevels[].id`. */
|
|
6117
|
+
approvalLevelId: string;
|
|
6118
|
+
}
|
|
6119
|
+
/**
|
|
6120
|
+
* A host-defined grouping of tools (e.g. "Teamwork" bundling the
|
|
6121
|
+
* VantagePeers tools). The section title and the grouping itself are
|
|
6122
|
+
* data — the library renders whatever grouping it is given.
|
|
6123
|
+
*/
|
|
6124
|
+
interface MosaicToolToggleListSection {
|
|
6125
|
+
/** Stable identifier for the section. */
|
|
6126
|
+
id: string;
|
|
6127
|
+
/** Host-supplied, host-localized section heading. */
|
|
6128
|
+
title: string;
|
|
6129
|
+
/** Ordered ids of the tools that belong to this section. */
|
|
6130
|
+
toolIds: string[];
|
|
6131
|
+
}
|
|
6132
|
+
interface MosaicToolToggleListProps {
|
|
6133
|
+
/** Host-defined groupings of tools, rendered in order. */
|
|
6134
|
+
sections: MosaicToolToggleListSection[];
|
|
6135
|
+
/** Full open catalogue of tools — a PROP, never a library constant. */
|
|
6136
|
+
tools: MosaicToolToggleListTool[];
|
|
6137
|
+
/** Open catalogue of approval levels — a PROP, never a library constant. */
|
|
6138
|
+
approvalLevels: MosaicToolToggleListApprovalLevel[];
|
|
6139
|
+
/** Called when a tool's enable switch is toggled. */
|
|
6140
|
+
onToggleTool: (toolId: string, enabled: boolean) => void;
|
|
6141
|
+
/** Called when a tool's approval level is changed. */
|
|
6142
|
+
onChangeApproval: (toolId: string, approvalLevelId: string) => void;
|
|
6143
|
+
/** Per-tool accessible name for the enable/disable switch. Required, no default. */
|
|
6144
|
+
toggleAriaLabel: (toolName: string) => string;
|
|
6145
|
+
/** Per-tool accessible name for the approval-level selector. Required, no default. */
|
|
6146
|
+
approvalSelectAriaLabel: (toolName: string) => string;
|
|
6147
|
+
/** Additional Tailwind classes on the root element. */
|
|
6148
|
+
className?: string;
|
|
6149
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
6150
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
6151
|
+
}
|
|
6152
|
+
/**
|
|
6153
|
+
* MosaicToolToggleList — production tool-permissions atom for
|
|
6154
|
+
* @vantageos/mosaic-blocks.
|
|
6155
|
+
*
|
|
6156
|
+
* Purely presentational: renders one row per tool (switch + approval
|
|
6157
|
+
* selector), grouped under host-supplied section headings, and reports
|
|
6158
|
+
* every change via callbacks. No network call, no internal persisted
|
|
6159
|
+
* state, no hardcoded tool catalogue.
|
|
6160
|
+
*/
|
|
6161
|
+
declare function MosaicToolToggleList({ sections, tools, approvalLevels, onToggleTool, onChangeApproval, toggleAriaLabel, approvalSelectAriaLabel, className, ref, }: MosaicToolToggleListProps): React.JSX.Element;
|
|
6162
|
+
declare namespace MosaicToolToggleList {
|
|
6163
|
+
var displayName: string;
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* toolToggleListVariants — pure CVA variant functions for MosaicToolToggleList.
|
|
6168
|
+
*
|
|
6169
|
+
* Isolated in their own module so they can be re-exported from the
|
|
6170
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
6171
|
+
*
|
|
6172
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
6173
|
+
*/
|
|
6174
|
+
/** Section header container. */
|
|
6175
|
+
declare const toolToggleListSectionVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6176
|
+
/** One tool row — enabled vs. disabled tone. */
|
|
6177
|
+
declare const toolToggleListRowVariants: (props?: ({
|
|
6178
|
+
enabled?: boolean | null | undefined;
|
|
6179
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
6180
|
+
|
|
6181
|
+
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { Menu } from '@base-ui/react/menu';
|
|
|
27
27
|
import { AlertDialog } from '@base-ui/react/alert-dialog';
|
|
28
28
|
|
|
29
29
|
// src/version.ts
|
|
30
|
-
var version = "0.5.
|
|
30
|
+
var version = "0.5.10-alpha";
|
|
31
31
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
32
32
|
return /* @__PURE__ */ jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
33
33
|
}
|
|
@@ -12279,7 +12279,220 @@ function MosaicApprovalPrompt(props) {
|
|
|
12279
12279
|
);
|
|
12280
12280
|
}
|
|
12281
12281
|
MosaicApprovalPrompt.displayName = "MosaicApprovalPrompt";
|
|
12282
|
+
var toolToggleListSectionVariants = cva(["flex flex-col gap-2"], {
|
|
12283
|
+
variants: {}
|
|
12284
|
+
});
|
|
12285
|
+
var toolToggleListRowVariants = cva(
|
|
12286
|
+
[
|
|
12287
|
+
"flex flex-col gap-3 rounded-lg border p-3 transition-colors sm:flex-row sm:items-center sm:justify-between"
|
|
12288
|
+
],
|
|
12289
|
+
{
|
|
12290
|
+
variants: {
|
|
12291
|
+
enabled: {
|
|
12292
|
+
true: "border-border bg-card",
|
|
12293
|
+
false: "border-border bg-card/50 opacity-70"
|
|
12294
|
+
}
|
|
12295
|
+
},
|
|
12296
|
+
defaultVariants: {
|
|
12297
|
+
enabled: true
|
|
12298
|
+
}
|
|
12299
|
+
}
|
|
12300
|
+
);
|
|
12301
|
+
function cn78(...classes) {
|
|
12302
|
+
return classes.filter(Boolean).join(" ");
|
|
12303
|
+
}
|
|
12304
|
+
function MosaicToolToggleList({
|
|
12305
|
+
sections,
|
|
12306
|
+
tools,
|
|
12307
|
+
approvalLevels,
|
|
12308
|
+
onToggleTool,
|
|
12309
|
+
onChangeApproval,
|
|
12310
|
+
toggleAriaLabel,
|
|
12311
|
+
approvalSelectAriaLabel,
|
|
12312
|
+
className,
|
|
12313
|
+
ref
|
|
12314
|
+
}) {
|
|
12315
|
+
const toolsById = new Map(tools.map((tool) => [tool.id, tool]));
|
|
12316
|
+
const approvalLabelById = new Map(approvalLevels.map((level) => [level.id, level.label]));
|
|
12317
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn78("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxs(
|
|
12318
|
+
"div",
|
|
12319
|
+
{
|
|
12320
|
+
"data-slot": "tool-toggle-list-section",
|
|
12321
|
+
className: toolToggleListSectionVariants(),
|
|
12322
|
+
children: [
|
|
12323
|
+
/* @__PURE__ */ jsx(
|
|
12324
|
+
"h3",
|
|
12325
|
+
{
|
|
12326
|
+
"data-slot": "tool-toggle-list-section-title",
|
|
12327
|
+
className: "text-sm font-semibold text-foreground",
|
|
12328
|
+
children: section.title
|
|
12329
|
+
}
|
|
12330
|
+
),
|
|
12331
|
+
section.toolIds.map((toolId) => {
|
|
12332
|
+
const tool = toolsById.get(toolId);
|
|
12333
|
+
if (!tool) return null;
|
|
12334
|
+
return /* @__PURE__ */ jsxs(
|
|
12335
|
+
"div",
|
|
12336
|
+
{
|
|
12337
|
+
"data-slot": "tool-toggle-list-row",
|
|
12338
|
+
className: toolToggleListRowVariants({ enabled: tool.enabled }),
|
|
12339
|
+
children: [
|
|
12340
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12341
|
+
/* @__PURE__ */ jsx(
|
|
12342
|
+
Switch.Root,
|
|
12343
|
+
{
|
|
12344
|
+
checked: tool.enabled,
|
|
12345
|
+
onCheckedChange: (checked) => onToggleTool(tool.id, checked),
|
|
12346
|
+
"aria-label": toggleAriaLabel(tool.name),
|
|
12347
|
+
"data-slot": "tool-toggle-list-switch",
|
|
12348
|
+
className: cn78(
|
|
12349
|
+
"relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
|
|
12350
|
+
"rounded-full border-2 border-transparent outline-none",
|
|
12351
|
+
"bg-muted transition-colors",
|
|
12352
|
+
"data-[checked]:bg-foreground",
|
|
12353
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]"
|
|
12354
|
+
),
|
|
12355
|
+
children: /* @__PURE__ */ jsx(
|
|
12356
|
+
Switch.Thumb,
|
|
12357
|
+
{
|
|
12358
|
+
"data-slot": "tool-toggle-list-switch-thumb",
|
|
12359
|
+
className: cn78(
|
|
12360
|
+
"pointer-events-none block h-4 w-4 rounded-full",
|
|
12361
|
+
"bg-background shadow-sm",
|
|
12362
|
+
"translate-x-0 transition-transform",
|
|
12363
|
+
"data-[checked]:translate-x-5"
|
|
12364
|
+
)
|
|
12365
|
+
}
|
|
12366
|
+
)
|
|
12367
|
+
}
|
|
12368
|
+
),
|
|
12369
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
12370
|
+
/* @__PURE__ */ jsx(
|
|
12371
|
+
"span",
|
|
12372
|
+
{
|
|
12373
|
+
"data-slot": "tool-toggle-list-name",
|
|
12374
|
+
className: "text-sm font-medium text-foreground",
|
|
12375
|
+
children: tool.name
|
|
12376
|
+
}
|
|
12377
|
+
),
|
|
12378
|
+
/* @__PURE__ */ jsx(
|
|
12379
|
+
"span",
|
|
12380
|
+
{
|
|
12381
|
+
"data-slot": "tool-toggle-list-description",
|
|
12382
|
+
className: "text-sm text-muted-foreground",
|
|
12383
|
+
children: tool.description
|
|
12384
|
+
}
|
|
12385
|
+
)
|
|
12386
|
+
] })
|
|
12387
|
+
] }),
|
|
12388
|
+
/* @__PURE__ */ jsxs(
|
|
12389
|
+
Select.Root,
|
|
12390
|
+
{
|
|
12391
|
+
value: tool.approvalLevelId,
|
|
12392
|
+
onValueChange: (value) => {
|
|
12393
|
+
if (value !== null) onChangeApproval(tool.id, value);
|
|
12394
|
+
},
|
|
12395
|
+
children: [
|
|
12396
|
+
/* @__PURE__ */ jsxs(
|
|
12397
|
+
Select.Trigger,
|
|
12398
|
+
{
|
|
12399
|
+
"aria-label": approvalSelectAriaLabel(tool.name),
|
|
12400
|
+
"data-slot": "tool-toggle-list-approval-trigger",
|
|
12401
|
+
className: cn78(
|
|
12402
|
+
"inline-flex h-9 min-w-[10rem] items-center justify-between gap-2",
|
|
12403
|
+
"rounded-md border border-border bg-background px-3 py-2",
|
|
12404
|
+
"text-sm text-foreground shadow-xs outline-none",
|
|
12405
|
+
"hover:bg-muted",
|
|
12406
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
12407
|
+
"data-[popup-open]:ring-ring data-[popup-open]:ring-[3px]"
|
|
12408
|
+
),
|
|
12409
|
+
children: [
|
|
12410
|
+
/* @__PURE__ */ jsx(Select.Value, { children: (val) => val != null ? approvalLabelById.get(val) : "" }),
|
|
12411
|
+
/* @__PURE__ */ jsx(Select.Icon, { className: "size-4 shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsx(ChevronDownIcon5, {}) })
|
|
12412
|
+
]
|
|
12413
|
+
}
|
|
12414
|
+
),
|
|
12415
|
+
/* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsx(
|
|
12416
|
+
Select.Popup,
|
|
12417
|
+
{
|
|
12418
|
+
"data-slot": "tool-toggle-list-approval-popup",
|
|
12419
|
+
className: cn78(
|
|
12420
|
+
"z-50 min-w-[10rem] overflow-hidden rounded-md border border-border",
|
|
12421
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
12422
|
+
"origin-[var(--transform-origin)]",
|
|
12423
|
+
"transition-[transform,scale,opacity]",
|
|
12424
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
12425
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
12426
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0"
|
|
12427
|
+
),
|
|
12428
|
+
children: /* @__PURE__ */ jsx(Select.List, { children: approvalLevels.map((level) => /* @__PURE__ */ jsxs(
|
|
12429
|
+
Select.Item,
|
|
12430
|
+
{
|
|
12431
|
+
value: level.id,
|
|
12432
|
+
className: cn78(
|
|
12433
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
12434
|
+
"text-sm text-popover-foreground outline-none",
|
|
12435
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
12436
|
+
"data-[selected]:font-medium"
|
|
12437
|
+
),
|
|
12438
|
+
children: [
|
|
12439
|
+
/* @__PURE__ */ jsx(Select.ItemText, { children: level.label }),
|
|
12440
|
+
/* @__PURE__ */ jsx(Select.ItemIndicator, { className: "ml-auto size-4", children: /* @__PURE__ */ jsx(CheckIcon5, {}) })
|
|
12441
|
+
]
|
|
12442
|
+
},
|
|
12443
|
+
level.id
|
|
12444
|
+
)) })
|
|
12445
|
+
}
|
|
12446
|
+
) }) })
|
|
12447
|
+
]
|
|
12448
|
+
}
|
|
12449
|
+
)
|
|
12450
|
+
]
|
|
12451
|
+
},
|
|
12452
|
+
tool.id
|
|
12453
|
+
);
|
|
12454
|
+
})
|
|
12455
|
+
]
|
|
12456
|
+
},
|
|
12457
|
+
section.id
|
|
12458
|
+
)) });
|
|
12459
|
+
}
|
|
12460
|
+
MosaicToolToggleList.displayName = "MosaicToolToggleList";
|
|
12461
|
+
function ChevronDownIcon5() {
|
|
12462
|
+
return /* @__PURE__ */ jsx(
|
|
12463
|
+
"svg",
|
|
12464
|
+
{
|
|
12465
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12466
|
+
viewBox: "0 0 24 24",
|
|
12467
|
+
fill: "none",
|
|
12468
|
+
stroke: "currentColor",
|
|
12469
|
+
strokeWidth: "2",
|
|
12470
|
+
strokeLinecap: "round",
|
|
12471
|
+
strokeLinejoin: "round",
|
|
12472
|
+
"aria-hidden": "true",
|
|
12473
|
+
className: "size-4",
|
|
12474
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
12475
|
+
}
|
|
12476
|
+
);
|
|
12477
|
+
}
|
|
12478
|
+
function CheckIcon5() {
|
|
12479
|
+
return /* @__PURE__ */ jsx(
|
|
12480
|
+
"svg",
|
|
12481
|
+
{
|
|
12482
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12483
|
+
viewBox: "0 0 24 24",
|
|
12484
|
+
fill: "none",
|
|
12485
|
+
stroke: "currentColor",
|
|
12486
|
+
strokeWidth: "2",
|
|
12487
|
+
strokeLinecap: "round",
|
|
12488
|
+
strokeLinejoin: "round",
|
|
12489
|
+
"aria-hidden": "true",
|
|
12490
|
+
className: "size-4",
|
|
12491
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
12492
|
+
}
|
|
12493
|
+
);
|
|
12494
|
+
}
|
|
12282
12495
|
|
|
12283
|
-
export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentCard, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentTeamPreview, MosaicAnimatedList, MosaicAppSidebar, MosaicApprovalPrompt, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicChatComposer, MosaicChatMessage, MosaicChatThread, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDocumentUpload, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarkdown, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMemoryCard, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTemplateCard, MosaicTemplateGallery, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUrlScraper, MosaicUserButton, Placeholder, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
|
12496
|
+
export { MosaicAccordion, MosaicAccordionItem, MosaicAccordionPanel, MosaicAccordionTrigger, MosaicActivityFeed, MosaicActivityItem, MosaicAdaptiveGrid, MosaicAdaptiveModal, MosaicAdaptiveNavigation, MosaicAgentCard, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, MosaicAgentTeamPreview, MosaicAnimatedList, MosaicAppSidebar, MosaicApprovalPrompt, MosaicAvatar, MosaicBadge, MosaicBlurredOrb, MosaicButton, MosaicCard, MosaicCardContent, MosaicCardDescription, MosaicCardFooter, MosaicCardHeader, MosaicCardTitle, MosaicChatComposer, MosaicChatMessage, MosaicChatThread, MosaicCheckbox, MosaicClerkOrgSwitcher, MosaicClerkWebhookHandler, MosaicCollapsible, MosaicCollapsiblePanel, MosaicCollapsibleTrigger, MosaicCombobox, MosaicCounter, MosaicCreateOrgDialog, MosaicDashboardContent, MosaicDashboardHeader, MosaicDashboardLayout, MosaicDataTable, MosaicDeleteConfirmationDialog, MosaicDeviceProvider, MosaicDocumentUpload, MosaicDropdownMenu, MosaicEmptyState, MosaicFallingPattern, MosaicFeature3Col, MosaicFeatureCenteredMedia, MosaicField, MosaicFieldControl, MosaicFieldDescription, MosaicFieldError, MosaicFieldLabel, MosaicFilterBar, MosaicFilterSidebar, MosaicFooterSimple, MosaicHeroSplit, MosaicInput, MosaicInputGroup, MosaicIntegrationsBadge, MosaicInviteMemberDialog, MosaicKanbanBoard, MosaicKanbanColumn, MosaicLogosGrid, MosaicMainNav, MosaicMarkdown, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, MosaicMemberList, MosaicMemoryCard, MosaicMessageCard, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, MosaicModuleCard, MosaicModuleForm, MosaicModuleLibrary, MosaicMultiOrgIndicator, MosaicMultiTenantProvider, MosaicNavbar, MosaicOrgPanel, MosaicOrgProfilePage, MosaicOrgRoleBadge, MosaicOrgSwitcher, MosaicPreferencesPanel, MosaicPricingCard, MosaicProfilePanel, MosaicProgress, MosaicQuickActionCard, MosaicQuickActionsMenu, MosaicQuickAgentSelector, MosaicQuickStartPanel, MosaicRadioGroup, MosaicRadioGroupItem, MosaicScrollArea, MosaicSelect, MosaicSelectorModal, MosaicSeparator, MosaicSignInLayout, MosaicSignUpLayout, MosaicSkeleton, MosaicSlider, MosaicStatsGrid, MosaicStepPipeline, MosaicSwitch, MosaicTabs, MosaicTabsList, MosaicTabsPanel, MosaicTabsTrigger, MosaicTemplateCard, MosaicTemplateGallery, MosaicTemplatePreview, MosaicTestimonialsGrid, MosaicTextarea, MosaicThemeProvider, MosaicThemeToggle, MosaicToolToggleList, MosaicTooltip, MosaicTooltipContent, MosaicTooltipProvider, MosaicTooltipRoot, MosaicTooltipTrigger, MosaicUrlScraper, MosaicUserButton, Placeholder, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
|
12284
12497
|
//# sourceMappingURL=index.js.map
|
|
12285
12498
|
//# sourceMappingURL=index.js.map
|