@akanjs/client 0.9.41 → 0.9.43

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.
@@ -1,5 +1,8 @@
1
1
  "use client";
2
- import { createContext, useContext } from "react";
2
+ import {
3
+ createContext,
4
+ useContext
5
+ } from "react";
3
6
  const DEFAULT_TOP_INSET = 48;
4
7
  const DEFAULT_BOTTOM_INSET = 60;
5
8
  const defaultPageState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/client",
3
- "version": "0.9.41",
3
+ "version": "0.9.43",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { FetchInitForm } from "@akanjs/signal";
2
2
  import { type ClassValue } from "clsx";
3
- import type { ReactNode } from "react";
3
+ import type { ReactElement, ReactNode } from "react";
4
4
  export declare const clsx: (...args: ClassValue[]) => string;
5
5
  export declare const loadFonts: (fonts: {
6
6
  name: string;
@@ -29,7 +29,7 @@ export type ModelProps<T extends string, L extends {
29
29
  className?: string;
30
30
  sliceName?: T;
31
31
  onClick?: (model: L) => any;
32
- actions?: DataAction<L>[];
32
+ actions?: DataAction[];
33
33
  columns?: DataColumn<L>[];
34
34
  href?: string;
35
35
  };
@@ -43,7 +43,9 @@ export interface ModelDashboardProps<Summary> {
43
43
  hidePresents?: boolean;
44
44
  sliceName?: string;
45
45
  }
46
- export interface ModelInsightProps<Insight> {
46
+ export interface ModelInsightProps<Insight = {
47
+ count: number;
48
+ }> {
47
49
  className?: string;
48
50
  insight: Insight;
49
51
  sliceName?: string;
@@ -55,10 +57,7 @@ export interface ModelViewProps {
55
57
  id?: string;
56
58
  sliceName?: string;
57
59
  }
58
- export type DataAction<L> = "edit" | "view" | "remove" | {
59
- type: string;
60
- render: () => ReactNode;
61
- };
60
+ export type DataAction = "edit" | "view" | "remove" | null | undefined | ReactElement;
62
61
  export interface DataTool {
63
62
  render: () => ReactNode;
64
63
  }