@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,6 @@ import { Mount } from "effect/ui";
|
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
5
|
import { Menu, Select } from "effect/ui/kit";
|
|
6
6
|
import { Editor } from "@tiptap/core";
|
|
7
|
-
import { Bold, Braces, Italic, Link2, Redo2, Underline, Undo2 } from "lucide";
|
|
8
7
|
|
|
9
8
|
// ../../src/components/effectcn/button.ts
|
|
10
9
|
import {
|
|
@@ -92,107 +91,15 @@ var scrollArrow = "inset-x-0 z-10 hidden h-6 cursor-default place-items-center r
|
|
|
92
91
|
|
|
93
92
|
// ../../src/components/rich-text-editor/html.ts
|
|
94
93
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
95
|
-
|
|
96
|
-
// ../../src/lib/lucide-effect.ts
|
|
97
94
|
import {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ChevronsRight as chevronsRight,
|
|
107
|
-
ChevronsUpDown as chevronsUpDown,
|
|
108
|
-
Copy as copy,
|
|
109
|
-
Download as download,
|
|
110
|
-
Eye as eye,
|
|
111
|
-
EyeOff as eyeOff,
|
|
112
|
-
Ellipsis as ellipsis,
|
|
113
|
-
FileJson as fileJson,
|
|
114
|
-
FileText as fileText,
|
|
115
|
-
GripVertical as gripVertical,
|
|
116
|
-
Image as image,
|
|
117
|
-
LayoutGrid as layoutGrid,
|
|
118
|
-
LoaderCircle as loaderCircle,
|
|
119
|
-
Mail as mail,
|
|
120
|
-
Paperclip as paperclip,
|
|
121
|
-
RefreshCw as refreshCw,
|
|
122
|
-
RotateCcw as rotateCcw,
|
|
123
|
-
Rows3 as rows3,
|
|
124
|
-
Search as search,
|
|
125
|
-
Settings2 as settings2,
|
|
126
|
-
TriangleAlert as triangleAlert,
|
|
127
|
-
X as x
|
|
128
|
-
} from "lucide";
|
|
129
|
-
var createLucideIcon = (icon) => (h, {
|
|
130
|
-
size = 24,
|
|
131
|
-
color = "currentColor",
|
|
132
|
-
strokeWidth = 2,
|
|
133
|
-
className
|
|
134
|
-
} = {}) => h.svg.attrs({
|
|
135
|
-
class: className,
|
|
136
|
-
width: String(size),
|
|
137
|
-
height: String(size),
|
|
138
|
-
viewBox: "0 0 24 24",
|
|
139
|
-
fill: "none",
|
|
140
|
-
stroke: color,
|
|
141
|
-
"stroke-width": String(strokeWidth),
|
|
142
|
-
"stroke-linecap": "round",
|
|
143
|
-
"stroke-linejoin": "round",
|
|
144
|
-
"aria-hidden": "true"
|
|
145
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
146
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
147
|
-
switch (tag) {
|
|
148
|
-
case "path":
|
|
149
|
-
return h.path.attrs(attrs);
|
|
150
|
-
case "circle":
|
|
151
|
-
return h.circle.attrs(attrs);
|
|
152
|
-
case "ellipse":
|
|
153
|
-
return h.ellipse.attrs(attrs);
|
|
154
|
-
case "line":
|
|
155
|
-
return h.line.attrs(attrs);
|
|
156
|
-
case "polyline":
|
|
157
|
-
return h.polyline.attrs(attrs);
|
|
158
|
-
case "polygon":
|
|
159
|
-
return h.polygon.attrs(attrs);
|
|
160
|
-
case "rect":
|
|
161
|
-
return h.rect.attrs(attrs);
|
|
162
|
-
default:
|
|
163
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
164
|
-
}
|
|
165
|
-
}));
|
|
166
|
-
var Check = createLucideIcon(check);
|
|
167
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
168
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
169
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
170
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
171
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
172
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
173
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
174
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
175
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
176
|
-
var Copy = createLucideIcon(copy);
|
|
177
|
-
var Download = createLucideIcon(download);
|
|
178
|
-
var Eye = createLucideIcon(eye);
|
|
179
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
180
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
181
|
-
var FileJson = createLucideIcon(fileJson);
|
|
182
|
-
var FileText = createLucideIcon(fileText);
|
|
183
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
184
|
-
var Image = createLucideIcon(image);
|
|
185
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
186
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
187
|
-
var Mail = createLucideIcon(mail);
|
|
188
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
189
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
190
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
191
|
-
var Rows3 = createLucideIcon(rows3);
|
|
192
|
-
var Search = createLucideIcon(search);
|
|
193
|
-
var Settings2 = createLucideIcon(settings2);
|
|
194
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
195
|
-
var X = createLucideIcon(x);
|
|
95
|
+
Bold,
|
|
96
|
+
Braces as VariableIcon,
|
|
97
|
+
Italic,
|
|
98
|
+
Link2,
|
|
99
|
+
Redo2,
|
|
100
|
+
Underline,
|
|
101
|
+
Undo2
|
|
102
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
196
103
|
|
|
197
104
|
// ../../src/lib/rich-text/tiptap.ts
|
|
198
105
|
import { Extension } from "@tiptap/core";
|
|
@@ -637,14 +544,13 @@ var contentArgs = {
|
|
|
637
544
|
errorId: Schema6.String
|
|
638
545
|
};
|
|
639
546
|
var icons = {
|
|
640
|
-
bold:
|
|
641
|
-
italic:
|
|
642
|
-
underline:
|
|
643
|
-
undo:
|
|
644
|
-
redo:
|
|
645
|
-
link:
|
|
547
|
+
bold: Bold,
|
|
548
|
+
italic: Italic,
|
|
549
|
+
underline: Underline,
|
|
550
|
+
undo: Undo2,
|
|
551
|
+
redo: Redo2,
|
|
552
|
+
link: Link2
|
|
646
553
|
};
|
|
647
|
-
var VariableIcon = createLucideIcon(Braces);
|
|
648
554
|
var blocks = ["paragraph", "heading", "bullet", "numbered"];
|
|
649
555
|
var makeRichTextEditor = (name, extensions) => {
|
|
650
556
|
const Attach = Mount.makeStream(`${name}.editor`, { args: contentArgs }, (node, initial, changes) => Stream.callback((queue) => Effect.gen(function* () {
|
|
@@ -3,7 +3,7 @@ import { Schema as Schema6 } from "effect";
|
|
|
3
3
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
4
4
|
import { renderToReactElement } from "@tiptap/static-renderer/pm/react";
|
|
5
5
|
import {
|
|
6
|
-
useEffect
|
|
6
|
+
useEffect,
|
|
7
7
|
useEffectEvent,
|
|
8
8
|
useId
|
|
9
9
|
} from "react";
|
|
@@ -345,160 +345,8 @@ var richTextValidation = ({
|
|
|
345
345
|
]
|
|
346
346
|
});
|
|
347
347
|
|
|
348
|
-
// ../../src/
|
|
349
|
-
import {
|
|
350
|
-
import {
|
|
351
|
-
createContext,
|
|
352
|
-
useCallback,
|
|
353
|
-
useContext,
|
|
354
|
-
useEffect,
|
|
355
|
-
useLayoutEffect,
|
|
356
|
-
useRef,
|
|
357
|
-
useState,
|
|
358
|
-
useSyncExternalStore
|
|
359
|
-
} from "react";
|
|
360
|
-
|
|
361
|
-
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
362
|
-
import { MessageLog, Renderer, View } from "effect/ui";
|
|
363
|
-
import { BrowserHost, Html } from "effect/ui/html";
|
|
364
|
-
import { Cause, Effect, Fiber } from "effect";
|
|
365
|
-
var node = () => ({ children: [] });
|
|
366
|
-
var modelHost = (commit) => {
|
|
367
|
-
const remove = (child) => {
|
|
368
|
-
if (!child.parent)
|
|
369
|
-
return;
|
|
370
|
-
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
371
|
-
delete child.parent;
|
|
372
|
-
};
|
|
373
|
-
return {
|
|
374
|
-
createElement: node,
|
|
375
|
-
createText: node,
|
|
376
|
-
setText: () => {},
|
|
377
|
-
setAttr: () => {},
|
|
378
|
-
setProp: () => {},
|
|
379
|
-
setEvents: () => {},
|
|
380
|
-
insertBefore: (parent, child, before) => {
|
|
381
|
-
if (child === before)
|
|
382
|
-
return;
|
|
383
|
-
remove(child);
|
|
384
|
-
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
385
|
-
parent.children.splice(index, 0, child);
|
|
386
|
-
child.parent = parent;
|
|
387
|
-
},
|
|
388
|
-
remove,
|
|
389
|
-
parentOf: (child) => child.parent,
|
|
390
|
-
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
391
|
-
elements: ["html"],
|
|
392
|
-
controlled: new Set,
|
|
393
|
-
runsMounts: false,
|
|
394
|
-
commit
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
398
|
-
let currentProps = props;
|
|
399
|
-
let root;
|
|
400
|
-
let active = true;
|
|
401
|
-
let failure;
|
|
402
|
-
const publish = () => {
|
|
403
|
-
if (!active)
|
|
404
|
-
return;
|
|
405
|
-
if (failure) {
|
|
406
|
-
publishSnapshot({ error: failure });
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
const current = root?.model();
|
|
410
|
-
if (current !== undefined)
|
|
411
|
-
publishSnapshot({ model: current });
|
|
412
|
-
};
|
|
413
|
-
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
414
|
-
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
415
|
-
head: false,
|
|
416
|
-
onEmit,
|
|
417
|
-
fallback: ({ cause }) => {
|
|
418
|
-
failure = new Error("Effect UI root failed", {
|
|
419
|
-
cause: Cause.squash(cause)
|
|
420
|
-
});
|
|
421
|
-
return View.text("");
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
if (!active)
|
|
425
|
-
return;
|
|
426
|
-
root = mounted;
|
|
427
|
-
if (props !== currentProps)
|
|
428
|
-
mounted.setProps(currentProps);
|
|
429
|
-
publish();
|
|
430
|
-
return yield* Effect.never;
|
|
431
|
-
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
432
|
-
return {
|
|
433
|
-
send: (message) => {
|
|
434
|
-
root?.send(message);
|
|
435
|
-
publish();
|
|
436
|
-
},
|
|
437
|
-
setProps: (next) => {
|
|
438
|
-
currentProps = next;
|
|
439
|
-
root?.setProps(next);
|
|
440
|
-
},
|
|
441
|
-
dispose: () => {
|
|
442
|
-
active = false;
|
|
443
|
-
root = undefined;
|
|
444
|
-
Effect.runFork(Fiber.interrupt(fiber));
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
450
|
-
"use client";
|
|
451
|
-
var ModelMessageLogContext = createContext(undefined);
|
|
452
|
-
var useModel = (component, props, options = {}) => {
|
|
453
|
-
const contextLog = useContext(ModelMessageLogContext);
|
|
454
|
-
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
455
|
-
const [store] = useState(() => {
|
|
456
|
-
const initial = { model: component.init(props).model };
|
|
457
|
-
let snapshot = initial;
|
|
458
|
-
const listeners = new Set;
|
|
459
|
-
return {
|
|
460
|
-
subscribe: (listener) => {
|
|
461
|
-
listeners.add(listener);
|
|
462
|
-
return () => {
|
|
463
|
-
listeners.delete(listener);
|
|
464
|
-
};
|
|
465
|
-
},
|
|
466
|
-
getSnapshot: () => snapshot,
|
|
467
|
-
getServerSnapshot: () => initial,
|
|
468
|
-
publish: (next) => {
|
|
469
|
-
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
470
|
-
return;
|
|
471
|
-
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
472
|
-
return;
|
|
473
|
-
snapshot = next;
|
|
474
|
-
listeners.forEach((listener) => listener());
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
});
|
|
478
|
-
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
479
|
-
const committed = useRef(props);
|
|
480
|
-
const onEmit = useRef(options.onEmit);
|
|
481
|
-
const runtime = useRef(undefined);
|
|
482
|
-
const send = useCallback((message) => runtime.current?.send(message), []);
|
|
483
|
-
useLayoutEffect(() => {
|
|
484
|
-
onEmit.current = options.onEmit;
|
|
485
|
-
committed.current = props;
|
|
486
|
-
runtime.current?.setProps(props);
|
|
487
|
-
}, [props, options.onEmit]);
|
|
488
|
-
useEffect(() => {
|
|
489
|
-
if (messageLog === null)
|
|
490
|
-
return;
|
|
491
|
-
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
492
|
-
runtime.current = mounted;
|
|
493
|
-
return () => {
|
|
494
|
-
runtime.current = undefined;
|
|
495
|
-
mounted.dispose();
|
|
496
|
-
};
|
|
497
|
-
}, [component, messageLog, store]);
|
|
498
|
-
if ("error" in snapshot)
|
|
499
|
-
throw snapshot.error;
|
|
500
|
-
return { model: snapshot.model, send };
|
|
501
|
-
};
|
|
348
|
+
// ../../src/components/rich-text-editor/react.tsx
|
|
349
|
+
import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
502
350
|
|
|
503
351
|
// ../../src/components/rich-text-editor/classes.ts
|
|
504
352
|
var richTextEditorClasses = {
|
|
@@ -515,7 +363,7 @@ var resolveRichTextEditorClasses = (overrides) => ({
|
|
|
515
363
|
|
|
516
364
|
// ../../src/components/rich-text-editor/index.ts
|
|
517
365
|
import { Schema as Schema4 } from "effect";
|
|
518
|
-
import { Component, UiSchema, View
|
|
366
|
+
import { Component, UiSchema, View } from "effect/ui";
|
|
519
367
|
|
|
520
368
|
// ../../src/components/rich-text-editor/schema.ts
|
|
521
369
|
import { Schema as Schema3, Struct } from "effect";
|
|
@@ -745,7 +593,7 @@ var richTextEditorBehaviours = {
|
|
|
745
593
|
};
|
|
746
594
|
var RichTextEditorModel = Component.define(modelOptions).make({
|
|
747
595
|
...richTextEditorBehaviours,
|
|
748
|
-
view: () =>
|
|
596
|
+
view: () => View.text("")
|
|
749
597
|
});
|
|
750
598
|
|
|
751
599
|
// ../../src/components/rich-text-editor/engine.ts
|
|
@@ -944,15 +792,15 @@ var RichTextEditor = ({
|
|
|
944
792
|
editor?.view.focus();
|
|
945
793
|
return false;
|
|
946
794
|
};
|
|
947
|
-
|
|
795
|
+
useEffect(() => {
|
|
948
796
|
if (!editor)
|
|
949
797
|
return;
|
|
950
798
|
replaceRichText(editor, value);
|
|
951
799
|
}, [editor, value]);
|
|
952
|
-
|
|
800
|
+
useEffect(() => {
|
|
953
801
|
editor?.setEditable(!disabled, false);
|
|
954
802
|
}, [editor, disabled]);
|
|
955
|
-
|
|
803
|
+
useEffect(() => {
|
|
956
804
|
if (!editor)
|
|
957
805
|
return;
|
|
958
806
|
refreshMentionLabels(editor, variables);
|
|
@@ -961,7 +809,7 @@ var RichTextEditor = ({
|
|
|
961
809
|
if (editor)
|
|
962
810
|
runEditorAction(editor, action, variables);
|
|
963
811
|
});
|
|
964
|
-
|
|
812
|
+
useEffect(() => {
|
|
965
813
|
if (request)
|
|
966
814
|
applyAction(request.action);
|
|
967
815
|
}, [request]);
|
|
@@ -3,7 +3,6 @@ import { Schema as Schema3 } from "effect";
|
|
|
3
3
|
import { Subscription, UiSchema as UiSchema2 } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
5
|
import { Combobox, Dialog } from "effect/ui/kit";
|
|
6
|
-
import { Search as Search2 } from "lucide";
|
|
7
6
|
|
|
8
7
|
// ../../src/components/effectcn/button.ts
|
|
9
8
|
import {
|
|
@@ -61,107 +60,7 @@ var DialogDescription = (h, dialog, options = {}) => dialog.description(h.p.clas
|
|
|
61
60
|
|
|
62
61
|
// ../../src/components/search-menu/html.ts
|
|
63
62
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
64
|
-
|
|
65
|
-
// ../../src/lib/lucide-effect.ts
|
|
66
|
-
import {
|
|
67
|
-
ArrowDown as arrowDown,
|
|
68
|
-
ArrowUp as arrowUp,
|
|
69
|
-
ListFilter as listFilter,
|
|
70
|
-
Check as check,
|
|
71
|
-
ChevronLeft as chevronLeft,
|
|
72
|
-
ChevronDown as chevronDown,
|
|
73
|
-
ChevronRight as chevronRight,
|
|
74
|
-
ChevronsLeft as chevronsLeft,
|
|
75
|
-
ChevronsRight as chevronsRight,
|
|
76
|
-
ChevronsUpDown as chevronsUpDown,
|
|
77
|
-
Copy as copy,
|
|
78
|
-
Download as download,
|
|
79
|
-
Eye as eye,
|
|
80
|
-
EyeOff as eyeOff,
|
|
81
|
-
Ellipsis as ellipsis,
|
|
82
|
-
FileJson as fileJson,
|
|
83
|
-
FileText as fileText,
|
|
84
|
-
GripVertical as gripVertical,
|
|
85
|
-
Image as image,
|
|
86
|
-
LayoutGrid as layoutGrid,
|
|
87
|
-
LoaderCircle as loaderCircle,
|
|
88
|
-
Mail as mail,
|
|
89
|
-
Paperclip as paperclip,
|
|
90
|
-
RefreshCw as refreshCw,
|
|
91
|
-
RotateCcw as rotateCcw,
|
|
92
|
-
Rows3 as rows3,
|
|
93
|
-
Search as search,
|
|
94
|
-
Settings2 as settings2,
|
|
95
|
-
TriangleAlert as triangleAlert,
|
|
96
|
-
X as x
|
|
97
|
-
} from "lucide";
|
|
98
|
-
var createLucideIcon = (icon) => (h, {
|
|
99
|
-
size = 24,
|
|
100
|
-
color = "currentColor",
|
|
101
|
-
strokeWidth = 2,
|
|
102
|
-
className
|
|
103
|
-
} = {}) => h.svg.attrs({
|
|
104
|
-
class: className,
|
|
105
|
-
width: String(size),
|
|
106
|
-
height: String(size),
|
|
107
|
-
viewBox: "0 0 24 24",
|
|
108
|
-
fill: "none",
|
|
109
|
-
stroke: color,
|
|
110
|
-
"stroke-width": String(strokeWidth),
|
|
111
|
-
"stroke-linecap": "round",
|
|
112
|
-
"stroke-linejoin": "round",
|
|
113
|
-
"aria-hidden": "true"
|
|
114
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
115
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
116
|
-
switch (tag) {
|
|
117
|
-
case "path":
|
|
118
|
-
return h.path.attrs(attrs);
|
|
119
|
-
case "circle":
|
|
120
|
-
return h.circle.attrs(attrs);
|
|
121
|
-
case "ellipse":
|
|
122
|
-
return h.ellipse.attrs(attrs);
|
|
123
|
-
case "line":
|
|
124
|
-
return h.line.attrs(attrs);
|
|
125
|
-
case "polyline":
|
|
126
|
-
return h.polyline.attrs(attrs);
|
|
127
|
-
case "polygon":
|
|
128
|
-
return h.polygon.attrs(attrs);
|
|
129
|
-
case "rect":
|
|
130
|
-
return h.rect.attrs(attrs);
|
|
131
|
-
default:
|
|
132
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
133
|
-
}
|
|
134
|
-
}));
|
|
135
|
-
var Check = createLucideIcon(check);
|
|
136
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
137
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
138
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
139
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
140
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
141
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
142
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
143
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
144
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
145
|
-
var Copy = createLucideIcon(copy);
|
|
146
|
-
var Download = createLucideIcon(download);
|
|
147
|
-
var Eye = createLucideIcon(eye);
|
|
148
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
149
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
150
|
-
var FileJson = createLucideIcon(fileJson);
|
|
151
|
-
var FileText = createLucideIcon(fileText);
|
|
152
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
153
|
-
var Image = createLucideIcon(image);
|
|
154
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
155
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
156
|
-
var Mail = createLucideIcon(mail);
|
|
157
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
158
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
159
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
160
|
-
var Rows3 = createLucideIcon(rows3);
|
|
161
|
-
var Search = createLucideIcon(search);
|
|
162
|
-
var Settings2 = createLucideIcon(settings2);
|
|
163
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
164
|
-
var X = createLucideIcon(x);
|
|
63
|
+
import { Search as SearchIcon, X, createLucideIcon } from "@krak-stack/registry/lucide-effect";
|
|
165
64
|
|
|
166
65
|
// ../../src/components/search-menu/classes.ts
|
|
167
66
|
var searchMenuClasses = {
|
|
@@ -297,7 +196,6 @@ var Props = SearchMenuPropsSchema.mapFields((fields) => ({
|
|
|
297
196
|
...fields,
|
|
298
197
|
groups: Schema3.Array(Group2)
|
|
299
198
|
}));
|
|
300
|
-
var SearchIcon = createLucideIcon(Search2);
|
|
301
199
|
var Events = UiSchema2.TaggedEnum({
|
|
302
200
|
OpenChanged: { open: Schema3.Boolean },
|
|
303
201
|
QueryChanged: { query: Schema3.String },
|