@teamflojo/floimg-studio-ui 0.5.0 → 0.5.2

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * CommandPalette - Raycast/Linear-style command palette
3
+ * Triggered by Cmd+K for quick action discovery and execution
4
+ */
5
+ interface CommandPaletteProps {
6
+ /** Callback to toggle AI Chat (since it's local state in App) */
7
+ onToggleAIChat?: () => void;
8
+ }
9
+ export declare function CommandPalette({ onToggleAIChat }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * ConfirmationDialog - Accessible confirmation modal
3
+ * Used for destructive actions like creating a new workflow with unsaved changes
4
+ */
5
+ interface ConfirmationDialogProps {
6
+ /** Whether the dialog is open */
7
+ isOpen: boolean;
8
+ /** Title of the dialog */
9
+ title: string;
10
+ /** Message/description */
11
+ message: string;
12
+ /** Confirm button text */
13
+ confirmText?: string;
14
+ /** Cancel button text */
15
+ cancelText?: string;
16
+ /** Callback when confirmed */
17
+ onConfirm: () => void;
18
+ /** Callback when cancelled */
19
+ onCancel: () => void;
20
+ /** Whether the action is destructive (changes button styling) */
21
+ destructive?: boolean;
22
+ }
23
+ export declare function ConfirmationDialog({ isOpen, title, message, confirmText, cancelText, onConfirm, onCancel, destructive, }: ConfirmationDialogProps): import("react/jsx-runtime").JSX.Element | null;
24
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * KeyBadge - Displays keyboard shortcut keys as styled badges
3
+ * Platform-aware (shows ⌘ on Mac, Ctrl on Windows)
4
+ */
5
+ interface KeyBadgeProps {
6
+ /** Shortcut binding string (e.g., 'mod+s', 'mod+shift+k') */
7
+ binding: string | null;
8
+ /** Optional additional className */
9
+ className?: string;
10
+ /** Size variant */
11
+ size?: "sm" | "md";
12
+ }
13
+ /**
14
+ * Displays a keyboard shortcut as styled key badges
15
+ * Automatically converts platform-agnostic bindings to platform-specific display
16
+ */
17
+ export declare function KeyBadge({ binding, className, size }: KeyBadgeProps): import("react/jsx-runtime").JSX.Element | null;
18
+ /**
19
+ * Displays a shortcut inline with action text
20
+ * Example: "Save Workflow" with "⌘S" badge
21
+ */
22
+ interface ShortcutLabelProps {
23
+ /** Action name */
24
+ label: string;
25
+ /** Shortcut binding */
26
+ binding: string | null;
27
+ /** Optional additional className for the container */
28
+ className?: string;
29
+ }
30
+ export declare function ShortcutLabel({ label, binding, className }: ShortcutLabelProps): import("react/jsx-runtime").JSX.Element;
31
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * KeyboardSettings - Customization UI for keyboard shortcuts
3
+ * Allows users to view and remap shortcuts
4
+ */
5
+ interface KeyboardSettingsProps {
6
+ /** Optional className */
7
+ className?: string;
8
+ }
9
+ export declare function KeyboardSettings({ className }: KeyboardSettingsProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * KeyboardShortcutsModal - Shows all available keyboard shortcuts
3
+ * Triggered by Cmd+? or clicking help
4
+ */
5
+ export declare function KeyboardShortcutsModal(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- export declare function NodeInspector(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function NodeInspector(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { NodeDefinition } from '@teamflojo/floimg-studio-shared';
3
+
4
+ export type NodePaletteColorVariant = "amber" | "blue" | "teal" | "pink" | "cyan" | "orange" | "emerald";
5
+ export interface NodePaletteItemProps {
6
+ /** The node definition to render */
7
+ definition: NodeDefinition;
8
+ /** Color variant for the palette item */
9
+ colorVariant: NodePaletteColorVariant;
10
+ /** Handler for drag start - receives the definition to serialize */
11
+ onDragStart: (e: React.DragEvent, definition: NodeDefinition) => void;
12
+ /** Handler for double-click - adds node to canvas */
13
+ onDoubleClick: (definition: NodeDefinition) => void;
14
+ /** Whether this node is disabled (prevents drag/add) */
15
+ disabled?: boolean;
16
+ /** Handler for when a disabled node is clicked */
17
+ onDisabledClick?: (definition: NodeDefinition) => void;
18
+ /** Custom badge to render (e.g., icon, tag) */
19
+ badge?: ReactNode;
20
+ /** Message to display instead of description when disabled */
21
+ alternateMessage?: string;
22
+ }
23
+ /**
24
+ * A single item in the node palette. Renders with themed CSS classes
25
+ * for consistent styling.
26
+ *
27
+ * Extension features (disabled state, badges) are opt-in via props.
28
+ */
29
+ export declare function NodePaletteItem({ definition, colorVariant, onDragStart, onDoubleClick, disabled, onDisabledClick, badge, alternateMessage, }: NodePaletteItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * ShortcutRecorder - VS Code-style keyboard shortcut recording widget
3
+ * Click to start recording, press keys to set, Escape to cancel
4
+ */
5
+ interface ShortcutRecorderProps {
6
+ /** Current binding value */
7
+ value: string | null;
8
+ /** Callback when binding changes */
9
+ onChange: (binding: string | null) => void;
10
+ /** Callback to check for conflicts */
11
+ onConflictCheck?: (binding: string) => string | null;
12
+ /** Whether the recorder is disabled */
13
+ disabled?: boolean;
14
+ /** Optional additional className */
15
+ className?: string;
16
+ }
17
+ export declare function ShortcutRecorder({ value, onChange, onConflictCheck, disabled, className, }: ShortcutRecorderProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  export { default as App } from './App';
3
3
  export { WorkflowEditor } from './editor/WorkflowEditor';
4
4
  export { NodePalette } from './components/NodePalette';
5
+ export { NodePaletteItem, type NodePaletteItemProps, type NodePaletteColorVariant, } from './components/NodePaletteItem';
5
6
  export { NodeInspector } from './components/NodeInspector';
6
7
  export { Toolbar, type ToolbarProps } from './components/Toolbar';
7
8
  export { Gallery } from './components/Gallery';
@@ -10,6 +11,12 @@ export { WorkflowLibrary } from './components/WorkflowLibrary';
10
11
  export { AISettings } from './components/AISettings';
11
12
  export { AIChat } from './components/AIChat';
12
13
  export { UploadGallery } from './components/UploadGallery';
14
+ export { CommandPalette } from './components/CommandPalette';
15
+ export { KeyboardShortcutsModal } from './components/KeyboardShortcutsModal';
16
+ export { useKeyboardShortcuts } from './lib/keyboard/useKeyboardShortcuts';
17
+ export { SHORTCUT_DEFINITIONS, CATEGORY_NAMES } from './lib/keyboard/shortcuts';
18
+ export type * from './lib/keyboard/types';
13
19
  export { useWorkflowStore } from './stores/workflowStore';
20
+ export { useSettingsStore } from './stores/settingsStore';
14
21
  export { coreTemplates as templates, getCoreCategories as getCategories, getCoreTemplatesByCategory as getTemplatesByCategory, getCoreTemplateById as getTemplateById, searchCoreTemplates as searchTemplates, resolveTemplate, type Template, } from '@teamflojo/floimg-templates';
15
22
  export type * from '@teamflojo/floimg-studio-shared';