@krak-stack/registry 0.11.1 → 0.11.3
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/agent/react.js +29 -183
- package/dist/components/animated-list/html.js +1 -105
- package/dist/components/animated-list/react.js +16 -168
- package/dist/components/animated-number/react.js +8 -162
- package/dist/components/app-switcher/html.js +1 -103
- package/dist/components/async-action-button/html.js +1 -101
- package/dist/components/async-action-button/react.js +10 -164
- package/dist/components/audit-log-table/react.js +59 -213
- 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/code-block/react.js +10 -164
- package/dist/components/copy-button/html.d.ts +2 -2
- package/dist/components/copy-button/html.js +1 -101
- package/dist/components/copy-button/react.js +10 -164
- package/dist/components/copy-value/html.js +6 -105
- package/dist/components/copy-value/react.js +20 -172
- package/dist/components/danger-confirmation/react.js +13 -167
- package/dist/components/data-table/html.d.ts +51 -51
- package/dist/components/data-table/html.js +28 -101
- package/dist/components/data-table/react.js +59 -213
- 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/editable-text/react.js +14 -168
- package/dist/components/editing-locale-switcher/html.js +2 -102
- package/dist/components/email-composer/react.js +25 -174
- package/dist/components/email-editor/html.js +8 -107
- package/dist/components/email-editor/react.js +34 -186
- package/dist/components/error-component/html.d.ts +4 -4
- package/dist/components/error-component/html.js +10 -107
- package/dist/components/error-component/react.js +15 -169
- package/dist/components/file-input/html.js +6 -106
- package/dist/components/icon-input/html.js +3 -103
- package/dist/components/icon-input/react.js +7 -161
- package/dist/components/image-crop-editor/html.js +1 -101
- package/dist/components/image-crop-editor/react.js +19 -173
- 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/markdown/react.js +10 -164
- package/dist/components/notification-menu/html.js +7 -114
- package/dist/components/pagination/html.js +5 -100
- package/dist/components/presence-transition/react.js +9 -163
- package/dist/components/registry-previews/component-example.js +10 -164
- package/dist/components/rich-text-editor/html.js +14 -108
- package/dist/components/rich-text-editor/react.js +9 -161
- package/dist/components/search-menu/html.js +1 -103
- package/dist/components/search-menu/react.js +11 -165
- package/dist/components/sidebar-layout/html.js +2 -102
- package/dist/components/sidebar-layout/react.js +3 -157
- package/dist/components/stepper/html.js +4 -102
- package/dist/components/support/html.js +1 -101
- package/dist/components/support/react.js +14 -168
- 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/timezone-input/react.js +9 -163
- 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/components/webhook-delivery-table/react.js +74 -226
- package/dist/lib/docs.integrations.server.js +16 -35
- package/dist/lib/docs.js +31 -183
- package/dist/lib/docs.server.js +16 -35
- package/dist/lib/documentation-toolkit.js +19 -38
- package/dist/lib/effect-ui-adapter/use-model.js +158 -0
- package/dist/lib/lucide-effect.d.ts +2432 -0
- package/dist/lib/lucide-effect.js +7428 -0
- package/dist/services/agent/client/index.js +29 -183
- package/package.json +10 -2
|
@@ -387,108 +387,8 @@ var SupportDialogModel = SupportDefinition.make({
|
|
|
387
387
|
view: () => View.text("")
|
|
388
388
|
});
|
|
389
389
|
|
|
390
|
-
// ../../src/lib/lucide-effect.ts
|
|
391
|
-
import {
|
|
392
|
-
ArrowDown as arrowDown,
|
|
393
|
-
ArrowUp as arrowUp,
|
|
394
|
-
ListFilter as listFilter,
|
|
395
|
-
Check as check,
|
|
396
|
-
ChevronLeft as chevronLeft,
|
|
397
|
-
ChevronDown as chevronDown,
|
|
398
|
-
ChevronRight as chevronRight,
|
|
399
|
-
ChevronsLeft as chevronsLeft,
|
|
400
|
-
ChevronsRight as chevronsRight,
|
|
401
|
-
ChevronsUpDown as chevronsUpDown,
|
|
402
|
-
Copy as copy,
|
|
403
|
-
Download as download,
|
|
404
|
-
Eye as eye,
|
|
405
|
-
EyeOff as eyeOff,
|
|
406
|
-
Ellipsis as ellipsis,
|
|
407
|
-
FileJson as fileJson,
|
|
408
|
-
FileText as fileText,
|
|
409
|
-
GripVertical as gripVertical,
|
|
410
|
-
Image as image,
|
|
411
|
-
LayoutGrid as layoutGrid,
|
|
412
|
-
LoaderCircle as loaderCircle,
|
|
413
|
-
Mail as mail,
|
|
414
|
-
Paperclip as paperclip,
|
|
415
|
-
RefreshCw as refreshCw,
|
|
416
|
-
RotateCcw as rotateCcw,
|
|
417
|
-
Rows3 as rows3,
|
|
418
|
-
Search as search,
|
|
419
|
-
Settings2 as settings2,
|
|
420
|
-
TriangleAlert as triangleAlert,
|
|
421
|
-
X as x
|
|
422
|
-
} from "lucide";
|
|
423
|
-
var createLucideIcon = (icon) => (h, {
|
|
424
|
-
size = 24,
|
|
425
|
-
color = "currentColor",
|
|
426
|
-
strokeWidth = 2,
|
|
427
|
-
className
|
|
428
|
-
} = {}) => h.svg.attrs({
|
|
429
|
-
class: className,
|
|
430
|
-
width: String(size),
|
|
431
|
-
height: String(size),
|
|
432
|
-
viewBox: "0 0 24 24",
|
|
433
|
-
fill: "none",
|
|
434
|
-
stroke: color,
|
|
435
|
-
"stroke-width": String(strokeWidth),
|
|
436
|
-
"stroke-linecap": "round",
|
|
437
|
-
"stroke-linejoin": "round",
|
|
438
|
-
"aria-hidden": "true"
|
|
439
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
440
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
441
|
-
switch (tag) {
|
|
442
|
-
case "path":
|
|
443
|
-
return h.path.attrs(attrs);
|
|
444
|
-
case "circle":
|
|
445
|
-
return h.circle.attrs(attrs);
|
|
446
|
-
case "ellipse":
|
|
447
|
-
return h.ellipse.attrs(attrs);
|
|
448
|
-
case "line":
|
|
449
|
-
return h.line.attrs(attrs);
|
|
450
|
-
case "polyline":
|
|
451
|
-
return h.polyline.attrs(attrs);
|
|
452
|
-
case "polygon":
|
|
453
|
-
return h.polygon.attrs(attrs);
|
|
454
|
-
case "rect":
|
|
455
|
-
return h.rect.attrs(attrs);
|
|
456
|
-
default:
|
|
457
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
458
|
-
}
|
|
459
|
-
}));
|
|
460
|
-
var Check = createLucideIcon(check);
|
|
461
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
462
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
463
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
464
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
465
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
466
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
467
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
468
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
469
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
470
|
-
var Copy = createLucideIcon(copy);
|
|
471
|
-
var Download = createLucideIcon(download);
|
|
472
|
-
var Eye = createLucideIcon(eye);
|
|
473
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
474
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
475
|
-
var FileJson = createLucideIcon(fileJson);
|
|
476
|
-
var FileText = createLucideIcon(fileText);
|
|
477
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
478
|
-
var Image = createLucideIcon(image);
|
|
479
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
480
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
481
|
-
var Mail = createLucideIcon(mail);
|
|
482
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
483
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
484
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
485
|
-
var Rows3 = createLucideIcon(rows3);
|
|
486
|
-
var Search = createLucideIcon(search);
|
|
487
|
-
var Settings2 = createLucideIcon(settings2);
|
|
488
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
489
|
-
var X = createLucideIcon(x);
|
|
490
|
-
|
|
491
390
|
// ../../src/components/support/html.ts
|
|
391
|
+
import { Check, Image, Paperclip, X } from "@krak-stack/registry/lucide-effect";
|
|
492
392
|
var ObserveScreenshotPaste = Mount.makeStream("ObserveScreenshotPaste", {}, (textarea) => Stream.fromEventListener(textarea, "paste").pipe(Stream.filterMap((event) => {
|
|
493
393
|
const files = Array.from(event.clipboardData?.files ?? []).filter(({ type }) => type.startsWith("image/"));
|
|
494
394
|
if (files.length === 0)
|
|
@@ -1,167 +1,13 @@
|
|
|
1
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
2
|
-
import { MessageLog as MessageLog2 } from "effect/ui";
|
|
3
|
-
import {
|
|
4
|
-
createContext,
|
|
5
|
-
useCallback,
|
|
6
|
-
useContext,
|
|
7
|
-
useEffect,
|
|
8
|
-
useLayoutEffect,
|
|
9
|
-
useRef,
|
|
10
|
-
useState,
|
|
11
|
-
useSyncExternalStore
|
|
12
|
-
} from "react";
|
|
13
|
-
|
|
14
|
-
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
15
|
-
import { MessageLog, Renderer, View } from "effect/ui";
|
|
16
|
-
import { BrowserHost, Html } from "effect/ui/html";
|
|
17
|
-
import { Cause, Effect, Fiber } from "effect";
|
|
18
|
-
var node = () => ({ children: [] });
|
|
19
|
-
var modelHost = (commit) => {
|
|
20
|
-
const remove = (child) => {
|
|
21
|
-
if (!child.parent)
|
|
22
|
-
return;
|
|
23
|
-
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
24
|
-
delete child.parent;
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
createElement: node,
|
|
28
|
-
createText: node,
|
|
29
|
-
setText: () => {},
|
|
30
|
-
setAttr: () => {},
|
|
31
|
-
setProp: () => {},
|
|
32
|
-
setEvents: () => {},
|
|
33
|
-
insertBefore: (parent, child, before) => {
|
|
34
|
-
if (child === before)
|
|
35
|
-
return;
|
|
36
|
-
remove(child);
|
|
37
|
-
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
38
|
-
parent.children.splice(index, 0, child);
|
|
39
|
-
child.parent = parent;
|
|
40
|
-
},
|
|
41
|
-
remove,
|
|
42
|
-
parentOf: (child) => child.parent,
|
|
43
|
-
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
44
|
-
elements: ["html"],
|
|
45
|
-
controlled: new Set,
|
|
46
|
-
runsMounts: false,
|
|
47
|
-
commit
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
51
|
-
let currentProps = props;
|
|
52
|
-
let root;
|
|
53
|
-
let active = true;
|
|
54
|
-
let failure;
|
|
55
|
-
const publish = () => {
|
|
56
|
-
if (!active)
|
|
57
|
-
return;
|
|
58
|
-
if (failure) {
|
|
59
|
-
publishSnapshot({ error: failure });
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const current = root?.model();
|
|
63
|
-
if (current !== undefined)
|
|
64
|
-
publishSnapshot({ model: current });
|
|
65
|
-
};
|
|
66
|
-
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
67
|
-
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
68
|
-
head: false,
|
|
69
|
-
onEmit,
|
|
70
|
-
fallback: ({ cause }) => {
|
|
71
|
-
failure = new Error("Effect UI root failed", {
|
|
72
|
-
cause: Cause.squash(cause)
|
|
73
|
-
});
|
|
74
|
-
return View.text("");
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
if (!active)
|
|
78
|
-
return;
|
|
79
|
-
root = mounted;
|
|
80
|
-
if (props !== currentProps)
|
|
81
|
-
mounted.setProps(currentProps);
|
|
82
|
-
publish();
|
|
83
|
-
return yield* Effect.never;
|
|
84
|
-
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
85
|
-
return {
|
|
86
|
-
send: (message) => {
|
|
87
|
-
root?.send(message);
|
|
88
|
-
publish();
|
|
89
|
-
},
|
|
90
|
-
setProps: (next) => {
|
|
91
|
-
currentProps = next;
|
|
92
|
-
root?.setProps(next);
|
|
93
|
-
},
|
|
94
|
-
dispose: () => {
|
|
95
|
-
active = false;
|
|
96
|
-
root = undefined;
|
|
97
|
-
Effect.runFork(Fiber.interrupt(fiber));
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
103
|
-
"use client";
|
|
104
|
-
var ModelMessageLogContext = createContext(undefined);
|
|
105
|
-
var useModel = (component, props, options = {}) => {
|
|
106
|
-
const contextLog = useContext(ModelMessageLogContext);
|
|
107
|
-
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
108
|
-
const [store] = useState(() => {
|
|
109
|
-
const initial = { model: component.init(props).model };
|
|
110
|
-
let snapshot = initial;
|
|
111
|
-
const listeners = new Set;
|
|
112
|
-
return {
|
|
113
|
-
subscribe: (listener) => {
|
|
114
|
-
listeners.add(listener);
|
|
115
|
-
return () => {
|
|
116
|
-
listeners.delete(listener);
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
getSnapshot: () => snapshot,
|
|
120
|
-
getServerSnapshot: () => initial,
|
|
121
|
-
publish: (next) => {
|
|
122
|
-
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
123
|
-
return;
|
|
124
|
-
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
125
|
-
return;
|
|
126
|
-
snapshot = next;
|
|
127
|
-
listeners.forEach((listener) => listener());
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
132
|
-
const committed = useRef(props);
|
|
133
|
-
const onEmit = useRef(options.onEmit);
|
|
134
|
-
const runtime = useRef(undefined);
|
|
135
|
-
const send = useCallback((message) => runtime.current?.send(message), []);
|
|
136
|
-
useLayoutEffect(() => {
|
|
137
|
-
onEmit.current = options.onEmit;
|
|
138
|
-
committed.current = props;
|
|
139
|
-
runtime.current?.setProps(props);
|
|
140
|
-
}, [props, options.onEmit]);
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
if (messageLog === null)
|
|
143
|
-
return;
|
|
144
|
-
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
145
|
-
runtime.current = mounted;
|
|
146
|
-
return () => {
|
|
147
|
-
runtime.current = undefined;
|
|
148
|
-
mounted.dispose();
|
|
149
|
-
};
|
|
150
|
-
}, [component, messageLog, store]);
|
|
151
|
-
if ("error" in snapshot)
|
|
152
|
-
throw snapshot.error;
|
|
153
|
-
return { model: snapshot.model, send };
|
|
154
|
-
};
|
|
155
|
-
|
|
156
1
|
// ../../src/components/support/react.tsx
|
|
2
|
+
import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
157
3
|
import { Component as Component2 } from "effect/ui";
|
|
158
4
|
import { Option, Redacted as Redacted2, Schema as Schema5 } from "effect";
|
|
159
5
|
import { Check, Image, Paperclip, X } from "lucide-react";
|
|
160
6
|
import {
|
|
161
7
|
useId,
|
|
162
|
-
useLayoutEffect
|
|
163
|
-
useRef
|
|
164
|
-
useState
|
|
8
|
+
useLayoutEffect,
|
|
9
|
+
useRef,
|
|
10
|
+
useState
|
|
165
11
|
} from "react";
|
|
166
12
|
|
|
167
13
|
// ../../src/components/ui/button.tsx
|
|
@@ -430,8 +276,8 @@ function Textarea({ className, ...props }) {
|
|
|
430
276
|
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
431
277
|
|
|
432
278
|
// ../../src/components/support/index.ts
|
|
433
|
-
import { Command, Component, UiSchema, View
|
|
434
|
-
import { Effect
|
|
279
|
+
import { Command, Component, UiSchema, View } from "effect/ui";
|
|
280
|
+
import { Effect, Redacted, Schema as Schema3 } from "effect";
|
|
435
281
|
|
|
436
282
|
// ../../src/components/support/form.ts
|
|
437
283
|
import { Result, Schema as Schema2, SchemaIssue } from "effect";
|
|
@@ -693,7 +539,7 @@ class SendSupport extends Command.Service()("support/SendSupport", {
|
|
|
693
539
|
},
|
|
694
540
|
success: SupportMessage2
|
|
695
541
|
}) {
|
|
696
|
-
static layerFromSubmit = (submit) => SendSupport.toLayer(({ request }) =>
|
|
542
|
+
static layerFromSubmit = (submit) => SendSupport.toLayer(({ request }) => Effect.tryPromise(async () => submit(Redacted.value(request))).pipe(Effect.match({
|
|
697
543
|
onSuccess: () => SupportMessage2.SendFinished({ accepted: true }),
|
|
698
544
|
onFailure: () => SupportMessage2.SendFinished({ accepted: false })
|
|
699
545
|
})));
|
|
@@ -738,10 +584,10 @@ var supportBehaviours = {
|
|
|
738
584
|
};
|
|
739
585
|
var SupportDialogModel = SupportDefinition.make({
|
|
740
586
|
...supportBehaviours,
|
|
741
|
-
view: () =>
|
|
587
|
+
view: () => View.text("")
|
|
742
588
|
});
|
|
743
589
|
// ../../src/components/support/multipart.ts
|
|
744
|
-
import { Effect as
|
|
590
|
+
import { Effect as Effect2, FileSystem, Schema as Schema4 } from "effect";
|
|
745
591
|
import { Multipart } from "effect/http";
|
|
746
592
|
import { HttpApiSchema } from "effect/http-api";
|
|
747
593
|
var SupportMultipartPayload = Schema4.Struct({
|
|
@@ -758,9 +604,9 @@ var SupportMultipartPayload = Schema4.Struct({
|
|
|
758
604
|
|
|
759
605
|
class InvalidSupportScreenshot extends Schema4.TaggedError()("InvalidSupportScreenshot", {}) {
|
|
760
606
|
}
|
|
761
|
-
var readSupportScreenshots =
|
|
607
|
+
var readSupportScreenshots = Effect2.fn("Support.readScreenshots")(function* (files) {
|
|
762
608
|
const fs = yield* FileSystem.FileSystem;
|
|
763
|
-
return yield*
|
|
609
|
+
return yield* Effect2.forEach(files, (file, index) => Effect2.gen(function* () {
|
|
764
610
|
const format = screenshotFormats.get(file.contentType);
|
|
765
611
|
if (!format)
|
|
766
612
|
return yield* new InvalidSupportScreenshot;
|
|
@@ -824,7 +670,7 @@ var SupportFormView = ({
|
|
|
824
670
|
}) => {
|
|
825
671
|
const classes = resolveSupportClasses(classOverrides);
|
|
826
672
|
const id = useId();
|
|
827
|
-
const fileInput =
|
|
673
|
+
const fileInput = useRef(null);
|
|
828
674
|
const directEmail = Schema5.decodeUnknownOption(SupportReplyEmail)(supportEmail);
|
|
829
675
|
const pending = status === "pending";
|
|
830
676
|
const messageError = invalidFields?.includes("message") ? copy.invalidMessage ?? copy.invalid : undefined;
|
|
@@ -1081,7 +927,7 @@ var SupportWithSubmit = ({
|
|
|
1081
927
|
onSubmit
|
|
1082
928
|
}) => {
|
|
1083
929
|
const copy = useSupportFormMessages(locale, messages);
|
|
1084
|
-
const [submission] =
|
|
930
|
+
const [submission] = useState(() => {
|
|
1085
931
|
let submit = onSubmit;
|
|
1086
932
|
const component = SupportDialogModel.pipe(Component2.provide(SendSupport.layerFromSubmit((request) => submit(request))));
|
|
1087
933
|
return {
|
|
@@ -1091,7 +937,7 @@ var SupportWithSubmit = ({
|
|
|
1091
937
|
}
|
|
1092
938
|
};
|
|
1093
939
|
});
|
|
1094
|
-
|
|
940
|
+
useLayoutEffect(() => {
|
|
1095
941
|
submission.setSubmit(onSubmit);
|
|
1096
942
|
}, [onSubmit, submission]);
|
|
1097
943
|
return /* @__PURE__ */ jsx7(SupportModelView, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// ../../src/components/theme-switcher/html.ts
|
|
2
2
|
import { Html } from "effect/ui/html";
|
|
3
3
|
import { Menu } from "effect/ui/kit";
|
|
4
|
-
import { Monitor, Moon, Sun } from "lucide";
|
|
5
4
|
|
|
6
5
|
// ../../src/lib/utils.ts
|
|
7
6
|
import { cn } from "cn";
|
|
@@ -59,107 +58,7 @@ var MenuLabel = (h, menu, options) => menu.groupLabel({
|
|
|
59
58
|
|
|
60
59
|
// ../../src/components/theme-switcher/html.ts
|
|
61
60
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
62
|
-
|
|
63
|
-
// ../../src/lib/lucide-effect.ts
|
|
64
|
-
import {
|
|
65
|
-
ArrowDown as arrowDown,
|
|
66
|
-
ArrowUp as arrowUp,
|
|
67
|
-
ListFilter as listFilter,
|
|
68
|
-
Check as check,
|
|
69
|
-
ChevronLeft as chevronLeft,
|
|
70
|
-
ChevronDown as chevronDown,
|
|
71
|
-
ChevronRight as chevronRight,
|
|
72
|
-
ChevronsLeft as chevronsLeft,
|
|
73
|
-
ChevronsRight as chevronsRight,
|
|
74
|
-
ChevronsUpDown as chevronsUpDown,
|
|
75
|
-
Copy as copy,
|
|
76
|
-
Download as download,
|
|
77
|
-
Eye as eye,
|
|
78
|
-
EyeOff as eyeOff,
|
|
79
|
-
Ellipsis as ellipsis,
|
|
80
|
-
FileJson as fileJson,
|
|
81
|
-
FileText as fileText,
|
|
82
|
-
GripVertical as gripVertical,
|
|
83
|
-
Image as image,
|
|
84
|
-
LayoutGrid as layoutGrid,
|
|
85
|
-
LoaderCircle as loaderCircle,
|
|
86
|
-
Mail as mail,
|
|
87
|
-
Paperclip as paperclip,
|
|
88
|
-
RefreshCw as refreshCw,
|
|
89
|
-
RotateCcw as rotateCcw,
|
|
90
|
-
Rows3 as rows3,
|
|
91
|
-
Search as search,
|
|
92
|
-
Settings2 as settings2,
|
|
93
|
-
TriangleAlert as triangleAlert,
|
|
94
|
-
X as x
|
|
95
|
-
} from "lucide";
|
|
96
|
-
var createLucideIcon = (icon) => (h, {
|
|
97
|
-
size = 24,
|
|
98
|
-
color = "currentColor",
|
|
99
|
-
strokeWidth = 2,
|
|
100
|
-
className
|
|
101
|
-
} = {}) => h.svg.attrs({
|
|
102
|
-
class: className,
|
|
103
|
-
width: String(size),
|
|
104
|
-
height: String(size),
|
|
105
|
-
viewBox: "0 0 24 24",
|
|
106
|
-
fill: "none",
|
|
107
|
-
stroke: color,
|
|
108
|
-
"stroke-width": String(strokeWidth),
|
|
109
|
-
"stroke-linecap": "round",
|
|
110
|
-
"stroke-linejoin": "round",
|
|
111
|
-
"aria-hidden": "true"
|
|
112
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
113
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
114
|
-
switch (tag) {
|
|
115
|
-
case "path":
|
|
116
|
-
return h.path.attrs(attrs);
|
|
117
|
-
case "circle":
|
|
118
|
-
return h.circle.attrs(attrs);
|
|
119
|
-
case "ellipse":
|
|
120
|
-
return h.ellipse.attrs(attrs);
|
|
121
|
-
case "line":
|
|
122
|
-
return h.line.attrs(attrs);
|
|
123
|
-
case "polyline":
|
|
124
|
-
return h.polyline.attrs(attrs);
|
|
125
|
-
case "polygon":
|
|
126
|
-
return h.polygon.attrs(attrs);
|
|
127
|
-
case "rect":
|
|
128
|
-
return h.rect.attrs(attrs);
|
|
129
|
-
default:
|
|
130
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
131
|
-
}
|
|
132
|
-
}));
|
|
133
|
-
var Check = createLucideIcon(check);
|
|
134
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
135
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
136
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
137
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
138
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
139
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
140
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
141
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
142
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
143
|
-
var Copy = createLucideIcon(copy);
|
|
144
|
-
var Download = createLucideIcon(download);
|
|
145
|
-
var Eye = createLucideIcon(eye);
|
|
146
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
147
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
148
|
-
var FileJson = createLucideIcon(fileJson);
|
|
149
|
-
var FileText = createLucideIcon(fileText);
|
|
150
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
151
|
-
var Image = createLucideIcon(image);
|
|
152
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
153
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
154
|
-
var Mail = createLucideIcon(mail);
|
|
155
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
156
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
157
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
158
|
-
var Rows3 = createLucideIcon(rows3);
|
|
159
|
-
var Search = createLucideIcon(search);
|
|
160
|
-
var Settings2 = createLucideIcon(settings2);
|
|
161
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
162
|
-
var X = createLucideIcon(x);
|
|
61
|
+
import { Monitor, Moon, Sun } from "@krak-stack/registry/lucide-effect";
|
|
163
62
|
|
|
164
63
|
// ../../src/components/theme-switcher/index.ts
|
|
165
64
|
import { Schema as Schema2 } from "effect";
|
|
@@ -230,9 +129,9 @@ var themeSwitcherBehaviours = {
|
|
|
230
129
|
|
|
231
130
|
// ../../src/components/theme-switcher/html.ts
|
|
232
131
|
var icons = {
|
|
233
|
-
light:
|
|
234
|
-
dark:
|
|
235
|
-
system:
|
|
132
|
+
light: Sun,
|
|
133
|
+
dark: Moon,
|
|
134
|
+
system: Monitor
|
|
236
135
|
};
|
|
237
136
|
var ThemeSwitcher = Html.component({
|
|
238
137
|
...themeSwitcherOptions,
|
|
@@ -58,11 +58,11 @@ export declare const TimeInput: Component.Component<"TimeInput", {
|
|
|
58
58
|
}, {
|
|
59
59
|
readonly open: boolean;
|
|
60
60
|
}, {
|
|
61
|
+
readonly _tag: "Cleared";
|
|
62
|
+
} | {
|
|
61
63
|
readonly _tag: "Closed";
|
|
62
64
|
} | {
|
|
63
65
|
readonly _tag: "Opened";
|
|
64
|
-
} | {
|
|
65
|
-
readonly _tag: "Cleared";
|
|
66
66
|
} | {
|
|
67
67
|
readonly _tag: "Edited";
|
|
68
68
|
readonly value: string;
|
|
@@ -3,7 +3,6 @@ import { Effect, 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
5
|
import { Popover } from "effect/ui/kit";
|
|
6
|
-
import { Clock } from "lucide";
|
|
7
6
|
|
|
8
7
|
// ../../src/components/effectcn/button.ts
|
|
9
8
|
import {
|
|
@@ -60,107 +59,7 @@ var PopoverTitle = (h, popover, options = {}) => popover.title(h.h2.class(cn("m-
|
|
|
60
59
|
|
|
61
60
|
// ../../src/components/time-input/html.ts
|
|
62
61
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
63
|
-
|
|
64
|
-
// ../../src/lib/lucide-effect.ts
|
|
65
|
-
import {
|
|
66
|
-
ArrowDown as arrowDown,
|
|
67
|
-
ArrowUp as arrowUp,
|
|
68
|
-
ListFilter as listFilter,
|
|
69
|
-
Check as check,
|
|
70
|
-
ChevronLeft as chevronLeft,
|
|
71
|
-
ChevronDown as chevronDown,
|
|
72
|
-
ChevronRight as chevronRight,
|
|
73
|
-
ChevronsLeft as chevronsLeft,
|
|
74
|
-
ChevronsRight as chevronsRight,
|
|
75
|
-
ChevronsUpDown as chevronsUpDown,
|
|
76
|
-
Copy as copy,
|
|
77
|
-
Download as download,
|
|
78
|
-
Eye as eye,
|
|
79
|
-
EyeOff as eyeOff,
|
|
80
|
-
Ellipsis as ellipsis,
|
|
81
|
-
FileJson as fileJson,
|
|
82
|
-
FileText as fileText,
|
|
83
|
-
GripVertical as gripVertical,
|
|
84
|
-
Image as image,
|
|
85
|
-
LayoutGrid as layoutGrid,
|
|
86
|
-
LoaderCircle as loaderCircle,
|
|
87
|
-
Mail as mail,
|
|
88
|
-
Paperclip as paperclip,
|
|
89
|
-
RefreshCw as refreshCw,
|
|
90
|
-
RotateCcw as rotateCcw,
|
|
91
|
-
Rows3 as rows3,
|
|
92
|
-
Search as search,
|
|
93
|
-
Settings2 as settings2,
|
|
94
|
-
TriangleAlert as triangleAlert,
|
|
95
|
-
X as x
|
|
96
|
-
} from "lucide";
|
|
97
|
-
var createLucideIcon = (icon) => (h, {
|
|
98
|
-
size = 24,
|
|
99
|
-
color = "currentColor",
|
|
100
|
-
strokeWidth = 2,
|
|
101
|
-
className
|
|
102
|
-
} = {}) => h.svg.attrs({
|
|
103
|
-
class: className,
|
|
104
|
-
width: String(size),
|
|
105
|
-
height: String(size),
|
|
106
|
-
viewBox: "0 0 24 24",
|
|
107
|
-
fill: "none",
|
|
108
|
-
stroke: color,
|
|
109
|
-
"stroke-width": String(strokeWidth),
|
|
110
|
-
"stroke-linecap": "round",
|
|
111
|
-
"stroke-linejoin": "round",
|
|
112
|
-
"aria-hidden": "true"
|
|
113
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
114
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
115
|
-
switch (tag) {
|
|
116
|
-
case "path":
|
|
117
|
-
return h.path.attrs(attrs);
|
|
118
|
-
case "circle":
|
|
119
|
-
return h.circle.attrs(attrs);
|
|
120
|
-
case "ellipse":
|
|
121
|
-
return h.ellipse.attrs(attrs);
|
|
122
|
-
case "line":
|
|
123
|
-
return h.line.attrs(attrs);
|
|
124
|
-
case "polyline":
|
|
125
|
-
return h.polyline.attrs(attrs);
|
|
126
|
-
case "polygon":
|
|
127
|
-
return h.polygon.attrs(attrs);
|
|
128
|
-
case "rect":
|
|
129
|
-
return h.rect.attrs(attrs);
|
|
130
|
-
default:
|
|
131
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
132
|
-
}
|
|
133
|
-
}));
|
|
134
|
-
var Check = createLucideIcon(check);
|
|
135
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
136
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
137
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
138
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
139
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
140
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
141
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
142
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
143
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
144
|
-
var Copy = createLucideIcon(copy);
|
|
145
|
-
var Download = createLucideIcon(download);
|
|
146
|
-
var Eye = createLucideIcon(eye);
|
|
147
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
148
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
149
|
-
var FileJson = createLucideIcon(fileJson);
|
|
150
|
-
var FileText = createLucideIcon(fileText);
|
|
151
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
152
|
-
var Image = createLucideIcon(image);
|
|
153
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
154
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
155
|
-
var Mail = createLucideIcon(mail);
|
|
156
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
157
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
158
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
159
|
-
var Rows3 = createLucideIcon(rows3);
|
|
160
|
-
var Search = createLucideIcon(search);
|
|
161
|
-
var Settings2 = createLucideIcon(settings2);
|
|
162
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
163
|
-
var X = createLucideIcon(x);
|
|
62
|
+
import { Clock as ClockIcon, X } from "@krak-stack/registry/lucide-effect";
|
|
164
63
|
|
|
165
64
|
// ../../src/components/time-input/classes.ts
|
|
166
65
|
var timeInputClasses = {
|
|
@@ -461,7 +360,6 @@ var getTimeInputColumns = (p, status) => {
|
|
|
461
360
|
};
|
|
462
361
|
|
|
463
362
|
// ../../src/components/time-input/html.ts
|
|
464
|
-
var ClockIcon = createLucideIcon(Clock);
|
|
465
363
|
var actionButton = {
|
|
466
364
|
variant: "ghost",
|
|
467
365
|
size: "icon-sm",
|