@krak-stack/registry 0.10.18 → 0.10.20
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 +31 -0
- package/README.md +18 -0
- package/dist/components/ui/code-block.js +7 -7
- package/dist/components/ui/copy-button.js +7 -7
- package/dist/components/ui/copy-value.d.ts +4 -1
- package/dist/components/ui/copy-value.js +49 -16
- package/dist/components/ui/data-table.d.ts +3 -3
- package/dist/components/ui/data-table.js +23 -17
- package/dist/components/ui/editing-locale-switcher.js +7 -7
- package/dist/components/ui/effect-form.js +8 -8
- package/dist/components/ui/email-composer.js +871 -0
- package/dist/components/ui/email-editor.d.ts +3 -1
- package/dist/components/ui/email-editor.js +294 -471
- package/dist/components/ui/error-component.js +7 -7
- package/dist/components/ui/form.d.ts +7 -7
- package/dist/components/ui/form.js +18 -14
- package/dist/components/ui/icon-input.js +1 -1
- package/dist/components/ui/map-menu.d.ts +1 -1
- package/dist/components/ui/map-menu.js +183 -60
- package/dist/components/ui/pagination.js +7 -7
- package/dist/components/ui/phone-number-input.js +1 -1
- package/dist/components/ui/rich-text-editor.d.ts +15 -13
- package/dist/components/ui/rich-text-editor.js +280 -661
- package/dist/components/ui/select-with-custom-input.js +7 -7
- package/dist/components/ui/select.js +159 -0
- package/dist/components/ui/timezone-select.js +1 -1
- package/dist/components/ui/virtualized-combobox.js +1 -1
- package/dist/lib/docs.js +7 -7
- package/dist/lib/email-composer/index.js +110 -0
- package/dist/lib/email-composer/schema.js +13 -0
- package/dist/lib/email-document/legacy-rich-text/editor.d.ts +70 -0
- package/dist/lib/email-document/legacy-rich-text/schema.d.ts +65 -0
- package/dist/lib/email-document/legacy-rich-text/tiptap.d.ts +39 -0
- package/dist/lib/email-document/model.d.ts +1 -1
- package/dist/lib/email-document/model.js +2 -2
- package/dist/lib/email-document/render.js +2 -2
- package/dist/lib/email-document/schema.js +1 -1
- package/dist/lib/rich-text/model.js +79 -111
- package/dist/lib/rich-text/schema.d.ts +5 -55
- package/dist/lib/rich-text/schema.js +17 -36
- package/dist/lib/rich-text/tiptap.d.ts +12 -0
- package/dist/services/agent/client/index.js +7 -7
- package/dist/services/events/client/audit-log-table.js +23 -17
- package/dist/services/webhooks/client/delivery-table.js +30 -24
- package/package.json +24 -1
- package/dist/lib/rich-text/dom.d.ts +0 -40
- /package/dist/lib/{rich-text → email-document/legacy-rich-text}/model.d.ts +0 -0
|
@@ -414,7 +414,7 @@ function SelectTrigger({
|
|
|
414
414
|
return /* @__PURE__ */ jsxs3(SelectPrimitive.Trigger, {
|
|
415
415
|
"data-slot": "select-trigger",
|
|
416
416
|
"data-size": size,
|
|
417
|
-
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border
|
|
417
|
+
className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
418
418
|
...props,
|
|
419
419
|
children: [
|
|
420
420
|
children,
|
|
@@ -431,9 +431,9 @@ function SelectContent({
|
|
|
431
431
|
children,
|
|
432
432
|
side = "bottom",
|
|
433
433
|
sideOffset = 4,
|
|
434
|
-
align = "
|
|
434
|
+
align = "start",
|
|
435
435
|
alignOffset = 0,
|
|
436
|
-
alignItemWithTrigger =
|
|
436
|
+
alignItemWithTrigger = false,
|
|
437
437
|
...props
|
|
438
438
|
}) {
|
|
439
439
|
return /* @__PURE__ */ jsx8(SelectPrimitive.Portal, {
|
|
@@ -447,7 +447,7 @@ function SelectContent({
|
|
|
447
447
|
children: /* @__PURE__ */ jsxs3(SelectPrimitive.Popup, {
|
|
448
448
|
"data-slot": "select-content",
|
|
449
449
|
"data-align-trigger": alignItemWithTrigger,
|
|
450
|
-
className: cn("
|
|
450
|
+
className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
|
|
451
451
|
...props,
|
|
452
452
|
children: [
|
|
453
453
|
/* @__PURE__ */ jsx8(SelectScrollUpButton, {}),
|
|
@@ -467,7 +467,7 @@ function SelectItem({
|
|
|
467
467
|
}) {
|
|
468
468
|
return /* @__PURE__ */ jsxs3(SelectPrimitive.Item, {
|
|
469
469
|
"data-slot": "select-item",
|
|
470
|
-
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none
|
|
470
|
+
className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
471
471
|
...props,
|
|
472
472
|
children: [
|
|
473
473
|
/* @__PURE__ */ jsx8(SelectPrimitive.ItemText, {
|
|
@@ -491,7 +491,7 @@ function SelectScrollUpButton({
|
|
|
491
491
|
}) {
|
|
492
492
|
return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollUpArrow, {
|
|
493
493
|
"data-slot": "select-scroll-up-button",
|
|
494
|
-
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center
|
|
494
|
+
className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
495
495
|
...props,
|
|
496
496
|
children: /* @__PURE__ */ jsx8(ChevronUpIcon, {})
|
|
497
497
|
});
|
|
@@ -502,7 +502,7 @@ function SelectScrollDownButton({
|
|
|
502
502
|
}) {
|
|
503
503
|
return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollDownArrow, {
|
|
504
504
|
"data-slot": "select-scroll-down-button",
|
|
505
|
-
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center
|
|
505
|
+
className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
506
506
|
...props,
|
|
507
507
|
children: /* @__PURE__ */ jsx8(ChevronDownIcon, {})
|
|
508
508
|
});
|
|
@@ -2143,7 +2143,7 @@ var DataTableToolbar = ({
|
|
|
2143
2143
|
}
|
|
2144
2144
|
};
|
|
2145
2145
|
return /* @__PURE__ */ jsxs9("div", {
|
|
2146
|
-
className: cn("grid min-w-0 items-center gap-2 pb-4", features.search !== false && "md:grid-cols-[minmax(12rem,1fr)_minmax(0,auto)]"),
|
|
2146
|
+
className: cn("grid min-w-0 shrink-0 items-center gap-2 pb-4", features.search !== false && "md:grid-cols-[minmax(12rem,1fr)_minmax(0,auto)]"),
|
|
2147
2147
|
children: [
|
|
2148
2148
|
features.search !== false ? /* @__PURE__ */ jsxs9("div", {
|
|
2149
2149
|
className: "relative min-w-0",
|
|
@@ -2805,9 +2805,13 @@ var ViewMenu = ({
|
|
|
2805
2805
|
}),
|
|
2806
2806
|
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2807
2807
|
/* @__PURE__ */ jsxs9(MenubarRadioGroup, {
|
|
2808
|
-
onValueChange: (
|
|
2809
|
-
|
|
2810
|
-
|
|
2808
|
+
onValueChange: (input) => {
|
|
2809
|
+
const view = Schema2.decodeUnknownOption(DataTablePersistedUiStateSchema.fields.view)(input);
|
|
2810
|
+
if (Option2.isSome(view)) {
|
|
2811
|
+
changeState(setStore, (state) => ({
|
|
2812
|
+
...state,
|
|
2813
|
+
view: view.value
|
|
2814
|
+
}));
|
|
2811
2815
|
}
|
|
2812
2816
|
},
|
|
2813
2817
|
value: store.state.view,
|
|
@@ -3956,7 +3960,7 @@ var DataTablePagination = ({
|
|
|
3956
3960
|
const setPagination = (next) => changeState(setStore, (state) => ({ ...state, ...next }));
|
|
3957
3961
|
return /* @__PURE__ */ jsx15("div", {
|
|
3958
3962
|
"data-table-slot": "pagination",
|
|
3959
|
-
className: cn("pt-4", styles?.pagination),
|
|
3963
|
+
className: cn("shrink-0 pt-4", styles?.pagination),
|
|
3960
3964
|
children: /* @__PURE__ */ jsx15(Pagination, {
|
|
3961
3965
|
pageSizeContentClassName: styles?.popup?.select,
|
|
3962
3966
|
locale: store.config.locale,
|
|
@@ -3972,6 +3976,7 @@ var DataTablePagination = ({
|
|
|
3972
3976
|
})
|
|
3973
3977
|
});
|
|
3974
3978
|
};
|
|
3979
|
+
var getTableLayoutClass = (virtualization) => virtualization && virtualization !== true && virtualization.scroll === "internal" ? "flex min-h-0 flex-1 flex-col" : undefined;
|
|
3975
3980
|
var HydratedDataTable = ({
|
|
3976
3981
|
persistedUiState,
|
|
3977
3982
|
setPersistedUiState,
|
|
@@ -4053,7 +4058,7 @@ var HydratedDataTable = ({
|
|
|
4053
4058
|
uiState
|
|
4054
4059
|
]);
|
|
4055
4060
|
return /* @__PURE__ */ jsxs9("div", {
|
|
4056
|
-
className: cn("w-full max-w-full min-w-0 rounded-md", props.className),
|
|
4061
|
+
className: cn("w-full max-w-full min-w-0 rounded-md", getTableLayoutClass(props.features?.virtualization), props.className),
|
|
4057
4062
|
"data-table-root": "",
|
|
4058
4063
|
children: [
|
|
4059
4064
|
/* @__PURE__ */ jsx15(DataTableToolbar, {
|
|
@@ -4098,7 +4103,7 @@ var DataTable = (props) => {
|
|
|
4098
4103
|
if (!persistedUiState || AsyncResult.isWaiting(persistedUiResult)) {
|
|
4099
4104
|
return /* @__PURE__ */ jsx15("div", {
|
|
4100
4105
|
"aria-busy": "true",
|
|
4101
|
-
className: cn("invisible w-full max-w-full min-w-0 rounded-md", props.className),
|
|
4106
|
+
className: cn("invisible w-full max-w-full min-w-0 rounded-md", getTableLayoutClass(props.features?.virtualization), props.className),
|
|
4102
4107
|
"data-table-root": ""
|
|
4103
4108
|
});
|
|
4104
4109
|
}
|
|
@@ -4195,15 +4200,16 @@ var DataTableContent = ({
|
|
|
4195
4200
|
})
|
|
4196
4201
|
});
|
|
4197
4202
|
}
|
|
4203
|
+
const fillHeight = options.scroll === "internal";
|
|
4198
4204
|
return /* @__PURE__ */ jsxs9(ScrollAreaPrimitive2.Root, {
|
|
4199
|
-
className: "relative isolate max-w-full min-w-0",
|
|
4205
|
+
className: cn("relative isolate max-w-full min-w-0", fillHeight && "flex min-h-0 flex-1 flex-col"),
|
|
4200
4206
|
children: [
|
|
4201
4207
|
/* @__PURE__ */ jsx15(ScrollAreaPrimitive2.Viewport, {
|
|
4202
4208
|
ref: setScrollElement,
|
|
4203
4209
|
"data-table-virtual-viewport": "",
|
|
4204
|
-
className: "@container [overflow-anchor:none] data-has-overflow-y:me-2.5 [&_[data-slot=table-container]]:overflow-visible",
|
|
4210
|
+
className: cn("@container [overflow-anchor:none] data-has-overflow-y:me-2.5 [&_[data-slot=table-container]]:overflow-visible", fillHeight && "min-h-0 flex-1"),
|
|
4205
4211
|
style: {
|
|
4206
|
-
maxHeight: options.height ?? 480,
|
|
4212
|
+
maxHeight: fillHeight ? undefined : options.height ?? 480,
|
|
4207
4213
|
scrollPaddingTop: headerHeight
|
|
4208
4214
|
},
|
|
4209
4215
|
children: /* @__PURE__ */ jsx15(ScrollAreaPrimitive2.Content, {
|
|
@@ -4728,16 +4734,16 @@ function CopyButton({
|
|
|
4728
4734
|
clearTimeout(copyTimeout.current);
|
|
4729
4735
|
copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
|
|
4730
4736
|
};
|
|
4731
|
-
const copy =
|
|
4732
|
-
|
|
4733
|
-
await navigator.clipboard.writeText(value);
|
|
4737
|
+
const copy = () => {
|
|
4738
|
+
Promise.resolve().then(() => navigator.clipboard.writeText(value)).then(() => {
|
|
4734
4739
|
setCopyState("copied");
|
|
4735
4740
|
onCopied?.();
|
|
4736
|
-
|
|
4741
|
+
resetCopyState();
|
|
4742
|
+
}).catch((cause) => {
|
|
4737
4743
|
setCopyState("failed");
|
|
4738
|
-
onCopyError?.(
|
|
4739
|
-
|
|
4740
|
-
|
|
4744
|
+
onCopyError?.(cause instanceof Error ? cause : new Error(labels.copyFailed, { cause }));
|
|
4745
|
+
resetCopyState();
|
|
4746
|
+
});
|
|
4741
4747
|
};
|
|
4742
4748
|
const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
|
|
4743
4749
|
return /* @__PURE__ */ jsxs10(Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/registry",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.20",
|
|
4
4
|
"description": "Tree-shakable KrakStack components and Effect services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"type": "module",
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"exports": {
|
|
20
|
+
"./select": {
|
|
21
|
+
"types": "./dist/components/ui/select.d.ts",
|
|
22
|
+
"import": "./dist/components/ui/select.js"
|
|
23
|
+
},
|
|
20
24
|
"./support": {
|
|
21
25
|
"types": "./dist/components/support.d.ts",
|
|
22
26
|
"import": "./dist/components/support.js"
|
|
@@ -41,6 +45,18 @@
|
|
|
41
45
|
"types": "./dist/components/ui/email-editor.d.ts",
|
|
42
46
|
"import": "./dist/components/ui/email-editor.js"
|
|
43
47
|
},
|
|
48
|
+
"./email-composer": {
|
|
49
|
+
"types": "./dist/components/ui/email-composer.d.ts",
|
|
50
|
+
"import": "./dist/components/ui/email-composer.js"
|
|
51
|
+
},
|
|
52
|
+
"./email-composer/core": {
|
|
53
|
+
"types": "./dist/lib/email-composer/index.d.ts",
|
|
54
|
+
"import": "./dist/lib/email-composer/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./email-composer/schema": {
|
|
57
|
+
"types": "./dist/lib/email-composer/schema.d.ts",
|
|
58
|
+
"import": "./dist/lib/email-composer/schema.js"
|
|
59
|
+
},
|
|
44
60
|
"./email-document/schema": {
|
|
45
61
|
"types": "./dist/lib/email-document/schema.d.ts",
|
|
46
62
|
"import": "./dist/lib/email-document/schema.js"
|
|
@@ -437,6 +453,13 @@
|
|
|
437
453
|
},
|
|
438
454
|
"dependencies": {
|
|
439
455
|
"@oxlint/plugins": "1.78.0",
|
|
456
|
+
"@react-email/editor": "^1.8.13",
|
|
457
|
+
"@tiptap/core": "^3.35.1",
|
|
458
|
+
"@tiptap/extension-mention": "^3.35.1",
|
|
459
|
+
"@tiptap/pm": "^3.35.1",
|
|
460
|
+
"@tiptap/react": "^3.35.1",
|
|
461
|
+
"@tiptap/starter-kit": "^3.35.1",
|
|
462
|
+
"@tiptap/static-renderer": "^3.35.1",
|
|
440
463
|
"bowser": "^2.14.1",
|
|
441
464
|
"cron-parser": "^5.10.4",
|
|
442
465
|
"date-fns": "^4.4.0",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { RichTextDocument, type RichTextVariable } from "./schema.js";
|
|
2
|
-
import { type TextSelection } from "./model.js";
|
|
3
|
-
type Point = {
|
|
4
|
-
node: Node;
|
|
5
|
-
offset: number;
|
|
6
|
-
};
|
|
7
|
-
/** Normalize browser editing DOM to the allowlisted model; never retain arbitrary HTML. */
|
|
8
|
-
export declare const readRichTextDOM: (root: HTMLElement) => {
|
|
9
|
-
value: {
|
|
10
|
-
readonly version: 1;
|
|
11
|
-
readonly blocks: readonly {
|
|
12
|
-
readonly type: "bullet" | "heading" | "numbered" | "paragraph";
|
|
13
|
-
readonly content: readonly ({
|
|
14
|
-
readonly type: "text";
|
|
15
|
-
readonly text: string;
|
|
16
|
-
readonly marks?: {
|
|
17
|
-
readonly bold?: boolean | undefined;
|
|
18
|
-
readonly italic?: boolean | undefined;
|
|
19
|
-
readonly underline?: boolean | undefined;
|
|
20
|
-
readonly href?: string | undefined;
|
|
21
|
-
} | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
readonly type: "variable";
|
|
24
|
-
readonly key: string;
|
|
25
|
-
readonly marks?: {
|
|
26
|
-
readonly bold?: boolean | undefined;
|
|
27
|
-
readonly italic?: boolean | undefined;
|
|
28
|
-
readonly underline?: boolean | undefined;
|
|
29
|
-
readonly href?: string | undefined;
|
|
30
|
-
} | undefined;
|
|
31
|
-
})[];
|
|
32
|
-
}[];
|
|
33
|
-
} | undefined;
|
|
34
|
-
points: Point[];
|
|
35
|
-
};
|
|
36
|
-
export declare const readEditorSelection: (root: HTMLElement, points: readonly Point[]) => TextSelection | undefined;
|
|
37
|
-
export declare const restoreRichTextSelection: (root: HTMLElement, selection: TextSelection) => void;
|
|
38
|
-
/** DOM creation, not HTML interpolation, keeps variable values and text escaped. */
|
|
39
|
-
export declare const writeRichTextDOM: (root: HTMLElement, value: RichTextDocument, variables: readonly RichTextVariable[]) => void;
|
|
40
|
-
export {};
|
|
File without changes
|