@krak-stack/registry 0.10.0 → 0.10.1

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @krak-stack/registry
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7bf29e1: Replace SecretValue with CopyValue, modeled on Kokobi's read-only copyable input. Values are visible by default; enable `secret` for reveal/hide and optional auto-hide. Add a borderless `variant="ghost"` with monospaced text and an icon-only copy button, and tighten spacing between actions.
8
+
9
+ Migrate imports from `@krak-stack/registry/secret-value` to `@krak-stack/registry/copy-value`, rename `SecretValue` to `CopyValue`, and add `secret` to preserve masking. The shadcn registry item is now `@krak-stack/copy-value`. Include updated English/French documentation and previews.
10
+
11
+ - Add the server-only `docs/integrations` export and `docs-integrations` registry item for configurable English/French API, OAuth MCP, and webhook guides. Generate linked event summaries and grouped payload-field references directly from Effect schemas, including required/conditional fields, nested structures, and shared definitions, without raw schema dumps. Include reusable verification and delivery documentation for the KrakStack webhook sender, plus application-owned page overrides.
12
+ - 72bcef6: Keep the sidebar layout header pinned to the viewport during document overscroll without disabling native bounce. Preserve sidebar collapse offsets, document scrolling, and full-page layouts.
13
+
3
14
  ## 0.10.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -18,6 +18,56 @@ Les composants animés nécessitent la dépendance paire facultative `motion` ;
18
18
  champ de numéro de téléphone nécessite `libphonenumber-js`. Installez ces paquets
19
19
  uniquement pour les composants concernés. Le menu de notifications n'en a pas besoin.
20
20
 
21
+ ## Shared integration documentation
22
+
23
+ Generate API, OAuth MCP, and webhook guides in a Bun server loader:
24
+
25
+ ```ts
26
+ import {
27
+ createIntegrationDocs,
28
+ krakStackWebhookDocs,
29
+ } from "@krak-stack/registry/docs/integrations";
30
+ import { loadMdxDocsDirectory } from "@krak-stack/registry/docs/server";
31
+ import { webhookDefinitions } from "./webhook-definitions";
32
+
33
+ const pages = createIntegrationDocs({
34
+ appName: "My App",
35
+ origin: "https://app.example.com",
36
+ api: true,
37
+ mcp: true,
38
+ webhooks: { ...krakStackWebhookDocs, events: webhookDefinitions },
39
+ pages: await loadMdxDocsDirectory("src/content/docs"),
40
+ });
41
+ ```
42
+
43
+ Pass records to `createDocsSource({ pages, locales: ["en", "fr"] })` through your
44
+ existing server function. Do not import the generator into browser code.
45
+ Each webhook definition has a `name`, `description: { en, fr }`, and an Effect
46
+ `payload` schema for the complete delivered JSON body. Reuse the sender's
47
+ definitions. The guide links an event summary to grouped field tables, expanding
48
+ references and nested objects, arrays, and dictionaries without schema dumps.
49
+ Required status applies within the containing object; variant-specific fields
50
+ are marked conditional. Source schema annotations retain their authored language.
51
+
52
+ All guides are opt-in. MCP assumes remote Streamable HTTP with OAuth.
53
+ `krakStackWebhookDocs` explicitly selects the KrakStack webhook sender's public
54
+ signing and delivery policy. Other senders must supply localized `verification`
55
+ and `delivery` Markdown. Never pass secrets. `webhooks: true` keeps the generic
56
+ guide without event definitions or sender-specific policies.
57
+
58
+ Defaults are `/docs/api-access`, `/docs/mcp`, `/docs/webhooks`, English/French,
59
+ section `integration`, and orders 1000–1002. Configure `basePath`, `section`,
60
+ `order`, `locales`, `api: { referenceUrl }`, or `mcp: { url }` as needed.
61
+ Local `pages` replace defaults by locale and slug. Reserve unique orders and
62
+ matching routing metadata across translations. This does not install endpoints.
63
+ For copied sources, install `@krak-stack/docs-integrations`.
64
+
65
+ Générez les guides API, MCP OAuth et webhooks sur le serveur Bun. Les définitions
66
+ d’événements produisent des tableaux de champs lisibles et regroupés par charge
67
+ utile. Réutilisez `krakStackWebhookDocs` pour les instructions de vérification et
68
+ de livraison de l’émetteur KrakStack. Les guides sont facultatifs et disponibles
69
+ en français et en anglais ; les pages locales remplacent les valeurs par défaut.
70
+
21
71
  ## Use
22
72
 
23
73
  Import from the specific package subpaths you need:
