@krak-stack/registry 0.1.9 → 0.1.11

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.
@@ -99,7 +99,7 @@ export declare const FieldWrapper: ({ children, legend, localized, description,
99
99
  value: string;
100
100
  }[];
101
101
  }) => JSX.Element;
102
- 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, {
102
+ 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, {
103
103
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
104
104
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
105
105
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -148,7 +148,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
148
148
  readonly BlockNavigation: ({ messages, }: {
149
149
  messages?: FormMessageOverrides;
150
150
  }) => JSX.Element;
151
- }>, 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, {
151
+ }>, 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, {
152
152
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
153
153
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
154
154
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -198,7 +198,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
198
198
  messages?: FormMessageOverrides;
199
199
  }) => JSX.Element;
200
200
  }, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
201
- 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, {
201
+ 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, {
202
202
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
203
203
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
204
204
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -297,8 +297,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
297
297
  readonly BlockNavigation: ({ messages, }: {
298
298
  messages?: FormMessageOverrides;
299
299
  }) => JSX.Element;
300
- }, 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> & {
301
- 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, {
300
+ }, 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> & {
301
+ 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, {
302
302
  readonly TextField: ({ children, ...props }: React.ComponentProps<"input"> & DefaultOptions) => JSX.Element;
303
303
  readonly TextAreaField: ({ children, ...props }: React.ComponentProps<"textarea"> & DefaultOptions) => JSX.Element;
304
304
  readonly SelectField: ({ description, label, multiple, options, placeholder, }: SelectFieldProps) => JSX.Element;
@@ -3,6 +3,7 @@ type NavItem = {
3
3
  label: () => string;
4
4
  href: string;
5
5
  icon: LucideIcon;
6
+ badge?: () => string;
6
7
  external?: boolean;
7
8
  };
8
9
  type NavGroup = {
@@ -658,7 +658,12 @@ function AppSidebar({ footer, groups, header }) {
658
658
  /* @__PURE__ */ jsx8(item.icon, {}),
659
659
  /* @__PURE__ */ jsx8("span", {
660
660
  children: item.label()
661
- })
661
+ }),
662
+ item.badge ? /* @__PURE__ */ jsx8(Badge, {
663
+ className: "ml-auto",
664
+ variant: "secondary",
665
+ children: item.badge()
666
+ }) : null
662
667
  ]
663
668
  })
664
669
  }, item.href);
