@krak-stack/registry 0.10.0 → 0.10.2

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/dist/lib/docs.js CHANGED
@@ -12,12 +12,18 @@ import {
12
12
 
13
13
  // ../../src/components/ui/app-brand.tsx
14
14
  import { Link } from "@tanstack/react-router";
15
+
16
+ // ../../src/lib/utils.ts
17
+ import { cn } from "cn";
18
+
19
+ // ../../src/components/ui/app-brand.tsx
15
20
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
16
21
  var isStaticBrand = (props) => props.to === null;
17
22
  var isAnchorBrand = (props) => props.href !== undefined;
18
23
  function AppBrand(brandProps) {
19
24
  const {
20
25
  className,
26
+ classNames,
21
27
  label,
22
28
  subtitle,
23
29
  icon: Icon,
@@ -30,28 +36,31 @@ function AppBrand(brandProps) {
30
36
  const content = /* @__PURE__ */ jsxs(Fragment, {
31
37
  children: [
32
38
  /* @__PURE__ */ jsx("div", {
33
- className: [
34
- "flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md",
35
- imageSrc ? "border bg-background" : iconClassName
36
- ].join(" "),
39
+ "data-slot": "app-brand-visual",
40
+ className: cn("flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md", imageSrc ? "bg-background border" : iconClassName, classNames?.visual),
37
41
  children: imageSrc ? /* @__PURE__ */ jsx("img", {
42
+ "data-slot": "app-brand-image",
38
43
  src: imageSrc,
39
44
  alt: label,
40
- className: "size-full object-cover"
45
+ className: cn("size-full object-cover", classNames?.image)
41
46
  }) : Icon ? /* @__PURE__ */ jsx(Icon, {
42
- className: "size-4",
47
+ "data-slot": "app-brand-icon",
48
+ className: cn("size-4", classNames?.icon),
43
49
  color: iconColor
44
50
  }) : null
45
51
  }),
46
52
  /* @__PURE__ */ jsxs("div", {
47
- className: ["flex min-w-0 flex-col leading-tight", contentClassName].filter(Boolean).join(" "),
53
+ "data-slot": "app-brand-content",
54
+ className: cn("flex min-w-0 flex-col leading-tight", contentClassName, classNames?.content),
48
55
  children: [
49
56
  /* @__PURE__ */ jsx("span", {
50
- className: "truncate font-semibold tracking-tight",
57
+ "data-slot": "app-brand-label",
58
+ className: cn("truncate font-semibold tracking-tight", classNames?.label),
51
59
  children: label
52
60
  }),
53
61
  subtitle ? /* @__PURE__ */ jsx("span", {
54
- className: "text-muted-foreground truncate text-xs",
62
+ "data-slot": "app-brand-subtitle",
63
+ className: cn("text-muted-foreground truncate text-xs", classNames?.subtitle),
55
64
  children: subtitle
56
65
  }) : null
57
66
  ]
@@ -66,6 +75,7 @@ function AppBrand(brandProps) {
66
75
  if (isStaticBrand(brandProps)) {
67
76
  const {
68
77
  className: _className,
78
+ classNames: _classNames,
69
79
  label: _label,
70
80
  subtitle: _subtitle,
71
81
  icon: _icon,
@@ -76,6 +86,7 @@ function AppBrand(brandProps) {
76
86
  ...props
77
87
  } = brandProps;
78
88
  return /* @__PURE__ */ jsx("div", {
89
+ "data-slot": "app-brand",
79
90
  className: brandClassName,
80
91
  ...props,
81
92
  children: content
@@ -84,6 +95,7 @@ function AppBrand(brandProps) {
84
95
  if (isAnchorBrand(brandProps)) {
85
96
  const {
86
97
  className: _className,
98
+ classNames: _classNames,
87
99
  label: _label,
88
100
  subtitle: _subtitle,
89
101
  icon: _icon,
@@ -94,6 +106,7 @@ function AppBrand(brandProps) {
94
106
  ...props
95
107
  } = brandProps;
96
108
  return /* @__PURE__ */ jsx("a", {
109
+ "data-slot": "app-brand",
97
110
  className: brandClassName,
98
111
  href,
99
112
  ...props,
@@ -102,6 +115,7 @@ function AppBrand(brandProps) {
102
115
  }
103
116
  const {
104
117
  className: _className,
118
+ classNames: _classNames,
105
119
  label: _label,
106
120
  subtitle: _subtitle,
107
121
  icon: _icon,
@@ -112,6 +126,7 @@ function AppBrand(brandProps) {
112
126
  ...props
113
127
  } = brandProps;
114
128
  return /* @__PURE__ */ jsx(Link, {
129
+ "data-slot": "app-brand",
115
130
  to: to ?? "/",
116
131
  className: brandClassName,
117
132
  ...props,
@@ -123,11 +138,6 @@ function AppBrand(brandProps) {
123
138
  import { mergeProps } from "@base-ui/react/merge-props";
124
139
  import { useRender } from "@base-ui/react/use-render";
125
140
  import { cva } from "class-variance-authority";
126
-
127
- // ../../src/lib/utils.ts
128
- import { cn } from "cn";
129
-
130
- // ../../src/components/ui/badge.tsx
131
141
  var badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
132
142
  variants: {
133
143
  variant: {
@@ -1404,15 +1414,18 @@ function SidebarLayout({
1404
1414
  /* @__PURE__ */ jsxs10(SidebarInset, {
1405
1415
  className: cn("min-w-0 overflow-x-clip", fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
1406
1416
  children: [
1407
- /* @__PURE__ */ jsxs10("header", {
1408
- className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-10 flex h-14 shrink-0 items-center gap-2 border-b px-4 backdrop-blur",
1409
- children: [
1410
- /* @__PURE__ */ jsx13(SidebarTrigger, {}),
1411
- /* @__PURE__ */ jsx13("div", {
1412
- className: "ml-auto flex items-center gap-2",
1413
- children: headerActions
1414
- })
1415
- ]
1417
+ /* @__PURE__ */ jsx13("div", {
1418
+ className: "h-14 shrink-0",
1419
+ children: /* @__PURE__ */ jsxs10("header", {
1420
+ className: cn("bg-background/95 supports-[backdrop-filter]:bg-background/60 fixed inset-x-0 top-0 z-10 flex h-14 items-center gap-2 border-b px-4 backdrop-blur transition-[left] duration-200 ease-linear", sidebarCollapsible === "none" ? "left-(--sidebar-width)" : sidebarOpen ? "md:left-(--sidebar-width)" : sidebarCollapsible === "icon" ? "md:left-(--sidebar-width-icon)" : "md:left-0", fullPage && "xl:static"),
1421
+ children: [
1422
+ /* @__PURE__ */ jsx13(SidebarTrigger, {}),
1423
+ /* @__PURE__ */ jsx13("div", {
1424
+ className: "ml-auto flex items-center gap-2",
1425
+ children: headerActions
1426
+ })
1427
+ ]
1428
+ })
1416
1429
  }),
1417
1430
  /* @__PURE__ */ jsx13("div", {
1418
1431
  className: cn("isolate", contentClassName ?? "flex flex-col gap-6 px-5 py-6 md:px-8"),
@@ -17,15 +17,13 @@ import {
17
17
  // ../../src/components/ui/app-brand.tsx
18
18
  import { Link } from "@tanstack/react-router";
19
19
 
20
- // ../../src/components/ui/badge.tsx
21
- import { mergeProps } from "@base-ui/react/merge-props";
22
- import { useRender } from "@base-ui/react/use-render";
23
- import { cva } from "class-variance-authority";
24
-
25
20
  // ../../src/lib/utils.ts
26
21
  import { cn } from "cn";
27
22
 
28
23
  // ../../src/components/ui/badge.tsx
24
+ import { mergeProps } from "@base-ui/react/merge-props";
25
+ import { useRender } from "@base-ui/react/use-render";
26
+ import { cva } from "class-variance-authority";
29
27
  var badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
30
28
  variants: {
31
29
  variant: {
@@ -0,0 +1,21 @@
1
+ import { Schema, type JsonSchema } from "effect";
2
+ import type { Json } from "effect/Schema";
3
+ type Definitions = JsonSchema.Definitions;
4
+ type SchemaSource = Json | JsonSchema.JsonSchema | undefined;
5
+ export type WebhookReferenceField = {
6
+ path: string;
7
+ type: string;
8
+ required: "yes" | "no" | "conditional";
9
+ description: string;
10
+ };
11
+ /** Flatten fields, not definitions: required is relative to the containing object. */
12
+ export declare const webhookReferenceFields: (schema: SchemaSource, definitions: Definitions, prefix?: string) => WebhookReferenceField[];
13
+ export declare const formatWebhookReference: (locale: "en" | "fr", events: ReadonlyArray<{
14
+ name: string;
15
+ description: Readonly<{
16
+ en: string;
17
+ fr: string;
18
+ }>;
19
+ payload: Schema.Top;
20
+ }>) => string;
21
+ export {};
@@ -17,15 +17,13 @@ import {
17
17
  // ../../src/components/ui/app-brand.tsx
18
18
  import { Link } from "@tanstack/react-router";
19
19
 
20
- // ../../src/components/ui/badge.tsx
21
- import { mergeProps } from "@base-ui/react/merge-props";
22
- import { useRender } from "@base-ui/react/use-render";
23
- import { cva } from "class-variance-authority";
24
-
25
20
  // ../../src/lib/utils.ts
26
21
  import { cn } from "cn";
27
22
 
28
23
  // ../../src/components/ui/badge.tsx
24
+ import { mergeProps } from "@base-ui/react/merge-props";
25
+ import { useRender } from "@base-ui/react/use-render";
26
+ import { cva } from "class-variance-authority";
29
27
  var badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
30
28
  variants: {
31
29
  variant: {