@@ -1,19 +1,21 @@
1
1
  import { type CopyButtonMessageTranslations } from "./copy-button.js";
2
- export type SecretValueMessages = {
2
+ export type CopyValueMessages = {
3
3
  show: string;
4
4
  hide: string;
5
5
  hidden: string;
6
6
  };
7
- export type SecretValueProps = {
7
+ export type CopyValueProps = {
8
8
  value: string;
9
9
  label: string;
10
+ secret?: boolean;
11
+ variant?: "outline" | "ghost";
10
12
  disabled?: boolean;
11
13
  copyable?: boolean;
12
14
  autoHideDelay?: number;
13
15
  className?: string;
14
16
  locale?: string;
15
- messages?: Partial<Record<string, Partial<SecretValueMessages>>>;
17
+ messages?: Partial<Record<string, Partial<CopyValueMessages>>>;
16
18
  copyMessages?: CopyButtonMessageTranslations;
17
19
  };
18
20
  /** Masking is presentation, not a security boundary. Never logs the value. */
19
- export declare const SecretValue: ({ value, label, disabled, copyable, autoHideDelay, className, locale: override, messages, copyMessages, }: SecretValueProps) => import("react").JSX.Element;
21
+ export declare const CopyValue: ({ value, label, secret, variant, disabled, copyable, autoHideDelay, className, locale: override, messages, copyMessages, }: CopyValueProps) => import("react").JSX.Element;
@@ -0,0 +1,319 @@
1
+ // ../../src/components/ui/copy-value.tsx
2
+ import { Eye, EyeOff } from "lucide-react";
3
+ import { useEffect as useEffect2, useState as useState2 } from "react";
4
+
5
+ // ../../src/components/ui/input-group.tsx
6
+ import { cva as cva2 } from "class-variance-authority";
7
+
8
+ // ../../src/components/ui/button.tsx
9
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
10
+ import { cva } from "class-variance-authority";
11
+
12
+ // ../../src/lib/utils.ts
13
+ import { cn } from "cn";
14
+
15
+ // ../../src/components/ui/button.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
18
+ variants: {
19
+ variant: {
20
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
21
+ outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
22
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
23
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
24
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
25
+ link: "text-primary underline-offset-4 hover:underline"
26
+ },
27
+ size: {
28
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
29
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
30
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
31
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
32
+ icon: "size-9",
33
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
34
+ "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
35
+ "icon-lg": "size-10"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ variant: "default",
40
+ size: "default"
41
+ }
42
+ });
43
+ function Button({
44
+ className,
45
+ variant = "default",
46
+ size = "default",
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsx(ButtonPrimitive, {
50
+ "data-slot": "button",
51
+ className: cn(buttonVariants({ variant, size, className })),
52
+ ...props
53
+ });
54
+ }
55
+
56
+ // ../../src/components/ui/input.tsx
57
+ import { Input as InputPrimitive } from "@base-ui/react/input";
58
+ import { jsx as jsx2 } from "react/jsx-runtime";
59
+ function Input({ className, type, ...props }) {
60
+ return /* @__PURE__ */ jsx2(InputPrimitive, {
61
+ type,
62
+ "data-slot": "input",
63
+ className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
64
+ ...props
65
+ });
66
+ }
67
+
68
+ // ../../src/components/ui/input-group.tsx
69
+ import { jsx as jsx3 } from "react/jsx-runtime";
70
+ function InputGroup({ className, ...props }) {
71
+ return /* @__PURE__ */ jsx3("div", {
72
+ "data-slot": "input-group",
73
+ role: "group",
74
+ className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
75
+ ...props
76
+ });
77
+ }
78
+ var inputGroupAddonVariants = cva2("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
79
+ variants: {
80
+ align: {
81
+ "inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
82
+ "inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
83
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
84
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
85
+ }
86
+ },
87
+ defaultVariants: { align: "inline-start" }
88
+ });
89
+ function InputGroupAddon({
90
+ className,
91
+ align = "inline-start",
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ jsx3("div", {
95
+ role: "group",
96
+ "data-slot": "input-group-addon",
97
+ "data-align": align,
98
+ className: cn(inputGroupAddonVariants({ align }), className),
99
+ onClick: (event) => {
100
+ if (event.target instanceof HTMLElement && event.target.closest("button")) {
101
+ return;
102
+ }
103
+ event.currentTarget.parentElement?.querySelector("input")?.focus();
104
+ },
105
+ ...props
106
+ });
107
+ }
108
+ var inputGroupButtonVariants = cva2("flex items-center gap-2 text-sm shadow-none", {
109
+ variants: {
110
+ size: {
111
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
112
+ sm: "",
113
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
114
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
115
+ }
116
+ },
117
+ defaultVariants: { size: "xs" }
118
+ });
119
+ function InputGroupButton({
120
+ className,
121
+ type = "button",
122
+ variant = "ghost",
123
+ size = "xs",
124
+ ...props
125
+ }) {
126
+ return /* @__PURE__ */ jsx3(Button, {
127
+ type,
128
+ "data-size": size,
129
+ variant,
130
+ className: cn(inputGroupButtonVariants({ size }), className),
131
+ ...props
132
+ });
133
+ }
134
+ function InputGroupInput({
135
+ className,
136
+ ...props
137
+ }) {
138
+ return /* @__PURE__ */ jsx3(Input, {
139
+ "data-slot": "input-group-control",
140
+ className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
141
+ ...props
142
+ });
143
+ }
144
+
145
+ // ../../src/components/ui/copy-button.tsx
146
+ import { Check, Copy, TriangleAlert } from "lucide-react";
147
+ import { useEffect, useRef, useState } from "react";
148
+ import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider";
149
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
150
+ var messages = {
151
+ en: { copy: "Copy", copied: "Copied", copyFailed: "Copy failed" },
152
+ fr: { copy: "Copier", copied: "Copié", copyFailed: "Échec de la copie" }
153
+ };
154
+ var copyButtonMessages = (locale = "en", translations) => ({
155
+ ...locale.startsWith("fr") ? messages.fr : messages.en,
156
+ ...translations?.[locale.split("-")[0] ?? locale],
157
+ ...translations?.[locale]
158
+ });
159
+ function CopyButton({
160
+ value,
161
+ valueDescription,
162
+ copyVariant = "default",
163
+ locale: localeOverride,
164
+ messages,
165
+ onCopied,
166
+ onCopyError,
167
+ resetDelay = 1500,
168
+ disabled,
169
+ size,
170
+ "aria-label": ariaLabel,
171
+ ...props
172
+ }) {
173
+ const locale = useKrakstackLocale(localeOverride);
174
+ const [copyState, setCopyState] = useState("idle");
175
+ const copyTimeout = useRef(undefined);
176
+ const labels = copyButtonMessages(locale, messages);
177
+ const accessibleLabel = ariaLabel ?? (valueDescription ? `${labels.copy} ${valueDescription}` : labels.copy);
178
+ const isLarge = copyVariant === "large";
179
+ const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
180
+ useEffect(() => {
181
+ return () => {
182
+ if (copyTimeout.current)
183
+ clearTimeout(copyTimeout.current);
184
+ };
185
+ }, []);
186
+ const resetCopyState = () => {
187
+ if (copyTimeout.current)
188
+ clearTimeout(copyTimeout.current);
189
+ copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
190
+ };
191
+ const copy = async () => {
192
+ try {
193
+ await navigator.clipboard.writeText(value);
194
+ setCopyState("copied");
195
+ onCopied?.();
196
+ } catch (error) {
197
+ setCopyState("failed");
198
+ onCopyError?.(error instanceof Error ? error : new Error(labels.copyFailed, { cause: error }));
199
+ }
200
+ resetCopyState();
201
+ };
202
+ const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
203
+ return /* @__PURE__ */ jsxs(Button, {
204
+ "aria-label": accessibleLabel,
205
+ disabled,
206
+ onClick: copy,
207
+ size: size ?? defaultSize,
208
+ ...props,
209
+ children: [
210
+ /* @__PURE__ */ jsx4("span", {
211
+ "aria-live": "polite",
212
+ className: "sr-only",
213
+ role: "status",
214
+ children: status
215
+ }),
216
+ copyState === "copied" ? /* @__PURE__ */ jsx4(Check, {
217
+ "aria-hidden": "true"
218
+ }) : null,
219
+ copyState === "failed" ? /* @__PURE__ */ jsx4(TriangleAlert, {
220
+ "aria-hidden": "true"
221
+ }) : null,
222
+ copyState === "idle" ? /* @__PURE__ */ jsx4(Copy, {
223
+ "aria-hidden": "true"
224
+ }) : null,
225
+ isLarge ? /* @__PURE__ */ jsx4("span", {
226
+ children: labels.copy
227
+ }) : null
228
+ ]
229
+ });
230
+ }
231
+
232
+ // ../../src/components/ui/copy-value.tsx
233
+ import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider";
234
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
235
+ var labels = {
236
+ en: { show: "Show", hide: "Hide", hidden: "Hidden value" },
237
+ fr: { show: "Afficher", hide: "Masquer", hidden: "Valeur masquée" }
238
+ };
239
+ var CopyValue = ({
240
+ value,
241
+ label,
242
+ secret = false,
243
+ variant = "outline",
244
+ disabled,
245
+ copyable = true,
246
+ autoHideDelay = 0,
247
+ className,
248
+ locale: override,
249
+ messages,
250
+ copyMessages
251
+ }) => {
252
+ const locale = useKrakstackLocale2(override);
253
+ const copy = {
254
+ ...locale.startsWith("fr") ? labels.fr : labels.en,
255
+ ...messages?.[locale.split("-")[0] ?? locale],
256
+ ...messages?.[locale]
257
+ };
258
+ const [revealedValue, setRevealedValue] = useState2(null);
259
+ const [previous, setPrevious] = useState2({ value, disabled, secret });
260
+ if (previous.value !== value || previous.disabled !== disabled || previous.secret !== secret) {
261
+ setPrevious({ value, disabled, secret });
262
+ setRevealedValue(null);
263
+ }
264
+ const revealed = secret && !disabled && revealedValue === value;
265
+ useEffect2(() => {
266
+ if (!revealed || autoHideDelay <= 0)
267
+ return;
268
+ const timer = setTimeout(() => setRevealedValue(null), autoHideDelay);
269
+ return () => clearTimeout(timer);
270
+ }, [revealed, autoHideDelay, value]);
271
+ return /* @__PURE__ */ jsxs2(InputGroup, {
272
+ className: cn("min-w-0", variant === "ghost" && "border-0 bg-transparent shadow-none dark:bg-transparent", className),
273
+ children: [
274
+ /* @__PURE__ */ jsx5(InputGroupInput, {
275
+ className: variant === "ghost" ? "pl-0 font-mono" : undefined,
276
+ "aria-label": secret && !revealed ? `${label}: ${copy.hidden}` : label,
277
+ value,
278
+ type: secret && !revealed ? "password" : "text",
279
+ autoComplete: secret ? "off" : undefined,
280
+ readOnly: true,
281
+ disabled,
282
+ onFocus: (event) => event.currentTarget.select()
283
+ }),
284
+ /* @__PURE__ */ jsxs2(InputGroupAddon, {
285
+ align: "inline-end",
286
+ className: "gap-0",
287
+ children: [
288
+ secret ? /* @__PURE__ */ jsx5(InputGroupButton, {
289
+ type: "button",
290
+ size: "icon-sm",
291
+ variant: "ghost",
292
+ disabled,
293
+ "aria-label": `${revealed ? copy.hide : copy.show} ${label}`,
294
+ "aria-pressed": revealed,
295
+ onClick: () => setRevealedValue(revealed ? null : value),
296
+ children: revealed ? /* @__PURE__ */ jsx5(EyeOff, {
297
+ "aria-hidden": "true"
298
+ }) : /* @__PURE__ */ jsx5(Eye, {
299
+ "aria-hidden": "true"
300
+ })
301
+ }) : null,
302
+ copyable ? /* @__PURE__ */ jsx5(CopyButton, {
303
+ type: "button",
304
+ value,
305
+ valueDescription: label,
306
+ disabled,
307
+ variant: "ghost",
308
+ copyVariant: variant === "ghost" ? "default" : "large",
309
+ locale,
310
+ messages: copyMessages
311
+ }) : null
312
+ ]
313
+ })
314
+ ]
315
+ });
316
+ };
317
+ export {
318
+ CopyValue
319
+ };
@@ -145,7 +145,7 @@ declare const RevertButton: ({ locale, messages, original, }: {
145
145
  messages?: FormMessageTranslations;
146
146
  original: string;
147
147
  }) => JSX.Element | undefined;
148
- declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
148
+ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/form-core").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
149
149
  readonly TextField: typeof TextField;
150
150
  readonly TextAreaField: typeof TextAreaField;
151
151
  readonly SelectField: typeof SelectField;
@@ -161,7 +161,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
161
161
  readonly FormError: typeof FormError;
162
162
  readonly FieldWrapper: typeof FieldWrapper;
163
163
  readonly BlockNavigation: typeof BlockNavigation;
164
- }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
164
+ }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
165
165
  readonly TextField: typeof TextField;
