@rotorjs/react 0.4.2 → 0.5.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ComponentType
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { DashboardTileContainerProps } from './DashboardTileContainer';
|
|
2
3
|
export type DashboardLayoutContextValue = {
|
|
3
4
|
type: string;
|
|
4
|
-
tileContainer?: ComponentType<
|
|
5
|
+
tileContainer?: ComponentType<DashboardTileContainerProps>;
|
|
5
6
|
};
|
|
6
7
|
export declare const DashboardLayoutContext: import('react').Context<DashboardLayoutContextValue>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DashboardLayoutConfig } from '@rotorjs/dashboards';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
export type DashboardTileContainerProps = PropsWithChildren<{
|
|
4
|
+
layout?: DashboardLayoutConfig;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function DashboardTileContainer({ layout, children, }: DashboardTileContainerProps): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
package/dist/main.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './DashboardError';
|
|
|
4
4
|
export * from './DashboardLayout';
|
|
5
5
|
export * from './DashboardLayoutContext';
|
|
6
6
|
export * from './DashboardLayoutError';
|
|
7
|
+
export * from './DashboardTileContainer';
|
|
7
8
|
export * from './DashboardTileError';
|
|
8
9
|
export * from './DashboardTiles';
|
|
9
10
|
export * from './getKey';
|
package/dist/main.js
CHANGED
|
@@ -161,8 +161,17 @@ function x({ engine: t, initialVars: n, initialFacts: r, layouts: c, defaultLayo
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
|
+
//#region lib/DashboardTileContainer.tsx
|
|
165
|
+
function S({ layout: e, children: t }) {
|
|
166
|
+
let { tileContainer: n } = r(m);
|
|
167
|
+
return n ? /* @__PURE__ */ l(n, {
|
|
168
|
+
layout: e,
|
|
169
|
+
children: t
|
|
170
|
+
}) : t;
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
164
173
|
//#region lib/useDashboardState.ts
|
|
165
|
-
function
|
|
174
|
+
function C(e, t = []) {
|
|
166
175
|
let { engine: n } = r(f), [a, c] = o(e), [l, u] = o(t);
|
|
167
176
|
return d(e, a) || c(a), i(() => {
|
|
168
177
|
let e = s(), t = new AbortController(), r = t.signal;
|
|
@@ -174,4 +183,4 @@ function S(e, t = []) {
|
|
|
174
183
|
}, [a, n]), l;
|
|
175
184
|
}
|
|
176
185
|
//#endregion
|
|
177
|
-
export { x as Dashboard, f as DashboardContext, p as DashboardError, v as DashboardLayout, m as DashboardLayoutContext, _ as DashboardLayoutError, y as DashboardTileError, b as DashboardTiles, h as getKey,
|
|
186
|
+
export { x as Dashboard, f as DashboardContext, p as DashboardError, v as DashboardLayout, m as DashboardLayoutContext, _ as DashboardLayoutError, S as DashboardTileContainer, y as DashboardTileError, b as DashboardTiles, h as getKey, C as useDashboardState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotorjs/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Rotor",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aaron Burmeister"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"typescript": "^6.0.3",
|
|
63
63
|
"typescript-eslint": "^8.59.3",
|
|
64
64
|
"unplugin-dts": "^1.0.0",
|
|
65
|
-
"vite": "^8.0.
|
|
65
|
+
"vite": "^8.0.13"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@rotorjs/dashboards": "^0.13.0",
|