@floegence/floe-webapp-core 0.1.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.
Files changed (145) hide show
  1. package/dist/app/FloeApp.d.ts +37 -0
  2. package/dist/app/FloeProvider.d.ts +17 -0
  3. package/dist/app/index.d.ts +2 -0
  4. package/dist/components/deck/DeckCell.d.ts +17 -0
  5. package/dist/components/deck/DeckGrid.d.ts +14 -0
  6. package/dist/components/deck/DeckTopBar.d.ts +9 -0
  7. package/dist/components/deck/DropZonePreview.d.ts +10 -0
  8. package/dist/components/deck/LayoutSelector.d.ts +7 -0
  9. package/dist/components/deck/WidgetFrame.d.ts +14 -0
  10. package/dist/components/deck/WidgetPalette.d.ts +7 -0
  11. package/dist/components/deck/WidgetResizeHandle.d.ts +9 -0
  12. package/dist/components/deck/WidgetTypeSwitcher.d.ts +9 -0
  13. package/dist/components/deck/index.d.ts +9 -0
  14. package/dist/components/icons/index.d.ts +29 -0
  15. package/dist/components/index.d.ts +5 -0
  16. package/dist/components/launchpad/Launchpad.d.ts +15 -0
  17. package/dist/components/launchpad/LaunchpadGrid.d.ts +8 -0
  18. package/dist/components/launchpad/LaunchpadItem.d.ts +18 -0
  19. package/dist/components/launchpad/LaunchpadPagination.d.ts +6 -0
  20. package/dist/components/launchpad/LaunchpadSearch.d.ts +6 -0
  21. package/dist/components/launchpad/index.d.ts +10 -0
  22. package/dist/components/layout/ActivityBar.d.ts +24 -0
  23. package/dist/components/layout/BottomBar.d.ts +27 -0
  24. package/dist/components/layout/MobileTabBar.d.ts +19 -0
  25. package/dist/components/layout/Panel.d.ts +27 -0
  26. package/dist/components/layout/ResizeHandle.d.ts +9 -0
  27. package/dist/components/layout/Shell.d.ts +23 -0
  28. package/dist/components/layout/Sidebar.d.ts +33 -0
  29. package/dist/components/layout/TopBar.d.ts +11 -0
  30. package/dist/components/layout/index.d.ts +9 -0
  31. package/dist/components/loading/LoadingOverlay.d.ts +10 -0
  32. package/dist/components/loading/Skeleton.d.ts +21 -0
  33. package/dist/components/loading/SnakeLoader.d.ts +9 -0
  34. package/dist/components/loading/index.d.ts +3 -0
  35. package/dist/components/ui/Button.d.ts +12 -0
  36. package/dist/components/ui/Card.d.ts +79 -0
  37. package/dist/components/ui/CommandPalette.d.ts +4 -0
  38. package/dist/components/ui/Dialog.d.ts +29 -0
  39. package/dist/components/ui/Dropdown.d.ts +35 -0
  40. package/dist/components/ui/FloatingWindow.d.ts +45 -0
  41. package/dist/components/ui/Input.d.ts +16 -0
  42. package/dist/components/ui/Tooltip.d.ts +12 -0
  43. package/dist/components/ui/index.d.ts +8 -0
  44. package/dist/context/CommandContext.d.ts +30 -0
  45. package/dist/context/ComponentRegistry.d.ts +90 -0
  46. package/dist/context/DeckContext.d.ts +88 -0
  47. package/dist/context/FloeConfigContext.d.ts +133 -0
  48. package/dist/context/LayoutContext.d.ts +20 -0
  49. package/dist/context/NotificationContext.d.ts +32 -0
  50. package/dist/context/ThemeContext.d.ts +12 -0
  51. package/dist/context/WidgetRegistry.d.ts +37 -0
  52. package/dist/context/createSimpleContext.d.ts +15 -0
  53. package/dist/context/index.d.ts +9 -0
  54. package/dist/hooks/index.d.ts +6 -0
  55. package/dist/hooks/useDebounce.d.ts +5 -0
  56. package/dist/hooks/useDeckDrag.d.ts +6 -0
  57. package/dist/hooks/useKeybind.d.ts +4 -0
  58. package/dist/hooks/useMediaQuery.d.ts +5 -0
  59. package/dist/hooks/usePersisted.d.ts +5 -0
  60. package/dist/hooks/useResizeObserver.d.ts +9 -0
  61. package/dist/index.d.ts +7 -0
  62. package/dist/index.js +226 -0
  63. package/dist/index10.js +92 -0
  64. package/dist/index11.js +101 -0
  65. package/dist/index12.js +113 -0
  66. package/dist/index13.js +82 -0
  67. package/dist/index14.js +123 -0
  68. package/dist/index15.js +106 -0
  69. package/dist/index16.js +131 -0
  70. package/dist/index17.js +152 -0
  71. package/dist/index18.js +41 -0
  72. package/dist/index19.js +61 -0
  73. package/dist/index2.js +215 -0
  74. package/dist/index20.js +79 -0
  75. package/dist/index21.js +162 -0
  76. package/dist/index22.js +293 -0
  77. package/dist/index23.js +136 -0
  78. package/dist/index24.js +45 -0
  79. package/dist/index25.js +146 -0
  80. package/dist/index26.js +258 -0
  81. package/dist/index27.js +92 -0
  82. package/dist/index28.js +42 -0
  83. package/dist/index29.js +71 -0
  84. package/dist/index3.js +94 -0
  85. package/dist/index30.js +280 -0
  86. package/dist/index31.js +154 -0
  87. package/dist/index32.js +31 -0
  88. package/dist/index33.js +50 -0
  89. package/dist/index34.js +15 -0
  90. package/dist/index35.js +32 -0
  91. package/dist/index36.js +51 -0
  92. package/dist/index37.js +41 -0
  93. package/dist/index38.js +28 -0
  94. package/dist/index39.js +176 -0
  95. package/dist/index4.js +55 -0
  96. package/dist/index40.js +43 -0
  97. package/dist/index41.js +69 -0
  98. package/dist/index42.js +99 -0
  99. package/dist/index43.js +120 -0
  100. package/dist/index44.js +141 -0
  101. package/dist/index45.js +42 -0
  102. package/dist/index46.js +386 -0
  103. package/dist/index47.js +16 -0
  104. package/dist/index48.js +13 -0
  105. package/dist/index49.js +19 -0
  106. package/dist/index5.js +48 -0
  107. package/dist/index50.js +13 -0
  108. package/dist/index51.js +11 -0
  109. package/dist/index52.js +59 -0
  110. package/dist/index53.js +8 -0
  111. package/dist/index54.js +6 -0
  112. package/dist/index55.js +48 -0
  113. package/dist/index56.js +29 -0
  114. package/dist/index57.js +35 -0
  115. package/dist/index58.js +94 -0
  116. package/dist/index59.js +25 -0
  117. package/dist/index6.js +73 -0
  118. package/dist/index60.js +49 -0
  119. package/dist/index61.js +17 -0
  120. package/dist/index62.js +38 -0
  121. package/dist/index63.js +67 -0
  122. package/dist/index64.js +87 -0
  123. package/dist/index65.js +17 -0
  124. package/dist/index66.js +2266 -0
  125. package/dist/index7.js +112 -0
  126. package/dist/index8.js +66 -0
  127. package/dist/index9.js +33 -0
  128. package/dist/styles/build.d.ts +1 -0
  129. package/dist/styles/themes/index.d.ts +9 -0
  130. package/dist/styles.css +1 -0
  131. package/dist/styles.js +1 -0
  132. package/dist/utils/animations.d.ts +222 -0
  133. package/dist/utils/bodyStyleLock.d.ts +9 -0
  134. package/dist/utils/cn.d.ts +5 -0
  135. package/dist/utils/defer.d.ts +5 -0
  136. package/dist/utils/gridCollision.d.ts +31 -0
  137. package/dist/utils/gridLayout.d.ts +38 -0
  138. package/dist/utils/index.d.ts +8 -0
  139. package/dist/utils/keybind.d.ts +22 -0
  140. package/dist/utils/persist.d.ts +17 -0
  141. package/dist/widgets/MetricsWidget.d.ts +5 -0
  142. package/dist/widgets/SidebarWidget.d.ts +11 -0
  143. package/dist/widgets/TerminalWidget.d.ts +5 -0
  144. package/dist/widgets/index.d.ts +3 -0
  145. package/package.json +40 -0
