canvas-ui-sdk 0.3.17 → 0.3.19
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 +30 -75
- package/dist/index.js +550 -676
- package/dist/index.js.map +1 -1
- package/mcp/dist/index.js +2 -32
- package/package.json +1 -4
- package/registry/blocks/content-dropzone.json +2 -2
- package/registry/blocks/filter-popover.json +1 -1
- package/registry/blocks/fixed-column-data-table.json +1 -1
- package/registry/blocks/menufocus-template.json +1 -1
- package/registry/blocks/nested-comments-table.json +1 -1
- package/registry/blocks/nested-data-table.json +1 -1
- package/registry/blocks/page-previews.json +4 -14
- package/registry/blocks/standard-data-table.json +1 -1
- package/registry/blocks/title-group.json +1 -1
- package/registry/blocks/video-chat-controls.json +1 -1
- package/registry/blocks/video-playlist.json +1 -1
- package/registry/hooks/use-css-variable-sync.json +1 -1
- package/registry/index.json +1 -16
- package/registry/layout/dashboard-shell.json +1 -1
- package/registry/layout/header.json +1 -1
- package/registry/ui/checkbox.json +1 -1
- package/registry/ui/dialog.json +1 -1
- package/registry/ui/dropdown-menu.json +1 -1
- package/registry/ui/file-uploader.json +1 -1
- package/registry/ui/image-uploader.json +1 -1
- package/registry/ui/multiselect-checkbox-field.json +1 -1
- package/registry/ui/radio-group.json +1 -1
- package/registry/ui/select.json +1 -1
- package/registry/ui/sheet.json +1 -1
- package/registry/ui/slider.json +1 -1
- package/registry/ui/switch.json +1 -1
- package/registry/blocks/canvas-item.json +0 -18
- package/registry/blocks/component-palette.json +0 -21
- package/registry/blocks/infinity-canvas.json +0 -58
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
3
|
+
import React__default, { ReactNode } from 'react';
|
|
4
4
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -1370,7 +1370,7 @@ interface ContentDropzoneProps {
|
|
|
1370
1370
|
*
|
|
1371
1371
|
* A placeholder component representing where content blocks would be inserted.
|
|
1372
1372
|
* When empty, shows a dashed border placeholder.
|
|
1373
|
-
* When children are added, becomes a flex column with
|
|
1373
|
+
* When children are added, becomes a flex column with 32px (--spacing-4xl) gap between blocks.
|
|
1374
1374
|
*/
|
|
1375
1375
|
declare function ContentDropzone({ height, className, children, }: ContentDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
1376
1376
|
|
|
@@ -2966,47 +2966,6 @@ interface CreditCardDisplayProps {
|
|
|
2966
2966
|
*/
|
|
2967
2967
|
declare function CreditCardDisplay({ cardType, lastFourDigits, cardholderName, expiryDate, className, }: CreditCardDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2968
2968
|
|
|
2969
|
-
interface CanvasItemData {
|
|
2970
|
-
id: string;
|
|
2971
|
-
componentType: string;
|
|
2972
|
-
x: number;
|
|
2973
|
-
y: number;
|
|
2974
|
-
width?: number;
|
|
2975
|
-
height?: number;
|
|
2976
|
-
}
|
|
2977
|
-
interface CanvasItemProps {
|
|
2978
|
-
item: CanvasItemData;
|
|
2979
|
-
isSelected: boolean;
|
|
2980
|
-
onSelect: (id: string) => void;
|
|
2981
|
-
onDelete: (id: string) => void;
|
|
2982
|
-
onDragStart: (id: string, startX: number, startY: number, itemX: number, itemY: number) => void;
|
|
2983
|
-
scale: number;
|
|
2984
|
-
children: React.ReactNode;
|
|
2985
|
-
}
|
|
2986
|
-
/**
|
|
2987
|
-
* Canvas Item - Wrapper for components placed on the infinity canvas
|
|
2988
|
-
*
|
|
2989
|
-
* Handles:
|
|
2990
|
-
* - Absolute positioning based on x, y coordinates
|
|
2991
|
-
* - Selection state with visual border
|
|
2992
|
-
* - Drag handle for repositioning
|
|
2993
|
-
* - Delete button when selected
|
|
2994
|
-
*/
|
|
2995
|
-
declare function CanvasItem({ item, isSelected, onSelect, onDelete, onDragStart, scale, children, }: CanvasItemProps): react_jsx_runtime.JSX.Element;
|
|
2996
|
-
|
|
2997
|
-
interface ComponentPaletteProps {
|
|
2998
|
-
className?: string;
|
|
2999
|
-
}
|
|
3000
|
-
/**
|
|
3001
|
-
* Component Palette - Sidebar with draggable components
|
|
3002
|
-
*
|
|
3003
|
-
* Features:
|
|
3004
|
-
* - Organized by category (Page Templates, Blocks, Components)
|
|
3005
|
-
* - Collapsible sections
|
|
3006
|
-
* - Drag to add to canvas
|
|
3007
|
-
*/
|
|
3008
|
-
declare function ComponentPalette({ className }: ComponentPaletteProps): react_jsx_runtime.JSX.Element;
|
|
3009
|
-
|
|
3010
2969
|
interface ComponentOption {
|
|
3011
2970
|
id: string;
|
|
3012
2971
|
name: string;
|
|
@@ -4228,8 +4187,8 @@ declare const blocks: {
|
|
|
4228
4187
|
};
|
|
4229
4188
|
readonly ContentDropzone: {
|
|
4230
4189
|
readonly path: "@/components/blocks";
|
|
4231
|
-
readonly description: "Placeholder dropzone for content areas
|
|
4232
|
-
readonly props: readonly ["
|
|
4190
|
+
readonly description: "Placeholder dropzone for content areas. Shows dashed placeholder when empty; arranges children in a flex column with 32px (--spacing-4xl) gap between blocks. Within a block, use 12px (--spacing-lg) gap between title groups and their content.";
|
|
4191
|
+
readonly props: readonly ["height?", "className?", "children?"];
|
|
4233
4192
|
};
|
|
4234
4193
|
readonly UpvotingPostsTable: {
|
|
4235
4194
|
readonly path: "@/components/blocks";
|
|
@@ -4349,23 +4308,6 @@ declare const groupModalDrawerBlocks: {
|
|
|
4349
4308
|
readonly props: readonly ["title?", "description?", "rows?: FormRowConfig[]", "sortOptions?", "filterOptions?", "inputSize?: 'sm' | 'default' | 'lg'", "onAddNew?", "onCancel?", "onSave?", "onFieldChange?", "showHeader?", "showFooter?"];
|
|
4350
4309
|
};
|
|
4351
4310
|
};
|
|
4352
|
-
declare const canvasBlocks: {
|
|
4353
|
-
readonly InfinityCanvas: {
|
|
4354
|
-
readonly path: "@/components/blocks";
|
|
4355
|
-
readonly description: "Pannable, zoomable infinite canvas for placing components. Supports drag-and-drop from palette.";
|
|
4356
|
-
readonly props: readonly ["items: CanvasItemData[]", "onItemsChange", "selectedId", "onSelectItem"];
|
|
4357
|
-
};
|
|
4358
|
-
readonly ComponentPalette: {
|
|
4359
|
-
readonly path: "@/components/blocks";
|
|
4360
|
-
readonly description: "Sidebar listing draggable components grouped by category. Used with InfinityCanvas.";
|
|
4361
|
-
readonly props: readonly ["className?"];
|
|
4362
|
-
};
|
|
4363
|
-
readonly CanvasItem: {
|
|
4364
|
-
readonly path: "@/components/blocks";
|
|
4365
|
-
readonly description: "Wrapper for components placed on the infinity canvas. Handles positioning and selection.";
|
|
4366
|
-
readonly props: readonly ["item: CanvasItemData", "isSelected", "onSelect", "onDelete", "children"];
|
|
4367
|
-
};
|
|
4368
|
-
};
|
|
4369
4311
|
declare const videoBlocks: {
|
|
4370
4312
|
readonly VideoChatControls: {
|
|
4371
4313
|
readonly path: "@/components/blocks";
|
|
@@ -4632,12 +4574,6 @@ declare const pageTemplates: {
|
|
|
4632
4574
|
readonly shell: "custom (no shell)";
|
|
4633
4575
|
readonly blocks: readonly ["VideoContentSection", "VideoPlaylist", "YouTubePlayer"];
|
|
4634
4576
|
};
|
|
4635
|
-
readonly "page-canvas": {
|
|
4636
|
-
readonly path: "/page-canvas";
|
|
4637
|
-
readonly description: "Figma-style infinite canvas whiteboard. Drag components from sidebar palette onto a pannable, zoomable canvas.";
|
|
4638
|
-
readonly shell: "custom (no shell)";
|
|
4639
|
-
readonly blocks: readonly ["InfinityCanvas", "ComponentPalette", "CanvasItem", "Header"];
|
|
4640
|
-
};
|
|
4641
4577
|
};
|
|
4642
4578
|
|
|
4643
4579
|
/**
|
|
@@ -4663,13 +4599,24 @@ declare function removeCSSVariables(names: string[]): void;
|
|
|
4663
4599
|
*/
|
|
4664
4600
|
declare function broadcastCSSVariables(variables: Record<string, string>): void;
|
|
4665
4601
|
/**
|
|
4666
|
-
*
|
|
4667
|
-
|
|
4602
|
+
* Broadcasts branding changes to all iframes via postMessage
|
|
4603
|
+
*/
|
|
4604
|
+
declare function broadcastBranding(branding: Record<string, string> | null): void;
|
|
4605
|
+
/**
|
|
4606
|
+
* Broadcasts image changes to all iframes via postMessage
|
|
4607
|
+
*/
|
|
4608
|
+
declare function broadcastImages(images: Record<string, string> | null): void;
|
|
4609
|
+
/**
|
|
4610
|
+
* Sets up a listener for CSS variable, branding, and image updates from parent window.
|
|
4611
|
+
* Call this in page layouts that might be rendered in iframes.
|
|
4668
4612
|
*/
|
|
4669
|
-
declare function setupCSSVariableListener(
|
|
4613
|
+
declare function setupCSSVariableListener(options?: {
|
|
4614
|
+
onBrandingUpdate?: (branding: Record<string, string> | null) => void;
|
|
4615
|
+
onImagesUpdate?: (images: Record<string, string> | null) => void;
|
|
4616
|
+
}): () => void;
|
|
4670
4617
|
|
|
4671
4618
|
/**
|
|
4672
|
-
* Hook that listens for CSS variable updates from parent window.
|
|
4619
|
+
* Hook that listens for CSS variable, branding, and image updates from parent window.
|
|
4673
4620
|
* Use this in page layouts that might be rendered in iframes.
|
|
4674
4621
|
*
|
|
4675
4622
|
* @example
|
|
@@ -4680,7 +4627,10 @@ declare function setupCSSVariableListener(): () => void;
|
|
|
4680
4627
|
* }
|
|
4681
4628
|
* ```
|
|
4682
4629
|
*/
|
|
4683
|
-
declare function useCSSVariableSync(
|
|
4630
|
+
declare function useCSSVariableSync(options?: {
|
|
4631
|
+
onBrandingUpdate?: (branding: Record<string, string> | null) => void;
|
|
4632
|
+
onImagesUpdate?: (images: Record<string, string> | null) => void;
|
|
4633
|
+
}): void;
|
|
4684
4634
|
|
|
4685
4635
|
declare function useIsMobile(): boolean;
|
|
4686
4636
|
|
|
@@ -4785,6 +4735,7 @@ interface ThemeState {
|
|
|
4785
4735
|
setBrandVibrancy: (vibrancy: number) => void;
|
|
4786
4736
|
setSyncRelatedColors: (sync: boolean) => void;
|
|
4787
4737
|
applyBrandHueVibrancy: (hue: number, vibrancy: number, skipPrimary?: boolean) => void;
|
|
4738
|
+
hasCustomizations: boolean;
|
|
4788
4739
|
}
|
|
4789
4740
|
|
|
4790
4741
|
type PanelId = "colors" | "images" | "typography" | "buttons" | "inputs" | "export";
|
|
@@ -4811,8 +4762,12 @@ interface ThemeDrawerProps {
|
|
|
4811
4762
|
title?: string;
|
|
4812
4763
|
width?: number;
|
|
4813
4764
|
readOnly?: boolean;
|
|
4765
|
+
hideSave?: boolean;
|
|
4766
|
+
docked?: boolean;
|
|
4767
|
+
stickyTopOffset?: number;
|
|
4768
|
+
children?: React__default.ReactNode;
|
|
4814
4769
|
}
|
|
4815
|
-
declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, onSave, initialOverrides, initialBranding, initialImages, initialCustomButtonStyles, storageKey, title, width, readOnly, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
4770
|
+
declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, onSave, initialOverrides, initialBranding, initialImages, initialCustomButtonStyles, storageKey, title, width, readOnly, hideSave, docked, stickyTopOffset, children, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
|
|
4816
4771
|
|
|
4817
4772
|
interface HslColorPickerProps {
|
|
4818
4773
|
value: string;
|
|
@@ -4837,4 +4792,4 @@ interface ColorInputRowProps {
|
|
|
4837
4792
|
*/
|
|
4838
4793
|
declare function ColorInputRow({ label, value, onChange, variableOptions, }: ColorInputRowProps): react_jsx_runtime.JSX.Element;
|
|
4839
4794
|
|
|
4840
|
-
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, type BrandingState, Button, Calendar,
|
|
4795
|
+
export { AccountSettingsShell, type AccountTab, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, type BrandAsset, type BrandingState, Button, Calendar, CategoryGrid, CenteredHero, ChatBubble, type ChatBubbleMessage, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, type CircularProgressBarListProps, type CircularProgressBarProps, ColorInputRow, 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, 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, TitleGroup, type TitleGroupProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, UpvotingPostsTable, type VariableOption, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastBranding, broadcastCSSVariables, broadcastImages, buttonVariants, 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 };
|