@floegence/floe-webapp-core 0.1.2 → 0.1.7

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.
Files changed (88) hide show
  1. package/dist/components/file-browser/Breadcrumb.d.ts +7 -0
  2. package/dist/components/file-browser/DirectoryTree.d.ts +7 -0
  3. package/dist/components/file-browser/FileBrowser.d.ts +35 -0
  4. package/dist/components/file-browser/FileBrowserContext.d.ts +18 -0
  5. package/dist/components/file-browser/FileBrowserToolbar.d.ts +8 -0
  6. package/dist/components/file-browser/FileContextMenu.d.ts +15 -0
  7. package/dist/components/file-browser/FileGridView.d.ts +7 -0
  8. package/dist/components/file-browser/FileIcons.d.ts +14 -0
  9. package/dist/components/file-browser/FileListView.d.ts +7 -0
  10. package/dist/components/file-browser/index.d.ts +10 -0
  11. package/dist/components/file-browser/types.d.ts +104 -0
  12. package/dist/components/index.d.ts +1 -0
  13. package/dist/components/layout/Sidebar.d.ts +18 -0
  14. package/dist/components/layout/index.d.ts +1 -1
  15. package/dist/components/layout/mobileTabs.d.ts +30 -0
  16. package/dist/context/ComponentRegistry.d.ts +3 -2
  17. package/dist/index.js +249 -220
  18. package/dist/index10.js +2 -2
  19. package/dist/index11.js +4 -4
  20. package/dist/index12.js +2 -2
  21. package/dist/index13.js +4 -4
  22. package/dist/index14.js +4 -4
  23. package/dist/index15.js +4 -4
  24. package/dist/index16.js +3 -3
  25. package/dist/index17.js +5 -5
  26. package/dist/index18.js +2 -2
  27. package/dist/index19.js +1 -1
  28. package/dist/index2.js +89 -70
  29. package/dist/index20.js +1 -1
  30. package/dist/index21.js +3 -3
  31. package/dist/index22.js +2 -2
  32. package/dist/index23.js +2 -2
  33. package/dist/index24.js +1 -1
  34. package/dist/index25.js +4 -4
  35. package/dist/index26.js +1 -1
  36. package/dist/index27.js +1 -1
  37. package/dist/index28.js +1 -1
  38. package/dist/index29.js +1 -1
  39. package/dist/index3.js +1 -1
  40. package/dist/index36.js +138 -42
  41. package/dist/index37.js +102 -32
  42. package/dist/index38.js +90 -23
  43. package/dist/index39.js +107 -170
  44. package/dist/index4.js +48 -34
  45. package/dist/index40.js +86 -40
  46. package/dist/index41.js +176 -64
  47. package/dist/index42.js +64 -94
  48. package/dist/index43.js +64 -110
  49. package/dist/index44.js +39 -138
  50. package/dist/index45.js +44 -35
  51. package/dist/index46.js +34 -379
  52. package/dist/index47.js +25 -13
  53. package/dist/index48.js +173 -10
  54. package/dist/index49.js +40 -16
  55. package/dist/index5.js +3 -3
  56. package/dist/index50.js +65 -9
  57. package/dist/index51.js +96 -8
  58. package/dist/index52.js +113 -52
  59. package/dist/index53.js +138 -5
  60. package/dist/index54.js +39 -3
  61. package/dist/index55.js +382 -44
  62. package/dist/index56.js +13 -26
  63. package/dist/index57.js +10 -32
  64. package/dist/index58.js +17 -92
  65. package/dist/index59.js +10 -22
  66. package/dist/index6.js +2 -2
  67. package/dist/index60.js +8 -46
  68. package/dist/index61.js +56 -14
  69. package/dist/index62.js +5 -35
  70. package/dist/index63.js +3 -64
  71. package/dist/index64.js +45 -84
  72. package/dist/index65.js +25 -13
  73. package/dist/index66.js +27 -2258
  74. package/dist/index67.js +94 -0
  75. package/dist/index68.js +25 -0
  76. package/dist/index69.js +49 -0
  77. package/dist/index7.js +1 -1
  78. package/dist/index70.js +17 -0
  79. package/dist/index71.js +38 -0
  80. package/dist/index72.js +67 -0
  81. package/dist/index73.js +87 -0
  82. package/dist/index74.js +17 -0
  83. package/dist/index75.js +2266 -0
  84. package/dist/index76.js +10 -0
  85. package/dist/index8.js +2 -2
  86. package/dist/index9.js +1 -1
  87. package/dist/styles.css +1 -1
  88. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ export interface BreadcrumbProps {
2
+ class?: string;
3
+ }
4
+ /**
5
+ * Breadcrumb navigation showing current path
6
+ */
7
+ export declare function Breadcrumb(props: BreadcrumbProps): import("solid-js").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface DirectoryTreeProps {
2
+ class?: string;
3
+ }
4
+ /**
5
+ * Collapsible directory tree for sidebar navigation (folders only)
6
+ */
7
+ export declare function DirectoryTree(props: DirectoryTreeProps): import("solid-js").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { type JSX } from 'solid-js';
2
+ import { type FileContextMenuProps } from './FileContextMenu';
3
+ import type { FileItem, ViewMode, ContextMenuCallbacks, ContextMenuItem } from './types';
4
+ export interface FileBrowserProps {
5
+ /** File tree data */
6
+ files: FileItem[];
7
+ /** Initial path to display */
8
+ initialPath?: string;
9
+ /** Initial view mode */
10
+ initialViewMode?: ViewMode;
11
+ /** Callback when navigation occurs */
12
+ onNavigate?: (path: string) => void;
13
+ /** Callback when selection changes */
14
+ onSelect?: (items: FileItem[]) => void;
15
+ /** Additional class names */
16
+ class?: string;
17
+ /** Custom header content */
18
+ header?: JSX.Element;
19
+ /** Sidebar width in pixels */
20
+ sidebarWidth?: number;
21
+ /** Hide sidebar on mobile by default */
22
+ hideSidebarOnMobile?: boolean;
23
+ /** Context menu callbacks for built-in actions */
24
+ contextMenuCallbacks?: ContextMenuCallbacks;
25
+ /** Custom context menu items to add */
26
+ customContextMenuItems?: ContextMenuItem[];
27
+ /** Override default context menu items completely */
28
+ overrideContextMenuItems?: ContextMenuItem[];
29
+ /** Default context menu items to hide */
30
+ hideContextMenuItems?: FileContextMenuProps['hideItems'];
31
+ }
32
+ /**
33
+ * Professional file browser component with list/grid views and directory tree sidebar
34
+ */
35
+ export declare function FileBrowser(props: FileBrowserProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type JSX } from 'solid-js';
2
+ import type { FileItem, ViewMode, FileBrowserContextValue } from './types';
3
+ export interface FileBrowserProviderProps {
4
+ children: JSX.Element;
5
+ files: FileItem[];
6
+ initialPath?: string;
7
+ initialViewMode?: ViewMode;
8
+ onNavigate?: (path: string) => void;
9
+ onSelect?: (items: FileItem[]) => void;
10
+ }
11
+ /**
12
+ * Provider for file browser state management
13
+ */
14
+ export declare function FileBrowserProvider(props: FileBrowserProviderProps): JSX.Element;
15
+ /**
16
+ * Hook to access file browser context
17
+ */
18
+ export declare function useFileBrowser(): FileBrowserContextValue;
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'solid-js';
2
+ export interface FileBrowserToolbarProps {
3
+ class?: string;
4
+ }
5
+ /**
6
+ * Toolbar with navigation, breadcrumb, and view mode toggle
7
+ */
8
+ export declare function FileBrowserToolbar(props: FileBrowserToolbarProps): JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { ContextMenuItem, ContextMenuCallbacks } from './types';
2
+ export interface FileContextMenuProps {
3
+ /** Custom menu items to add (will be merged with defaults) */
4
+ customItems?: ContextMenuItem[];
5
+ /** Override default menu items completely */
6
+ overrideItems?: ContextMenuItem[];
7
+ /** Callbacks for built-in actions */
8
+ callbacks?: ContextMenuCallbacks;
9
+ /** Items to hide from default menu */
10
+ hideItems?: Array<'duplicate' | 'ask-agent' | 'copy-to' | 'move-to' | 'delete' | 'rename'>;
11
+ }
12
+ /**
13
+ * Context menu for file browser items
14
+ */
15
+ export declare function FileContextMenu(props: FileContextMenuProps): import("solid-js").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface FileGridViewProps {
2
+ class?: string;
3
+ }
4
+ /**
5
+ * Grid/tile view for displaying files in a card format
6
+ */
7
+ export declare function FileGridView(props: FileGridViewProps): import("solid-js").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { JSX } from 'solid-js';
2
+ interface FileIconProps {
3
+ class?: string;
4
+ }
5
+ export declare const FolderIcon: (props: FileIconProps) => JSX.Element;
6
+ export declare const FolderOpenIcon: (props: FileIconProps) => JSX.Element;
7
+ export declare const FileIcon: (props: FileIconProps) => JSX.Element;
8
+ export declare const CodeFileIcon: (props: FileIconProps) => JSX.Element;
9
+ export declare const ImageFileIcon: (props: FileIconProps) => JSX.Element;
10
+ export declare const DocumentFileIcon: (props: FileIconProps) => JSX.Element;
11
+ export declare const ConfigFileIcon: (props: FileIconProps) => JSX.Element;
12
+ export declare const StyleFileIcon: (props: FileIconProps) => JSX.Element;
13
+ export declare function getFileIcon(extension?: string): (props: FileIconProps) => JSX.Element;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface FileListViewProps {
2
+ class?: string;
3
+ }
4
+ /**
5
+ * List view for displaying files in a table format
6
+ */
7
+ export declare function FileListView(props: FileListViewProps): import("solid-js").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export { FileBrowser, type FileBrowserProps } from './FileBrowser';
2
+ export { FileBrowserProvider, useFileBrowser, type FileBrowserProviderProps } from './FileBrowserContext';
3
+ export { DirectoryTree, type DirectoryTreeProps } from './DirectoryTree';
4
+ export { FileListView, type FileListViewProps } from './FileListView';
5
+ export { FileGridView, type FileGridViewProps } from './FileGridView';
6
+ export { FileContextMenu, type FileContextMenuProps } from './FileContextMenu';
7
+ export { Breadcrumb, type BreadcrumbProps } from './Breadcrumb';
8
+ export { FileBrowserToolbar, type FileBrowserToolbarProps } from './FileBrowserToolbar';
9
+ export { FolderIcon, FolderOpenIcon, FileIcon, CodeFileIcon, ImageFileIcon, DocumentFileIcon, ConfigFileIcon, StyleFileIcon, getFileIcon, } from './FileIcons';
10
+ export type { FileItem, ViewMode, SortField, SortDirection, SortConfig, FileBrowserContextValue, ContextMenuActionType, ContextMenuItem, ContextMenuEvent, ContextMenuCallbacks, } from './types';
@@ -0,0 +1,104 @@
1
+ import type { JSX, Accessor } from 'solid-js';
2
+ /**
3
+ * Represents a file or folder item in the browser
4
+ */
5
+ export interface FileItem {
6
+ id: string;
7
+ name: string;
8
+ type: 'file' | 'folder';
9
+ path: string;
10
+ size?: number;
11
+ modifiedAt?: Date;
12
+ extension?: string;
13
+ children?: FileItem[];
14
+ icon?: JSX.Element;
15
+ }
16
+ /**
17
+ * View mode for the file browser main content area
18
+ */
19
+ export type ViewMode = 'list' | 'grid';
20
+ /**
21
+ * Sort options for file list
22
+ */
23
+ export type SortField = 'name' | 'size' | 'modifiedAt' | 'type';
24
+ export type SortDirection = 'asc' | 'desc';
25
+ export interface SortConfig {
26
+ field: SortField;
27
+ direction: SortDirection;
28
+ }
29
+ /**
30
+ * Built-in context menu action types
31
+ */
32
+ export type ContextMenuActionType = 'duplicate' | 'ask-agent' | 'copy-to' | 'move-to' | 'delete' | 'rename' | 'custom';
33
+ /**
34
+ * Context menu item definition
35
+ */
36
+ export interface ContextMenuItem {
37
+ /** Unique identifier for the action */
38
+ id: string;
39
+ /** Display label */
40
+ label: string;
41
+ /** Action type - use 'custom' for user-defined actions */
42
+ type: ContextMenuActionType;
43
+ /** Optional icon component */
44
+ icon?: (props: {
45
+ class?: string;
46
+ }) => JSX.Element;
47
+ /** Whether this item is disabled */
48
+ disabled?: boolean;
49
+ /** Whether to show a separator after this item */
50
+ separator?: boolean;
51
+ /** Keyboard shortcut hint (display only) */
52
+ shortcut?: string;
53
+ /** Custom handler for 'custom' type actions */
54
+ onAction?: (items: FileItem[]) => void;
55
+ }
56
+ /**
57
+ * Context menu event with position and target items
58
+ */
59
+ export interface ContextMenuEvent {
60
+ /** X position for the menu */
61
+ x: number;
62
+ /** Y position for the menu */
63
+ y: number;
64
+ /** Target file/folder items */
65
+ items: FileItem[];
66
+ }
67
+ /**
68
+ * Callbacks for context menu actions
69
+ */
70
+ export interface ContextMenuCallbacks {
71
+ onDuplicate?: (items: FileItem[]) => void;
72
+ onAskAgent?: (items: FileItem[]) => void;
73
+ onCopyTo?: (items: FileItem[]) => void;
74
+ onMoveTo?: (items: FileItem[]) => void;
75
+ onDelete?: (items: FileItem[]) => void;
76
+ onRename?: (item: FileItem) => void;
77
+ }
78
+ /**
79
+ * File browser context value for internal state management
80
+ */
81
+ export interface FileBrowserContextValue {
82
+ currentPath: Accessor<string>;
83
+ setCurrentPath: (path: string) => void;
84
+ navigateUp: () => void;
85
+ navigateTo: (item: FileItem) => void;
86
+ selectedItems: Accessor<Set<string>>;
87
+ selectItem: (id: string, multi?: boolean) => void;
88
+ clearSelection: () => void;
89
+ isSelected: (id: string) => boolean;
90
+ viewMode: Accessor<ViewMode>;
91
+ setViewMode: (mode: ViewMode) => void;
92
+ sortConfig: Accessor<SortConfig>;
93
+ setSortConfig: (config: SortConfig) => void;
94
+ expandedFolders: Accessor<Set<string>>;
95
+ toggleFolder: (path: string) => void;
96
+ isExpanded: (path: string) => boolean;
97
+ files: Accessor<FileItem[]>;
98
+ currentFiles: Accessor<FileItem[]>;
99
+ sidebarCollapsed: Accessor<boolean>;
100
+ toggleSidebar: () => void;
101
+ contextMenu: Accessor<ContextMenuEvent | null>;
102
+ showContextMenu: (event: ContextMenuEvent) => void;
103
+ hideContextMenu: () => void;
104
+ }
@@ -3,3 +3,4 @@ export * from './ui';
3
3
  export * from './loading';