@@ -0,0 +1,29 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface DialogProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ title?: string;
6
+ description?: string;
7
+ children: JSX.Element;
8
+ footer?: JSX.Element;
9
+ class?: string;
10
+ }
11
+ /**
12
+ * Modal dialog component
13
+ */
14
+ export declare function Dialog(props: DialogProps): JSX.Element;
15
+ /**
16
+ * Confirm dialog helper
17
+ */
18
+ export interface ConfirmDialogProps {
19
+ open: boolean;
20
+ onOpenChange: (open: boolean) => void;
21
+ title: string;
22
+ description?: string;
23
+ confirmText?: string;
24
+ cancelText?: string;
25
+ variant?: 'default' | 'destructive';
26
+ onConfirm: () => void | Promise<void>;
27
+ loading?: boolean;
28
+ }
29
+ export declare function ConfirmDialog(props: ConfirmDialogProps): JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface DropdownItem {
3
+ id: string;
4
+ label: string;
5
+ icon?: () => JSX.Element;
6
+ disabled?: boolean;
7
+ separator?: boolean;
8
+ }
9
+ export interface DropdownProps {
10
+ trigger: JSX.Element;
11
+ items: DropdownItem[];
12
+ value?: string;
13
+ onSelect: (id: string) => void;
14
+ align?: 'start' | 'center' | 'end';
15
+ class?: string;
16
+ }
17
+ /**
18
+ * Dropdown menu component
19
+ */
20
+ export declare function Dropdown(props: DropdownProps): JSX.Element;
21
+ /**
22
+ * Simple select dropdown
23
+ */
24
+ export interface SelectProps {
25
+ value: string;
26
+ onChange: (value: string) => void;
27
+ options: {
28
+ value: string;
29
+ label: string;
30
+ }[];
31
+ placeholder?: string;
32
+ disabled?: boolean;
33
+ class?: string;
34
+ }
35
+ export declare function Select(props: SelectProps): JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface FloatingWindowProps {
3
+ /** Whether the window is open */
4
+ open: boolean;
5
+ /** Callback when window open state changes */
6
+ onOpenChange: (open: boolean) => void;
7
+ /** Window title */
8
+ title?: string;
9
+ /** Window content */
10
+ children: JSX.Element;
11
+ /** Optional footer content */
12
+ footer?: JSX.Element;
13
+ /** Default position (centered if not provided) */
14
+ defaultPosition?: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ /** Default size */
19
+ defaultSize?: {
20
+ width: number;
21
+ height: number;
22
+ };
23
+ /** Minimum window size */
24
+ minSize?: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ /** Maximum window size */
29
+ maxSize?: {
30
+ width: number;
31
+ height: number;
32
+ };
33
+ /** Whether the window can be resized */
34
+ resizable?: boolean;
35
+ /** Whether the window can be dragged */
36
+ draggable?: boolean;
37
+ /** Additional CSS class */
38
+ class?: string;
39
+ /** z-index for the window */
40
+ zIndex?: number;
41
+ }
42
+ /**
43
+ * Floating window component with drag, resize, maximize/restore functionality
44
+ */
45
+ export declare function FloatingWindow(props: FloatingWindowProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type JSX } from 'solid-js';
2
+ export type InputSize = 'sm' | 'md' | 'lg';
3
+ export interface InputProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'size'> {
4
+ size?: InputSize;
5
+ error?: string;
6
+ leftIcon?: JSX.Element;
7
+ rightIcon?: JSX.Element;
8
+ }
9
+ export declare function Input(props: InputProps): JSX.Element;
10
+ /**
11
+ * Textarea variant
12
+ */
13
+ export interface TextareaProps extends JSX.TextareaHTMLAttributes<HTMLTextAreaElement> {
14
+ error?: string;
15
+ }
16
+ export declare function Textarea(props: TextareaProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface TooltipProps {
3
+ content: string | JSX.Element;
4
+ children: JSX.Element;
5
+ placement?: 'top' | 'bottom' | 'left' | 'right';
6
+ delay?: number;
7
+ class?: string;
8
+ }
9
+ /**
10
+ * Simple tooltip component
11
+ */
12
+ export declare function Tooltip(props: TooltipProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from './Button';
2
+ export { Input, Textarea, type InputProps, type InputSize, type TextareaProps } from './Input';
3
+ export { Dialog, ConfirmDialog, type DialogProps, type ConfirmDialogProps } from './Dialog';
4
+ export { FloatingWindow, type FloatingWindowProps } from './FloatingWindow';
5
+ export { Dropdown, Select, type DropdownProps, type DropdownItem, type SelectProps } from './Dropdown';
6
+ export { Tooltip, type TooltipProps } from './Tooltip';
7
+ export { CommandPalette } from './CommandPalette';
8
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Interactive3DCard, AnimatedBorderCard, NeonCard, MorphCard, type CardProps, type CardVariant, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, type Interactive3DCardProps, type AnimatedBorderCardProps, type NeonCardProps, type MorphCardProps, } from './Card';
@@ -0,0 +1,30 @@
1
+ import { type Accessor, type Component } from 'solid-js';
2
+ export interface Command {
3
+ id: string;
4
+ title: string;
5
+ description?: string;
6
+ icon?: Component<{
7
+ class?: string;
8
+ }>;
9
+ keybind?: string;
10
+ category?: string;
11
+ execute: () => void | Promise<void>;
12
+ }
13
+ export interface CommandContextValue {
14
+ isOpen: Accessor<boolean>;
15
+ search: Accessor<string>;
16
+ commands: Accessor<Command[]>;
17
+ filteredCommands: Accessor<Command[]>;
18
+ open: () => void;
19
+ close: () => void;
20
+ toggle: () => void;
21
+ setSearch: (value: string) => void;
22
+ register: (command: Command) => () => void;
23
+ registerAll: (commands: Command[]) => () => void;
24
+ execute: (id: string) => void;
25
+ getKeybindDisplay: (keybind: string) => string;
26
+ }
27
+ export declare function createCommandService(): CommandContextValue;
28
+ export declare const CommandProvider: (props: {
29
+ children: import("solid-js").JSX.Element;
30
+ }) => import("solid-js").JSX.Element, useCommand: () => CommandContextValue;
@@ -0,0 +1,90 @@
1
+ import { type Accessor, type Component } from 'solid-js';
2
+ import type { ThemeContextValue } from './ThemeContext';
3
+ import type { LayoutContextValue } from './LayoutContext';
4
+ import type { CommandContextValue } from './CommandContext';
5
+ import type { NotificationContextValue } from './NotificationContext';
6
+ /**
7
+ * Component registration system for pluggable architecture
8
+ * Designed to match `.design.md` 8.x: contributions + lifecycle + explicit mount/unmount.
9
+ */
10
+ export interface Logger {
11
+ debug: (...args: unknown[]) => void;
12
+ info: (...args: unknown[]) => void;
13
+ warn: (...args: unknown[]) => void;
14
+ error: (...args: unknown[]) => void;
15
+ }
16
+ export interface ComponentStorage {
17
+ get: <T>(key: string, defaultValue: T) => T;
18
+ set: <T>(key: string, value: T) => void;
19
+ remove: (key: string) => void;
20
+ }
21
+ export interface ComponentContext<TProtocol = unknown> {
22
+ protocol?: TProtocol;
23
+ theme: ThemeContextValue;
24
+ layout: LayoutContextValue;
25
+ commands: CommandContextValue;
26
+ notifications: NotificationContextValue;
27
+ storage: ComponentStorage;
28
+ logger: Logger;
29
+ }
30
+ export interface CommandContribution<TProtocol = unknown> {
31
+ id: string;
32
+ title: string;
33
+ description?: string;
34
+ icon?: Component<{
35
+ class?: string;
36
+ }>;
37
+ keybind?: string;
38
+ category?: string;
39
+ execute: (ctx: ComponentContext<TProtocol>) => void | Promise<void>;
40
+ }
41
+ export interface StatusBarContribution {
42
+ id: string;
43
+ position: 'left' | 'right';
44
+ order?: number;
45
+ component: Component;
46
+ }
47
+ export interface FloeComponent<TProtocol = unknown> {
48
+ id: string;
49
+ name: string;
50
+ icon?: Component<{
51
+ class?: string;
52
+ }>;
53
+ description?: string;
54
+ component: Component;
55
+ sidebar?: {
56
+ order?: number;
57
+ badge?: () => number | string | undefined;
58
+ /** When true, this component uses the full content area without sidebar */
59
+ fullScreen?: boolean;
60
+ /** When true, this component is hidden in the activity bar on mobile */
61
+ hiddenOnMobile?: boolean;
62
+ };
63
+ commands?: CommandContribution<TProtocol>[];
64
+ statusBar?: StatusBarContribution[];
65
+ onMount?: (context: ComponentContext<TProtocol>) => void | Promise<void>;
66
+ onUnmount?: () => void | Promise<void>;
67
+ }
68
+ export interface ComponentRegistryValue<TProtocol = unknown> {
69
+ register: (component: FloeComponent<TProtocol>) => void;
70
+ registerAll: (componentList: FloeComponent<TProtocol>[]) => void;
71
+ unregister: (componentId: string) => Promise<void>;
72
+ mount: (componentId: string, context: ComponentContext<TProtocol>) => Promise<void>;
73
+ unmount: (componentId: string) => Promise<void>;
74
+ mountAll: (contextFactory: (componentId: string) => ComponentContext<TProtocol>) => Promise<void>;
75
+ unmountAll: () => Promise<void>;
76
+ components: Accessor<Map<string, FloeComponent<TProtocol>>>;
77
+ mountedComponents: Accessor<Set<string>>;
78
+ sidebarItems: Accessor<Array<FloeComponent<TProtocol> & {
79
+ order: number;
80
+ }>>;
81
+ allCommands: Accessor<CommandContribution<TProtocol>[]>;
82
+ statusBarItems: Accessor<StatusBarContribution[]>;
83
+ getComponent: (id: string) => FloeComponent<TProtocol> | undefined;
84
+ }
85
+ export declare function useComponentContextFactory<TProtocol = unknown>(): (componentId: string, extra?: Pick<ComponentContext<TProtocol>, "protocol">) => ComponentContext<TProtocol>;
86
+ export declare const ComponentRegistryProvider: (props: {
87
+ children: import("solid-js").JSX.Element;
88
+ }) => import("solid-js").JSX.Element;
89
+ export declare function useComponentRegistry<TProtocol = unknown>(): ComponentRegistryValue<TProtocol>;
90
+ export declare function createComponentRegistry(): ComponentRegistryValue<unknown>;
@@ -0,0 +1,88 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { GridPosition } from '../utils/gridCollision';
3
+ /**
4
+ * Widget instance on the deck
5
+ */
6
+ export interface DeckWidget {
7
+ id: string;
8
+ type: string;
9
+ position: GridPosition;
10
+ config?: Record<string, unknown>;
11
+ title?: string;
12
+ }
13
+ /**
14
+ * Deck layout (saveable)
15
+ */
16
+ export interface DeckLayout {
17
+ id: string;
18
+ name: string;
19
+ widgets: DeckWidget[];
20
+ isPreset?: boolean;
21
+ createdAt: number;
22
+ updatedAt: number;
23
+ }
24
+ /**
25
+ * Drag state for a widget being moved
26
+ */
27
+ export interface DragState {
28
+ widgetId: string;
29
+ originalPosition: GridPosition;
30
+ currentPosition: GridPosition;
31
+ /** Pixel offset for smooth visual following */
32
+ pixelOffset: {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ startX: number;
37
+ startY: number;
38
+ }
39
+ /**
40
+ * Resize state for a widget being resized
41
+ */
42
+ export interface ResizeState {
43
+ widgetId: string;
44
+ edge: 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
45
+ originalPosition: GridPosition;
46
+ currentPosition: GridPosition;
47
+ startX: number;
48
+ startY: number;
49
+ }
50
+ export interface DeckContextValue {
51
+ layouts: Accessor<DeckLayout[]>;
52
+ activeLayoutId: Accessor<string>;
53
+ activeLayout: Accessor<DeckLayout | undefined>;
54
+ setActiveLayout: (id: string) => void;
55
+ createLayout: (name: string, widgets?: DeckWidget[]) => DeckLayout;
56
+ duplicateLayout: (id: string, newName: string) => DeckLayout | undefined;
57
+ deleteLayout: (id: string) => void;
58
+ renameLayout: (id: string, name: string) => void;
59
+ editMode: Accessor<boolean>;
60
+ setEditMode: (enabled: boolean) => void;
61
+ toggleEditMode: () => void;
62
+ addWidget: (type: string, position?: Partial<GridPosition>, config?: Record<string, unknown>) => string | undefined;
63
+ removeWidget: (widgetId: string) => void;
64
+ updateWidgetPosition: (widgetId: string, position: GridPosition) => void;
65
+ updateWidgetConfig: (widgetId: string, config: Record<string, unknown>) => void;
66
+ updateWidgetTitle: (widgetId: string, title: string) => void;
67
+ /** Change widget type while preserving position */
68
+ changeWidgetType: (widgetId: string, newType: string) => void;
69
+ dragState: Accessor<DragState | null>;
70
+ startDrag: (widgetId: string, startX: number, startY: number) => void;
71
+ updateDrag: (currentPosition: GridPosition, pixelOffset: {
72
+ x: number;
73
+ y: number;
74
+ }) => void;
75
+ endDrag: (commit: boolean) => void;
76
+ resizeState: Accessor<ResizeState | null>;
77
+ startResize: (widgetId: string, edge: ResizeState['edge'], startX: number, startY: number) => void;
78
+ updateResize: (currentPosition: GridPosition) => void;
79
+ endResize: (commit: boolean) => void;
80
+ getWidgetMinConstraints: (type: string) => {
81
+ minColSpan: number;
82
+ minRowSpan: number;
83
+ };
84
+ }
85
+ export declare const DeckProvider: (props: {
86
+ children: import("solid-js").JSX.Element;
87
+ }) => import("solid-js").JSX.Element, useDeck: () => DeckContextValue;
88
+ export declare function createDeckService(): DeckContextValue;
@@ -0,0 +1,133 @@
1
+ import { type JSX } from 'solid-js';
2
+ export interface FloeStorageAdapter {
3
+ getItem: (key: string) => string | null;
4
+ setItem: (key: string, value: string) => void;
5
+ removeItem: (key: string) => void;
6
+ /**
7
+ * Optional key listing for clearAll(). When not provided, clearAll becomes a no-op.
8
+ * This keeps custom adapters minimal while still supporting localStorage.
9
+ */
10
+ keys?: () => string[];
11
+ }
12
+ export interface FloeStorageConfig {
13
+ /** Namespace prefix for all persisted keys. */
14
+ namespace: string;
15
+ /** Disable all persistence when false. */
16
+ enabled: boolean;
17
+ /** Storage adapter (defaults to localStorage when available). */
18
+ adapter?: FloeStorageAdapter;
19
+ }
20
+ export interface FloeCommandsConfig {
21
+ /** Whether to install the global keydown listener. */
22
+ enableGlobalKeybinds: boolean;
23
+ /**
24
+ * When true, global keybinds are ignored while typing in form fields or contenteditable,
25
+ * unless the active element is inside an opt-in container (see allowWhenTypingWithin).
26
+ */
27
+ ignoreWhenTyping: boolean;
28
+ /** CSS selector to opt-in global keybinds while typing (e.g. code editor). */
29
+ allowWhenTypingWithin: string;
30
+ palette: {
31
+ /** Keybind to toggle the command palette. */
32
+ keybind: string;
33
+ enabled: boolean;
34
+ };
35
+ save: {
36
+ /**
37
+ * Whether to intercept the browser default save dialog (Cmd/Ctrl+S).
38
+ * When enabled, we still only run a command when saveCommandId exists.
39
+ */
40
+ enabled: boolean;
41
+ keybind: string;
42
+ /** Registered command id to run on save (default: file.save). */
43
+ commandId: string;
44
+ /**
45
+ * When true, preventDefault even if no save command is registered.
46
+ * This matches VSCode-style behavior for apps that manage their own saving.
47
+ */
48
+ preventDefaultWhenNoHandler: boolean;
49
+ };
50
+ }
51
+ export interface FloeLayoutConfig {
52
+ storageKey: string;
53
+ mobileQuery: string;
54
+ sidebar: {
55
+ defaultWidth: number;
56
+ clamp: {
57
+ min: number;
58
+ max: number;
59
+ };
60
+ defaultActiveTab: string;
61
+ defaultCollapsed: boolean;
62
+ };
63
+ terminal: {
64
+ defaultOpened: boolean;
65
+ defaultHeight: number;
66
+ clamp: {
67
+ min: number;
68
+ max: number;
69
+ };
70
+ };
71
+ }
72
+ export interface FloeThemeConfig {
73
+ storageKey: string;
74
+ defaultTheme: 'light' | 'dark' | 'system';
75
+ }
76
+ export interface FloeDeckConfig {
77
+ storageKey: string;
78
+ }
79
+ export interface FloeStrings {
80
+ topBar: {
81
+ searchPlaceholder: string;
82
+ };
83
+ commandPalette: {
84
+ placeholder: string;
85
+ empty: string;
86
+ esc: string;
87
+ };
88
+ confirmDialog: {
89
+ cancel: string;
90
+ confirm: string;
91
+ };
92
+ statusIndicator: {
93
+ connected: string;
94
+ disconnected: string;
95
+ connecting: string;
96
+ error: string;
97
+ };
98
+ }
99
+ export interface FloeConfig {
100
+ storage: FloeStorageConfig;
101
+ commands: FloeCommandsConfig;
102
+ layout: FloeLayoutConfig;
103
+ theme: FloeThemeConfig;
104
+ deck: FloeDeckConfig;
105
+ strings: FloeStrings;
106
+ }
107
+ export interface PersistApi {
108
+ key: (key: string) => string;
109
+ load: <T>(key: string, defaultValue: T) => T;
110
+ save: <T>(key: string, value: T) => void;
111
+ debouncedSave: <T>(key: string, value: T, delayMs?: number) => void;
112
+ remove: (key: string) => void;
113
+ clearAll: () => void;
114
+ }
115
+ export interface FloeConfigValue {
116
+ config: FloeConfig;
117
+ persist: PersistApi;
118
+ }
119
+ export type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends readonly (infer U)[] ? readonly U[] : T extends object ? {
120
+ [K in keyof T]?: DeepPartial<T[K]>;
121
+ } : T;
122
+ export declare const DEFAULT_FLOE_CONFIG: FloeConfig;
123
+ export interface FloeConfigProviderProps {
124
+ config?: DeepPartial<FloeConfig>;
125
+ children: JSX.Element;
126
+ }
127
+ export declare function FloeConfigProvider(props: FloeConfigProviderProps): JSX.Element;
128
+ export declare function useFloeConfig(): FloeConfigValue;
129
+ /**
130
+ * Safe accessor for internal services/tests. When the provider is missing,
131
+ * we fall back to DEFAULT_FLOE_CONFIG instead of throwing.
132
+ */
133
+ export declare function useResolvedFloeConfig(): FloeConfigValue;
@@ -0,0 +1,20 @@
1
+ import { type Accessor } from 'solid-js';
2
+ export interface LayoutContextValue {
3
+ sidebarWidth: Accessor<number>;
4
+ sidebarActiveTab: Accessor<string>;
5
+ sidebarCollapsed: Accessor<boolean>;
6
+ setSidebarWidth: (width: number) => void;
7
+ setSidebarActiveTab: (tab: string) => void;
8
+ setSidebarCollapsed: (collapsed: boolean) => void;
9
+ toggleSidebarCollapse: () => void;
10
+ terminalOpened: Accessor<boolean>;
11
+ terminalHeight: Accessor<number>;
12
+ toggleTerminal: () => void;
13
+ setTerminalHeight: (height: number) => void;
14
+ isMobile: Accessor<boolean>;
15
+ setIsMobile: (mobile: boolean) => void;
16
+ }
17
+ export declare const LayoutProvider: (props: {
18
+ children: import("solid-js").JSX.Element;
19
+ }) => import("solid-js").JSX.Element, useLayout: () => LayoutContextValue;
20
+ export declare function createLayoutService(): LayoutContextValue;
@@ -0,0 +1,32 @@
1
+ import { type Accessor } from 'solid-js';
2
+ export type NotificationType = 'info' | 'success' | 'warning' | 'error';
3
+ export interface Notification {
4
+ id: string;
5
+ type: NotificationType;
6
+ title: string;
7
+ message?: string;
8
+ duration?: number;
9
+ action?: {
10
+ label: string;
11
+ onClick: () => void;
12
+ };
13
+ }
14
+ export interface NotificationContextValue {
15
+ notifications: Accessor<Notification[]>;
16
+ show: (notification: Omit<Notification, 'id'>) => string;
17
+ dismiss: (id: string) => void;
18
+ dismissAll: () => void;
19
+ info: (title: string, message?: string) => string;
20
+ success: (title: string, message?: string) => string;
21
+ warning: (title: string, message?: string) => string;
22
+ error: (title: string, message?: string) => string;
23
+ }
24
+ export declare function createNotificationService(): NotificationContextValue;
25
+ export declare const NotificationProvider: (props: {
26
+ children: import("solid-js").JSX.Element;
27
+ }) => import("solid-js").JSX.Element, useNotification: () => NotificationContextValue;
28
+ /**
29
+ * Notification toast container component
30
+ * Place this at the root of your app
31
+ */
32
+ export declare function NotificationContainer(): import("solid-js").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import { type ThemeType } from '../styles/themes';
3
+ export interface ThemeContextValue {
4
+ theme: Accessor<ThemeType>;
5
+ resolvedTheme: Accessor<'light' | 'dark'>;
6
+ setTheme: (theme: ThemeType) => void;
7
+ toggleTheme: () => void;
8
+ }
9
+ export declare function createThemeService(): ThemeContextValue;
10
+ export declare const ThemeProvider: (props: {
11
+ children: import("solid-js").JSX.Element;
12
+ }) => import("solid-js").JSX.Element, useTheme: () => ThemeContextValue;
@@ -0,0 +1,37 @@
1
+ import { type Accessor, type Component } from 'solid-js';
2
+ /**
3
+ * Widget type definition for the dashboard
4
+ */
5
+ export interface WidgetDefinition {
6
+ type: string;
7
+ name: string;
8
+ icon?: Component<{
9
+ class?: string;
10
+ }>;
11
+ category: 'sidebar' | 'metrics' | 'terminal' | 'custom';
12
+ component: Component<WidgetProps>;
13
+ minColSpan?: number;
14
+ minRowSpan?: number;
15
+ defaultColSpan?: number;
16
+ defaultRowSpan?: number;
17
+ }
18
+ /**
19
+ * Props passed to widget components
20
+ */
21
+ export interface WidgetProps {
22
+ widgetId: string;
23
+ config?: Record<string, unknown>;
24
+ isEditMode?: boolean;
25
+ }
26
+ export interface WidgetRegistryValue {
27
+ register: (widget: WidgetDefinition) => void;
28
+ registerAll: (widgets: WidgetDefinition[]) => void;
29
+ unregister: (type: string) => void;
30
+ widgets: Accessor<Map<string, WidgetDefinition>>;
31
+ getWidget: (type: string) => WidgetDefinition | undefined;
32
+ getWidgetsByCategory: (category: WidgetDefinition['category']) => WidgetDefinition[];
33
+ }
34
+ export declare const WidgetRegistryProvider: (props: {
35
+ children: import("solid-js").JSX.Element;
36
+ }) => import("solid-js").JSX.Element, useWidgetRegistry: () => WidgetRegistryValue;
37
+ export declare function createWidgetRegistry(): WidgetRegistryValue;
@@ -0,0 +1,15 @@
1
+ import { type JSX } from 'solid-js';
2
+ /**
3
+ * Factory for creating simple context providers
4
+ * Follows the pattern from opencode implementation
5
+ */
6
+ export declare function createSimpleContext<T>(options: {
7
+ name: string;
8
+ init: () => T;
9
+ }): {
10
+ Provider: (props: {
11
+ children: JSX.Element;
12
+ }) => JSX.Element;
13
+ use: () => T;
14
+ Context: import("solid-js").Context<T | undefined>;
15
+ };
@@ -0,0 +1,9 @@
1
+ export { createSimpleContext } from './createSimpleContext';
2
+ export { FloeConfigProvider, useFloeConfig, useResolvedFloeConfig, DEFAULT_FLOE_CONFIG, type FloeConfig, type FloeConfigValue, type DeepPartial, type FloeStorageAdapter, type PersistApi, } from './FloeConfigContext';
3
+ export { ThemeProvider, useTheme, createThemeService, type ThemeContextValue } from './ThemeContext';
4
+ export { LayoutProvider, useLayout, createLayoutService, type LayoutContextValue } from './LayoutContext';
5
+ export { CommandProvider, useCommand, createCommandService, type Command, type CommandContextValue } from './CommandContext';
6
+ export { NotificationProvider, useNotification, createNotificationService, NotificationContainer, type Notification, type NotificationType, type NotificationContextValue, } from './NotificationContext';
7
+ export { ComponentRegistryProvider, useComponentRegistry, useComponentContextFactory, createComponentRegistry, type FloeComponent, type ComponentContext, type CommandContribution, type StatusBarContribution, type ComponentRegistryValue, } from './ComponentRegistry';
8
+ export { WidgetRegistryProvider, useWidgetRegistry, createWidgetRegistry, type WidgetDefinition, type WidgetProps, type WidgetRegistryValue, } from './WidgetRegistry';
9
+ export { DeckProvider, useDeck, createDeckService, type DeckWidget, type DeckLayout, type DragState, type ResizeState, type DeckContextValue, } from './DeckContext';
@@ -0,0 +1,6 @@
1
+ export { useMediaQuery } from './useMediaQuery';
2
+ export { useDebounce } from './useDebounce';
3
+ export { useResizeObserver, type Size } from './useResizeObserver';
4
+ export { useKeybind } from './useKeybind';
5
+ export { usePersisted } from './usePersisted';
6
+ export { useDeckDrag } from './useDeckDrag';
@@ -0,0 +1,5 @@
1
+ import { type Accessor } from 'solid-js';
2
+ /**
3
+ * Debounced signal value
4
+ */
5
+ export declare function useDebounce<T>(value: Accessor<T>, delay: number): Accessor<T>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook to set up drag handling for deck widgets
3
+ * Listens for pointer events on elements with data-widget-drag-handle attribute
4
+ * Only active when edit mode is enabled
5
+ */
6
+ export declare function useDeckDrag(): void;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Global keybind listener
3
+ */
4
+ export declare function useKeybind(keybind: string, callback: () => void): void;
@@ -0,0 +1,5 @@
1
+ import { type Accessor } from 'solid-js';
2
+ /**
3
+ * Reactive media query hook
4
+ */
5
+ export declare function useMediaQuery(query: string): Accessor<boolean>;
@@ -0,0 +1,5 @@
1
+ import { type Accessor } from 'solid-js';
2
+ /**
3
+ * Persisted signal using Floe's configured persistence (storage adapter + namespace).
4
+ */
5
+ export declare function usePersisted<T>(key: string, defaultValue: T): [Accessor<T>, (value: T) => void];