166
166
  readonly TextAreaField: typeof TextAreaField;
167
167
  readonly SelectField: typeof SelectField;
@@ -178,7 +178,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
178
178
  readonly FieldWrapper: typeof FieldWrapper;
179
179
  readonly BlockNavigation: typeof BlockNavigation;
180
180
  }, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
181
- form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
181
+ form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/form-core").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
182
182
  readonly TextField: typeof TextField;
183
183
  readonly TextAreaField: typeof TextAreaField;
184
184
  readonly SelectField: typeof SelectField;
@@ -211,8 +211,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
211
211
  readonly FormError: typeof FormError;
212
212
  readonly FieldWrapper: typeof FieldWrapper;
213
213
  readonly BlockNavigation: typeof BlockNavigation;
214
- }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
215
- form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
214
+ }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form-core").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/form-core").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/form-core").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/form-core").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
215
+ form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form-core").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
216
216
  readonly TextField: typeof TextField;
217
217
  readonly TextAreaField: typeof TextAreaField;
218
218
  readonly SelectField: typeof SelectField;
@@ -733,15 +733,18 @@ function SidebarLayout({
733
733
  /* @__PURE__ */ jsxs4(SidebarInset, {
734
734
  className: cn("min-w-0 overflow-x-clip", fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
735
735
  children: [
736
- /* @__PURE__ */ jsxs4("header", {
737
- 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",
738
- children: [
739
- /* @__PURE__ */ jsx5(SidebarTrigger, {}),
740
- /* @__PURE__ */ jsx5("div", {
741
- className: "ml-auto flex items-center gap-2",
742
- children: headerActions
743
- })
744
- ]
736
+ /* @__PURE__ */ jsx5("div", {
737
+ className: "h-14 shrink-0",
738
+ children: /* @__PURE__ */ jsxs4("header", {
739
+ 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"),
740
+ children: [
741
+ /* @__PURE__ */ jsx5(SidebarTrigger, {}),
742
+ /* @__PURE__ */ jsx5("div", {
743
+ className: "ml-auto flex items-center gap-2",
744
+ children: headerActions
745
+ })
746
+ ]
747
+ })
745
748
  }),
746
749
  /* @__PURE__ */ jsx5("div", {
747
750
  className: cn("isolate", contentClassName ?? "flex flex-col gap-6 px-5 py-6 md:px-8"),
@@ -0,0 +1,56 @@
1
+ import { Schema } from "effect";
2
+ import type { DocsPage } from "./docs.js";
3
+ export type IntegrationDocsText = Readonly<{
4
+ en: string;
5
+ fr: string;
6
+ }>;
7
+ export type WebhookEventReference = {
8
+ name: string;
9
+ description: IntegrationDocsText;
10
+ /** Reuse the sender's schema for the complete delivered JSON body. */
11
+ payload: Schema.Top;
12
+ };
13
+ export type WebhookDocsConfig = {
14
+ events: ReadonlyArray<WebhookEventReference>;
15
+ /** Public Markdown instructions only. Never pass signing secrets. */
16
+ verification?: IntegrationDocsText;
17
+ /** Public Markdown describing the sender's actual retry and delivery policy. */
18
+ delivery?: IntegrationDocsText;
19
+ };
20
+ /** Public protocol documentation for the KrakStack Webhooks sender (0.8.3).
21
+ * Opt in explicitly; other webhook senders may use a different protocol.
22
+ */
23
+ export declare const krakStackWebhookDocs: {
24
+ verification: {
25
+ en: string;
26
+ fr: string;
27
+ };
28
+ delivery: {
29
+ en: string;
30
+ fr: string;
31
+ };
32
+ };
33
+ export type IntegrationDocsConfig = {
34
+ appName: string;
35
+ /** Canonical public origin, including https://. */
36
+ origin: `http://${string}` | `https://${string}`;
37
+ basePath?: string;
38
+ section?: string;
39
+ /** Reserve three consecutive, positive navigation orders. Defaults to 1000. */
40
+ order?: number;
41
+ locales?: ReadonlyArray<"en" | "fr">;
42
+ /** Disabled unless explicitly enabled. Authentication remains app-owned. */
43
+ api?: boolean | {
44
+ referenceUrl?: string;
45
+ };
46
+ /** Enable only for remote Streamable HTTP servers supporting OAuth. */
47
+ mcp?: boolean | {
48
+ url?: string;
49
+ };
50
+ /** Reuse event definitions from the sender, or true for the generic guide. */
51
+ webhooks?: boolean | WebhookDocsConfig;
52
+ /** Local pages replace defaults with the same locale and slug. */
53
+ pages?: ReadonlyArray<DocsPage>;
54
+ };
55
+ /** Compile on the server, then pass the records to createDocsSource. Requires Bun. */
56
+ export declare const createIntegrationDocs: (config: IntegrationDocsConfig) => DocsPage[];