@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../src/components/timezone-input/react.tsx
|
|
2
|
-
import { useId, useMemo, useSyncExternalStore
|
|
2
|
+
import { useId, useMemo, useSyncExternalStore } from "react";
|
|
3
3
|
|
|
4
4
|
// ../../src/components/ui/button.tsx
|
|
5
5
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
@@ -634,165 +634,11 @@ var TimezoneSelectPropsSchema = Schema3.Struct({
|
|
|
634
634
|
}).annotate({ identifier: "TimezoneSelectProps" });
|
|
635
635
|
|
|
636
636
|
// ../../src/components/timezone-input/react.tsx
|
|
637
|
-
import { Component as Component3, View
|
|
638
|
-
|
|
639
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
640
|
-
import { MessageLog as MessageLog2 } from "effect/ui";
|
|
641
|
-
import {
|
|
642
|
-
createContext,
|
|
643
|
-
useCallback as useCallback2,
|
|
644
|
-
useContext,
|
|
645
|
-
useEffect as useEffect2,
|
|
646
|
-
useLayoutEffect,
|
|
647
|
-
useRef as useRef2,
|
|
648
|
-
useState,
|
|
649
|
-
useSyncExternalStore
|
|
650
|
-
} from "react";
|
|
651
|
-
|
|
652
|
-
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
653
|
-
import { MessageLog, Renderer, View } from "effect/ui";
|
|
654
|
-
import { BrowserHost, Html } from "effect/ui/html";
|
|
655
|
-
import { Cause, Effect, Fiber } from "effect";
|
|
656
|
-
var node = () => ({ children: [] });
|
|
657
|
-
var modelHost = (commit) => {
|
|
658
|
-
const remove = (child) => {
|
|
659
|
-
if (!child.parent)
|
|
660
|
-
return;
|
|
661
|
-
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
662
|
-
delete child.parent;
|
|
663
|
-
};
|
|
664
|
-
return {
|
|
665
|
-
createElement: node,
|
|
666
|
-
createText: node,
|
|
667
|
-
setText: () => {},
|
|
668
|
-
setAttr: () => {},
|
|
669
|
-
setProp: () => {},
|
|
670
|
-
setEvents: () => {},
|
|
671
|
-
insertBefore: (parent, child, before) => {
|
|
672
|
-
if (child === before)
|
|
673
|
-
return;
|
|
674
|
-
remove(child);
|
|
675
|
-
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
676
|
-
parent.children.splice(index, 0, child);
|
|
677
|
-
child.parent = parent;
|
|
678
|
-
},
|
|
679
|
-
remove,
|
|
680
|
-
parentOf: (child) => child.parent,
|
|
681
|
-
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
682
|
-
elements: ["html"],
|
|
683
|
-
controlled: new Set,
|
|
684
|
-
runsMounts: false,
|
|
685
|
-
commit
|
|
686
|
-
};
|
|
687
|
-
};
|
|
688
|
-
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
689
|
-
let currentProps = props;
|
|
690
|
-
let root;
|
|
691
|
-
let active = true;
|
|
692
|
-
let failure;
|
|
693
|
-
const publish = () => {
|
|
694
|
-
if (!active)
|
|
695
|
-
return;
|
|
696
|
-
if (failure) {
|
|
697
|
-
publishSnapshot({ error: failure });
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
const current = root?.model();
|
|
701
|
-
if (current !== undefined)
|
|
702
|
-
publishSnapshot({ model: current });
|
|
703
|
-
};
|
|
704
|
-
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
705
|
-
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
706
|
-
head: false,
|
|
707
|
-
onEmit,
|
|
708
|
-
fallback: ({ cause }) => {
|
|
709
|
-
failure = new Error("Effect UI root failed", {
|
|
710
|
-
cause: Cause.squash(cause)
|
|
711
|
-
});
|
|
712
|
-
return View.text("");
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
if (!active)
|
|
716
|
-
return;
|
|
717
|
-
root = mounted;
|
|
718
|
-
if (props !== currentProps)
|
|
719
|
-
mounted.setProps(currentProps);
|
|
720
|
-
publish();
|
|
721
|
-
return yield* Effect.never;
|
|
722
|
-
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
723
|
-
return {
|
|
724
|
-
send: (message) => {
|
|
725
|
-
root?.send(message);
|
|
726
|
-
publish();
|
|
727
|
-
},
|
|
728
|
-
setProps: (next) => {
|
|
729
|
-
currentProps = next;
|
|
730
|
-
root?.setProps(next);
|
|
731
|
-
},
|
|
732
|
-
dispose: () => {
|
|
733
|
-
active = false;
|
|
734
|
-
root = undefined;
|
|
735
|
-
Effect.runFork(Fiber.interrupt(fiber));
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
741
|
-
"use client";
|
|
742
|
-
var ModelMessageLogContext = createContext(undefined);
|
|
743
|
-
var useModel = (component, props, options = {}) => {
|
|
744
|
-
const contextLog = useContext(ModelMessageLogContext);
|
|
745
|
-
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
746
|
-
const [store] = useState(() => {
|
|
747
|
-
const initial = { model: component.init(props).model };
|
|
748
|
-
let snapshot = initial;
|
|
749
|
-
const listeners = new Set;
|
|
750
|
-
return {
|
|
751
|
-
subscribe: (listener) => {
|
|
752
|
-
listeners.add(listener);
|
|
753
|
-
return () => {
|
|
754
|
-
listeners.delete(listener);
|
|
755
|
-
};
|
|
756
|
-
},
|
|
757
|
-
getSnapshot: () => snapshot,
|
|
758
|
-
getServerSnapshot: () => initial,
|
|
759
|
-
publish: (next) => {
|
|
760
|
-
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
761
|
-
return;
|
|
762
|
-
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
763
|
-
return;
|
|
764
|
-
snapshot = next;
|
|
765
|
-
listeners.forEach((listener) => listener());
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
});
|
|
769
|
-
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
770
|
-
const committed = useRef2(props);
|
|
771
|
-
const onEmit = useRef2(options.onEmit);
|
|
772
|
-
const runtime = useRef2(undefined);
|
|
773
|
-
const send = useCallback2((message) => runtime.current?.send(message), []);
|
|
774
|
-
useLayoutEffect(() => {
|
|
775
|
-
onEmit.current = options.onEmit;
|
|
776
|
-
committed.current = props;
|
|
777
|
-
runtime.current?.setProps(props);
|
|
778
|
-
}, [props, options.onEmit]);
|
|
779
|
-
useEffect2(() => {
|
|
780
|
-
if (messageLog === null)
|
|
781
|
-
return;
|
|
782
|
-
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
783
|
-
runtime.current = mounted;
|
|
784
|
-
return () => {
|
|
785
|
-
runtime.current = undefined;
|
|
786
|
-
mounted.dispose();
|
|
787
|
-
};
|
|
788
|
-
}, [component, messageLog, store]);
|
|
789
|
-
if ("error" in snapshot)
|
|
790
|
-
throw snapshot.error;
|
|
791
|
-
return { model: snapshot.model, send };
|
|
792
|
-
};
|
|
637
|
+
import { Component as Component3, View } from "effect/ui";
|
|
638
|
+
import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
793
639
|
|
|
794
640
|
// ../../src/components/timezone-input/index.ts
|
|
795
|
-
import { Effect
|
|
641
|
+
import { Effect, Schema as Schema4, Stream } from "effect";
|
|
796
642
|
import { Component as Component2, Subscription, UiSchema as UiSchema2 } from "effect/ui";
|
|
797
643
|
var defaultMessages2 = {
|
|
798
644
|
en: {
|
|
@@ -1086,12 +932,12 @@ var timezoneSelectBehaviours = {
|
|
|
1086
932
|
init: () => ({ timestamp: null, detected: null, search: "" }),
|
|
1087
933
|
update: update2,
|
|
1088
934
|
subscriptions: ({ props }) => {
|
|
1089
|
-
const tick =
|
|
935
|
+
const tick = Effect.sync(() => TimezoneSelectMessage.Ticked({
|
|
1090
936
|
timestamp: currentMinute(),
|
|
1091
937
|
detected: browserTimeZone()
|
|
1092
938
|
}));
|
|
1093
939
|
return [
|
|
1094
|
-
Subscription.make("timezone-clock", !!props.referenceTime, (fixed) => fixed ? Stream.fromEffect(tick) : Stream.fromEffect(tick).pipe(Stream.concat(Stream.fromEffect(tick.pipe(
|
|
940
|
+
Subscription.make("timezone-clock", !!props.referenceTime, (fixed) => fixed ? Stream.fromEffect(tick) : Stream.fromEffect(tick).pipe(Stream.concat(Stream.fromEffect(tick.pipe(Effect.delay("15 seconds"))).pipe(Stream.forever))))
|
|
1095
941
|
];
|
|
1096
942
|
}
|
|
1097
943
|
};
|
|
@@ -1101,7 +947,7 @@ import { jsx as jsx5, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-run
|
|
|
1101
947
|
var TimezoneSelectModel = Component3.define(timezoneSelectOptions).make({
|
|
1102
948
|
init: timezoneSelectBehaviours.init,
|
|
1103
949
|
update: timezoneSelectBehaviours.update,
|
|
1104
|
-
view: () =>
|
|
950
|
+
view: () => View.text("")
|
|
1105
951
|
});
|
|
1106
952
|
var subscribeClock = (notify) => {
|
|
1107
953
|
const timer = setInterval(notify, 15000);
|
|
@@ -1132,8 +978,8 @@ var TimezoneInput = ({
|
|
|
1132
978
|
model: { search },
|
|
1133
979
|
send
|
|
1134
980
|
} = useModel(TimezoneSelectModel, { value, referenceTime });
|
|
1135
|
-
const detected =
|
|
1136
|
-
const clock =
|
|
981
|
+
const detected = useSyncExternalStore(noSubscription, browserTimeZone, noTime);
|
|
982
|
+
const clock = useSyncExternalStore(referenceTime ? noSubscription : subscribeClock, currentMinute, noTime);
|
|
1137
983
|
const referenceValid = !referenceTime || isTimeZoneReferenceDate(referenceTime);
|
|
1138
984
|
const timestamp = referenceTime ? referenceValid ? referenceTime.getTime() : null : clock;
|
|
1139
985
|
const baselineZone = comparisonTimeZone === undefined ? detected : comparisonTimeZone;
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
ToastProvider as ToastRequests,
|
|
5
5
|
ToastProviderProps as KitToastProps
|
|
6
6
|
} from "effect/ui/kit";
|
|
7
|
-
import { CircleAlert, CircleCheck, Info, TriangleAlert as TriangleAlert2 } from "lucide";
|
|
8
7
|
|
|
9
8
|
// ../../src/lib/utils.ts
|
|
10
9
|
import { cn } from "cn";
|
|
@@ -50,106 +49,15 @@ var ToastClose = (h, provider, toast, options) => provider.close({
|
|
|
50
49
|
toast
|
|
51
50
|
});
|
|
52
51
|
|
|
53
|
-
// ../../src/
|
|
52
|
+
// ../../src/components/toast/html.ts
|
|
54
53
|
import {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
ChevronsLeft as chevronsLeft,
|
|
63
|
-
ChevronsRight as chevronsRight,
|
|
64
|
-
ChevronsUpDown as chevronsUpDown,
|
|
65
|
-
Copy as copy,
|
|
66
|
-
Download as download,
|
|
67
|
-
Eye as eye,
|
|
68
|
-
EyeOff as eyeOff,
|
|
69
|
-
Ellipsis as ellipsis,
|
|
70
|
-
FileJson as fileJson,
|
|
71
|
-
FileText as fileText,
|
|
72
|
-
GripVertical as gripVertical,
|
|
73
|
-
Image as image,
|
|
74
|
-
LayoutGrid as layoutGrid,
|
|
75
|
-
LoaderCircle as loaderCircle,
|
|
76
|
-
Mail as mail,
|
|
77
|
-
Paperclip as paperclip,
|
|
78
|
-
RefreshCw as refreshCw,
|
|
79
|
-
RotateCcw as rotateCcw,
|
|
80
|
-
Rows3 as rows3,
|
|
81
|
-
Search as search,
|
|
82
|
-
Settings2 as settings2,
|
|
83
|
-
TriangleAlert as triangleAlert,
|
|
84
|
-
X as x
|
|
85
|
-
} from "lucide";
|
|
86
|
-
var createLucideIcon = (icon) => (h, {
|
|
87
|
-
size = 24,
|
|
88
|
-
color = "currentColor",
|
|
89
|
-
strokeWidth = 2,
|
|
90
|
-
className
|
|
91
|
-
} = {}) => h.svg.attrs({
|
|
92
|
-
class: className,
|
|
93
|
-
width: String(size),
|
|
94
|
-
height: String(size),
|
|
95
|
-
viewBox: "0 0 24 24",
|
|
96
|
-
fill: "none",
|
|
97
|
-
stroke: color,
|
|
98
|
-
"stroke-width": String(strokeWidth),
|
|
99
|
-
"stroke-linecap": "round",
|
|
100
|
-
"stroke-linejoin": "round",
|
|
101
|
-
"aria-hidden": "true"
|
|
102
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
103
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
104
|
-
switch (tag) {
|
|
105
|
-
case "path":
|
|
106
|
-
return h.path.attrs(attrs);
|
|
107
|
-
case "circle":
|
|
108
|
-
return h.circle.attrs(attrs);
|
|
109
|
-
case "ellipse":
|
|
110
|
-
return h.ellipse.attrs(attrs);
|
|
111
|
-
case "line":
|
|
112
|
-
return h.line.attrs(attrs);
|
|
113
|
-
case "polyline":
|
|
114
|
-
return h.polyline.attrs(attrs);
|
|
115
|
-
case "polygon":
|
|
116
|
-
return h.polygon.attrs(attrs);
|
|
117
|
-
case "rect":
|
|
118
|
-
return h.rect.attrs(attrs);
|
|
119
|
-
default:
|
|
120
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
121
|
-
}
|
|
122
|
-
}));
|
|
123
|
-
var Check = createLucideIcon(check);
|
|
124
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
125
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
126
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
127
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
128
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
129
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
130
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
131
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
132
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
133
|
-
var Copy = createLucideIcon(copy);
|
|
134
|
-
var Download = createLucideIcon(download);
|
|
135
|
-
var Eye = createLucideIcon(eye);
|
|
136
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
137
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
138
|
-
var FileJson = createLucideIcon(fileJson);
|
|
139
|
-
var FileText = createLucideIcon(fileText);
|
|
140
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
141
|
-
var Image = createLucideIcon(image);
|
|
142
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
143
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
144
|
-
var Mail = createLucideIcon(mail);
|
|
145
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
146
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
147
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
148
|
-
var Rows3 = createLucideIcon(rows3);
|
|
149
|
-
var Search = createLucideIcon(search);
|
|
150
|
-
var Settings2 = createLucideIcon(settings2);
|
|
151
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
152
|
-
var X = createLucideIcon(x);
|
|
54
|
+
CircleAlert,
|
|
55
|
+
CircleCheck,
|
|
56
|
+
Info as InfoIcon,
|
|
57
|
+
LoaderCircle,
|
|
58
|
+
TriangleAlert,
|
|
59
|
+
X
|
|
60
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
153
61
|
|
|
154
62
|
// ../../src/components/toast/classes.ts
|
|
155
63
|
var toastClasses = {
|
|
@@ -219,12 +127,11 @@ var ToastProviderPropsSchema = Schema2.Struct({
|
|
|
219
127
|
...ToastSharedPropsSchema.fields
|
|
220
128
|
}).annotate({ identifier: "ToastProviderHtmlProps" });
|
|
221
129
|
var icons = {
|
|
222
|
-
success:
|
|
223
|
-
error:
|
|
224
|
-
warning:
|
|
130
|
+
success: CircleCheck,
|
|
131
|
+
error: CircleAlert,
|
|
132
|
+
warning: TriangleAlert,
|
|
225
133
|
loading: LoaderCircle
|
|
226
134
|
};
|
|
227
|
-
var InfoIcon = createLucideIcon(Info);
|
|
228
135
|
var ToastProvider = (h, options) => {
|
|
229
136
|
const {
|
|
230
137
|
position = "bottom-right",
|
|
@@ -70,15 +70,15 @@ export declare const UploadAttachment: import("effect/ui/Component").Component<"
|
|
|
70
70
|
readonly canRetry?: boolean | undefined;
|
|
71
71
|
readonly canRemove?: boolean | undefined;
|
|
72
72
|
}, null, {
|
|
73
|
-
readonly _tag: "Retry";
|
|
74
|
-
} | {
|
|
75
73
|
readonly _tag: "Cancel";
|
|
76
74
|
} | {
|
|
77
75
|
readonly _tag: "Remove";
|
|
78
|
-
}, {
|
|
79
|
-
readonly _tag: "Retry";
|
|
80
76
|
} | {
|
|
77
|
+
readonly _tag: "Retry";
|
|
78
|
+
}, {
|
|
81
79
|
readonly _tag: "Cancel";
|
|
82
80
|
} | {
|
|
83
81
|
readonly _tag: "Remove";
|
|
82
|
+
} | {
|
|
83
|
+
readonly _tag: "Retry";
|
|
84
84
|
}, never, Html.Elements, {}, never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// ../../src/components/upload-attachment/html.ts
|
|
2
2
|
import { Schema as Schema3 } from "effect";
|
|
3
3
|
import { Html } from "effect/ui/html";
|
|
4
|
-
import { File } from "lucide";
|
|
5
4
|
|
|
6
5
|
// ../../src/components/effectcn/button.ts
|
|
7
6
|
import {
|
|
@@ -38,107 +37,14 @@ var Button = (h, options = {}) => KitButton(h, {
|
|
|
38
37
|
|
|
39
38
|
// ../../src/components/upload-attachment/html.ts
|
|
40
39
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
41
|
-
|
|
42
|
-
// ../../src/lib/lucide-effect.ts
|
|
43
40
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
+
Check,
|
|
42
|
+
File as FileIcon,
|
|
43
|
+
LoaderCircle,
|
|
44
|
+
RotateCcw,
|
|
45
|
+
TriangleAlert,
|
|
46
|
+
X
|
|
47
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
142
48
|
|
|
143
49
|
// ../../src/components/upload-attachment/classes.ts
|
|
144
50
|
var uploadAttachmentClasses = {
|
|
@@ -263,7 +169,6 @@ var uploadAttachmentBehaviours = {
|
|
|
263
169
|
};
|
|
264
170
|
|
|
265
171
|
// ../../src/components/upload-attachment/html.ts
|
|
266
|
-
var FileIcon = createLucideIcon(File);
|
|
267
172
|
var props = Schema3.Struct({
|
|
268
173
|
...uploadAttachmentOptions.props.fields,
|
|
269
174
|
canCancel: Schema3.optional(Schema3.Boolean),
|
|
@@ -141,107 +141,12 @@ var SelectScrollDownArrow = (h, select, options = {}) => select.scrollDownArrow(
|
|
|
141
141
|
|
|
142
142
|
// ../../src/components/pagination/html.ts
|
|
143
143
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
144
|
-
|
|
145
|
-
// ../../src/lib/lucide-effect.ts
|
|
146
144
|
import {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
ChevronDown as chevronDown,
|
|
153
|
-
ChevronRight as chevronRight,
|
|
154
|
-
ChevronsLeft as chevronsLeft,
|
|
155
|
-
ChevronsRight as chevronsRight,
|
|
156
|
-
ChevronsUpDown as chevronsUpDown,
|
|
157
|
-
Copy as copy,
|
|
158
|
-
Download as download,
|
|
159
|
-
Eye as eye,
|
|
160
|
-
EyeOff as eyeOff,
|
|
161
|
-
Ellipsis as ellipsis,
|
|
162
|
-
FileJson as fileJson,
|
|
163
|
-
FileText as fileText,
|
|
164
|
-
GripVertical as gripVertical,
|
|
165
|
-
Image as image,
|
|
166
|
-
LayoutGrid as layoutGrid,
|
|
167
|
-
LoaderCircle as loaderCircle,
|
|
168
|
-
Mail as mail,
|
|
169
|
-
Paperclip as paperclip,
|
|
170
|
-
RefreshCw as refreshCw,
|
|
171
|
-
RotateCcw as rotateCcw,
|
|
172
|
-
Rows3 as rows3,
|
|
173
|
-
Search as search,
|
|
174
|
-
Settings2 as settings2,
|
|
175
|
-
TriangleAlert as triangleAlert,
|
|
176
|
-
X as x
|
|
177
|
-
} from "lucide";
|
|
178
|
-
var createLucideIcon = (icon) => (h, {
|
|
179
|
-
size = 24,
|
|
180
|
-
color = "currentColor",
|
|
181
|
-
strokeWidth = 2,
|
|
182
|
-
className
|
|
183
|
-
} = {}) => h.svg.attrs({
|
|
184
|
-
class: className,
|
|
185
|
-
width: String(size),
|
|
186
|
-
height: String(size),
|
|
187
|
-
viewBox: "0 0 24 24",
|
|
188
|
-
fill: "none",
|
|
189
|
-
stroke: color,
|
|
190
|
-
"stroke-width": String(strokeWidth),
|
|
191
|
-
"stroke-linecap": "round",
|
|
192
|
-
"stroke-linejoin": "round",
|
|
193
|
-
"aria-hidden": "true"
|
|
194
|
-
}).children(...icon.map(([tag, attributes]) => {
|
|
195
|
-
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
196
|
-
switch (tag) {
|
|
197
|
-
case "path":
|
|
198
|
-
return h.path.attrs(attrs);
|
|
199
|
-
case "circle":
|
|
200
|
-
return h.circle.attrs(attrs);
|
|
201
|
-
case "ellipse":
|
|
202
|
-
return h.ellipse.attrs(attrs);
|
|
203
|
-
case "line":
|
|
204
|
-
return h.line.attrs(attrs);
|
|
205
|
-
case "polyline":
|
|
206
|
-
return h.polyline.attrs(attrs);
|
|
207
|
-
case "polygon":
|
|
208
|
-
return h.polygon.attrs(attrs);
|
|
209
|
-
case "rect":
|
|
210
|
-
return h.rect.attrs(attrs);
|
|
211
|
-
default:
|
|
212
|
-
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
213
|
-
}
|
|
214
|
-
}));
|
|
215
|
-
var Check = createLucideIcon(check);
|
|
216
|
-
var ArrowDown = createLucideIcon(arrowDown);
|
|
217
|
-
var ArrowUp = createLucideIcon(arrowUp);
|
|
218
|
-
var ListFilter = createLucideIcon(listFilter);
|
|
219
|
-
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
220
|
-
var ChevronDown = createLucideIcon(chevronDown);
|
|
221
|
-
var ChevronRight = createLucideIcon(chevronRight);
|
|
222
|
-
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
223
|
-
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
224
|
-
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
225
|
-
var Copy = createLucideIcon(copy);
|
|
226
|
-
var Download = createLucideIcon(download);
|
|
227
|
-
var Eye = createLucideIcon(eye);
|
|
228
|
-
var EyeOff = createLucideIcon(eyeOff);
|
|
229
|
-
var Ellipsis = createLucideIcon(ellipsis);
|
|
230
|
-
var FileJson = createLucideIcon(fileJson);
|
|
231
|
-
var FileText = createLucideIcon(fileText);
|
|
232
|
-
var GripVertical = createLucideIcon(gripVertical);
|
|
233
|
-
var Image = createLucideIcon(image);
|
|
234
|
-
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
235
|
-
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
236
|
-
var Mail = createLucideIcon(mail);
|
|
237
|
-
var Paperclip = createLucideIcon(paperclip);
|
|
238
|
-
var RefreshCw = createLucideIcon(refreshCw);
|
|
239
|
-
var RotateCcw = createLucideIcon(rotateCcw);
|
|
240
|
-
var Rows3 = createLucideIcon(rows3);
|
|
241
|
-
var Search = createLucideIcon(search);
|
|
242
|
-
var Settings2 = createLucideIcon(settings2);
|
|
243
|
-
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
244
|
-
var X = createLucideIcon(x);
|
|
145
|
+
ChevronLeft,
|
|
146
|
+
ChevronRight,
|
|
147
|
+
ChevronsLeft,
|
|
148
|
+
ChevronsRight
|
|
149
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
245
150
|
|
|
246
151
|
// ../../src/components/pagination/classes.ts
|
|
247
152
|
var paginationClasses = {
|
|
@@ -616,6 +521,28 @@ var PaginationMeta = Schema3.Struct({
|
|
|
616
521
|
examples: [{ page: 0, pageSize: 20, total: 125, pageCount: 7 }]
|
|
617
522
|
}));
|
|
618
523
|
|
|
524
|
+
// ../../src/components/data-table/html.ts
|
|
525
|
+
import {
|
|
526
|
+
ArrowDown,
|
|
527
|
+
ArrowUp,
|
|
528
|
+
ChevronDown,
|
|
529
|
+
ChevronRight as ChevronRight2,
|
|
530
|
+
ChevronsUpDown,
|
|
531
|
+
Download,
|
|
532
|
+
Ellipsis,
|
|
533
|
+
EyeOff,
|
|
534
|
+
FileJson,
|
|
535
|
+
FileText,
|
|
536
|
+
GripVertical,
|
|
537
|
+
LayoutGrid,
|
|
538
|
+
ListFilter,
|
|
539
|
+
RefreshCw,
|
|
540
|
+
Rows3,
|
|
541
|
+
Search,
|
|
542
|
+
Settings2,
|
|
543
|
+
X
|
|
544
|
+
} from "@krak-stack/registry/lucide-effect";
|
|
545
|
+
|
|
619
546
|
// ../../src/components/data-table/index.ts
|
|
620
547
|
import { DateTime as DateTime3, Effect as Effect2, Option as Option3, Redacted, Schema as Schema5, Stream } from "effect";
|
|
621
548
|
import { Csv } from "effect/encoding";
|
|
@@ -2391,7 +2318,7 @@ var DataTable = Html2.component({
|
|
|
2391
2318
|
const definition = field.groups?.find(({ id }) => id === groupId);
|
|
2392
2319
|
const label = definition?.label ?? groupId;
|
|
2393
2320
|
const open = !model.collapsedGroups[key];
|
|
2394
|
-
const title = h.div.class(cn(tableClasses.groupContent, !gallery && tableClasses.groupSticky)).children(h.button.attr("type", "button").class(tableClasses.groupTrigger).style({ paddingInlineStart: `${depth * 20}px` }).on("click", DataTableMessage.GroupToggled({ key })).attr("aria-expanded", open ? "true" : "false").attr("aria-label", label).children((open ? ChevronDown :
|
|
2321
|
+
const title = h.div.class(cn(tableClasses.groupContent, !gallery && tableClasses.groupSticky)).children(h.button.attr("type", "button").class(tableClasses.groupTrigger).style({ paddingInlineStart: `${depth * 20}px` }).on("click", DataTableMessage.GroupToggled({ key })).attr("aria-expanded", open ? "true" : "false").attr("aria-label", label).children((open ? ChevronDown : ChevronRight2)(h, {
|
|
2395
2322
|
size: 16,
|
|
2396
2323
|
className: "shrink-0"
|
|
2397
2324
|
}), h.span.class("min-w-0 flex-1 truncate").children(label), h.span.class(tableClasses.count).children(String(children.length))), !!field.actions?.length && menu(keyOf("group", key), field.actionsLabel ?? copy.actions, `${field.actionsLabel ?? copy.actions}: ${label}`, field.actions.map((action) => ({
|