@litelens/design-system 1.6.5 → 1.7.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 +28 -22
- package/dist/atoms/index.js +1 -1
- package/dist/{chunk-HNYJJE2D.js → chunk-SGI4TV5J.js} +3 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/package.json +2 -5
- package/dist/chunk-TLJXC46A.js +0 -1
- package/dist/types/index.d.ts +0 -55
- package/dist/types/index.js +0 -1
package/README.md
CHANGED
|
@@ -19,10 +19,25 @@ React 19 component library for litelens — atoms, components, utilities, and ho
|
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
|
+
This package is published to [GitHub Packages](https://github.com/orgs/litelensapp/packages), not the public npm registry. GitHub Packages requires the npm scope to match the owning GitHub org, so the package is published there as **`@litelensapp/design-system`** (the source package is `@litelens/design-system` internally, but external consumers install and import it under the `@litelensapp` scope).
|
|
23
|
+
|
|
24
|
+
### 1. Authenticate to GitHub Packages
|
|
25
|
+
|
|
26
|
+
Create a GitHub [personal access token](https://github.com/settings/tokens) with at least `read:packages` scope, then add a `.npmrc` in your project root (or `~/.npmrc` for a global config):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
@litelensapp:registry=https://npm.pkg.github.com
|
|
30
|
+
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Set `GITHUB_TOKEN` in your shell environment (or replace `${GITHUB_TOKEN}` with the token directly, though an env var is recommended so the token isn't committed).
|
|
34
|
+
|
|
35
|
+
### 2. Install
|
|
36
|
+
|
|
22
37
|
```bash
|
|
23
|
-
npm install @
|
|
38
|
+
npm install @litelensapp/design-system
|
|
24
39
|
# or
|
|
25
|
-
pnpm add @
|
|
40
|
+
pnpm add @litelensapp/design-system
|
|
26
41
|
```
|
|
27
42
|
|
|
28
43
|
## Tailwind CSS v4 Setup
|
|
@@ -31,7 +46,7 @@ Tailwind CSS v4 is required, via the `@tailwindcss/vite` plugin. After installin
|
|
|
31
46
|
|
|
32
47
|
```css
|
|
33
48
|
/* src/style.css */
|
|
34
|
-
@import "@
|
|
49
|
+
@import "@litelensapp/design-system/styles.css";
|
|
35
50
|
|
|
36
51
|
/* your app's own styles below */
|
|
37
52
|
```
|
|
@@ -55,9 +70,9 @@ The package exports from multiple entrypoints for granular imports:
|
|
|
55
70
|
Low-level primitive components (buttons, inputs, dialogs, etc.):
|
|
56
71
|
|
|
57
72
|
```tsx
|
|
58
|
-
import { Button } from "@
|
|
59
|
-
import { Input } from "@
|
|
60
|
-
import { Badge } from "@
|
|
73
|
+
import { Button } from "@litelensapp/design-system";
|
|
74
|
+
import { Input } from "@litelensapp/design-system";
|
|
75
|
+
import { Badge } from "@litelensapp/design-system";
|
|
61
76
|
```
|
|
62
77
|
|
|
63
78
|
### Atoms subpath (`./atoms`)
|
|
@@ -65,7 +80,7 @@ import { Badge } from "@litelens/design-system";
|
|
|
65
80
|
Directly reference the atoms barrel export:
|
|
66
81
|
|
|
67
82
|
```tsx
|
|
68
|
-
import { Button, Checkbox, Select } from "@
|
|
83
|
+
import { Button, Checkbox, Select } from "@litelensapp/design-system/atoms";
|
|
69
84
|
```
|
|
70
85
|
|
|
71
86
|
### Components (`./components`)
|
|
@@ -77,7 +92,7 @@ import {
|
|
|
77
92
|
AnnotationBadge,
|
|
78
93
|
ResourceDetailDrawer,
|
|
79
94
|
ResourceDeletionButton,
|
|
80
|
-
} from "@
|
|
95
|
+
} from "@litelensapp/design-system/components";
|
|
81
96
|
```
|
|
82
97
|
|
|
83
98
|
### Hooks (`./hooks`)
|
|
@@ -85,7 +100,7 @@ import {
|
|
|
85
100
|
React hooks for common operations:
|
|
86
101
|
|
|
87
102
|
```tsx
|
|
88
|
-
import { useCopyToClipboard } from "@
|
|
103
|
+
import { useCopyToClipboard } from "@litelensapp/design-system/hooks";
|
|
89
104
|
```
|
|
90
105
|
|
|
91
106
|
### Utils (`./utils`)
|
|
@@ -93,15 +108,7 @@ import { useCopyToClipboard } from "@litelens/design-system/hooks";
|
|
|
93
108
|
Utility functions for formatting, transformation, and common operations:
|
|
94
109
|
|
|
95
110
|
```tsx
|
|
96
|
-
import { formatRelativeTime, formatTs, cn } from "@
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Types (`./types`)
|
|
100
|
-
|
|
101
|
-
TypeScript type definitions for API and navigation:
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
import type { NavItem, NavGroup, UseQueryCallback } from "@litelens/design-system/types";
|
|
111
|
+
import { formatRelativeTime, formatTs, cn } from "@litelensapp/design-system/utils";
|
|
105
112
|
```
|
|
106
113
|
|
|
107
114
|
### Libs (`./libs`)
|
|
@@ -109,7 +116,7 @@ import type { NavItem, NavGroup, UseQueryCallback } from "@litelens/design-syste
|
|
|
109
116
|
Advanced libraries and utilities (full-text search, etc.):
|
|
110
117
|
|
|
111
118
|
```tsx
|
|
112
|
-
import { FullTextSearchInput, useFullTextSearch } from "@
|
|
119
|
+
import { FullTextSearchInput, useFullTextSearch } from "@litelensapp/design-system/libs";
|
|
113
120
|
```
|
|
114
121
|
|
|
115
122
|
## Publishing
|
|
@@ -119,10 +126,9 @@ Version bumps and publishing are automated:
|
|
|
119
126
|
1. Bump the version in `package.json`
|
|
120
127
|
2. Commit and push to the main branch
|
|
121
128
|
3. Create a git tag: `git tag design-system/vX.Y.Z` and push it
|
|
122
|
-
4. The `.github/workflows/publish-design-system.yml` workflow automatically:
|
|
129
|
+
4. The `.github/workflows/job-publish-design-system.yml` workflow (invoked from `cd.yml`) automatically:
|
|
123
130
|
- Builds the package using `tsup`
|
|
124
|
-
- Publishes to
|
|
125
|
-
- Creates a GitHub release
|
|
131
|
+
- Publishes to [GitHub Packages](https://github.com/orgs/litelensapp/packages) as `@litelensapp/design-system`
|
|
126
132
|
|
|
127
133
|
## Contributing
|
|
128
134
|
|
package/dist/atoms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toaster, textareaVariants } from '../chunk-
|
|
1
|
+
export { Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toaster, textareaVariants } from '../chunk-SGI4TV5J.js';
|
|
2
2
|
export { Badge, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, toast } from '../chunk-UXCVSUSL.js';
|
|
3
3
|
import '../chunk-3ZL7QROP.js';
|
|
4
4
|
import '../chunk-NFJMUQY6.js';
|
|
@@ -744,7 +744,7 @@ function TextareaYaml({
|
|
|
744
744
|
gutterRef.current.scrollTop = scrollTop;
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
|
-
const gutterLines = lines.map((_, i) => /* @__PURE__ */ jsx("div", { className: "leading-5", children: i + 1 },
|
|
747
|
+
const gutterLines = lines.map((_, i) => /* @__PURE__ */ jsx("div", { className: "leading-5", children: i + 1 }, lineStarts[i]));
|
|
748
748
|
const gutterStyle = {
|
|
749
749
|
color: YC.lineNum,
|
|
750
750
|
borderRight: `1px solid ${YC.lineNumBorder}`,
|
|
@@ -759,7 +759,7 @@ function TextareaYaml({
|
|
|
759
759
|
lineStart: lineStarts[i],
|
|
760
760
|
activeMatchCharIdx
|
|
761
761
|
}
|
|
762
|
-
) },
|
|
762
|
+
) }, lineStarts[i]));
|
|
763
763
|
return /* @__PURE__ */ jsxs(
|
|
764
764
|
"div",
|
|
765
765
|
{
|
|
@@ -846,7 +846,7 @@ function TextareaYaml({
|
|
|
846
846
|
}
|
|
847
847
|
)
|
|
848
848
|
},
|
|
849
|
-
|
|
849
|
+
lineStarts[i]
|
|
850
850
|
)) })
|
|
851
851
|
] })
|
|
852
852
|
)
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { AppleIcon, Badge, Button, Checkbox, Collapsible, CollapsiblePanel, Coll
|
|
|
2
2
|
export { toast } from 'sonner';
|
|
3
3
|
export { AnnotationBadge, ButtonGroup, ButtonGroupProps, ConfirmationModal, Divider, DonutChart, EmptyState, EmptyStateProps, ErrorBoundary, ErrorToast, ErrorToastProps, FormModal, LineIcon, LoadingSpinner, LoadingSpinnerProps, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailDrawerProps, ResourceDetailEmptyBody, ResourceDetailEmptyBodyProps, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, SuccessToastProps, TOAST_STYLE, TableSkeletonLoader, TableSkeletonLoaderProps, TableSkeletonRow, TableSkeletonRowProps, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './components/index.js';
|
|
4
4
|
export { BREAKPOINTS, Breakpoint, useBreakpoint, useCopyToClipboard, useMediaQuery } from './hooks/index.js';
|
|
5
|
-
export { NavEntry, NavGroup, NavItem, SharedNamespaceContext, SharedUnifiedTrayContentProps, SharedUnifiedTrayContext, SharedUnifiedTrayOpenParams, SharedUnifiedTrayTab, UnifiedTrayAllFamily, UnifiedTrayCoreFamily, UseQueryCallback } from './types/index.js';
|
|
6
5
|
export { clamp, cn, formatRelativeTime, formatTs } from './utils/index.js';
|
|
7
6
|
export { FullTextSearchInput, SplitAndHighlightText, UseFullTextSearchCustomOptions, UseFullTextSearchOptions, UseFullTextSearchReturn, UseFullTextSearchWithHandlersReturn, useFullTextSearch } from './libs/index.js';
|
|
8
7
|
export { AppWindowIcon, ArrowLeftRightIcon, ArrowUpCircleIcon, ArrowUpIcon, BellIcon, BoxesIcon, CheckCircle2Icon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, CircleCheckIcon, CircleXIcon, ClockIcon, ContainerIcon, CopyIcon, CornerDownLeftIcon, CpuIcon, DatabaseIcon, DownloadIcon, DropletIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, FolderOpenIcon, FolderSyncIcon, FrownIcon, GaugeIcon, HardDriveIcon, HouseIcon, InfoIcon, KeyIcon, LayersIcon, LayoutDashboardIcon, Link2Icon, ListChecksIcon, Loader2Icon, LockIcon, LockOpenIcon, Maximize2Icon, Minimize2Icon, MinusIcon, MoreVerticalIcon, NetworkIcon, OctagonXIcon, PackageIcon, PauseIcon, PencilIcon, PlayIcon, PlugIcon, PlusIcon, RefreshCwIcon, RocketIcon, RotateCcwIcon, RouteIcon, SaveIcon, ScalingIcon, ScrollTextIcon, SearchIcon, ServerIcon, Settings2Icon, SettingsIcon, ShieldAlertIcon, ShieldCheckIcon, ShieldIcon, SlidersHorizontalIcon, SquareIcon, StarIcon, TerminalIcon, TimerIcon, Trash2Icon, TriangleAlertIcon, UserRoundIcon, WebhookIcon, XCircleIcon, XIcon } from 'lucide-react';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toaster, textareaVariants } from './chunk-
|
|
1
|
+
export { Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toaster, textareaVariants } from './chunk-SGI4TV5J.js';
|
|
2
2
|
export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './chunk-A3HUPART.js';
|
|
3
3
|
export { Badge, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, toast } from './chunk-UXCVSUSL.js';
|
|
4
4
|
export { BREAKPOINTS, useBreakpoint, useMediaQuery } from './chunk-XLB44BWQ.js';
|
|
5
5
|
export { useCopyToClipboard } from './chunk-3ZL7QROP.js';
|
|
6
|
-
import './chunk-TLJXC46A.js';
|
|
7
6
|
export { formatRelativeTime, formatTs } from './chunk-CPX26L4M.js';
|
|
8
7
|
export { FullTextSearchInput, useFullTextSearch } from './chunk-74UTXQDZ.js';
|
|
9
8
|
export { SplitAndHighlightText } from './chunk-NFJMUQY6.js';
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litelens/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Design system components, utilities, and hooks for litelens",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/litelensapp/litelens.git",
|
|
9
|
-
"directory": "design-system"
|
|
9
|
+
"directory": "packages/design-system"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
@@ -30,9 +30,6 @@
|
|
|
30
30
|
"./hooks": {
|
|
31
31
|
"import": "./dist/hooks/index.js"
|
|
32
32
|
},
|
|
33
|
-
"./types": {
|
|
34
|
-
"import": "./dist/types/index.js"
|
|
35
|
-
},
|
|
36
33
|
"./utils": {
|
|
37
34
|
"import": "./dist/utils/index.js"
|
|
38
35
|
},
|
package/dist/chunk-TLJXC46A.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface UseQueryCallback<T = unknown> {
|
|
4
|
-
select?: (data?: T) => T;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface NavItem<T> {
|
|
8
|
-
id: string;
|
|
9
|
-
label: string;
|
|
10
|
-
view?: T;
|
|
11
|
-
}
|
|
12
|
-
interface NavGroup<T> {
|
|
13
|
-
id: string;
|
|
14
|
-
label: string;
|
|
15
|
-
icon: ElementType;
|
|
16
|
-
items: NavItem<T>[];
|
|
17
|
-
}
|
|
18
|
-
type NavEntry<T> = {
|
|
19
|
-
kind: "item";
|
|
20
|
-
icon: ElementType;
|
|
21
|
-
item: NavItem<T>;
|
|
22
|
-
} | {
|
|
23
|
-
kind: "group";
|
|
24
|
-
group: NavGroup<T>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
interface SharedNamespaceContext {
|
|
28
|
-
Name: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
type UnifiedTrayCoreFamily = "modification" | "pod";
|
|
32
|
-
type UnifiedTrayAllFamily = UnifiedTrayCoreFamily | (string & {});
|
|
33
|
-
interface SharedUnifiedTrayOpenParams {
|
|
34
|
-
label: string;
|
|
35
|
-
icon?: ReactNode;
|
|
36
|
-
dedupeKey: string;
|
|
37
|
-
[key: string]: unknown;
|
|
38
|
-
}
|
|
39
|
-
interface SharedUnifiedTrayTab {
|
|
40
|
-
family: string;
|
|
41
|
-
id: string;
|
|
42
|
-
label: string;
|
|
43
|
-
icon?: ReactNode;
|
|
44
|
-
params: Record<string, unknown>;
|
|
45
|
-
}
|
|
46
|
-
interface SharedUnifiedTrayContentProps {
|
|
47
|
-
tab: SharedUnifiedTrayTab;
|
|
48
|
-
collapsed: boolean;
|
|
49
|
-
onClose: () => void;
|
|
50
|
-
}
|
|
51
|
-
interface SharedUnifiedTrayContext {
|
|
52
|
-
openTab: (family: UnifiedTrayAllFamily, params: any) => void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export type { NavEntry, NavGroup, NavItem, SharedNamespaceContext, SharedUnifiedTrayContentProps, SharedUnifiedTrayContext, SharedUnifiedTrayOpenParams, SharedUnifiedTrayTab, UnifiedTrayAllFamily, UnifiedTrayCoreFamily, UseQueryCallback };
|
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '../chunk-TLJXC46A.js';
|