@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
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useRouterState
|
|
5
5
|
} from "@tanstack/react-router";
|
|
6
6
|
import { CircleAlert, RefreshCw } from "lucide-react";
|
|
7
|
-
import { useState as
|
|
7
|
+
import { useState as useState2 } from "react";
|
|
8
8
|
import { Option, Schema as Schema5 } from "effect";
|
|
9
9
|
import { HttpClientError, HttpTraceContext } from "effect/http";
|
|
10
10
|
|
|
@@ -60,167 +60,13 @@ function Button({
|
|
|
60
60
|
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
61
61
|
import { Redacted as Redacted2 } from "effect";
|
|
62
62
|
import { Component as Component2 } from "effect/ui";
|
|
63
|
-
import { useLayoutEffect
|
|
63
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
64
64
|
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
65
|
-
|
|
66
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
67
|
-
import { MessageLog as MessageLog2 } from "effect/ui";
|
|
68
|
-
import {
|
|
69
|
-
createContext,
|
|
70
|
-
useCallback,
|
|
71
|
-
useContext,
|
|
72
|
-
useEffect,
|
|
73
|
-
useLayoutEffect,
|
|
74
|
-
useRef,
|
|
75
|
-
useState,
|
|
76
|
-
useSyncExternalStore
|
|
77
|
-
} from "react";
|
|
78
|
-
|
|
79
|
-
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
80
|
-
import { MessageLog, Renderer, View } from "effect/ui";
|
|
81
|
-
import { BrowserHost, Html } from "effect/ui/html";
|
|
82
|
-
import { Cause, Effect, Fiber } from "effect";
|
|
83
|
-
var node = () => ({ children: [] });
|
|
84
|
-
var modelHost = (commit) => {
|
|
85
|
-
const remove = (child) => {
|
|
86
|
-
if (!child.parent)
|
|
87
|
-
return;
|
|
88
|
-
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
89
|
-
delete child.parent;
|
|
90
|
-
};
|
|
91
|
-
return {
|
|
92
|
-
createElement: node,
|
|
93
|
-
createText: node,
|
|
94
|
-
setText: () => {},
|
|
95
|
-
setAttr: () => {},
|
|
96
|
-
setProp: () => {},
|
|
97
|
-
setEvents: () => {},
|
|
98
|
-
insertBefore: (parent, child, before) => {
|
|
99
|
-
if (child === before)
|
|
100
|
-
return;
|
|
101
|
-
remove(child);
|
|
102
|
-
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
103
|
-
parent.children.splice(index, 0, child);
|
|
104
|
-
child.parent = parent;
|
|
105
|
-
},
|
|
106
|
-
remove,
|
|
107
|
-
parentOf: (child) => child.parent,
|
|
108
|
-
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
109
|
-
elements: ["html"],
|
|
110
|
-
controlled: new Set,
|
|
111
|
-
runsMounts: false,
|
|
112
|
-
commit
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
116
|
-
let currentProps = props;
|
|
117
|
-
let root;
|
|
118
|
-
let active = true;
|
|
119
|
-
let failure;
|
|
120
|
-
const publish = () => {
|
|
121
|
-
if (!active)
|
|
122
|
-
return;
|
|
123
|
-
if (failure) {
|
|
124
|
-
publishSnapshot({ error: failure });
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
const current = root?.model();
|
|
128
|
-
if (current !== undefined)
|
|
129
|
-
publishSnapshot({ model: current });
|
|
130
|
-
};
|
|
131
|
-
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
132
|
-
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
133
|
-
head: false,
|
|
134
|
-
onEmit,
|
|
135
|
-
fallback: ({ cause }) => {
|
|
136
|
-
failure = new Error("Effect UI root failed", {
|
|
137
|
-
cause: Cause.squash(cause)
|
|
138
|
-
});
|
|
139
|
-
return View.text("");
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
if (!active)
|
|
143
|
-
return;
|
|
144
|
-
root = mounted;
|
|
145
|
-
if (props !== currentProps)
|
|
146
|
-
mounted.setProps(currentProps);
|
|
147
|
-
publish();
|
|
148
|
-
return yield* Effect.never;
|
|
149
|
-
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
150
|
-
return {
|
|
151
|
-
send: (message) => {
|
|
152
|
-
root?.send(message);
|
|
153
|
-
publish();
|
|
154
|
-
},
|
|
155
|
-
setProps: (next) => {
|
|
156
|
-
currentProps = next;
|
|
157
|
-
root?.setProps(next);
|
|
158
|
-
},
|
|
159
|
-
dispose: () => {
|
|
160
|
-
active = false;
|
|
161
|
-
root = undefined;
|
|
162
|
-
Effect.runFork(Fiber.interrupt(fiber));
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
168
|
-
"use client";
|
|
169
|
-
var ModelMessageLogContext = createContext(undefined);
|
|
170
|
-
var useModel = (component, props, options = {}) => {
|
|
171
|
-
const contextLog = useContext(ModelMessageLogContext);
|
|
172
|
-
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
173
|
-
const [store] = useState(() => {
|
|
174
|
-
const initial = { model: component.init(props).model };
|
|
175
|
-
let snapshot = initial;
|
|
176
|
-
const listeners = new Set;
|
|
177
|
-
return {
|
|
178
|
-
subscribe: (listener) => {
|
|
179
|
-
listeners.add(listener);
|
|
180
|
-
return () => {
|
|
181
|
-
listeners.delete(listener);
|
|
182
|
-
};
|
|
183
|
-
},
|
|
184
|
-
getSnapshot: () => snapshot,
|
|
185
|
-
getServerSnapshot: () => initial,
|
|
186
|
-
publish: (next) => {
|
|
187
|
-
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
188
|
-
return;
|
|
189
|
-
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
190
|
-
return;
|
|
191
|
-
snapshot = next;
|
|
192
|
-
listeners.forEach((listener) => listener());
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
});
|
|
196
|
-
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
197
|
-
const committed = useRef(props);
|
|
198
|
-
const onEmit = useRef(options.onEmit);
|
|
199
|
-
const runtime = useRef(undefined);
|
|
200
|
-
const send = useCallback((message) => runtime.current?.send(message), []);
|
|
201
|
-
useLayoutEffect(() => {
|
|
202
|
-
onEmit.current = options.onEmit;
|
|
203
|
-
committed.current = props;
|
|
204
|
-
runtime.current?.setProps(props);
|
|
205
|
-
}, [props, options.onEmit]);
|
|
206
|
-
useEffect(() => {
|
|
207
|
-
if (messageLog === null)
|
|
208
|
-
return;
|
|
209
|
-
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
210
|
-
runtime.current = mounted;
|
|
211
|
-
return () => {
|
|
212
|
-
runtime.current = undefined;
|
|
213
|
-
mounted.dispose();
|
|
214
|
-
};
|
|
215
|
-
}, [component, messageLog, store]);
|
|
216
|
-
if ("error" in snapshot)
|
|
217
|
-
throw snapshot.error;
|
|
218
|
-
return { model: snapshot.model, send };
|
|
219
|
-
};
|
|
65
|
+
import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
220
66
|
|
|
221
67
|
// ../../src/components/copy-button/index.ts
|
|
222
|
-
import { Effect
|
|
223
|
-
import { Command, Component, UiSchema, View
|
|
68
|
+
import { Effect, Redacted, Schema as Schema2 } from "effect";
|
|
69
|
+
import { Command, Component, UiSchema, View } from "effect/ui";
|
|
224
70
|
|
|
225
71
|
// ../../src/components/copy-button/schema.ts
|
|
226
72
|
import { Schema } from "effect";
|
|
@@ -275,13 +121,13 @@ class WriteClipboard extends Command.Service()("copy-button/WriteClipboard", {
|
|
|
275
121
|
},
|
|
276
122
|
success: CopyButtonMessage
|
|
277
123
|
}) {
|
|
278
|
-
static layerFromWrite = (write) => WriteClipboard.toLayer(({ value }) =>
|
|
124
|
+
static layerFromWrite = (write) => WriteClipboard.toLayer(({ value }) => Effect.tryPromise(() => write(Redacted.value(value))).pipe(Effect.match({
|
|
279
125
|
onSuccess: () => CopyButtonMessage.Finished({ success: true }),
|
|
280
126
|
onFailure: () => CopyButtonMessage.Finished({ success: false })
|
|
281
127
|
})));
|
|
282
128
|
static browser = WriteClipboard.layerFromWrite((value) => navigator.clipboard.writeText(value));
|
|
283
129
|
}
|
|
284
|
-
var ResetClipboardFeedback = Command.make("copy-button/ResetFeedback", { args: { delay: Schema2.Number }, mode: "switch" }, ({ delay }) =>
|
|
130
|
+
var ResetClipboardFeedback = Command.make("copy-button/ResetFeedback", { args: { delay: Schema2.Number }, mode: "switch" }, ({ delay }) => Effect.sleep(Math.max(0, delay)).pipe(Effect.as(CopyButtonMessage.Reset())));
|
|
285
131
|
var copyButtonOptions = {
|
|
286
132
|
name: "CopyButton",
|
|
287
133
|
props: CopyButtonModelProps,
|
|
@@ -303,7 +149,7 @@ var copyButtonBehaviours = {
|
|
|
303
149
|
};
|
|
304
150
|
var CopyButtonModel = Definition.make({
|
|
305
151
|
...copyButtonBehaviours,
|
|
306
|
-
view: () =>
|
|
152
|
+
view: () => View.text("")
|
|
307
153
|
});
|
|
308
154
|
var copyButtonStatus = (status, copy, description) => {
|
|
309
155
|
if (status === "idle")
|
|
@@ -331,19 +177,19 @@ function CopyButton({
|
|
|
331
177
|
}) {
|
|
332
178
|
const locale = useKrakstackLocale(localeOverride);
|
|
333
179
|
const labels = copyButtonMessages(locale, messages);
|
|
334
|
-
const callbacks =
|
|
180
|
+
const callbacks = useRef({
|
|
335
181
|
onCopied,
|
|
336
182
|
onCopyError,
|
|
337
183
|
failureLabel: labels.copyFailed
|
|
338
184
|
});
|
|
339
|
-
|
|
185
|
+
useLayoutEffect(() => {
|
|
340
186
|
callbacks.current = {
|
|
341
187
|
onCopied,
|
|
342
188
|
onCopyError,
|
|
343
189
|
failureLabel: labels.copyFailed
|
|
344
190
|
};
|
|
345
191
|
}, [onCopied, onCopyError, labels.copyFailed]);
|
|
346
|
-
const [component] =
|
|
192
|
+
const [component] = useState(() => CopyButtonModel.pipe(Component2.provide(WriteClipboard.layerFromWrite(async (text) => {
|
|
347
193
|
const { onCopied, onCopyError, failureLabel } = callbacks.current;
|
|
348
194
|
try {
|
|
349
195
|
await navigator.clipboard.writeText(text);
|
|
@@ -481,7 +327,7 @@ var resolveErrorComponentClasses = (overrides) => ({
|
|
|
481
327
|
});
|
|
482
328
|
|
|
483
329
|
// ../../src/components/error-component/index.ts
|
|
484
|
-
import { Effect as
|
|
330
|
+
import { Effect as Effect2, Redacted as Redacted3, Schema as Schema4 } from "effect";
|
|
485
331
|
import { Command as Command2, Component as Component3, UiSchema as UiSchema2 } from "effect/ui";
|
|
486
332
|
|
|
487
333
|
// ../../src/components/error-component/schema.ts
|
|
@@ -600,7 +446,7 @@ var ErrorComponentMessage = UiSchema2.TaggedEnum({
|
|
|
600
446
|
Copied: { report: Report, success: Schema4.Boolean }
|
|
601
447
|
});
|
|
602
448
|
var ErrorComponentEvents = UiSchema2.TaggedEnum({ Retry: {} });
|
|
603
|
-
var CopyReport = Command2.make("error-component/CopyReport", { args: { report: Report }, mode: "switch" }, ({ report }) =>
|
|
449
|
+
var CopyReport = Command2.make("error-component/CopyReport", { args: { report: Report }, mode: "switch" }, ({ report }) => Effect2.tryPromise(() => navigator.clipboard.writeText(Redacted3.value(report))).pipe(Effect2.match({
|
|
604
450
|
onSuccess: () => ErrorComponentMessage.Copied({ report, success: true }),
|
|
605
451
|
onFailure: () => ErrorComponentMessage.Copied({ report, success: false })
|
|
606
452
|
})));
|
|
@@ -658,13 +504,13 @@ var ErrorComponent = ({
|
|
|
658
504
|
const standardError = error instanceof Error ? error : undefined;
|
|
659
505
|
const errorMessage = standardError?.message.trim() || labels.description;
|
|
660
506
|
const reference = diagnostics?.reference ?? (standardError ? getErrorTraceId(standardError) : undefined);
|
|
661
|
-
const [reportedAt] =
|
|
507
|
+
const [reportedAt] = useState2(() => new Date().toISOString());
|
|
662
508
|
const report = errorComponentReport({
|
|
663
509
|
error: standardError,
|
|
664
510
|
pathname,
|
|
665
511
|
diagnostics: { ...diagnostics, reference }
|
|
666
512
|
}, labels, locale, reportedAt);
|
|
667
|
-
const [copyResult, setCopyResult] =
|
|
513
|
+
const [copyResult, setCopyResult] = useState2(null);
|
|
668
514
|
const copyStatus = copyResult?.report === report ? copyResult.status : undefined;
|
|
669
515
|
return /* @__PURE__ */ jsx5("main", {
|
|
670
516
|
className: cn("flex min-h-[60vh] items-center justify-center p-6", className),
|
|
@@ -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(() => {
|
|
@@ -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" });
|