canvas-ui-sdk 0.2.0 → 0.3.1

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 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>;
@@ -4722,6 +4724,8 @@ interface ThemeState {
4722
4724
  exportCSS: () => string;
4723
4725
  exportJSON: () => string;
4724
4726
  importJSON: (json: string) => boolean;
4727
+ save: () => void;
4728
+ discard: () => void;
4725
4729
  branding: BrandingState;
4726
4730
  setBranding: (updates: Partial<BrandingState>) => void;
4727
4731
  images: Record<ImageKey, string>;
@@ -4750,12 +4754,21 @@ interface ThemeDrawerProps {
4750
4754
  onBrandingChange?: (branding: BrandingState) => void;
4751
4755
  onImagesChange?: (images: Record<ImageKey, string>) => void;
4752
4756
  onImageUpload?: (key: ImageKey, file: File) => Promise<string>;
4757
+ onSave?: (themeData: {
4758
+ overrides: Record<string, string>;
4759
+ branding: BrandingState;
4760
+ images: Record<ImageKey, string>;
4761
+ customButtonStyles: CustomButtonStyle[];
4762
+ }) => void;
4753
4763
  initialOverrides?: Record<string, string>;
4764
+ initialBranding?: BrandingState;
4765
+ initialImages?: Record<ImageKey, string>;
4766
+ initialCustomButtonStyles?: CustomButtonStyle[];
4754
4767
  storageKey?: string;
4755
4768
  title?: string;
4756
4769
  width?: number;
4757
4770
  }
4758
- declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, initialOverrides, storageKey, title, width, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
4771
+ declare function ThemeDrawer({ devOnly, triggerPosition, defaultOpen, panels: enabledPanels, onThemeChange, onBrandingChange, onImagesChange, onImageUpload, onSave, initialOverrides, initialBranding, initialImages, initialCustomButtonStyles, storageKey, title, width, }: ThemeDrawerProps): react_jsx_runtime.JSX.Element | null;
4759
4772
 
4760
4773
  interface HslColorPickerProps {
4761
4774
  value: string;