@sentinel-core/sentinel 1.0.11 → 1.0.13
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/dist/sentinel.cjs +14 -14
- package/dist/sentinel.css +1 -1
- package/dist/sentinel.es.js +1110 -1034
- package/dist/src/react/Sentinel.d.ts +4 -2
- package/dist/src/react/index.d.ts +1 -1
- package/dist/src/react/provider.d.ts +26 -10
- package/dist/src/ui/widgets/PropsViewer.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
type SentinelProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
-
|
|
4
|
+
componentName?: string;
|
|
5
|
+
sourceFile?: string;
|
|
6
|
+
renderCount?: number;
|
|
5
7
|
dialogMd?: string;
|
|
6
8
|
componentProps?: Record<string, any>;
|
|
7
9
|
};
|
|
8
|
-
export declare const Sentinel: ({ children,
|
|
10
|
+
export declare const Sentinel: ({ children, componentName, sourceFile, renderCount, dialogMd, componentProps, }: SentinelProps) => React.JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type
|
|
2
|
+
type DialogMeta = {
|
|
3
|
+
componentName?: string;
|
|
4
|
+
sourceFile?: string;
|
|
5
|
+
renderCount?: number;
|
|
6
|
+
propHistory?: Record<string, any>[];
|
|
7
|
+
md?: string;
|
|
8
|
+
componentProps?: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
type SentinelInteractionContextType = {
|
|
3
11
|
activeId: string | null;
|
|
4
12
|
activeRect: DOMRect | null;
|
|
5
|
-
openDialogId: string | null;
|
|
6
|
-
dialogMeta: {
|
|
7
|
-
title?: string;
|
|
8
|
-
md?: string;
|
|
9
|
-
componentProps?: Record<string, any>;
|
|
10
|
-
};
|
|
11
13
|
registerHover: (id: string, rect: DOMRect) => void;
|
|
12
14
|
unregisterHover: (id: string) => void;
|
|
13
|
-
openDialog: (id: string,
|
|
15
|
+
openDialog: (id: string, componentName?: string, md?: string, componentProps?: Record<string, any>, sourceFile?: string, renderCount?: number, propHistory?: Record<string, any>[]) => void;
|
|
16
|
+
};
|
|
17
|
+
type SentinelDialogContextType = {
|
|
18
|
+
openDialogId: string | null;
|
|
19
|
+
dialogMeta: DialogMeta;
|
|
14
20
|
closeDialog: () => void;
|
|
15
21
|
};
|
|
16
|
-
export declare const SentinelContext: React.Context<SentinelContextType | undefined>;
|
|
17
22
|
export declare const SentinelProvider: ({ children, }: {
|
|
18
23
|
children: React.ReactNode;
|
|
19
24
|
}) => React.JSX.Element;
|
|
20
|
-
export declare const
|
|
25
|
+
export declare const useSentinelInteraction: () => SentinelInteractionContextType;
|
|
26
|
+
export declare const useSentinelDialog: () => SentinelDialogContextType;
|
|
27
|
+
export declare const useSentinel: () => {
|
|
28
|
+
openDialogId: string | null;
|
|
29
|
+
dialogMeta: DialogMeta;
|
|
30
|
+
closeDialog: () => void;
|
|
31
|
+
activeId: string | null;
|
|
32
|
+
activeRect: DOMRect | null;
|
|
33
|
+
registerHover: (id: string, rect: DOMRect) => void;
|
|
34
|
+
unregisterHover: (id: string) => void;
|
|
35
|
+
openDialog: (id: string, componentName?: string, md?: string, componentProps?: Record<string, any>, sourceFile?: string, renderCount?: number, propHistory?: Record<string, any>[]) => void;
|
|
36
|
+
};
|
|
21
37
|
export {};
|