@@ -26,6 +26,8 @@ export declare const readDocumentation: (args_0: {
26
26
  readonly locale: string;
27
27
  readonly section: string;
28
28
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
29
+ readonly createdAt?: string | undefined;
30
+ readonly updatedAt?: string | undefined;
29
31
  readonly legacySlugs?: readonly string[] | undefined;
30
32
  readonly headings: readonly Schema.Struct.ReadonlySide<{
31
33
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -58,6 +60,8 @@ export declare const makeChatDocumentation: (args_0: {
58
60
  readonly locale: Schema.String;
59
61
  readonly section: Schema.String;
60
62
  readonly type: Schema.Literals<readonly ["concept", "tutorial", "how-to", "reference", "runbook"]>;
63
+ readonly createdAt: Schema.optional<Schema.String>;
64
+ readonly updatedAt: Schema.optional<Schema.String>;
61
65
  readonly legacySlugs: Schema.optional<Schema.$Array<Schema.String>>;
62
66
  readonly headings: Schema.$Array<Schema.Struct<{
63
67
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -104,6 +108,8 @@ export declare const makeChatDocumentation: (args_0: {
104
108
  readonly locale: Schema.String;
105
109
  readonly section: Schema.String;
106
110
  readonly type: Schema.Literals<readonly ["concept", "tutorial", "how-to", "reference", "runbook"]>;
111
+ readonly createdAt: Schema.optional<Schema.String>;
112
+ readonly updatedAt: Schema.optional<Schema.String>;
107
113
  readonly legacySlugs: Schema.optional<Schema.$Array<Schema.String>>;
108
114
  readonly headings: Schema.$Array<Schema.Struct<{
109
115
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -206,6 +206,7 @@ var DocsPageType = Schema2.Literals([
206
206
  "reference",
207
207
  "runbook"
208
208
  ]).annotate({ identifier: "DocsPageType" });
209
+ var DocsDate = Schema2.String.pipe(Schema2.check(Schema2.makeFilter((date) => Number.isNaN(new Date(date).getTime()) ? "Expected a valid date" : undefined)));
209
210
  var DocsFrontmatter = Schema2.Struct({
210
211
  slug: Schema2.String,
211
212
  path: Schema2.String,
@@ -216,6 +217,8 @@ var DocsFrontmatter = Schema2.Struct({
216
217
  locale: Schema2.String,
217
218
  section: DocsSection,
218
219
  type: DocsPageType,
220
+ createdAt: Schema2.optional(DocsDate),
221
+ updatedAt: Schema2.optional(DocsDate),
219
222
  legacySlugs: Schema2.optional(Schema2.Array(Schema2.String))
220
223
  }).annotate({ identifier: "DocsFrontmatter" });
221
224
  var DocsHeadingSchema = Schema2.Struct({
@@ -15,6 +15,8 @@ export declare const DocsFrontmatter: Schema.Struct<{
15
15
  readonly locale: Schema.String;
16
16
  readonly section: Schema.String;
17
17
  readonly type: Schema.Literals<readonly ["concept", "tutorial", "how-to", "reference", "runbook"]>;
18
+ readonly createdAt: Schema.optional<Schema.String>;
19
+ readonly updatedAt: Schema.optional<Schema.String>;
18
20
  readonly legacySlugs: Schema.optional<Schema.$Array<Schema.String>>;
19
21
  }>;
20
22
  export declare const DocsHeadingSchema: Schema.Struct<{
@@ -33,6 +35,8 @@ export declare const DocsPageSchema: Schema.Struct<{
33
35
  readonly locale: Schema.String;
34
36
  readonly section: Schema.String;
35
37
  readonly type: Schema.Literals<readonly ["concept", "tutorial", "how-to", "reference", "runbook"]>;
38
+ readonly createdAt: Schema.optional<Schema.String>;
39
+ readonly updatedAt: Schema.optional<Schema.String>;
36
40
  readonly legacySlugs: Schema.optional<Schema.$Array<Schema.String>>;
37
41
  readonly headings: Schema.$Array<Schema.Struct<{
38
42
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -68,6 +72,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
68
72
  readonly locale: string;
69
73
  readonly section: string;
70
74
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
75
+ readonly createdAt?: string | undefined;
76
+ readonly updatedAt?: string | undefined;
71
77
  readonly legacySlugs?: readonly string[] | undefined;
72
78
  readonly headings: readonly Schema.Struct.ReadonlySide<{
73
79
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -88,6 +94,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
88
94
  readonly locale: string;
89
95
  readonly section: string;
90
96
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
97
+ readonly createdAt?: string | undefined;
98
+ readonly updatedAt?: string | undefined;
91
99
  readonly legacySlugs?: readonly string[] | undefined;
92
100
  readonly headings: readonly Schema.Struct.ReadonlySide<{
93
101
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -109,6 +117,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
109
117
  readonly locale: string;
110
118
  readonly section: string;
111
119
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
120
+ readonly createdAt?: string | undefined;
121
+ readonly updatedAt?: string | undefined;
112
122
  readonly legacySlugs?: readonly string[] | undefined;
113
123
  readonly headings: readonly Schema.Struct.ReadonlySide<{
114
124
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -129,6 +139,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
129
139
  readonly locale: string;
130
140
  readonly section: string;
131
141
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
142
+ readonly createdAt?: string | undefined;
143
+ readonly updatedAt?: string | undefined;
132
144
  readonly legacySlugs?: readonly string[] | undefined;
133
145
  readonly headings: readonly Schema.Struct.ReadonlySide<{
134
146
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -150,6 +162,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
150
162
  readonly locale: string;
151
163
  readonly section: string;
152
164
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
165
+ readonly createdAt?: string | undefined;
166
+ readonly updatedAt?: string | undefined;
153
167
  readonly legacySlugs?: readonly string[] | undefined;
154
168
  readonly headings: readonly Schema.Struct.ReadonlySide<{
155
169
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -170,6 +184,8 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
170
184
  readonly locale: string;
171
185
  readonly section: string;
172
186
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
187
+ readonly createdAt?: string | undefined;
188
+ readonly updatedAt?: string | undefined;
173
189
  readonly legacySlugs?: readonly string[] | undefined;
174
190
  readonly headings: readonly Schema.Struct.ReadonlySide<{
175
191
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -198,6 +214,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
198
214
  readonly locale: string;
199
215
  readonly section: string;
200
216
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
217
+ readonly createdAt?: string | undefined;
218
+ readonly updatedAt?: string | undefined;
201
219
  readonly legacySlugs?: readonly string[] | undefined;
202
220
  readonly headings: readonly Schema.Struct.ReadonlySide<{
203
221
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -218,6 +236,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
218
236
  readonly locale: string;
219
237
  readonly section: string;
220
238
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
239
+ readonly createdAt?: string | undefined;
240
+ readonly updatedAt?: string | undefined;
221
241
  readonly legacySlugs?: readonly string[] | undefined;
222
242
  readonly headings: readonly Schema.Struct.ReadonlySide<{
223
243
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -239,6 +259,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
239
259
  readonly locale: string;
240
260
  readonly section: string;
241
261
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
262
+ readonly createdAt?: string | undefined;
263
+ readonly updatedAt?: string | undefined;
242
264
  readonly legacySlugs?: readonly string[] | undefined;
243
265
  readonly headings: readonly Schema.Struct.ReadonlySide<{
244
266
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -259,6 +281,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
259
281
  readonly locale: string;
260
282
  readonly section: string;
261
283
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
284
+ readonly createdAt?: string | undefined;
285
+ readonly updatedAt?: string | undefined;
262
286
  readonly legacySlugs?: readonly string[] | undefined;
263
287
  readonly headings: readonly Schema.Struct.ReadonlySide<{
264
288
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -280,6 +304,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
280
304
  readonly locale: string;
281
305
  readonly section: string;
282
306
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
307
+ readonly createdAt?: string | undefined;
308
+ readonly updatedAt?: string | undefined;
283
309
  readonly legacySlugs?: readonly string[] | undefined;
284
310
  readonly headings: readonly Schema.Struct.ReadonlySide<{
285
311
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -300,6 +326,8 @@ export declare const createMdxDocsSource: (config: MdxDocsSourceConfig) => {
300
326
  readonly locale: string;
301
327
  readonly section: string;
302
328
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
329
+ readonly createdAt?: string | undefined;
330
+ readonly updatedAt?: string | undefined;
303
331
  readonly legacySlugs?: readonly string[] | undefined;
304
332
  readonly headings: readonly Schema.Struct.ReadonlySide<{
305
333
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -400,6 +428,8 @@ export declare const makeDocs: (config: DocsConfig) => {
400
428
  readonly locale: string;
401
429
  readonly section: string;
402
430
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
431
+ readonly createdAt?: string | undefined;
432
+ readonly updatedAt?: string | undefined;
403
433
  readonly legacySlugs?: readonly string[] | undefined;
404
434
  readonly headings: readonly Schema.Struct.ReadonlySide<{
405
435
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -420,6 +450,8 @@ export declare const makeDocs: (config: DocsConfig) => {
420
450
  readonly locale: string;
421
451
  readonly section: string;
422
452
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
453
+ readonly createdAt?: string | undefined;
454
+ readonly updatedAt?: string | undefined;
423
455
  readonly legacySlugs?: readonly string[] | undefined;
424
456
  readonly headings: readonly Schema.Struct.ReadonlySide<{
425
457
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -441,6 +473,8 @@ export declare const makeDocs: (config: DocsConfig) => {
441
473
  readonly locale: string;
442
474
  readonly section: string;
443
475
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
476
+ readonly createdAt?: string | undefined;
477
+ readonly updatedAt?: string | undefined;
444
478
  readonly legacySlugs?: readonly string[] | undefined;
445
479
  readonly headings: readonly Schema.Struct.ReadonlySide<{
446
480
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -461,6 +495,8 @@ export declare const makeDocs: (config: DocsConfig) => {
461
495
  readonly locale: string;
462
496
  readonly section: string;
463
497
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
498
+ readonly createdAt?: string | undefined;
499
+ readonly updatedAt?: string | undefined;
464
500
  readonly legacySlugs?: readonly string[] | undefined;
465
501
  readonly headings: readonly Schema.Struct.ReadonlySide<{
466
502
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -482,6 +518,8 @@ export declare const makeDocs: (config: DocsConfig) => {
482
518
  readonly locale: string;
483
519
  readonly section: string;
484
520
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
521
+ readonly createdAt?: string | undefined;
522
+ readonly updatedAt?: string | undefined;
485
523
  readonly legacySlugs?: readonly string[] | undefined;
486
524
  readonly headings: readonly Schema.Struct.ReadonlySide<{
487
525
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -502,6 +540,8 @@ export declare const makeDocs: (config: DocsConfig) => {
502
540
  readonly locale: string;
503
541
  readonly section: string;
504
542
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
543
+ readonly createdAt?: string | undefined;
544
+ readonly updatedAt?: string | undefined;
505
545
  readonly legacySlugs?: readonly string[] | undefined;
506
546
  readonly headings: readonly Schema.Struct.ReadonlySide<{
507
547
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -523,6 +563,8 @@ export declare const makeDocs: (config: DocsConfig) => {
523
563
  readonly locale: string;
524
564
  readonly section: string;
525
565
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
566
+ readonly createdAt?: string | undefined;
567
+ readonly updatedAt?: string | undefined;
526
568
  readonly legacySlugs?: readonly string[] | undefined;
527
569
  readonly headings: readonly Schema.Struct.ReadonlySide<{
528
570
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -544,6 +586,8 @@ export declare const makeDocs: (config: DocsConfig) => {
544
586
  readonly locale: string;
545
587
  readonly section: string;
546
588
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
589
+ readonly createdAt?: string | undefined;
590
+ readonly updatedAt?: string | undefined;
547
591
  readonly legacySlugs?: readonly string[] | undefined;
548
592
  readonly headings: readonly Schema.Struct.ReadonlySide<{
549
593
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -566,6 +610,8 @@ export declare const makeDocs: (config: DocsConfig) => {
566
610
  readonly locale: string;
567
611
  readonly section: string;
568
612
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
613
+ readonly createdAt?: string | undefined;
614
+ readonly updatedAt?: string | undefined;
569
615
  readonly legacySlugs?: readonly string[] | undefined;
570
616
  readonly headings: readonly Schema.Struct.ReadonlySide<{
571
617
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -586,6 +632,8 @@ export declare const makeDocs: (config: DocsConfig) => {
586
632
  readonly locale: string;
587
633
  readonly section: string;
588
634
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
635
+ readonly createdAt?: string | undefined;
636
+ readonly updatedAt?: string | undefined;
589
637
  readonly legacySlugs?: readonly string[] | undefined;
590
638
  readonly headings: readonly Schema.Struct.ReadonlySide<{
591
639
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -613,6 +661,8 @@ export declare const makeDocs: (config: DocsConfig) => {
613
661
  readonly locale: string;
614
662
  readonly section: string;
615
663
  readonly type: "concept" | "how-to" | "reference" | "runbook" | "tutorial";
664
+ readonly createdAt?: string | undefined;
665
+ readonly updatedAt?: string | undefined;
616
666
  readonly legacySlugs?: readonly string[] | undefined;
617
667
  readonly headings: readonly Schema.Struct.ReadonlySide<{
618
668
  readonly depth: Schema.Literals<readonly [2, 3]>;
@@ -650,6 +700,8 @@ export type DocsRouteMessages = {
650
700
  notFoundTitle: string;
651
701
  notFoundDescription: string;
652
702
  notFoundAction: string;
703
+ newLabel: string;
704
+ lastUpdated: (date: Date) => string;
653
705
  sectionLabel: (section: DocsSection) => string;
654
706
  pageTypeLabel: (type: DocsPageType) => string;
655
707
  };
@@ -982,6 +982,24 @@ var badgeVariants = cva2("group/badge inline-flex h-5 w-fit shrink-0 items-cente
982
982
  variant: "default"
983
983
  }
984
984
  });
985
+ function Badge({
986
+ className,
987
+ variant = "default",
988
+ render,
989
+ ...props
990
+ }) {
991
+ return useRender({
992
+ defaultTagName: "span",
993
+ props: mergeProps({
994
+ className: cn(badgeVariants({ variant }), className)
995
+ }, props),
996
+ render,
997
+ state: {
998
+ slot: "badge",
999
+ variant
1000
+ }
1001
+ });
1002
+ }
985
1003
 
986
1004
  // ../../src/components/ui/sidebar.tsx
987
1005
  import * as React2 from "react";
@@ -1542,7 +1560,12 @@ function AppSidebar({ footer, groups, header }) {
1542
1560
  /* @__PURE__ */ jsx13(item.icon, {}),
1543
1561
  /* @__PURE__ */ jsx13("span", {
1544
1562
  children: item.label()
1545
- })
1563
+ }),
1564
+ item.badge ? /* @__PURE__ */ jsx13(Badge, {
1565
+ className: "ml-auto",
1566
+ variant: "secondary",
1567
+ children: item.badge()
1568
+ }) : null
1546
1569
  ]
1547
1570
  })
1548
1571
  }, item.href);
@@ -1716,6 +1739,14 @@ var DocsPageType = Schema2.Literals([
1716
1739
  "reference",
1717
1740
  "runbook"
1718
1741
  ]).annotate({ identifier: "DocsPageType" });
1742
+ var DocsDate = Schema2.String.pipe(Schema2.check(Schema2.makeFilter((date) => Number.isNaN(new Date(date).getTime()) ? "Expected a valid date" : undefined)));
1743
+ var NEW_DOCS_PAGE_DAYS = 14;
1744
+ var isDocsPageNew = (createdAt, now = new Date) => {
1745
+ if (!createdAt)
1746
+ return false;
1747
+ const age = now.getTime() - new Date(createdAt).getTime();
1748
+ return age >= 0 && age < NEW_DOCS_PAGE_DAYS * 24 * 60 * 60 * 1000;
1749
+ };
1719
1750
  var DocsFrontmatter = Schema2.Struct({
1720
1751
  slug: Schema2.String,
1721
1752
  path: Schema2.String,
@@ -1726,6 +1757,8 @@ var DocsFrontmatter = Schema2.Struct({
1726
1757
  locale: Schema2.String,
1727
1758
  section: DocsSection,
1728
1759
  type: DocsPageType,
1760
+ createdAt: Schema2.optional(DocsDate),
1761
+ updatedAt: Schema2.optional(DocsDate),
1729
1762
  legacySlugs: Schema2.optional(Schema2.Array(Schema2.String))
1730
1763
  }).annotate({ identifier: "DocsFrontmatter" });
1731
1764
  var DocsHeadingSchema = Schema2.Struct({
@@ -1849,7 +1882,7 @@ var validateDocsPages = (pages, config) => {
1849
1882
  if (!localized) {
1850
1883
  throw new Error(`Missing ${locale} page for ${page.slug}`);
1851
1884
  }
1852
- if (page.path !== localized.path || page.order !== localized.order || page.section !== localized.section || page.type !== localized.type || page.icon !== localized.icon || JSON.stringify(page.legacySlugs ?? []) !== JSON.stringify(localized.legacySlugs ?? [])) {
1885
+ if (page.path !== localized.path || page.order !== localized.order || page.section !== localized.section || page.type !== localized.type || page.icon !== localized.icon || page.createdAt !== localized.createdAt || page.updatedAt !== localized.updatedAt || JSON.stringify(page.legacySlugs ?? []) !== JSON.stringify(localized.legacySlugs ?? [])) {
1853
1886
  throw new Error(`Metadata differs between ${baseLocale2} and ${locale} for ${page.slug}`);
1854
1887
  }
1855
1888
  }
@@ -2092,6 +2125,8 @@ var messages2 = {
2092
2125
  notFoundTitle: "Documentation page not found",
2093
2126
  notFoundDescription: "The requested documentation page does not exist or has moved.",
2094
2127
  notFoundAction: "Return to documentation",
2128
+ newLabel: "New",
2129
+ lastUpdated: (date) => `Last updated ${new Intl.DateTimeFormat("en", { dateStyle: "long" }).format(date)}`,
2095
2130
  sectionLabel: (section) => defaultSectionLabel("en", section),
2096
2131
  pageTypeLabel: (type) => docsPageTypeMessages.en[type]
2097
2132
  },
@@ -2118,6 +2153,8 @@ var messages2 = {
2118
2153
  notFoundTitle: "Page de documentation introuvable",
2119
2154
  notFoundDescription: "La page de documentation demandée n’existe pas ou a été déplacée.",
2120
2155
  notFoundAction: "Retourner à la documentation",
2156
+ newLabel: "Nouveau",
2157
+ lastUpdated: (date) => `Dernière mise à jour le ${new Intl.DateTimeFormat("fr", { dateStyle: "long" }).format(date)}`,
2121
2158
  sectionLabel: (section) => defaultSectionLabel("fr", section),
2122
2159
  pageTypeLabel: (type) => docsPageTypeMessages.fr[type]
2123
2160
  }
@@ -2390,7 +2427,8 @@ var DocsLayout = ({
2390
2427
  items: section.pages.map((item) => ({
2391
2428
  label: () => item.title,
2392
2429
  href: item.path,
2393
- icon: item.icon ? iconFor(item.icon) : EmptyIcon
2430
+ icon: item.icon ? iconFor(item.icon) : EmptyIcon,
2431
+ ...isDocsPageNew(item.createdAt) ? { badge: () => resolvedMessages.newLabel } : {}
2394
2432
  }))
2395
2433
  }));
2396
2434
  if (resources) {
@@ -2472,7 +2510,11 @@ var DocsHeader = ({ docs, resolution }) => {
2472
2510
  /* @__PURE__ */ jsx14("p", {
2473
2511
  className: "text-muted-foreground mt-3 max-w-2xl text-base leading-7",
2474
2512
  children: page.description
2475
- })
2513
+ }),
2514
+ page.updatedAt ? /* @__PURE__ */ jsx14("p", {
2515
+ className: "text-muted-foreground mt-3 text-sm",
2516
+ children: resolvedMessages.lastUpdated(new Date(page.updatedAt))
2517
+ }) : null
2476
2518
  ]
2477
2519
  });
2478
2520
  };
@@ -0,0 +1,70 @@
1
+ import { OutputFormat } from "@xberg-io/xberg";
2
+ import { Context, Effect, Layer } from "effect";
3
+ import { FileExtractionFailed } from "./schema.js";
4
+ export interface FileExtractionOptions {
5
+ readonly maxInputBytes: number;
6
+ readonly maxOutputBytes: number;
7
+ readonly maxConcurrentExtractions: number;
8
+ readonly timeoutSeconds: number;
9
+ }
10
+ export interface FileExtractionInput {
11
+ readonly bytes: Uint8Array;
12
+ readonly filename: string;
13
+ readonly mimeType: string;
14
+ }
15
+ export interface ExtractFileInput extends FileExtractionInput {
16
+ readonly outputFormat: OutputFormat;
17
+ }
18
+ export declare const defaultFileExtractionOptions: FileExtractionOptions;
19
+ declare const FileExtractionService_base: Context.ServiceClass<FileExtractionService, "FileExtractionService", {
20
+ extract: (args_0: ExtractFileInput) => Effect.Effect<{
21
+ content: string;
22
+ contentByteSize: number;
23
+ truncated: boolean;
24
+ }, FileExtractionFailed, never>;
25
+ markdown: (input: FileExtractionInput) => Effect.Effect<{
26
+ content: string;
27
+ contentByteSize: number;
28
+ truncated: boolean;
29
+ }, FileExtractionFailed, never>;
30
+ text: (input: FileExtractionInput) => Effect.Effect<{
31
+ content: string;
32
+ contentByteSize: number;
33
+ truncated: boolean;
34
+ }, FileExtractionFailed, never>;
35
+ html: (input: FileExtractionInput) => Effect.Effect<{
36
+ content: string;
37
+ contentByteSize: number;
38
+ truncated: boolean;
39
+ }, FileExtractionFailed, never>;
40
+ }> & {
41
+ readonly make: Effect.Effect<{
42
+ extract: (args_0: ExtractFileInput) => Effect.Effect<{
43
+ content: string;
44
+ contentByteSize: number;
45
+ truncated: boolean;
46
+ }, FileExtractionFailed, never>;
47
+ markdown: (input: FileExtractionInput) => Effect.Effect<{
48
+ content: string;
49
+ contentByteSize: number;
50
+ truncated: boolean;
51
+ }, FileExtractionFailed, never>;
52
+ text: (input: FileExtractionInput) => Effect.Effect<{
53
+ content: string;
54
+ contentByteSize: number;
55
+ truncated: boolean;
56
+ }, FileExtractionFailed, never>;
57
+ html: (input: FileExtractionInput) => Effect.Effect<{
58
+ content: string;
59
+ contentByteSize: number;
60
+ truncated: boolean;
61
+ }, FileExtractionFailed, never>;
62
+ }, never, never>;
63
+ };
64
+ export declare class FileExtractionService extends FileExtractionService_base {
65
+ static readonly layer: Layer.Layer<FileExtractionService, never, never>;
66
+ static readonly layerWith: (options: Partial<FileExtractionOptions>) => Layer.Layer<FileExtractionService, never, never>;
67
+ static readonly testLayer: (service: typeof this.Service) => Layer.Layer<FileExtractionService, never, never>;
68
+ }
69
+ export { FileExtractedTextSchema, FileExtractionFailed } from "./schema.js";
70
+ export { OutputFormat } from "@xberg-io/xberg";