canvas-ui-sdk 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +71 -3
- package/dist/index.js +2738 -296
- package/dist/index.js.map +1 -1
- package/mcp/dist/index.js +5 -1
- package/package.json +1 -1
- package/styles/tokens.reference.css +35 -3
package/dist/index.d.ts
CHANGED
|
@@ -4670,6 +4670,8 @@ interface ThemeContextValue {
|
|
|
4670
4670
|
interface PreviewBrandingContextValue {
|
|
4671
4671
|
previewBranding: ThemeBranding | null;
|
|
4672
4672
|
setPreviewBranding: (branding: ThemeBranding | null) => void;
|
|
4673
|
+
previewImages: ThemeImages | null;
|
|
4674
|
+
setPreviewImages: (images: ThemeImages | null) => void;
|
|
4673
4675
|
}
|
|
4674
4676
|
declare const ThemeContext: React$1.Context<ThemeContextValue>;
|
|
4675
4677
|
declare const PreviewBrandingContext: React$1.Context<PreviewBrandingContextValue>;
|
|
@@ -4704,16 +4706,82 @@ interface ThemeProviderProps {
|
|
|
4704
4706
|
*/
|
|
4705
4707
|
declare function ThemeProvider({ children, images, branding, brandAssets, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
4706
4708
|
|
|
4707
|
-
|
|
4709
|
+
interface BrandingState {
|
|
4710
|
+
iconShape: IconShapeId$1;
|
|
4711
|
+
iconName: string;
|
|
4712
|
+
bgColor: string;
|
|
4713
|
+
iconColor: string;
|
|
4714
|
+
wordmark: string;
|
|
4715
|
+
}
|
|
4716
|
+
interface ThemeState {
|
|
4717
|
+
variables: Record<string, string>;
|
|
4718
|
+
overrides: Record<string, string>;
|
|
4719
|
+
isDirty: boolean;
|
|
4720
|
+
unsavedChangesCount: number;
|
|
4721
|
+
setVariable: (name: string, value: string) => void;
|
|
4722
|
+
resetCategory: (prefix: string) => void;
|
|
4723
|
+
resetAll: () => void;
|
|
4724
|
+
exportCSS: () => string;
|
|
4725
|
+
exportJSON: () => string;
|
|
4726
|
+
importJSON: (json: string) => boolean;
|
|
4727
|
+
save: () => void;
|
|
4728
|
+
discard: () => void;
|
|
4729
|
+
branding: BrandingState;
|
|
4730
|
+
setBranding: (updates: Partial<BrandingState>) => void;
|
|
4731
|
+
images: Record<ImageKey, string>;
|
|
4732
|
+
setImage: (key: ImageKey, url: string) => void;
|
|
4733
|
+
deleteImage: (key: ImageKey) => void;
|
|
4734
|
+
customButtonStyles: CustomButtonStyle[];
|
|
4735
|
+
addCustomButtonStyle: () => void;
|
|
4736
|
+
updateCustomButtonStyle: (id: string, updates: Partial<CustomButtonStyle>) => void;
|
|
4737
|
+
deleteCustomButtonStyle: (id: string) => void;
|
|
4738
|
+
brandHue: number;
|
|
4739
|
+
brandVibrancy: number;
|
|
4740
|
+
syncRelatedColors: boolean;
|
|
4741
|
+
setBrandHue: (hue: number) => void;
|
|
4742
|
+
setBrandVibrancy: (vibrancy: number) => void;
|
|
4743
|
+
setSyncRelatedColors: (sync: boolean) => void;
|
|
4744
|
+
applyBrandHueVibrancy: (hue: number, vibrancy: number, skipPrimary?: boolean) => void;
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4747
|
+
type PanelId = "colors" | "images" | "typography" | "buttons" | "inputs" | "export";
|
|
4708
4748
|
interface ThemeDrawerProps {
|
|
4709
4749
|
devOnly?: boolean;
|
|
4710
4750
|
triggerPosition?: "bottom-right" | "bottom-left";
|
|
4711
4751
|
defaultOpen?: boolean;
|
|
4712
4752
|
panels?: PanelId[];
|
|
4713
4753
|
onThemeChange?: (overrides: Record<string, string>) => void;
|
|
4754
|
+
onBrandingChange?: (branding: BrandingState) => void;
|
|
4755
|
+
onImagesChange?: (images: Record<ImageKey, string>) => void;
|
|
4756
|
+
onImageUpload?: (key: ImageKey, file: File) => Promise<string>;
|
|
4714
4757
|
initialOverrides?: Record<string, string>;
|
|
4715
4758
|
storageKey?: string;
|
|
4759
|
+
title?: string;
|
|
4760
|
+
width?: number;
|
|
4761
|
+
}
|
|
4762
|
+
declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, initialOverrides, storageKey, title, width, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
4763
|
+
|
|
4764
|
+
interface HslColorPickerProps {
|
|
4765
|
+
value: string;
|
|
4766
|
+
onChange: (hex: string) => void;
|
|
4767
|
+
}
|
|
4768
|
+
declare function HslColorPicker({ value, onChange }: HslColorPickerProps): react_jsx_runtime.JSX.Element;
|
|
4769
|
+
|
|
4770
|
+
interface VariableOption {
|
|
4771
|
+
value: string;
|
|
4772
|
+
label: string;
|
|
4716
4773
|
}
|
|
4717
|
-
|
|
4774
|
+
interface ColorInputRowProps {
|
|
4775
|
+
label: string;
|
|
4776
|
+
value: string;
|
|
4777
|
+
onChange: (value: string) => void;
|
|
4778
|
+
variableOptions?: VariableOption[];
|
|
4779
|
+
}
|
|
4780
|
+
/**
|
|
4781
|
+
* Reusable color row: swatch (opens HSL picker) + label + hex input.
|
|
4782
|
+
* When variableOptions is provided, shows a dropdown for CSS variable references
|
|
4783
|
+
* with a "Custom Color" option that enables the HSL picker.
|
|
4784
|
+
*/
|
|
4785
|
+
declare function ColorInputRow({ label, value, onChange, variableOptions, }: ColorInputRowProps): react_jsx_runtime.JSX.Element;
|
|
4718
4786
|
|
|
4719
|
-
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, Button, Calendar, CanvasItem, CategoryGrid, CenteredHero, ChatBubble, type ChatBubbleMessage, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, type CircularProgressBarListProps, type CircularProgressBarProps, ComponentPalette, ComponentSearch, ContentDropzone, ContentWithImage, CoreValuesGrid, CreditCardDisplay, CtaBanner, type CustomButtonStyle, CustomComponentHelper, DashboardShell, DateInput, DescriptionCard, DestinationCards, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DoubleSidebar, type DoubleSidebarSection, DoubleSidebarShell, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FaqAccordion, FaqsTable, FeatureWithImage, FeaturedNewsCards, FeaturedPlaces, FeaturesComparison, FileUploader, type FilterCheckboxGroupConfig, type FilterDateRangeConfig, type FilterDropdownConfig, type FilterOption$c as FilterOption, FilterPopover, type FilterState, FixedColumnDataTable, FlairBanner, FooterNavbar, FormGroup, GallerySection, GradientBanner, GridTilesList, Header, HeroDarkCentered, HeroDarkWithImage, HeroFullwidthImage, HeroSection, HowItWorks, type IconNavItemConfig, type IconShapeId, IconSidebar, IconSidebarShell, ImageFeedWithNestedComments, type ImageKey, ImageUploader, InfoCard, type InfoCardProps, Input, Label, LargeImageLabelsList, Sidebar as LayoutSidebar, type LineTab, LineTabs, type LinkItem, LinksCard, type LinksCardProps, Loader, LoginBrandingPanel, MenuSection, type MenufocusItem, MenufocusTemplate, type MenufocusTemplateProps, MessengerInput, MessengerSidebar, MetricsSection, MobileBottomNav, MobileMenuShell, type MobileNavTabConfig, MonthlyCalendarWidget, MultiselectCheckboxField, MultiselectTags, MultistepProgressBarShell, type MultistepProgressBarShellProps, type MultistepProgressBarStep, MultistepShell, MultistepSidebarShell, type NavItem, type NavSection, type NavTab, NestedCommentsTable, NestedDataTable, OfficeLocations, PageHeaderSection, Pagination, ParticipantList, type Persona, PersonaCard, PersonaGrid, PillTabs, type PillTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortfolioCard, PreviewBrandingContext, PricingCards, PricingCta, ProfileCard, ProfileGridTilesList, ProfileImageUploader, ProgressBar, type ProjectContext, ProjectContextShell, type ProjectContextTab, PromptChipsRow, PromptTemplate, RadioGroup, RadioGroupItem, RangeInput, ReviewsGrid, ReviewsTable, type Screen, type ScreenConnection, ScreenFlowchart, ScreenPromptBuilder, ScreenPromptTemplate, type ScreenStatus, type ScreenType, ScrollArea, ScrollBar, SearchBar, SearchBarShell, SearchSidebar, Searchbox, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectablePills, Separator, SettingsListRow, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar$1 as Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNav, SidebarProfileCard, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkillsCard, Slider, SlideshowGridTiles, SocialFeed, SocialProof, type SortOption$b as SortOption, StandardDataTable, StandardListWithImage, StandardPageShell, StatsCard, type Step, StepTracker, Switch, type TableColumn, type TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamCardsGrid, TeamCircularGrid, TestimonialCarousel, TextInput, Textarea, type ThemeBranding, ThemeContext, ThemeDrawer, type ThemeImages, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, UpvotingPostsTable, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastCSSVariables, buttonVariants, canvasBlocks, cn, colorVariables, defaultBranding, defaultButtonColorStyles, defaultButtonColors, defaultButtonSizes, defaultColors, defaultCustomButtonStyles, defaultDoubleSidebarSections, defaultIconNavItems, defaultImages, defaultInputSizes, defaultProgressBarSteps, defaultSteps, defaultSupportLinks, defaultTypography, defaultVerticalSteps, getChildScreens, getScreenUrl, getTopLevelScreens, groupModalDrawerBlocks, layoutPrimitives, layoutShells, marketingBlocks, pageTemplates, pricingBlocks, removeCSSVariables, setCSSVariable, setCSSVariables, setupCSSVariableListener, useCSSVariableSync, useIsMobile, usePreviewBranding, useSidebar, useThemeBrandAssets, useThemeBranding, useThemeImages, videoBlocks };
|
|
4787
|
+
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, type BrandingState, Button, Calendar, CanvasItem, CategoryGrid, CenteredHero, ChatBubble, type ChatBubbleMessage, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, type CircularProgressBarListProps, type CircularProgressBarProps, ColorInputRow, ComponentPalette, ComponentSearch, ContentDropzone, ContentWithImage, CoreValuesGrid, CreditCardDisplay, CtaBanner, type CustomButtonStyle, CustomComponentHelper, DashboardShell, DateInput, DescriptionCard, DestinationCards, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DoubleSidebar, type DoubleSidebarSection, DoubleSidebarShell, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FaqAccordion, FaqsTable, FeatureWithImage, FeaturedNewsCards, FeaturedPlaces, FeaturesComparison, FileUploader, type FilterCheckboxGroupConfig, type FilterDateRangeConfig, type FilterDropdownConfig, type FilterOption$c as FilterOption, FilterPopover, type FilterState, FixedColumnDataTable, FlairBanner, FooterNavbar, FormGroup, GallerySection, GradientBanner, GridTilesList, Header, HeroDarkCentered, HeroDarkWithImage, HeroFullwidthImage, HeroSection, HowItWorks, HslColorPicker, type IconNavItemConfig, type IconShapeId, IconSidebar, IconSidebarShell, ImageFeedWithNestedComments, type ImageKey, ImageUploader, InfoCard, type InfoCardProps, Input, Label, LargeImageLabelsList, Sidebar as LayoutSidebar, type LineTab, LineTabs, type LinkItem, LinksCard, type LinksCardProps, Loader, LoginBrandingPanel, MenuSection, type MenufocusItem, MenufocusTemplate, type MenufocusTemplateProps, MessengerInput, MessengerSidebar, MetricsSection, MobileBottomNav, MobileMenuShell, type MobileNavTabConfig, MonthlyCalendarWidget, MultiselectCheckboxField, MultiselectTags, MultistepProgressBarShell, type MultistepProgressBarShellProps, type MultistepProgressBarStep, MultistepShell, MultistepSidebarShell, type NavItem, type NavSection, type NavTab, NestedCommentsTable, NestedDataTable, OfficeLocations, PageHeaderSection, Pagination, ParticipantList, type Persona, PersonaCard, PersonaGrid, PillTabs, type PillTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortfolioCard, PreviewBrandingContext, PricingCards, PricingCta, ProfileCard, ProfileGridTilesList, ProfileImageUploader, ProgressBar, type ProjectContext, ProjectContextShell, type ProjectContextTab, PromptChipsRow, PromptTemplate, RadioGroup, RadioGroupItem, RangeInput, ReviewsGrid, ReviewsTable, type Screen, type ScreenConnection, ScreenFlowchart, ScreenPromptBuilder, ScreenPromptTemplate, type ScreenStatus, type ScreenType, ScrollArea, ScrollBar, SearchBar, SearchBarShell, SearchSidebar, Searchbox, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectablePills, Separator, SettingsListRow, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar$1 as Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNav, SidebarProfileCard, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkillsCard, Slider, SlideshowGridTiles, SocialFeed, SocialProof, type SortOption$b as SortOption, StandardDataTable, StandardListWithImage, StandardPageShell, StatsCard, type Step, StepTracker, Switch, type TableColumn, type TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamCardsGrid, TeamCircularGrid, TestimonialCarousel, TextInput, Textarea, type ThemeBranding, ThemeContext, ThemeDrawer, type ThemeImages, ThemeProvider, type ThemeState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, UpvotingPostsTable, type VariableOption, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastCSSVariables, buttonVariants, canvasBlocks, cn, colorVariables, defaultBranding, defaultButtonColorStyles, defaultButtonColors, defaultButtonSizes, defaultColors, defaultCustomButtonStyles, defaultDoubleSidebarSections, defaultIconNavItems, defaultImages, defaultInputSizes, defaultProgressBarSteps, defaultSteps, defaultSupportLinks, defaultTypography, defaultVerticalSteps, getChildScreens, getScreenUrl, getTopLevelScreens, groupModalDrawerBlocks, layoutPrimitives, layoutShells, marketingBlocks, pageTemplates, pricingBlocks, removeCSSVariables, setCSSVariable, setCSSVariables, setupCSSVariableListener, useCSSVariableSync, useIsMobile, usePreviewBranding, useSidebar, useThemeBrandAssets, useThemeBranding, useThemeImages, videoBlocks };
|