@appkit/dek-lib 0.37.0 → 0.43.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.
package/README.md CHANGED
@@ -1,3 +1,42 @@
1
- # Dek Lib
1
+ # @appkit/dek-lib
2
2
 
3
- Tools to run a Dek Board
3
+ The DEK board runtime. Provides `BoardProvider`, the component hierarchy (`Board`, `Zone`, `Component`, `Router`), and a set of built-in plugins (base, calendar, clock, home-assistant, weather, desktop, sample).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @appkit/dek-lib
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { authorize, Board, BoardProvider } from '@appkit/dek-lib';
15
+
16
+ const token = await authorize('user@example.com', 'password');
17
+
18
+ <BoardProvider authToken={token}>
19
+ <Board />
20
+ </BoardProvider>
21
+ ```
22
+
23
+ ## Documentation
24
+
25
+ - [Board Configuration](docs/config.md) — Board/zone/layout config format reference
26
+ - [Built-in Plugins](docs/built-in-plugins.md) — base, calendar, clock, home-assistant, weather, desktop, sample
27
+ - [Board System](../../docs/board-system.md) — How the board system works (layout format, zones, navigation)
28
+
29
+ ## Public API
30
+
31
+ ```typescript
32
+ // Components
33
+ export { Board, BoardProvider, Zone, Component, Router, RouteResolver, Command, CommandGroup };
34
+
35
+ // Utilities
36
+ export { authorize }; // Login and get an auth token
37
+ export { loadCustomDekPlugin }; // Load a plugin from remote code
38
+ export { useAuthorization }; // Hook: current auth state
39
+
40
+ // Types
41
+ export type { PreviewConfig };
42
+ ```
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ type Props = {
3
+ children?: ReactNode;
4
+ };
5
+ type State = {
6
+ hasError: boolean;
7
+ };
8
+ declare class ErrorBoundary extends React.Component<Props, State> {
9
+ constructor(props: any);
10
+ static getDerivedStateFromError(error: any): {
11
+ hasError: boolean;
12
+ };
13
+ componentDidCatch(error: any, errorInfo: any): void;
14
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
15
+ }
16
+ export default ErrorBoundary;
@@ -1,5 +1,8 @@
1
1
  type Props = {
2
2
  height?: string | number;
3
+ leftWidget?: string;
4
+ centerWidget?: string;
5
+ rightWidget?: string;
3
6
  };
4
- declare const Header: ({ height }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ declare const Header: ({ height, leftWidget, centerWidget, rightWidget, }: Props) => import("react/jsx-runtime").JSX.Element;
5
8
  export default Header;