@appkit/dek-lib 0.37.0 → 0.46.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;
@@ -129,7 +129,10 @@ export type AddPluginInput = {
129
129
  components: Array<PluginComponentInput>;
130
130
  description: Scalars['String']['input'];
131
131
  name: Scalars['String']['input'];
132
+ pluginSchema?: InputMaybe<Scalars['String']['input']>;
132
133
  private?: Scalars['Boolean']['input'];
134
+ readme?: InputMaybe<Scalars['String']['input']>;
135
+ title?: InputMaybe<Scalars['String']['input']>;
133
136
  version: Scalars['String']['input'];
134
137
  };
135
138
  export type AddPluginResult = {
@@ -329,6 +332,7 @@ export type Command = {
329
332
  containerProps: Array<CommandProp>;
330
333
  createdAt: Scalars['DateTime']['output'];
331
334
  id: Scalars['ID']['output'];
335
+ integration: Integration;
332
336
  integrationKey: Scalars['String']['output'];
333
337
  props: Array<CommandProp>;
334
338
  title: Scalars['String']['output'];
@@ -688,7 +692,10 @@ export type Plugin = {
688
692
  description: Scalars['String']['output'];
689
693
  id: Scalars['ID']['output'];
690
694
  name: Scalars['String']['output'];
695
+ pluginSchema?: Maybe<Scalars['String']['output']>;
691
696
  private: Scalars['Boolean']['output'];
697
+ readme?: Maybe<Scalars['String']['output']>;
698
+ title?: Maybe<Scalars['String']['output']>;
692
699
  updatedAt: Scalars['DateTime']['output'];
693
700
  user: User;
694
701
  version: Scalars['String']['output'];
@@ -985,7 +992,7 @@ export type UpdateBookResult = {
985
992
  };
986
993
  export type UpdateCommandGroupInput = {
987
994
  archived?: InputMaybe<Scalars['Boolean']['input']>;
988
- commandIds: Array<Scalars['String']['input']>;
995
+ commandIds?: InputMaybe<Array<Scalars['String']['input']>>;
989
996
  title?: InputMaybe<Scalars['String']['input']>;
990
997
  };
991
998
  export type UpdateCommandGroupResult = {
@@ -1185,8 +1192,11 @@ export type ZonePropInput = {
1185
1192
  export type ZonesQueryInput = {
1186
1193
  archived?: InputMaybe<YesNoAnyInput>;
1187
1194
  boardIds?: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
1195
+ component?: InputMaybe<Scalars['String']['input']>;
1188
1196
  createdAt?: InputMaybe<DateRangeInput>;
1189
- title?: InputMaybe<RegexExpressionInput>;
1197
+ key?: InputMaybe<Scalars['String']['input']>;
1198
+ title?: InputMaybe<Scalars['String']['input']>;
1199
+ titleMatch?: InputMaybe<RegexExpressionInput>;
1190
1200
  updatedAt?: InputMaybe<DateRangeInput>;
1191
1201
  };
1192
1202
  export type ZonesResult = {