@sentinel-core/sentinel 1.0.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/dist/sentinel.css +3 -0
- package/dist/sentinel.js +18659 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/react/Sentinel.d.ts +9 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/provider.d.ts +21 -0
- package/dist/src/ui/components/Button.d.ts +11 -0
- package/dist/src/ui/components/Dialog.d.ts +22 -0
- package/dist/src/ui/components/Label.d.ts +4 -0
- package/dist/src/ui/components/Tabs.d.ts +7 -0
- package/dist/src/ui/widgets/SentinelDialog.d.ts +1 -0
- package/dist/src/ui/widgets/Spotlight.d.ts +7 -0
- package/dist/src/utils/cn.d.ts +2 -0
- package/package.json +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './react';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type SentinelProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
dialogTitle?: string;
|
|
5
|
+
dialogMd?: string;
|
|
6
|
+
componentProps?: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
export declare const Sentinel: ({ children, dialogTitle, dialogMd, componentProps, }: SentinelProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type SentinelContextType = {
|
|
3
|
+
activeId: string | null;
|
|
4
|
+
activeRect: DOMRect | null;
|
|
5
|
+
openDialogId: string | null;
|
|
6
|
+
dialogMeta: {
|
|
7
|
+
title?: string;
|
|
8
|
+
md?: string;
|
|
9
|
+
componentProps?: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
registerHover: (id: string, rect: DOMRect) => void;
|
|
12
|
+
unregisterHover: (id: string) => void;
|
|
13
|
+
openDialog: (id: string, title?: string, md?: string, componentProps?: Record<string, any>) => void;
|
|
14
|
+
closeDialog: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const SentinelContext: React.Context<SentinelContextType | undefined>;
|
|
17
|
+
export declare const SentinelProvider: ({ children, }: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const useSentinel: () => SentinelContextType;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DialogPrimitive from "@huin-core/react-dialog";
|
|
4
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
5
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
7
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
+
variant?: "center" | "top" | "bottom" | "left" | "right" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DialogHeader: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const DialogFooter: {
|
|
17
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@huin-core/react-label";
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
4
|
+
export { Label };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@huin-core/react-tabs";
|
|
3
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SentinelDialog: () => import("react/jsx-runtime").JSX.Element;
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sentinel-core/sentinel",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Runtime intelligence for your UI.",
|
|
5
|
+
"author": "firatorhan",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/firatorhan/sentinel.git",
|
|
11
|
+
"directory": "packages/sentinel"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"sentinel",
|
|
15
|
+
"react-components",
|
|
16
|
+
"tailwind",
|
|
17
|
+
"huinhub",
|
|
18
|
+
"markdown-dialog"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/src/index.d.ts",
|
|
24
|
+
"import": "./dist/sentinel.js"
|
|
25
|
+
},
|
|
26
|
+
"./index.css": "./dist/sentinel.css"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"dev": "vite build --watch",
|
|
33
|
+
"build": "tsc -b && vite build",
|
|
34
|
+
"lint": "eslint .",
|
|
35
|
+
"preview": "vite preview"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@huin-core/react-dialog": "^1.0.5",
|
|
39
|
+
"@huin-core/react-label": "^1.0.5",
|
|
40
|
+
"@huin-core/react-portal": "^1.0.5",
|
|
41
|
+
"@huin-core/react-primitive": "^1.0.5",
|
|
42
|
+
"@huin-core/react-slot": "^1.0.5",
|
|
43
|
+
"@huin-core/react-tabs": "^1.0.5",
|
|
44
|
+
"class-variance-authority": "^0.7.1",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"react-markdown": "^10.1.0",
|
|
47
|
+
"rehype-highlight": "^7.0.2",
|
|
48
|
+
"remark-gfm": "^4.0.1",
|
|
49
|
+
"tailwind-merge": "^3.6.0"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": ">=18",
|
|
53
|
+
"react-dom": ">=18"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@eslint/js": "^10.0.1",
|
|
57
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
58
|
+
"@types/node": "^24.12.3",
|
|
59
|
+
"@types/react": "^19.2.14",
|
|
60
|
+
"@types/react-dom": "^19.2.3",
|
|
61
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
62
|
+
"eslint": "^10.3.0",
|
|
63
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
64
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
65
|
+
"globals": "^17.6.0",
|
|
66
|
+
"tailwindcss": "^4.3.0",
|
|
67
|
+
"typescript": "~6.0.2",
|
|
68
|
+
"typescript-eslint": "^8.59.2",
|
|
69
|
+
"vite": "^8.0.12",
|
|
70
|
+
"vite-plugin-dts": "^5.0.1"
|
|
71
|
+
}
|
|
72
|
+
}
|