4
4
  export * from './icons';
5
5
  export * from './launchpad';
6
+ export * from './file-browser';
@@ -9,6 +9,24 @@ export interface SidebarProps {
9
9
  * Collapsible sidebar panel
10
10
  */
11
11
  export declare function Sidebar(props: SidebarProps): JSX.Element;
12
+ /**
13
+ * Unified wrapper for sidebar content.
14
+ * Use this component to ensure consistent padding and spacing across all sidebars.
15
+ */
16
+ export interface SidebarContentProps {
17
+ children: JSX.Element;
18
+ class?: string;
19
+ }
20
+ export declare function SidebarContent(props: SidebarContentProps): JSX.Element;
21
+ /**
22
+ * Container for sidebar items within a section.
23
+ * Provides consistent spacing between list items.
24
+ */
25
+ export interface SidebarItemListProps {
26
+ children: JSX.Element;
27
+ class?: string;
28
+ }
29
+ export declare function SidebarItemList(props: SidebarItemListProps): JSX.Element;
12
30
  /**
13
31
  * Sidebar section with optional header
14
32
  */
@@ -1,6 +1,6 @@
1
1
  export { Shell, type ShellProps } from './Shell';
2
2
  export { ActivityBar, type ActivityBarItem, type ActivityBarProps } from './ActivityBar';
3
- export { Sidebar, SidebarSection, SidebarItem, type SidebarProps, type SidebarSectionProps, type SidebarItemProps } from './Sidebar';
3
+ export { Sidebar, SidebarContent, SidebarItemList, SidebarSection, SidebarItem, type SidebarProps, type SidebarContentProps, type SidebarItemListProps, type SidebarSectionProps, type SidebarItemProps, } from './Sidebar';
4
4
  export { TopBar, type TopBarProps } from './TopBar';
5
5
  export { BottomBar, BottomBarItem, StatusIndicator, type BottomBarProps, type BottomBarItemProps, type StatusIndicatorProps } from './BottomBar';
6
6
  export { MobileTabBar, type MobileTabBarItem, type MobileTabBarProps } from './MobileTabBar';
@@ -0,0 +1,30 @@
1
+ export interface ResolveMobileTabActiveIdArgs {
2
+ /** Current active tab id from LayoutContext. */
3
+ activeId: string;
4
+ /** Whether the mobile sidebar overlay is currently open. */
5
+ mobileSidebarOpen: boolean;
6
+ /** Whether the active component is marked as fullScreen. */
7
+ activeIsFullScreen: boolean;
8
+ }
9
+ /**
10
+ * Determine which tab should appear active in the mobile tab bar.
11
+ * - For fullScreen components: always show as active
12
+ * - For sidebar components: show as active only when sidebar is open
13
+ */
14
+ export declare function resolveMobileTabActiveId(args: ResolveMobileTabActiveIdArgs): string;
15
+ export interface ResolveMobileTabSelectArgs {
16
+ clickedId: string;
17
+ activeId: string;
18
+ mobileSidebarOpen: boolean;
19
+ clickedIsFullScreen: boolean;
20
+ }
21
+ export interface ResolveMobileTabSelectResult {
22
+ nextActiveId: string;
23
+ nextMobileSidebarOpen: boolean;
24
+ }
25
+ /**
26
+ * Handle mobile tab selection:
27
+ * - FullScreen components: navigate directly, close sidebar
28
+ * - Sidebar components: toggle sidebar visibility
29
+ */
30
+ export declare function resolveMobileTabSelect(args: ResolveMobileTabSelectArgs): ResolveMobileTabSelectResult;
@@ -4,8 +4,9 @@ import type { LayoutContextValue } from './LayoutContext';
4
4
  import type { CommandContextValue } from './CommandContext';
5
5
  import type { NotificationContextValue } from './NotificationContext';
6
6
  /**
7
- * Component registration system for pluggable architecture
8
- * Designed to match `.design.md` 8.x: contributions + lifecycle + explicit mount/unmount.
7
+ * Component registration system for pluggable architecture.
8
+ *
9
+ * Public docs: `docs/component-registry.md`
9
10
  */
10
11
  export interface Logger {
11
12
  debug: (...args: unknown[]) => void;