@krak-stack/registry 0.11.2 → 0.11.4
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/CHANGELOG.md +14 -0
- package/README.md +22 -0
- package/dist/components/animated-list/html.js +1 -105
- package/dist/components/app-switcher/html.js +1 -103
- package/dist/components/async-action-button/html.js +1 -101
- package/dist/components/bulk-list-input/html.js +2 -102
- package/dist/components/choice-cards/html.js +1 -101
- package/dist/components/code-block/html.js +1 -101
- package/dist/components/copy-button/html.d.ts +2 -2
- package/dist/components/copy-button/html.js +1 -101
- package/dist/components/copy-value/html.js +2 -101
- package/dist/components/data-table/html.d.ts +51 -51
- package/dist/components/data-table/html.js +28 -101
- package/dist/components/date-input/html.js +2 -105
- package/dist/components/editable-text/html.d.ts +2 -2
- package/dist/components/editable-text/html.js +4 -102
- package/dist/components/editing-locale-switcher/html.js +2 -102
- package/dist/components/email-editor/html.js +8 -107
- package/dist/components/error-component/html.d.ts +4 -4
- package/dist/components/error-component/html.js +10 -107
- package/dist/components/file-input/html.js +6 -106
- package/dist/components/hint/react.d.ts +15 -0
- package/dist/components/hint/react.js +133 -0
- package/dist/components/icon-input/html.js +3 -103
- package/dist/components/image-crop-editor/html.js +1 -101
- package/dist/components/loading/html.js +1 -101
- package/dist/components/locale-switcher/html.js +1 -103
- package/dist/components/map-menu/html.d.ts +8 -8
- package/dist/components/map-menu/html.js +7 -106
- package/dist/components/markdown/html.js +1 -101
- package/dist/components/notification-menu/html.js +7 -114
- package/dist/components/pagination/html.js +5 -100
- package/dist/components/rich-text-editor/html.js +14 -108
- package/dist/components/search-menu/html.js +1 -103
- package/dist/components/sidebar-layout/html.js +2 -102
- package/dist/components/stepper/html.js +4 -102
- package/dist/components/support/html.js +1 -101
- package/dist/components/theme-switcher/html.js +4 -105
- package/dist/components/time-input/html.d.ts +2 -2
- package/dist/components/time-input/html.js +1 -103
- package/dist/components/toast/html.js +11 -104
- package/dist/components/upload-attachment/html.d.ts +4 -4
- package/dist/components/upload-attachment/html.js +7 -102
- package/dist/components/webhook-delivery-table/html.js +28 -101
- package/dist/lib/lucide-effect.d.ts +2432 -0
- package/dist/lib/lucide-effect.js +7428 -0
- package/package.json +11 -3
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { Effect as Effect2, Redacted as Redacted2 } from "effect";
|
|
3
3
|
import { Mount } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
|
-
import { CircleAlert, RefreshCw as RefreshCw2 } from "lucide";
|
|
6
5
|
|
|
7
6
|
// ../../src/components/effectcn/button.ts
|
|
8
7
|
import {
|
|
@@ -51,107 +50,13 @@ var inputVariants = (options = {}) => cn(base2, sizes2[options.size ?? "default"
|
|
|
51
50
|
|
|
52
51
|
// ../../src/components/error-component/html.ts
|
|
53
52
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
54
|
-
|
|
55
|
-
// ../../src/lib/lucide-effect.ts
|
|
56
53
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
ChevronRight as chevronRight,
|
|
64
|
-
ChevronsLeft as chevronsLeft,
|
|
65
|
-
ChevronsRight as chevronsRight,
|
|
66
|
-
ChevronsUpDown as chevronsUpDown,
|
|
67
|
-
Copy as copy,
|
|
68
|
-
Download as download,
|
|
69
|
-
Eye as eye,
|
|
70
|
-
EyeOff as eyeOff,
|
|
71
|
-
Ellipsis as ellipsis,
|
|
72
|
-
FileJson as fileJson,
|
|
73
|
-
FileText as fileText,
|
|
74
|
-
GripVertical as gripVertical,
|
|
75
|
-
Image as image,
|
|
76
|
-
LayoutGrid as layoutGrid,
|
|
77
|
-
LoaderCircle as loaderCircle,
|
|
78
|
-
Mail as mail,
|
|
79
|
-
Paperclip as paperclip,
|
|
80
|
-
RefreshCw as refreshCw,
|
|
81
|
-
RotateCcw as rotateCcw,
|
|
82
|
-
Rows3 as rows3,
|
|
83
|
-
Search as search,
|
|
84
|
-
Settings2 as settings2,
|
|
85
|
-
TriangleAlert as triangleAlert,
|
|
86
|
-
X as x
|
|
87
|
-
} from "lucide";
|
|
88
|
-
var createLucideIcon = (icon) => (h, {
|
|
89
|
-
size = 24,
|
|
90
|
-
color = "currentColor",
|
|
91
|
-
strokeWidth = 2,
|
|
92
|
-
className
|
|
93
|
-
} = {}) => h.svg.attrs({
|
|
94
|
-
class: className,
|
|
95
|
-
width: String(size),
|
|
96
|
-
height: String(size),
|
|
97
|
-
viewBox: "0 0 24 24",
|
|
98
|
-
fill: "none",
|
|
99
|
-
stroke: color,
|
|
100
|
-
"stroke-width": String(strokeWidth),
|
|
101
|
-
"stroke-linecap": "round",
|
|
102
|
-
"stroke-linejoin": "round",
|
|
103
|
-
"aria-hidden": "true"
|
|
104
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
105
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
106
|
-
switch (tag) {
|
|
107
|
-
case "path":
|
|
108
|
-
return h.path.attrs(attrs);
|
|
109
|
-
case "circle":
|
|
110
|
-
return h.circle.attrs(attrs);
|
|
111
|
-
case "ellipse":
|
|
112
|
-
return h.ellipse.attrs(attrs);
|
|
113
|
-
case "line":
|
|
114
|
-
return h.line.attrs(attrs);
|
|
115
|
-
case "polyline":
|
|
116
|
-
return h.polyline.attrs(attrs);
|
|
117
|
-
case "polygon":
|
|
118
|
-
return h.polygon.attrs(attrs);
|
|
119
|
-
case "rect":
|
|
120
|
-
return h.rect.attrs(attrs);
|
|
121
|
-
default:
|
|
122
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
123
|
-
}
|
|
124
|
-
}));
|
|
125
|
-
var Check = createLucideIcon(check);
|
|
126
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
127
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
128
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
129
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
130
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
131
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
132
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
133
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
134
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
135
|
-
var Copy = createLucideIcon(copy);
|
|
136
|
-
var Download = createLucideIcon(download);
|
|
137
|
-
var Eye = createLucideIcon(eye);
|
|
138
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
139
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
140
|
-
var FileJson = createLucideIcon(fileJson);
|
|
141
|
-
var FileText = createLucideIcon(fileText);
|
|
142
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
143
|
-
var Image = createLucideIcon(image);
|
|
144
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
145
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
146
|
-
var Mail = createLucideIcon(mail);
|
|
147
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
148
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
149
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
150
|
-
var Rows3 = createLucideIcon(rows3);
|
|
151
|
-
var Search = createLucideIcon(search);
|
|
152
|
-
var Settings2 = createLucideIcon(settings2);
|
|
153
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
154
|
-
var X = createLucideIcon(x);
|
|
54
|
+
Check,
|
|
55
|
+
CircleAlert as AlertIcon,
|
|
56
|
+
Copy as Copy2,
|
|
57
|
+
RefreshCw as RetryIcon,
|
|
58
|
+
TriangleAlert
|
|
59
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
155
60
|
|
|
156
61
|
// ../../src/components/error-component/classes.ts
|
|
157
62
|
var errorComponentClasses = {
|
|
@@ -168,7 +73,7 @@ import { Command, Component, UiSchema } from "effect/ui";
|
|
|
168
73
|
|
|
169
74
|
// ../../src/components/error-component/schema.ts
|
|
170
75
|
import { Schema, Struct } from "effect";
|
|
171
|
-
var
|
|
76
|
+
var Copy = {
|
|
172
77
|
title: Schema.String,
|
|
173
78
|
description: Schema.String,
|
|
174
79
|
retry: Schema.String,
|
|
@@ -186,8 +91,8 @@ var Copy2 = {
|
|
|
186
91
|
versionLabel: Schema.String,
|
|
187
92
|
referenceLabel: Schema.String
|
|
188
93
|
};
|
|
189
|
-
var Messages = Schema.Struct(
|
|
190
|
-
var Overrides = Schema.Record(Schema.Literals(Object.keys(
|
|
94
|
+
var Messages = Schema.Struct(Copy);
|
|
95
|
+
var Overrides = Schema.Record(Schema.Literals(Object.keys(Copy)), Schema.optionalKey(Schema.String));
|
|
191
96
|
var Translations = Schema.Record(Schema.String, Schema.UndefinedOr(Overrides));
|
|
192
97
|
var ErrorComponentClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(errorComponentClasses)), Schema.optionalKey(Schema.String)).annotate({ identifier: "ErrorComponentClassesOverrides" });
|
|
193
98
|
var ErrorComponentSharedPropsSchema = Schema.Struct({
|
|
@@ -308,8 +213,6 @@ var errorComponentBehaviours = {
|
|
|
308
213
|
};
|
|
309
214
|
|
|
310
215
|
// ../../src/components/error-component/html.ts
|
|
311
|
-
var AlertIcon = createLucideIcon(CircleAlert);
|
|
312
|
-
var RetryIcon = createLucideIcon(RefreshCw2);
|
|
313
216
|
var SelectReportOnFocus = Mount.make("ErrorComponent/SelectReportOnFocus", {}, (node) => {
|
|
314
217
|
const select = () => node.select();
|
|
315
218
|
return Effect2.acquireRelease(Effect2.sync(() => node.addEventListener("focus", select)), () => Effect2.sync(() => node.removeEventListener("focus", select))).pipe(Effect2.andThen(Effect2.never));
|
|
@@ -332,7 +235,7 @@ var makeErrorComponent = (renderFeedback) => Html.component({
|
|
|
332
235
|
props: { type: "button" },
|
|
333
236
|
variant: "link",
|
|
334
237
|
onPress: ErrorComponentMessage.Copy({ report: Redacted2.make(report) })
|
|
335
|
-
}).children(current?.success ? Check(h, { size: 16 }) : current?.success === false ? TriangleAlert(h, { size: 16 }) :
|
|
238
|
+
}).children(current?.success ? Check(h, { size: 16 }) : current?.success === false ? TriangleAlert(h, { size: 16 }) : Copy2(h, { size: 16 }), copy.copy), h.p.attr("role", "status").class(current?.success === false ? "text-sm" : "sr-only").children(current ? current.success ? copy.copied : copy.copyFailed : ""), current?.success === false && h.textarea.class(inputVariants({ class: "h-auto min-h-16 py-2" })).onMount(SelectReportOnFocus({})).attrs({
|
|
336
239
|
"aria-label": copy.details,
|
|
337
240
|
readonly: "",
|
|
338
241
|
rows: "10"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { Effect, Redacted as Redacted2, Schema as Schema3, Stream } from "effect";
|
|
3
3
|
import { Component as Component2, Mount } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
|
-
import { CloudUpload, File, FileUp, ImageUp, Trash2 } from "lucide";
|
|
6
5
|
|
|
7
6
|
// ../../src/components/effectcn/button.ts
|
|
8
7
|
import {
|
|
@@ -45,107 +44,13 @@ var FileDropHint = (h, options = {}) => h.p.class(cn("text-muted-foreground m-0
|
|
|
45
44
|
|
|
46
45
|
// ../../src/components/file-input/html.ts
|
|
47
46
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
48
|
-
|
|
49
|
-
// ../../src/lib/lucide-effect.ts
|
|
50
47
|
import {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ChevronRight as chevronRight,
|
|
58
|
-
ChevronsLeft as chevronsLeft,
|
|
59
|
-
ChevronsRight as chevronsRight,
|
|
60
|
-
ChevronsUpDown as chevronsUpDown,
|
|
61
|
-
Copy as copy,
|
|
62
|
-
Download as download,
|
|
63
|
-
Eye as eye,
|
|
64
|
-
EyeOff as eyeOff,
|
|
65
|
-
Ellipsis as ellipsis,
|
|
66
|
-
FileJson as fileJson,
|
|
67
|
-
FileText as fileText,
|
|
68
|
-
GripVertical as gripVertical,
|
|
69
|
-
Image as image,
|
|
70
|
-
LayoutGrid as layoutGrid,
|
|
71
|
-
LoaderCircle as loaderCircle,
|
|
72
|
-
Mail as mail,
|
|
73
|
-
Paperclip as paperclip,
|
|
74
|
-
RefreshCw as refreshCw,
|
|
75
|
-
RotateCcw as rotateCcw,
|
|
76
|
-
Rows3 as rows3,
|
|
77
|
-
Search as search,
|
|
78
|
-
Settings2 as settings2,
|
|
79
|
-
TriangleAlert as triangleAlert,
|
|
80
|
-
X as x
|
|
81
|
-
} from "lucide";
|
|
82
|
-
var createLucideIcon = (icon) => (h, {
|
|
83
|
-
size = 24,
|
|
84
|
-
color = "currentColor",
|
|
85
|
-
strokeWidth = 2,
|
|
86
|
-
className
|
|
87
|
-
} = {}) => h.svg.attrs({
|
|
88
|
-
class: className,
|
|
89
|
-
width: String(size),
|
|
90
|
-
height: String(size),
|
|
91
|
-
viewBox: "0 0 24 24",
|
|
92
|
-
fill: "none",
|
|
93
|
-
stroke: color,
|
|
94
|
-
"stroke-width": String(strokeWidth),
|
|
95
|
-
"stroke-linecap": "round",
|
|
96
|
-
"stroke-linejoin": "round",
|
|
97
|
-
"aria-hidden": "true"
|
|
98
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
99
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
100
|
-
switch (tag) {
|
|
101
|
-
case "path":
|
|
102
|
-
return h.path.attrs(attrs);
|
|
103
|
-
case "circle":
|
|
104
|
-
return h.circle.attrs(attrs);
|
|
105
|
-
case "ellipse":
|
|
106
|
-
return h.ellipse.attrs(attrs);
|
|
107
|
-
case "line":
|
|
108
|
-
return h.line.attrs(attrs);
|
|
109
|
-
case "polyline":
|
|
110
|
-
return h.polyline.attrs(attrs);
|
|
111
|
-
case "polygon":
|
|
112
|
-
return h.polygon.attrs(attrs);
|
|
113
|
-
case "rect":
|
|
114
|
-
return h.rect.attrs(attrs);
|
|
115
|
-
default:
|
|
116
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
117
|
-
}
|
|
118
|
-
}));
|
|
119
|
-
var Check = createLucideIcon(check);
|
|
120
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
121
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
122
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
123
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
124
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
125
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
126
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
127
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
128
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
129
|
-
var Copy = createLucideIcon(copy);
|
|
130
|
-
var Download = createLucideIcon(download);
|
|
131
|
-
var Eye = createLucideIcon(eye);
|
|
132
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
133
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
134
|
-
var FileJson = createLucideIcon(fileJson);
|
|
135
|
-
var FileText = createLucideIcon(fileText);
|
|
136
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
137
|
-
var Image = createLucideIcon(image);
|
|
138
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
139
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
140
|
-
var Mail = createLucideIcon(mail);
|
|
141
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
142
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
143
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
144
|
-
var Rows3 = createLucideIcon(rows3);
|
|
145
|
-
var Search = createLucideIcon(search);
|
|
146
|
-
var Settings2 = createLucideIcon(settings2);
|
|
147
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
148
|
-
var X = createLucideIcon(x);
|
|
48
|
+
CloudUpload as UploadIcon,
|
|
49
|
+
File as FileIcon,
|
|
50
|
+
FileUp as ReplaceIcon,
|
|
51
|
+
ImageUp as ReplaceImageIcon,
|
|
52
|
+
Trash2 as DeleteIcon
|
|
53
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
149
54
|
|
|
150
55
|
// ../../src/components/file-input/classes.ts
|
|
151
56
|
var fileInputClasses = {
|
|
@@ -296,11 +201,6 @@ var filePickerBehaviours = {
|
|
|
296
201
|
};
|
|
297
202
|
|
|
298
203
|
// ../../src/components/file-input/html.ts
|
|
299
|
-
var UploadIcon = createLucideIcon(CloudUpload);
|
|
300
|
-
var FileIcon = createLucideIcon(File);
|
|
301
|
-
var ReplaceIcon = createLucideIcon(FileUp);
|
|
302
|
-
var ReplaceImageIcon = createLucideIcon(ImageUp);
|
|
303
|
-
var DeleteIcon = createLucideIcon(Trash2);
|
|
304
204
|
var PreviewFile = Mount.make("FilePickerPreviewFile", { args: { file: Schema3.Redacted(Schema3.File) } }, (image, _, changes) => Effect.gen(function* () {
|
|
305
205
|
let url;
|
|
306
206
|
yield* Effect.addFinalizer(() => Effect.sync(() => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode, type SVGProps } from "react";
|
|
2
|
+
/*! Solid lightbulb by Font Awesome Free 5.15.2 (https://fontawesome.com), CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Adapted to JSX. */
|
|
3
|
+
export declare const SolidLightbulb: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
|
|
4
|
+
export type HintProps = {
|
|
5
|
+
content: string;
|
|
6
|
+
triggerLabel: string;
|
|
7
|
+
children?: (props: {
|
|
8
|
+
descriptionId: string;
|
|
9
|
+
}) => ReactNode;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
classNames?: Partial<Record<"target" | "aside" | "trigger" | "icon" | "content", string>>;
|
|
13
|
+
};
|
|
14
|
+
/** Inline supplementary guidance, not a substitute for instructions or errors. */
|
|
15
|
+
export declare const Hint: ({ content, triggerLabel, children, icon, className, classNames, }: HintProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// ../../src/components/hint/react.tsx
|
|
2
|
+
import {
|
|
3
|
+
useEffect,
|
|
4
|
+
useId,
|
|
5
|
+
useRef,
|
|
6
|
+
useState
|
|
7
|
+
} from "react";
|
|
8
|
+
|
|
9
|
+
// ../../src/lib/utils.ts
|
|
10
|
+
import { cn } from "cn";
|
|
11
|
+
|
|
12
|
+
// ../../src/components/hint/react.tsx
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
"use client";
|
|
15
|
+
/*! Solid lightbulb by Font Awesome Free 5.15.2 (https://fontawesome.com), CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Adapted to JSX. */
|
|
16
|
+
var SolidLightbulb = (props) => /* @__PURE__ */ jsx("svg", {
|
|
17
|
+
viewBox: "0 0 352 512",
|
|
18
|
+
width: "1em",
|
|
19
|
+
height: "1em",
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
...props,
|
|
23
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
24
|
+
d: "M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
var Hint = ({
|
|
28
|
+
content,
|
|
29
|
+
triggerLabel,
|
|
30
|
+
children,
|
|
31
|
+
icon = /* @__PURE__ */ jsx(SolidLightbulb, {}),
|
|
32
|
+
className,
|
|
33
|
+
classNames
|
|
34
|
+
}) => {
|
|
35
|
+
const descriptionId = useId();
|
|
36
|
+
const root = useRef(null);
|
|
37
|
+
const [hovered, setHovered] = useState(false);
|
|
38
|
+
const [focused, setFocused] = useState(false);
|
|
39
|
+
const [pinned, setPinned] = useState(false);
|
|
40
|
+
const [dismissed, setDismissed] = useState(false);
|
|
41
|
+
const open = !dismissed && (hovered || focused || pinned);
|
|
42
|
+
const state = open ? "open" : "closed";
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!open)
|
|
45
|
+
return;
|
|
46
|
+
const dismiss = () => {
|
|
47
|
+
setPinned(false);
|
|
48
|
+
setDismissed(true);
|
|
49
|
+
};
|
|
50
|
+
const onKeyDown = (event) => {
|
|
51
|
+
if (event.key === "Escape")
|
|
52
|
+
dismiss();
|
|
53
|
+
};
|
|
54
|
+
const onPointerDown = (event) => {
|
|
55
|
+
if (event.target instanceof Node && !root.current?.contains(event.target)) {
|
|
56
|
+
dismiss();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
document.addEventListener("keydown", onKeyDown);
|
|
60
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
61
|
+
return () => {
|
|
62
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
63
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
64
|
+
};
|
|
65
|
+
}, [open]);
|
|
66
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
ref: root,
|
|
68
|
+
"data-slot": "hint",
|
|
69
|
+
"data-state": state,
|
|
70
|
+
className: cn(children ? "grid items-start gap-3 sm:grid-cols-[minmax(0,1fr)_16rem]" : "inline-flex", className),
|
|
71
|
+
onPointerEnter: (event) => {
|
|
72
|
+
if (event.pointerType === "touch")
|
|
73
|
+
return;
|
|
74
|
+
setHovered(true);
|
|
75
|
+
setDismissed(false);
|
|
76
|
+
},
|
|
77
|
+
onPointerLeave: () => setHovered(false),
|
|
78
|
+
onFocus: () => {
|
|
79
|
+
setFocused(true);
|
|
80
|
+
setDismissed(false);
|
|
81
|
+
},
|
|
82
|
+
onBlur: (event) => {
|
|
83
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
84
|
+
setFocused(false);
|
|
85
|
+
setPinned(false);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
children ? /* @__PURE__ */ jsx("div", {
|
|
90
|
+
"data-slot": "hint-target",
|
|
91
|
+
className: cn("min-w-0", classNames?.target),
|
|
92
|
+
children: children({ descriptionId })
|
|
93
|
+
}) : null,
|
|
94
|
+
/* @__PURE__ */ jsxs("div", {
|
|
95
|
+
"data-slot": "hint-aside",
|
|
96
|
+
className: cn("flex items-start gap-2", classNames?.aside),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
"data-slot": "hint-trigger",
|
|
101
|
+
"data-state": state,
|
|
102
|
+
"aria-label": triggerLabel,
|
|
103
|
+
"aria-expanded": open,
|
|
104
|
+
"aria-controls": descriptionId,
|
|
105
|
+
"aria-describedby": descriptionId,
|
|
106
|
+
className: cn("focus-visible:outline-ring inline-flex size-8 shrink-0 items-center justify-center rounded-md focus-visible:outline-2 focus-visible:outline-offset-2", open ? "text-primary" : "text-muted-foreground", classNames?.trigger),
|
|
107
|
+
onClick: () => {
|
|
108
|
+
setPinned(!pinned);
|
|
109
|
+
setDismissed(pinned);
|
|
110
|
+
},
|
|
111
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
112
|
+
"data-slot": "hint-icon",
|
|
113
|
+
"aria-hidden": "true",
|
|
114
|
+
className: cn("inline-flex [&>svg]:size-5", classNames?.icon),
|
|
115
|
+
children: icon
|
|
116
|
+
})
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsx("p", {
|
|
119
|
+
id: descriptionId,
|
|
120
|
+
"data-slot": "hint-content",
|
|
121
|
+
"data-state": state,
|
|
122
|
+
className: cn("text-muted-foreground m-0 min-w-0 pt-1 text-sm leading-relaxed data-[state=closed]:invisible", classNames?.content),
|
|
123
|
+
children: content
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
Hint,
|
|
132
|
+
SolidLightbulb
|
|
133
|
+
};
|
|
@@ -3,7 +3,6 @@ import { Schema as Schema5 } from "effect";
|
|
|
3
3
|
import { UiSchema as UiSchema3 } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
5
|
import { Combobox, VirtualList } from "effect/ui/kit";
|
|
6
|
-
import { ExternalLink, Search as Search2 } from "lucide";
|
|
7
6
|
|
|
8
7
|
// ../../src/components/effectcn/button.ts
|
|
9
8
|
import {
|
|
@@ -62,107 +61,10 @@ var ComboboxItemIndicator = (h, combobox, options) => combobox.itemIndicator({
|
|
|
62
61
|
|
|
63
62
|
// ../../src/components/icon-input/html.ts
|
|
64
63
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
65
|
-
|
|
66
|
-
// ../../src/lib/lucide-effect.ts
|
|
67
64
|
import {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Check as check,
|
|
72
|
-
ChevronLeft as chevronLeft,
|
|
73
|
-
ChevronDown as chevronDown,
|
|
74
|
-
ChevronRight as chevronRight,
|
|
75
|
-
ChevronsLeft as chevronsLeft,
|
|
76
|
-
ChevronsRight as chevronsRight,
|
|
77
|
-
ChevronsUpDown as chevronsUpDown,
|
|
78
|
-
Copy as copy,
|
|
79
|
-
Download as download,
|
|
80
|
-
Eye as eye,
|
|
81
|
-
EyeOff as eyeOff,
|
|
82
|
-
Ellipsis as ellipsis,
|
|
83
|
-
FileJson as fileJson,
|
|
84
|
-
FileText as fileText,
|
|
85
|
-
GripVertical as gripVertical,
|
|
86
|
-
Image as image,
|
|
87
|
-
LayoutGrid as layoutGrid,
|
|
88
|
-
LoaderCircle as loaderCircle,
|
|
89
|
-
Mail as mail,
|
|
90
|
-
Paperclip as paperclip,
|
|
91
|
-
RefreshCw as refreshCw,
|
|
92
|
-
RotateCcw as rotateCcw,
|
|
93
|
-
Rows3 as rows3,
|
|
94
|
-
Search as search,
|
|
95
|
-
Settings2 as settings2,
|
|
96
|
-
TriangleAlert as triangleAlert,
|
|
97
|
-
X as x
|
|
98
|
-
} from "lucide";
|
|
99
|
-
var createLucideIcon = (icon) => (h, {
|
|
100
|
-
size = 24,
|
|
101
|
-
color = "currentColor",
|
|
102
|
-
strokeWidth = 2,
|
|
103
|
-
className
|
|
104
|
-
} = {}) => h.svg.attrs({
|
|
105
|
-
class: className,
|
|
106
|
-
width: String(size),
|
|
107
|
-
height: String(size),
|
|
108
|
-
viewBox: "0 0 24 24",
|
|
109
|
-
fill: "none",
|
|
110
|
-
stroke: color,
|
|
111
|
-
"stroke-width": String(strokeWidth),
|
|
112
|
-
"stroke-linecap": "round",
|
|
113
|
-
"stroke-linejoin": "round",
|
|
114
|
-
"aria-hidden": "true"
|
|
115
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
116
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
117
|
-
switch (tag) {
|
|
118
|
-
case "path":
|
|
119
|
-
return h.path.attrs(attrs);
|
|
120
|
-
case "circle":
|
|
121
|
-
return h.circle.attrs(attrs);
|
|
122
|
-
case "ellipse":
|
|
123
|
-
return h.ellipse.attrs(attrs);
|
|
124
|
-
case "line":
|
|
125
|
-
return h.line.attrs(attrs);
|
|
126
|
-
case "polyline":
|
|
127
|
-
return h.polyline.attrs(attrs);
|
|
128
|
-
case "polygon":
|
|
129
|
-
return h.polygon.attrs(attrs);
|
|
130
|
-
case "rect":
|
|
131
|
-
return h.rect.attrs(attrs);
|
|
132
|
-
default:
|
|
133
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
134
|
-
}
|
|
135
|
-
}));
|
|
136
|
-
var Check = createLucideIcon(check);
|
|
137
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
138
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
139
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
140
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
141
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
142
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
143
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
144
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
145
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
146
|
-
var Copy = createLucideIcon(copy);
|
|
147
|
-
var Download = createLucideIcon(download);
|
|
148
|
-
var Eye = createLucideIcon(eye);
|
|
149
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
150
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
151
|
-
var FileJson = createLucideIcon(fileJson);
|
|
152
|
-
var FileText = createLucideIcon(fileText);
|
|
153
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
154
|
-
var Image = createLucideIcon(image);
|
|
155
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
156
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
157
|
-
var Mail = createLucideIcon(mail);
|
|
158
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
159
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
160
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
161
|
-
var Rows3 = createLucideIcon(rows3);
|
|
162
|
-
var Search = createLucideIcon(search);
|
|
163
|
-
var Settings2 = createLucideIcon(settings2);
|
|
164
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
165
|
-
var X = createLucideIcon(x);
|
|
65
|
+
ExternalLink as ExternalLinkIcon,
|
|
66
|
+
Search as SearchIcon
|
|
67
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
166
68
|
|
|
167
69
|
// ../../src/components/icon-input/index.ts
|
|
168
70
|
import { Effect, Schema as Schema4, Stream } from "effect";
|
|
@@ -437,8 +339,6 @@ var iconInputBehaviours = {
|
|
|
437
339
|
};
|
|
438
340
|
|
|
439
341
|
// ../../src/components/icon-input/html.ts
|
|
440
|
-
var SearchIcon = createLucideIcon(Search2);
|
|
441
|
-
var ExternalLinkIcon = createLucideIcon(ExternalLink);
|
|
442
342
|
var Events = UiSchema3.TaggedEnum({
|
|
443
343
|
ValueChanged: { value: Schema5.String }
|
|
444
344
|
}).annotate({ identifier: "IconInputEvents" });
|
|
@@ -38,107 +38,7 @@ var Button = (h, options = {}) => KitButton(h, {
|
|
|
38
38
|
|
|
39
39
|
// ../../src/components/image-crop-editor/html.ts
|
|
40
40
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
41
|
-
|
|
42
|
-
// ../../src/lib/lucide-effect.ts
|
|
43
|
-
import {
|
|
44
|
-
ArrowDown as arrowDown,
|
|
45
|
-
ArrowUp as arrowUp,
|
|
46
|
-
ListFilter as listFilter,
|
|
47
|
-
Check as check,
|
|
48
|
-
ChevronLeft as chevronLeft,
|
|
49
|
-
ChevronDown as chevronDown,
|
|
50
|
-
ChevronRight as chevronRight,
|
|
51
|
-
ChevronsLeft as chevronsLeft,
|
|
52
|
-
ChevronsRight as chevronsRight,
|
|
53
|
-
ChevronsUpDown as chevronsUpDown,
|
|
54
|
-
Copy as copy,
|
|
55
|
-
Download as download,
|
|
56
|
-
Eye as eye,
|
|
57
|
-
EyeOff as eyeOff,
|
|
58
|
-
Ellipsis as ellipsis,
|
|
59
|
-
FileJson as fileJson,
|
|
60
|
-
FileText as fileText,
|
|
61
|
-
GripVertical as gripVertical,
|
|
62
|
-
Image as image,
|
|
63
|
-
LayoutGrid as layoutGrid,
|
|
64
|
-
LoaderCircle as loaderCircle,
|
|
65
|
-
Mail as mail,
|
|
66
|
-
Paperclip as paperclip,
|
|
67
|
-
RefreshCw as refreshCw,
|
|
68
|
-
RotateCcw as rotateCcw,
|
|
69
|
-
Rows3 as rows3,
|
|
70
|
-
Search as search,
|
|
71
|
-
Settings2 as settings2,
|
|
72
|
-
TriangleAlert as triangleAlert,
|
|
73
|
-
X as x
|
|
74
|
-
} from "lucide";
|
|
75
|
-
var createLucideIcon = (icon) => (h, {
|
|
76
|
-
size = 24,
|
|
77
|
-
color = "currentColor",
|
|
78
|
-
strokeWidth = 2,
|
|
79
|
-
className
|
|
80
|
-
} = {}) => h.svg.attrs({
|
|
81
|
-
class: className,
|
|
82
|
-
width: String(size),
|
|
83
|
-
height: String(size),
|
|
84
|
-
viewBox: "0 0 24 24",
|
|
85
|
-
fill: "none",
|
|
86
|
-
stroke: color,
|
|
87
|
-
"stroke-width": String(strokeWidth),
|
|
88
|
-
"stroke-linecap": "round",
|
|
89
|
-
"stroke-linejoin": "round",
|
|
90
|
-
"aria-hidden": "true"
|
|
91
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
92
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
93
|
-
switch (tag) {
|
|
94
|
-
case "path":
|
|
95
|
-
return h.path.attrs(attrs);
|
|
96
|
-
case "circle":
|
|
97
|
-
return h.circle.attrs(attrs);
|
|
98
|
-
case "ellipse":
|
|
99
|
-
return h.ellipse.attrs(attrs);
|
|
100
|
-
case "line":
|
|
101
|
-
return h.line.attrs(attrs);
|
|
102
|
-
case "polyline":
|
|
103
|
-
return h.polyline.attrs(attrs);
|
|
104
|
-
case "polygon":
|
|
105
|
-
return h.polygon.attrs(attrs);
|
|
106
|
-
case "rect":
|
|
107
|
-
return h.rect.attrs(attrs);
|
|
108
|
-
default:
|
|
109
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
110
|
-
}
|
|
111
|
-
}));
|
|
112
|
-
var Check = createLucideIcon(check);
|
|
113
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
114
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
115
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
116
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
117
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
118
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
119
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
120
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
121
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
122
|
-
var Copy = createLucideIcon(copy);
|
|
123
|
-
var Download = createLucideIcon(download);
|
|
124
|
-
var Eye = createLucideIcon(eye);
|
|
125
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
126
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
127
|
-
var FileJson = createLucideIcon(fileJson);
|
|
128
|
-
var FileText = createLucideIcon(fileText);
|
|
129
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
130
|
-
var Image = createLucideIcon(image);
|
|
131
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
132
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
133
|
-
var Mail = createLucideIcon(mail);
|
|
134
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
135
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
136
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
137
|
-
var Rows3 = createLucideIcon(rows3);
|
|
138
|
-
var Search = createLucideIcon(search);
|
|
139
|
-
var Settings2 = createLucideIcon(settings2);
|
|
140
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
141
|
-
var X = createLucideIcon(x);
|
|
41
|
+
import { Check, LoaderCircle, RotateCcw } from "@krak-stack/registry/lucide-effect";
|
|
142
42
|
|
|
143
43
|
// ../../src/components/async-action-button/index.ts
|
|
144
44
|
import { Effect, Schema as Schema2 } from "effect";
|