@ucdjs-internal/shared-ui 0.1.5 → 0.1.7
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 +0 -3
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.mjs +4 -0
- package/dist/components/shiki-code.d.mts +1 -1
- package/dist/components/shiki-code.mjs +4 -4
- package/dist/components/theme-toggle.d.mts +2 -1
- package/dist/components/theme-toggle.mjs +23 -4
- package/dist/components/ucd-logo.d.mts +10 -0
- package/dist/components/ucd-logo.mjs +61 -0
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/hooks/use-clipboard.d.mts +28 -0
- package/dist/hooks/use-clipboard.mjs +60 -0
- package/dist/hooks/use-mobile.mjs +1 -3
- package/dist/hooks/use-theme.mjs +6 -8
- package/dist/index.mjs +1 -2
- package/dist/lib/theme-script.mjs +1 -2
- package/dist/lib/utils.mjs +1 -3
- package/dist/ui/alert-dialog.mjs +1 -3
- package/dist/ui/avatar.mjs +1 -3
- package/dist/ui/badge.d.mts +1 -1
- package/dist/ui/badge.mjs +1 -3
- package/dist/ui/breadcrumb.mjs +1 -3
- package/dist/ui/button.d.mts +2 -2
- package/dist/ui/button.mjs +1 -3
- package/dist/ui/card.mjs +1 -3
- package/dist/ui/checkbox.mjs +1 -3
- package/dist/ui/collapsible.mjs +1 -3
- package/dist/ui/combobox.mjs +1 -3
- package/dist/ui/command.d.mts +52 -13
- package/dist/ui/command.mjs +327 -90
- package/dist/ui/context-menu.mjs +1 -3
- package/dist/ui/dialog.d.mts +2 -0
- package/dist/ui/dialog.mjs +40 -31
- package/dist/ui/dropdown-menu.mjs +1 -3
- package/dist/ui/field.d.mts +1 -1
- package/dist/ui/field.mjs +1 -3
- package/dist/ui/input-group.mjs +1 -3
- package/dist/ui/input.mjs +1 -3
- package/dist/ui/label.mjs +1 -3
- package/dist/ui/scroll-area.mjs +1 -3
- package/dist/ui/select.mjs +1 -3
- package/dist/ui/separator.mjs +1 -3
- package/dist/ui/sheet.mjs +1 -3
- package/dist/ui/sidebar.d.mts +1 -1
- package/dist/ui/sidebar.mjs +3 -5
- package/dist/ui/skeleton.mjs +1 -3
- package/dist/ui/table.mjs +1 -3
- package/dist/ui/textarea.mjs +1 -3
- package/dist/ui/tooltip.mjs +1 -3
- package/dist/vscode/syntaxes/ucd.tmLanguage.mjs +42 -0
- package/package.json +19 -20
- package/dist/vendor/cmdk/command-score.mjs +0 -62
- package/dist/vendor/cmdk/index.d.mts +0 -181
- package/dist/vendor/cmdk/index.mjs +0 -713
package/dist/ui/dialog.mjs
CHANGED
|
@@ -5,7 +5,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { XIcon } from "lucide-react";
|
|
7
7
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
8
|
-
|
|
9
8
|
//#region src/ui/dialog.tsx
|
|
10
9
|
function Dialog(t0) {
|
|
11
10
|
const $ = c(4);
|
|
@@ -116,38 +115,42 @@ function DialogOverlay(t0) {
|
|
|
116
115
|
return t2;
|
|
117
116
|
}
|
|
118
117
|
function DialogContent(t0) {
|
|
119
|
-
const $ = c(
|
|
118
|
+
const $ = c(20);
|
|
120
119
|
let children;
|
|
121
120
|
let className;
|
|
121
|
+
let overlayClassName;
|
|
122
122
|
let props;
|
|
123
123
|
let t1;
|
|
124
124
|
if ($[0] !== t0) {
|
|
125
|
-
({className, children, showCloseButton: t1, ...props} = t0);
|
|
125
|
+
({className, overlayClassName, children, showCloseButton: t1, ...props} = t0);
|
|
126
126
|
$[0] = t0;
|
|
127
127
|
$[1] = children;
|
|
128
128
|
$[2] = className;
|
|
129
|
-
$[3] =
|
|
130
|
-
$[4] =
|
|
129
|
+
$[3] = overlayClassName;
|
|
130
|
+
$[4] = props;
|
|
131
|
+
$[5] = t1;
|
|
131
132
|
} else {
|
|
132
133
|
children = $[1];
|
|
133
134
|
className = $[2];
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
overlayClassName = $[3];
|
|
136
|
+
props = $[4];
|
|
137
|
+
t1 = $[5];
|
|
136
138
|
}
|
|
137
139
|
const showCloseButton = t1 === void 0 ? true : t1;
|
|
138
140
|
let t2;
|
|
139
|
-
if ($[
|
|
140
|
-
t2 = /* @__PURE__ */ jsx(DialogOverlay, {});
|
|
141
|
-
$[
|
|
142
|
-
|
|
141
|
+
if ($[6] !== overlayClassName) {
|
|
142
|
+
t2 = /* @__PURE__ */ jsx(DialogOverlay, { className: overlayClassName });
|
|
143
|
+
$[6] = overlayClassName;
|
|
144
|
+
$[7] = t2;
|
|
145
|
+
} else t2 = $[7];
|
|
143
146
|
let t3;
|
|
144
|
-
if ($[
|
|
147
|
+
if ($[8] !== className) {
|
|
145
148
|
t3 = cn("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none", className);
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else t3 = $[
|
|
149
|
+
$[8] = className;
|
|
150
|
+
$[9] = t3;
|
|
151
|
+
} else t3 = $[9];
|
|
149
152
|
let t4;
|
|
150
|
-
if ($[
|
|
153
|
+
if ($[10] !== showCloseButton) {
|
|
151
154
|
t4 = showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
152
155
|
"data-slot": "dialog-close",
|
|
153
156
|
render: /* @__PURE__ */ jsx(Button, {
|
|
@@ -160,24 +163,31 @@ function DialogContent(t0) {
|
|
|
160
163
|
children: "Close"
|
|
161
164
|
})]
|
|
162
165
|
});
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
} else t4 = $[
|
|
166
|
+
$[10] = showCloseButton;
|
|
167
|
+
$[11] = t4;
|
|
168
|
+
} else t4 = $[11];
|
|
166
169
|
let t5;
|
|
167
|
-
if ($[
|
|
168
|
-
t5 = /* @__PURE__ */ jsxs(
|
|
170
|
+
if ($[12] !== children || $[13] !== props || $[14] !== t3 || $[15] !== t4) {
|
|
171
|
+
t5 = /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
169
172
|
"data-slot": "dialog-content",
|
|
170
173
|
className: t3,
|
|
171
174
|
...props,
|
|
172
175
|
children: [children, t4]
|
|
173
|
-
})
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
} else t5 = $[
|
|
180
|
-
|
|
176
|
+
});
|
|
177
|
+
$[12] = children;
|
|
178
|
+
$[13] = props;
|
|
179
|
+
$[14] = t3;
|
|
180
|
+
$[15] = t4;
|
|
181
|
+
$[16] = t5;
|
|
182
|
+
} else t5 = $[16];
|
|
183
|
+
let t6;
|
|
184
|
+
if ($[17] !== t2 || $[18] !== t5) {
|
|
185
|
+
t6 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t2, t5] });
|
|
186
|
+
$[17] = t2;
|
|
187
|
+
$[18] = t5;
|
|
188
|
+
$[19] = t6;
|
|
189
|
+
} else t6 = $[19];
|
|
190
|
+
return t6;
|
|
181
191
|
}
|
|
182
192
|
function DialogHeader(t0) {
|
|
183
193
|
const $ = c(8);
|
|
@@ -326,6 +336,5 @@ function DialogDescription(t0) {
|
|
|
326
336
|
} else t2 = $[7];
|
|
327
337
|
return t2;
|
|
328
338
|
}
|
|
329
|
-
|
|
330
339
|
//#endregion
|
|
331
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
340
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -4,7 +4,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Check, ChevronRight } from "lucide-react";
|
|
6
6
|
import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
7
|
-
|
|
8
7
|
//#region src/ui/dropdown-menu.tsx
|
|
9
8
|
function DropdownMenu(t0) {
|
|
10
9
|
const $ = c(4);
|
|
@@ -529,6 +528,5 @@ function DropdownMenuShortcut(t0) {
|
|
|
529
528
|
} else t2 = $[7];
|
|
530
529
|
return t2;
|
|
531
530
|
}
|
|
532
|
-
|
|
533
531
|
//#endregion
|
|
534
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
532
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
package/dist/ui/field.d.mts
CHANGED
|
@@ -20,7 +20,7 @@ declare function FieldGroup({
|
|
|
20
20
|
...props
|
|
21
21
|
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
22
22
|
declare const fieldVariants: (props?: ({
|
|
23
|
-
orientation?: "
|
|
23
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
24
24
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
25
25
|
declare function Field({
|
|
26
26
|
className,
|
package/dist/ui/field.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import { Separator } from "./separator.mjs";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
|
-
|
|
8
7
|
//#region src/ui/field.tsx
|
|
9
8
|
function FieldSet(t0) {
|
|
10
9
|
const $ = c(8);
|
|
@@ -420,6 +419,5 @@ function _temp2(error_0) {
|
|
|
420
419
|
function _temp(error) {
|
|
421
420
|
return [error?.message, error];
|
|
422
421
|
}
|
|
423
|
-
|
|
424
422
|
//#endregion
|
|
425
|
-
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
423
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
package/dist/ui/input-group.mjs
CHANGED
|
@@ -6,7 +6,6 @@ import "react";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
|
-
|
|
10
9
|
//#region src/ui/input-group.tsx
|
|
11
10
|
function InputGroup(t0) {
|
|
12
11
|
const $ = c(8);
|
|
@@ -249,6 +248,5 @@ function InputGroupTextarea(t0) {
|
|
|
249
248
|
} else t2 = $[7];
|
|
250
249
|
return t2;
|
|
251
250
|
}
|
|
252
|
-
|
|
253
251
|
//#endregion
|
|
254
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
252
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
package/dist/ui/input.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import "react";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
6
|
-
|
|
7
6
|
//#region src/ui/input.tsx
|
|
8
7
|
function Input(t0) {
|
|
9
8
|
const $ = c(10);
|
|
@@ -42,6 +41,5 @@ function Input(t0) {
|
|
|
42
41
|
} else t2 = $[9];
|
|
43
42
|
return t2;
|
|
44
43
|
}
|
|
45
|
-
|
|
46
44
|
//#endregion
|
|
47
|
-
export { Input };
|
|
45
|
+
export { Input };
|
package/dist/ui/label.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { cn } from "../lib/utils.mjs";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/ui/label.tsx
|
|
7
6
|
function Label(t0) {
|
|
8
7
|
const $ = c(8);
|
|
@@ -36,6 +35,5 @@ function Label(t0) {
|
|
|
36
35
|
} else t2 = $[7];
|
|
37
36
|
return t2;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
38
|
//#endregion
|
|
41
|
-
export { Label };
|
|
39
|
+
export { Label };
|
package/dist/ui/scroll-area.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import "react";
|
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
6
|
-
|
|
7
6
|
//#region src/ui/scroll-area.tsx
|
|
8
7
|
function ScrollArea(t0) {
|
|
9
8
|
const $ = c(14);
|
|
@@ -115,6 +114,5 @@ function ScrollBar(t0) {
|
|
|
115
114
|
} else t4 = $[10];
|
|
116
115
|
return t4;
|
|
117
116
|
}
|
|
118
|
-
|
|
119
117
|
//#endregion
|
|
120
|
-
export { ScrollArea, ScrollBar };
|
|
118
|
+
export { ScrollArea, ScrollBar };
|
package/dist/ui/select.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
6
6
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
7
|
-
|
|
8
7
|
//#region src/ui/select.tsx
|
|
9
8
|
const Select = Select$1.Root;
|
|
10
9
|
function SelectGroup(t0) {
|
|
@@ -409,6 +408,5 @@ function SelectScrollDownButton(t0) {
|
|
|
409
408
|
} else t3 = $[8];
|
|
410
409
|
return t3;
|
|
411
410
|
}
|
|
412
|
-
|
|
413
411
|
//#endregion
|
|
414
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
412
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
package/dist/ui/separator.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { cn } from "../lib/utils.mjs";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
5
|
-
|
|
6
5
|
//#region src/ui/separator.tsx
|
|
7
6
|
function Separator(t0) {
|
|
8
7
|
const $ = c(10);
|
|
@@ -42,6 +41,5 @@ function Separator(t0) {
|
|
|
42
41
|
} else t3 = $[9];
|
|
43
42
|
return t3;
|
|
44
43
|
}
|
|
45
|
-
|
|
46
44
|
//#endregion
|
|
47
|
-
export { Separator };
|
|
45
|
+
export { Separator };
|
package/dist/ui/sheet.mjs
CHANGED
|
@@ -5,7 +5,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { X } from "lucide-react";
|
|
7
7
|
import { Dialog } from "@base-ui/react/dialog";
|
|
8
|
-
|
|
9
8
|
//#region src/ui/sheet.tsx
|
|
10
9
|
function Sheet(t0) {
|
|
11
10
|
const $ = c(4);
|
|
@@ -313,6 +312,5 @@ function SheetDescription(t0) {
|
|
|
313
312
|
} else t2 = $[7];
|
|
314
313
|
return t2;
|
|
315
314
|
}
|
|
316
|
-
|
|
317
315
|
//#endregion
|
|
318
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
316
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
package/dist/ui/sidebar.d.mts
CHANGED
|
@@ -105,7 +105,7 @@ declare function SidebarMenuItem({
|
|
|
105
105
|
}: React.ComponentProps<"li">): react_jsx_runtime0.JSX.Element;
|
|
106
106
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
107
107
|
variant?: "default" | "outline" | null | undefined;
|
|
108
|
-
size?: "
|
|
108
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
109
109
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
110
110
|
declare function SidebarMenuButton({
|
|
111
111
|
render,
|
package/dist/ui/sidebar.mjs
CHANGED
|
@@ -13,11 +13,10 @@ import { Menu } from "lucide-react";
|
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
14
14
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
15
15
|
import { useRender } from "@base-ui/react/use-render";
|
|
16
|
-
|
|
17
16
|
//#region src/ui/sidebar.tsx
|
|
18
17
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
19
18
|
const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
|
|
20
|
-
const SIDEBAR_WIDTH = "
|
|
19
|
+
const SIDEBAR_WIDTH = "18rem";
|
|
21
20
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
22
21
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
23
22
|
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
@@ -1143,7 +1142,7 @@ function SidebarMenuSub(t0) {
|
|
|
1143
1142
|
}
|
|
1144
1143
|
let t1;
|
|
1145
1144
|
if ($[3] !== className) {
|
|
1146
|
-
t1 = cn("border-sidebar-border
|
|
1145
|
+
t1 = cn("border-sidebar-border ml-3 translate-x-px gap-0.5 border-l pl-2 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col", className);
|
|
1147
1146
|
$[3] = className;
|
|
1148
1147
|
$[4] = t1;
|
|
1149
1148
|
} else t1 = $[4];
|
|
@@ -1253,6 +1252,5 @@ function SidebarMenuSubButton(t0) {
|
|
|
1253
1252
|
} else t5 = $[14];
|
|
1254
1253
|
return t3(t5);
|
|
1255
1254
|
}
|
|
1256
|
-
|
|
1257
1255
|
//#endregion
|
|
1258
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
1256
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
package/dist/ui/skeleton.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
|
|
5
4
|
//#region src/ui/skeleton.tsx
|
|
6
5
|
function Skeleton(t0) {
|
|
7
6
|
const $ = c(8);
|
|
@@ -35,6 +34,5 @@ function Skeleton(t0) {
|
|
|
35
34
|
} else t2 = $[7];
|
|
36
35
|
return t2;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
|
-
export { Skeleton };
|
|
38
|
+
export { Skeleton };
|
package/dist/ui/table.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { cn } from "../lib/utils.mjs";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/ui/table.tsx
|
|
7
6
|
function Table(t0) {
|
|
8
7
|
const $ = c(8);
|
|
@@ -264,6 +263,5 @@ function TableCaption(t0) {
|
|
|
264
263
|
} else t2 = $[7];
|
|
265
264
|
return t2;
|
|
266
265
|
}
|
|
267
|
-
|
|
268
266
|
//#endregion
|
|
269
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
267
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
package/dist/ui/textarea.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { cn } from "../lib/utils.mjs";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/ui/textarea.tsx
|
|
7
6
|
function Textarea(t0) {
|
|
8
7
|
const $ = c(8);
|
|
@@ -36,6 +35,5 @@ function Textarea(t0) {
|
|
|
36
35
|
} else t2 = $[7];
|
|
37
36
|
return t2;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
38
|
//#endregion
|
|
41
|
-
export { Textarea };
|
|
39
|
+
export { Textarea };
|
package/dist/ui/tooltip.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { cn } from "../lib/utils.mjs";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
5
|
-
|
|
6
5
|
//#region src/ui/tooltip.tsx
|
|
7
6
|
function TooltipProvider(t0) {
|
|
8
7
|
const $ = c(6);
|
|
@@ -144,6 +143,5 @@ function TooltipContent(t0) {
|
|
|
144
143
|
} else t8 = $[20];
|
|
145
144
|
return t8;
|
|
146
145
|
}
|
|
147
|
-
|
|
148
146
|
//#endregion
|
|
149
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
147
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region ../../vscode/syntaxes/ucd.tmLanguage.json
|
|
2
|
+
var ucd_tmLanguage_default = {
|
|
3
|
+
$schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
4
|
+
name: "ucd",
|
|
5
|
+
displayName: "Unicode Character Database",
|
|
6
|
+
scopeName: "source.ucd",
|
|
7
|
+
patterns: [{ "include": "#comment" }, { "include": "#entry" }],
|
|
8
|
+
repository: {
|
|
9
|
+
"comment": {
|
|
10
|
+
"name": "comment.line.number-sign.ucd",
|
|
11
|
+
"match": "#.*$"
|
|
12
|
+
},
|
|
13
|
+
"entry": { "patterns": [
|
|
14
|
+
{ "include": "#range" },
|
|
15
|
+
{ "include": "#codepoint" },
|
|
16
|
+
{ "include": "#separator" },
|
|
17
|
+
{ "include": "#field" }
|
|
18
|
+
] },
|
|
19
|
+
"range": {
|
|
20
|
+
"name": "constant.numeric.range.ucd",
|
|
21
|
+
"match": "\\b([0-9A-Fa-f]{4,6})\\.\\.([0-9A-Fa-f]{4,6})\\b",
|
|
22
|
+
"captures": {
|
|
23
|
+
"1": { "name": "constant.numeric.codepoint.ucd" },
|
|
24
|
+
"2": { "name": "constant.numeric.codepoint.ucd" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"codepoint": {
|
|
28
|
+
"name": "constant.numeric.codepoint.ucd",
|
|
29
|
+
"match": "^[0-9A-Fa-f]{4,6}\\b"
|
|
30
|
+
},
|
|
31
|
+
"separator": {
|
|
32
|
+
"name": "punctuation.separator.ucd",
|
|
33
|
+
"match": ";"
|
|
34
|
+
},
|
|
35
|
+
"field": {
|
|
36
|
+
"name": "string.unquoted.field.ucd",
|
|
37
|
+
"match": "[^;#\\n]+"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ucd_tmLanguage_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ucdjs-internal/shared-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Nørgård",
|
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
"#components/*": "./src/components/*.tsx",
|
|
22
22
|
"#ui/*": "./src/ui/*.tsx",
|
|
23
23
|
"#lib/*": "./src/lib/*.ts",
|
|
24
|
-
"#hooks/*": "./src/hooks/*.ts"
|
|
25
|
-
"#vendor/cmdk": "./src/vendor/cmdk/index.tsx"
|
|
24
|
+
"#hooks/*": "./src/hooks/*.ts"
|
|
26
25
|
},
|
|
27
26
|
"exports": {
|
|
28
27
|
".": "./dist/index.mjs",
|
|
29
|
-
"./components
|
|
30
|
-
"./components/theme-toggle": "./dist/components/theme-toggle.mjs",
|
|
28
|
+
"./components": "./dist/components/index.mjs",
|
|
31
29
|
"./hooks": "./dist/hooks/index.mjs",
|
|
32
30
|
"./lib/theme-script": "./dist/lib/theme-script.mjs",
|
|
33
31
|
"./lib/utils": "./dist/lib/utils.mjs",
|
|
@@ -68,34 +66,35 @@
|
|
|
68
66
|
"node": ">=24.13"
|
|
69
67
|
},
|
|
70
68
|
"dependencies": {
|
|
71
|
-
"@base-ui/react": "1.
|
|
72
|
-
"@base-ui/utils": "0.2.
|
|
69
|
+
"@base-ui/react": "1.3.0",
|
|
70
|
+
"@base-ui/utils": "0.2.6",
|
|
71
|
+
"@cmdi/base-ui": "0.0.1",
|
|
73
72
|
"@fontsource-variable/inter": "5.2.8",
|
|
74
73
|
"class-variance-authority": "0.7.1",
|
|
75
74
|
"clsx": "2.1.1",
|
|
76
|
-
"lucide-react": "
|
|
75
|
+
"lucide-react": "1.6.0",
|
|
77
76
|
"react": "19.2.4",
|
|
78
77
|
"react-dom": "19.2.4",
|
|
79
|
-
"shiki": "
|
|
80
|
-
"tailwind-merge": "3.
|
|
81
|
-
"tailwindcss": "4.2.
|
|
78
|
+
"shiki": "4.0.2",
|
|
79
|
+
"tailwind-merge": "3.5.0",
|
|
80
|
+
"tailwindcss": "4.2.2",
|
|
82
81
|
"tw-animate-css": "1.4.0",
|
|
83
82
|
"zod": "4.3.6"
|
|
84
83
|
},
|
|
85
84
|
"devDependencies": {
|
|
86
|
-
"@eslint-react/eslint-plugin": "
|
|
87
|
-
"@luxass/eslint-config": "7.
|
|
88
|
-
"@rollup/plugin-babel": "
|
|
85
|
+
"@eslint-react/eslint-plugin": "3.0.0",
|
|
86
|
+
"@luxass/eslint-config": "7.4.1",
|
|
87
|
+
"@rollup/plugin-babel": "7.0.0",
|
|
89
88
|
"@types/react": "19.2.14",
|
|
90
89
|
"@types/react-dom": "19.2.3",
|
|
91
90
|
"babel-plugin-react-compiler": "1.0.0",
|
|
92
|
-
"eslint": "10.
|
|
93
|
-
"eslint-plugin-format": "
|
|
91
|
+
"eslint": "10.1.0",
|
|
92
|
+
"eslint-plugin-format": "2.0.1",
|
|
94
93
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
95
|
-
"eslint-plugin-react-refresh": "0.5.
|
|
96
|
-
"publint": "0.3.
|
|
97
|
-
"tsdown": "0.
|
|
98
|
-
"typescript": "
|
|
94
|
+
"eslint-plugin-react-refresh": "0.5.2",
|
|
95
|
+
"publint": "0.3.18",
|
|
96
|
+
"tsdown": "0.21.4",
|
|
97
|
+
"typescript": "6.0.2",
|
|
99
98
|
"@ucdjs-tooling/tsconfig": "1.0.0",
|
|
100
99
|
"@ucdjs-tooling/tsdown-config": "1.0.0"
|
|
101
100
|
},
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
//#region src/vendor/cmdk/command-score.ts
|
|
2
|
-
const SCORE_CONTINUE_MATCH = 1;
|
|
3
|
-
const SCORE_SPACE_WORD_JUMP = .9;
|
|
4
|
-
const SCORE_NON_SPACE_WORD_JUMP = .8;
|
|
5
|
-
const SCORE_CHARACTER_JUMP = .17;
|
|
6
|
-
const SCORE_TRANSPOSITION = .1;
|
|
7
|
-
const PENALTY_SKIPPED = .999;
|
|
8
|
-
const PENALTY_CASE_MISMATCH = .9999;
|
|
9
|
-
const PENALTY_NOT_COMPLETE = .99;
|
|
10
|
-
const IS_GAP_REGEXP = /[\\/_+.#"@[({&]/;
|
|
11
|
-
const COUNT_GAPS_REGEXP = /[\\/_+.#"@[({&]/g;
|
|
12
|
-
const IS_SPACE_REGEXP = /[\s-]/;
|
|
13
|
-
const COUNT_SPACE_REGEXP = /[\s-]/g;
|
|
14
|
-
function commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex, memoizedResults) {
|
|
15
|
-
if (abbreviationIndex === abbreviation.length) {
|
|
16
|
-
if (stringIndex === value.length) return SCORE_CONTINUE_MATCH;
|
|
17
|
-
return PENALTY_NOT_COMPLETE;
|
|
18
|
-
}
|
|
19
|
-
const memoizeKey = `${stringIndex},${abbreviationIndex}`;
|
|
20
|
-
if (memoizedResults[memoizeKey] !== void 0) return memoizedResults[memoizeKey];
|
|
21
|
-
const abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);
|
|
22
|
-
let index = lowerString.indexOf(abbreviationChar, stringIndex);
|
|
23
|
-
let highScore = 0;
|
|
24
|
-
let score, transposedScore, wordBreaks, spaceBreaks;
|
|
25
|
-
while (index >= 0) {
|
|
26
|
-
score = commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 1, memoizedResults);
|
|
27
|
-
if (score > highScore) {
|
|
28
|
-
if (index === stringIndex) score *= SCORE_CONTINUE_MATCH;
|
|
29
|
-
else if (IS_GAP_REGEXP.test(value.charAt(index - 1))) {
|
|
30
|
-
score *= SCORE_NON_SPACE_WORD_JUMP;
|
|
31
|
-
wordBreaks = value.slice(stringIndex, index - 1).match(COUNT_GAPS_REGEXP);
|
|
32
|
-
if (wordBreaks && stringIndex > 0) score *= PENALTY_SKIPPED ** wordBreaks.length;
|
|
33
|
-
} else if (IS_SPACE_REGEXP.test(value.charAt(index - 1))) {
|
|
34
|
-
score *= SCORE_SPACE_WORD_JUMP;
|
|
35
|
-
spaceBreaks = value.slice(stringIndex, index - 1).match(COUNT_SPACE_REGEXP);
|
|
36
|
-
if (spaceBreaks && stringIndex > 0) score *= PENALTY_SKIPPED ** spaceBreaks.length;
|
|
37
|
-
} else {
|
|
38
|
-
score *= SCORE_CHARACTER_JUMP;
|
|
39
|
-
if (stringIndex > 0) score *= PENALTY_SKIPPED ** (index - stringIndex);
|
|
40
|
-
}
|
|
41
|
-
if (value.charAt(index) !== abbreviation.charAt(abbreviationIndex)) score *= PENALTY_CASE_MISMATCH;
|
|
42
|
-
}
|
|
43
|
-
if (score < SCORE_TRANSPOSITION && lowerString.charAt(index - 1) === lowerAbbreviation.charAt(abbreviationIndex + 1) || lowerAbbreviation.charAt(abbreviationIndex + 1) === lowerAbbreviation.charAt(abbreviationIndex) && lowerString.charAt(index - 1) !== lowerAbbreviation.charAt(abbreviationIndex)) {
|
|
44
|
-
transposedScore = commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 2, memoizedResults);
|
|
45
|
-
if (transposedScore * SCORE_TRANSPOSITION > score) score = transposedScore * SCORE_TRANSPOSITION;
|
|
46
|
-
}
|
|
47
|
-
if (score > highScore) highScore = score;
|
|
48
|
-
index = lowerString.indexOf(abbreviationChar, index + 1);
|
|
49
|
-
}
|
|
50
|
-
memoizedResults[memoizeKey] = highScore;
|
|
51
|
-
return highScore;
|
|
52
|
-
}
|
|
53
|
-
function formatInput(value) {
|
|
54
|
-
return value.toLowerCase().replace(COUNT_SPACE_REGEXP, " ");
|
|
55
|
-
}
|
|
56
|
-
function commandScore(string, abbreviation, aliases) {
|
|
57
|
-
string = aliases && aliases.length > 0 ? `${`${string} ${aliases.join(" ")}`}` : string;
|
|
58
|
-
return commandScoreInner(string, abbreviation, formatInput(string), formatInput(abbreviation), 0, 0, {});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { commandScore };
|