@krak-stack/registry 0.1.13 → 0.1.14
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/README.md +19 -0
- package/dist/components/ui/app-brand.d.ts +18 -13
- package/dist/components/ui/app-brand.js +48 -15
- package/dist/components/ui/code-block.js +10 -6
- package/dist/components/ui/copy-button.d.ts +1 -1
- package/dist/components/ui/copy-button.js +1 -1
- package/dist/components/ui/data-table.d.ts +1 -1
- package/dist/components/ui/data-table.js +21 -20
- package/dist/components/ui/effect-form.js +7 -6
- package/dist/components/ui/file-picker.js +2 -1
- package/dist/components/ui/form.js +17 -15
- package/dist/components/ui/google-map.d.ts +6 -10
- package/dist/components/ui/google-map.js +19 -14
- package/dist/components/ui/locale-switcher.js +7 -1
- package/dist/components/ui/sidebar-layout.js +19 -21
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/lib/docs-core.js +165 -109
- package/dist/lib/documentation-toolkit.d.ts +1 -1
- package/dist/lib/documentation-toolkit.js +41 -40
- package/dist/lib/httpapi-cli.d.ts +6 -6
- package/dist/lib/httpapi-cli.js +75 -48
- package/dist/lib/httpapi-client.d.ts +8 -2
- package/dist/lib/httpapi-client.js +21 -9
- package/dist/lib/httpapi-helpers.d.ts +15 -21
- package/dist/lib/httpapi-helpers.js +38 -26
- package/dist/lib/httpapi-mcp.js +73 -50
- package/dist/lib/httpapi-toolkit.d.ts +3 -2
- package/dist/lib/httpapi-toolkit.js +93 -65
- package/dist/lib/seo.js +29 -17
- package/dist/oxlint/anti-slop/index.js +1592 -0
- package/dist/services/agent/client/atom.d.ts +7 -7
- package/dist/services/agent/client/index.js +55 -54
- package/dist/services/agent/index.d.ts +71 -71
- package/dist/services/agent/index.js +38 -19
- package/dist/services/notification/channels/index.d.ts +11 -9
- package/dist/services/notification/channels/ses/index.d.ts +6 -6
- package/dist/services/notification/channels/ses/index.js +15 -11
- package/dist/services/notification/client/index.js +3 -2
- package/dist/services/notification/client/notification-menu.d.ts +9 -9
- package/dist/services/notification/index.d.ts +7 -6
- package/dist/services/notification/public.js +3 -2
- package/dist/services/s3/index.d.ts +2 -16
- package/dist/services/s3/index.js +12 -9
- package/package.json +7 -1
|
@@ -32,8 +32,8 @@ export type NotificationMenuState = {
|
|
|
32
32
|
open: boolean;
|
|
33
33
|
unreadCount: number;
|
|
34
34
|
};
|
|
35
|
-
type NotificationAction = (notificationIds: readonly string[]) => Promise<
|
|
36
|
-
export type NotificationMenuProps = {
|
|
35
|
+
type NotificationAction<Result = ErrorOptions["cause"]> = (notificationIds: readonly string[]) => Promise<Result> | Result | void;
|
|
36
|
+
export type NotificationMenuProps<ActionResult = ErrorOptions["cause"]> = {
|
|
37
37
|
className?: string | undefined;
|
|
38
38
|
defaultOpen?: boolean | undefined;
|
|
39
39
|
error?: boolean | undefined;
|
|
@@ -42,35 +42,35 @@ export type NotificationMenuProps = {
|
|
|
42
42
|
markReadOnOpen?: boolean | undefined;
|
|
43
43
|
messages?: Partial<NotificationMenuMessages> | undefined;
|
|
44
44
|
notifications: readonly NotificationItem[];
|
|
45
|
-
onArchive?: NotificationAction | undefined;
|
|
46
|
-
onMarkRead?: NotificationAction | undefined;
|
|
45
|
+
onArchive?: NotificationAction<ActionResult> | undefined;
|
|
46
|
+
onMarkRead?: NotificationAction<ActionResult> | undefined;
|
|
47
47
|
onNavigate?: ((notification: NotificationItem) => void) | undefined;
|
|
48
48
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
49
49
|
open?: boolean | undefined;
|
|
50
50
|
renderItem?: ((notification: NotificationItem) => ReactNode) | undefined;
|
|
51
51
|
renderTrigger?: ((state: NotificationMenuState) => ReactElement) | undefined;
|
|
52
52
|
};
|
|
53
|
-
export declare function NotificationMenu({ className, defaultOpen, error, isLoading, locale, markReadOnOpen, messages: messageOverrides, notifications, onArchive, onMarkRead, onNavigate, onOpenChange, open: controlledOpen, renderItem, renderTrigger, }: NotificationMenuProps): import("react").JSX.Element;
|
|
53
|
+
export declare function NotificationMenu<ActionResult = ErrorOptions["cause"]>({ className, defaultOpen, error, isLoading, locale, markReadOnOpen, messages: messageOverrides, notifications, onArchive, onMarkRead, onNavigate, onOpenChange, open: controlledOpen, renderItem, renderTrigger, }: NotificationMenuProps<ActionResult>): import("react").JSX.Element;
|
|
54
54
|
export declare function NotificationMenuTrigger({ labels, unreadCount, }: {
|
|
55
55
|
labels?: NotificationMenuMessages | undefined;
|
|
56
56
|
unreadCount: number;
|
|
57
57
|
}): import("react").JSX.Element;
|
|
58
|
-
export declare function NotificationList({ error, isLoading, labels, locale, notifications, onArchive, onNavigate, renderItem, tab, }: {
|
|
58
|
+
export declare function NotificationList<ActionResult>({ error, isLoading, labels, locale, notifications, onArchive, onNavigate, renderItem, tab, }: {
|
|
59
59
|
error: boolean;
|
|
60
60
|
isLoading: boolean;
|
|
61
61
|
labels: NotificationMenuMessages;
|
|
62
62
|
locale: string;
|
|
63
63
|
notifications: readonly NotificationItem[];
|
|
64
|
-
onArchive?: NotificationAction | undefined;
|
|
64
|
+
onArchive?: NotificationAction<ActionResult> | undefined;
|
|
65
65
|
onNavigate?: ((notification: NotificationItem) => void) | undefined;
|
|
66
66
|
renderItem?: ((notification: NotificationItem) => ReactNode) | undefined;
|
|
67
67
|
tab: NotificationMenuTab;
|
|
68
68
|
}): import("react").JSX.Element;
|
|
69
|
-
export declare function NotificationListItem({ labels, locale, notification, onArchive, onNavigate, renderItem, }: {
|
|
69
|
+
export declare function NotificationListItem<ActionResult>({ labels, locale, notification, onArchive, onNavigate, renderItem, }: {
|
|
70
70
|
labels: NotificationMenuMessages;
|
|
71
71
|
locale: string;
|
|
72
72
|
notification: NotificationItem;
|
|
73
|
-
onArchive?: NotificationAction | undefined;
|
|
73
|
+
onArchive?: NotificationAction<ActionResult> | undefined;
|
|
74
74
|
onNavigate?: ((notification: NotificationItem) => void) | undefined;
|
|
75
75
|
renderItem?: ((notification: NotificationItem) => ReactNode) | undefined;
|
|
76
76
|
}): import("react").JSX.Element;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { Context, Effect, Layer } from "effect";
|
|
2
|
-
import { NotificationChannelRegistry, type NotificationMessage, type
|
|
2
|
+
import { NotificationChannelRegistry, type NotificationMessage, type NotificationChannel } from "./channels/index.js";
|
|
3
3
|
import { NotificationSendError } from "./schema.js";
|
|
4
|
-
export interface
|
|
4
|
+
export interface NotificationServiceContract {
|
|
5
5
|
readonly send: (message: NotificationMessage) => Effect.Effect<void, NotificationSendError>;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** @deprecated Use NotificationServiceContract. */
|
|
8
|
+
export { type NotificationServiceContract as NotificationServiceShape };
|
|
9
|
+
declare const NotificationService_base: Context.ServiceClass<NotificationService, "NotificationService", NotificationServiceContract> & {
|
|
10
|
+
readonly make: Effect.Effect<NotificationServiceContract, never, NotificationChannelRegistry>;
|
|
9
11
|
};
|
|
10
12
|
export declare class NotificationService extends NotificationService_base {
|
|
11
13
|
static readonly layer: Layer.Layer<NotificationService, never, NotificationChannelRegistry>;
|
|
12
|
-
static readonly makeLayer: (channels: ReadonlyArray<
|
|
14
|
+
static readonly makeLayer: (channels: ReadonlyArray<NotificationChannel>) => Layer.Layer<NotificationService, never, never>;
|
|
13
15
|
static readonly noopLayer: Layer.Layer<NotificationService, never, never>;
|
|
14
16
|
static readonly localLayer: Layer.Layer<NotificationService, never, never>;
|
|
15
17
|
}
|
|
16
|
-
export {};
|
|
@@ -78,6 +78,7 @@ import {
|
|
|
78
78
|
TriangleAlert
|
|
79
79
|
} from "lucide-react";
|
|
80
80
|
import { useState } from "react";
|
|
81
|
+
import { Schema as Schema2 } from "effect";
|
|
81
82
|
|
|
82
83
|
// ../../src/components/ui/badge.tsx
|
|
83
84
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -1044,7 +1045,7 @@ function NotificationListItem({
|
|
|
1044
1045
|
onNavigate(notification);
|
|
1045
1046
|
return;
|
|
1046
1047
|
}
|
|
1047
|
-
if (notification.href &&
|
|
1048
|
+
if (notification.href && globalThis.window) {
|
|
1048
1049
|
window.location.assign(notification.href);
|
|
1049
1050
|
}
|
|
1050
1051
|
};
|
|
@@ -1182,7 +1183,7 @@ var formatNotificationDate = (value, locale) => {
|
|
|
1182
1183
|
timeStyle: "short"
|
|
1183
1184
|
}).format(date);
|
|
1184
1185
|
};
|
|
1185
|
-
var notificationTitle = (notification) =>
|
|
1186
|
+
var notificationTitle = (notification) => Schema2.is(Schema2.String)(notification.title) ? notification.title : defaultMessages.en.notifications;
|
|
1186
1187
|
export {
|
|
1187
1188
|
notificationMenuMessages,
|
|
1188
1189
|
NotificationService,
|
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import { Config, Context, Effect, Layer } from "effect";
|
|
2
2
|
import { S3ServiceError } from "./schema.js";
|
|
3
3
|
declare const S3ServiceConfig_base: Context.ServiceClass<S3ServiceConfig, "S3ServiceConfig", {
|
|
4
|
-
options:
|
|
5
|
-
accessKeyId: string;
|
|
6
|
-
secretAccessKey: string;
|
|
7
|
-
bucket: string;
|
|
8
|
-
region?: string | undefined;
|
|
9
|
-
endpoint?: string | undefined;
|
|
10
|
-
sessionToken?: string | undefined;
|
|
11
|
-
};
|
|
4
|
+
options: Bun.S3Options;
|
|
12
5
|
}> & {
|
|
13
6
|
readonly make: Effect.Effect<{
|
|
14
|
-
options:
|
|
15
|
-
accessKeyId: string;
|
|
16
|
-
secretAccessKey: string;
|
|
17
|
-
bucket: string;
|
|
18
|
-
region?: string | undefined;
|
|
19
|
-
endpoint?: string | undefined;
|
|
20
|
-
sessionToken?: string | undefined;
|
|
21
|
-
};
|
|
7
|
+
options: Bun.S3Options;
|
|
22
8
|
}, Config.ConfigError, never>;
|
|
23
9
|
};
|
|
24
10
|
export declare class S3ServiceConfig extends S3ServiceConfig_base {
|
|
@@ -43,16 +43,19 @@ class S3ServiceConfig extends Context.Service()("S3ServiceConfig", {
|
|
|
43
43
|
const region = yield* Config.string("S3_REGION").pipe(Config.withDefault(""));
|
|
44
44
|
const endpoint = yield* Config.string("S3_ENDPOINT").pipe(Config.withDefault(""));
|
|
45
45
|
const sessionToken = yield* Config.redacted("S3_SESSION_TOKEN").pipe(Config.orElse(() => Config.succeed(Redacted.make(""))));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
bucket,
|
|
51
|
-
...region ? { region } : {},
|
|
52
|
-
...endpoint ? { endpoint } : {},
|
|
53
|
-
...Redacted.value(sessionToken) ? { sessionToken: Redacted.value(sessionToken) } : {}
|
|
54
|
-
}
|
|
46
|
+
const options = {
|
|
47
|
+
accessKeyId: Redacted.value(accessKeyId),
|
|
48
|
+
secretAccessKey: Redacted.value(secretAccessKey),
|
|
49
|
+
bucket
|
|
55
50
|
};
|
|
51
|
+
if (region)
|
|
52
|
+
options.region = region;
|
|
53
|
+
if (endpoint)
|
|
54
|
+
options.endpoint = endpoint;
|
|
55
|
+
if (Redacted.value(sessionToken)) {
|
|
56
|
+
options.sessionToken = Redacted.value(sessionToken);
|
|
57
|
+
}
|
|
58
|
+
return { options };
|
|
56
59
|
})
|
|
57
60
|
}) {
|
|
58
61
|
static layer = Layer.effect(this, this.make);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/registry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Tree-shakable KrakStack components and Effect services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
"types": "./dist/lib/seo.d.ts",
|
|
69
69
|
"import": "./dist/lib/seo.js"
|
|
70
70
|
},
|
|
71
|
+
"./oxlint/anti-slop": {
|
|
72
|
+
"import": "./dist/oxlint/anti-slop/index.js"
|
|
73
|
+
},
|
|
71
74
|
"./app-brand": {
|
|
72
75
|
"types": "./dist/components/ui/app-brand.d.ts",
|
|
73
76
|
"import": "./dist/components/ui/app-brand.js"
|
|
@@ -206,6 +209,9 @@
|
|
|
206
209
|
"build": "NODE_ENV=production bun run build.ts",
|
|
207
210
|
"prepack": "bun run build"
|
|
208
211
|
},
|
|
212
|
+
"dependencies": {
|
|
213
|
+
"@oxlint/plugins": "1.78.0"
|
|
214
|
+
},
|
|
209
215
|
"peerDependencies": {
|
|
210
216
|
"@aws-sdk/client-sesv2": "^3.1068.0",
|
|
211
217
|
"@base-ui/react": "^1.5.0",
|