blume 1.1.2 → 1.1.3

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.
@@ -1,3 +1,4 @@
1
+ import type { ExampleLookup } from "../core/types.ts";
1
2
  /** Evaluated props plus whether any attribute resisted static evaluation. */
2
3
  interface EvaluatedProps {
3
4
  lossy: boolean;
@@ -27,6 +28,15 @@ export interface ComponentMarkdownContext extends EvaluatedProps {
27
28
  * fallback when the props can't be recovered statically).
28
29
  */
29
30
  export type ComponentMarkdown = (context: ComponentMarkdownContext) => string | null;
31
+ /**
32
+ * Build the `<Component>` serializer for a project's discovered examples. The
33
+ * live preview can't survive the trip to Markdown, so the agent-facing output
34
+ * carries the example's source — the same code the "Code" tab shows — as a
35
+ * fenced block. An unknown `path` (or a missing `path` prop) declines, leaving
36
+ * the JSX verbatim, mirroring the "no example found" note the component renders
37
+ * on the page.
38
+ */
39
+ export declare const exampleComponentSerializers: (examples: ExampleLookup) => Record<string, ComponentMarkdown>;
30
40
  /**
31
41
  * Downlevel supported components in an MDX source to plain Markdown. Sources
32
42
  * with no supported components — and sources Satteri can't parse as MDX, e.g.
@@ -765,6 +765,13 @@ export interface OpenApiConfig {
765
765
  renderer?: "blume" | "scalar";
766
766
  /** Where the reference mounts. Defaults to `/reference`. */
767
767
  route?: string;
768
+ /**
769
+ * Extra Scalar options forwarded verbatim to the embedded `<ScalarComponent>`
770
+ * (Scalar renderer only) — e.g. `localization`, `agent`,
771
+ * `hideTestRequestButton`, `orderSchemaPropertiesBy`. These win over Blume's
772
+ * derived spec/theme config, so it's a full escape hatch to Scalar's API.
773
+ */
774
+ scalar?: Record<string, unknown>;
768
775
  /** One or more specs; each renders on its own route by default. */
769
776
  sources?: OpenApiSource[];
770
777
  /** Shorthand for a single source: `sources: [{ spec }]`. */
@@ -782,6 +789,12 @@ export interface AsyncApiConfig {
782
789
  enabled?: boolean;
783
790
  /** Where the reference mounts. Defaults to `/events`. */
784
791
  route?: string;
792
+ /**
793
+ * Extra Scalar options forwarded verbatim to the embedded `<ScalarComponent>`.
794
+ * These win over Blume's derived spec/theme config — a full escape hatch to
795
+ * Scalar's API.
796
+ */
797
+ scalar?: Record<string, unknown>;
785
798
  /** One or more specs. */
786
799
  sources?: OpenApiSource[];
787
800
  /** Shorthand for a single source. */
@@ -857,6 +870,32 @@ export type LastModifiedConfig = boolean | {
857
870
  /** Where the date comes from. Defaults to `git`. */
858
871
  type?: "git" | "frontmatter";
859
872
  };
873
+ /**
874
+ * Date presentation for the "last updated" stamp and the changelog timeline —
875
+ * a curated pass-through to `Intl.DateTimeFormat`, shared by both surfaces.
876
+ * Defaults to `{ dateStyle: "long" }`. Dates render in UTC unless `timeZone` is
877
+ * set. `dateStyle` is a preset and can't be combined with the component fields.
878
+ */
879
+ export interface DateFormatConfig {
880
+ /** Preset date length; mutually exclusive with the component fields below. */
881
+ dateStyle?: "full" | "long" | "medium" | "short";
882
+ /** Weekday representation. */
883
+ weekday?: "long" | "short" | "narrow";
884
+ /** Era representation (e.g. the Japanese imperial era). */
885
+ era?: "long" | "short" | "narrow";
886
+ /** Year representation. */
887
+ year?: "numeric" | "2-digit";
888
+ /** Month representation. */
889
+ month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
890
+ /** Day representation. */
891
+ day?: "numeric" | "2-digit";
892
+ /** IANA time zone (e.g. `Asia/Tokyo`). Defaults to `UTC`. */
893
+ timeZone?: string;
894
+ /** Calendar system (e.g. `japanese`, `buddhist`). */
895
+ calendar?: string;
896
+ /** Numbering system (e.g. `latn`, `arab`). */
897
+ numberingSystem?: string;
898
+ }
860
899
  /**
861
900
  * On-page table of contents. `true`/`false` toggles it; the object form narrows
862
901
  * the heading range. Defaults to on, H2–H3.
@@ -893,6 +932,11 @@ export interface BlumeConfig {
893
932
  basePath?: string;
894
933
  /** Where content lives and how it's discovered. */
895
934
  content?: ContentConfig;
935
+ /**
936
+ * Date presentation for the "last updated" stamp and the changelog timeline.
937
+ * Pass-through `Intl.DateTimeFormat` options; defaults to `{ dateStyle: "long" }`.
938
+ */
939
+ dateFormat?: DateFormatConfig;
896
940
  /** Where and how the site deploys (site URL, adapter, output mode). */
897
941
  deployment?: DeploymentConfig;
898
942
  /** Default meta description, used where a page sets none. */
@@ -77,9 +77,9 @@ declare const uiStringsObject: z.ZodObject<{
77
77
  title: z.ZodDefault<z.ZodString>;
78
78
  you: z.ZodDefault<z.ZodString>;
79
79
  }, "strip", z.ZodTypeAny, {
80
- title: string;
81
80
  label: string;
82
81
  ai: string;
82
+ title: string;
83
83
  empty: string;
84
84
  error: string;
85
85
  placeholder: string;
@@ -90,9 +90,9 @@ declare const uiStringsObject: z.ZodObject<{
90
90
  tip: string;
91
91
  you: string;
92
92
  }, {
93
- title?: string | undefined;
94
93
  label?: string | undefined;
95
94
  ai?: string | undefined;
95
+ title?: string | undefined;
96
96
  empty?: string | undefined;
97
97
  error?: string | undefined;
98
98
  placeholder?: string | undefined;
@@ -115,12 +115,12 @@ declare const uiStringsObject: z.ZodObject<{
115
115
  showReleases: z.ZodDefault<z.ZodString>;
116
116
  title: z.ZodDefault<z.ZodString>;
117
117
  }, "strip", z.ZodTypeAny, {
118
- title: string;
119
118
  description: string;
119
+ title: string;
120
120
  showReleases: string;
121
121
  }, {
122
- title?: string | undefined;
123
122
  description?: string | undefined;
123
+ title?: string | undefined;
124
124
  showReleases?: string | undefined;
125
125
  }>>;
126
126
  content: z.ZodDefault<z.ZodObject<{
@@ -198,12 +198,12 @@ declare const uiStringsObject: z.ZodObject<{
198
198
  home: z.ZodDefault<z.ZodString>;
199
199
  title: z.ZodDefault<z.ZodString>;
200
200
  }, "strip", z.ZodTypeAny, {
201
- title: string;
202
201
  description: string;
202
+ title: string;
203
203
  home: string;
204
204
  }, {
205
- title?: string | undefined;
206
205
  description?: string | undefined;
206
+ title?: string | undefined;
207
207
  home?: string | undefined;
208
208
  }>>;
209
209
  page: z.ZodDefault<z.ZodObject<{
@@ -283,9 +283,9 @@ declare const uiStringsObject: z.ZodObject<{
283
283
  }>>;
284
284
  }, "strip", z.ZodTypeAny, {
285
285
  ask: {
286
- title: string;
287
286
  label: string;
288
287
  ai: string;
288
+ title: string;
289
289
  empty: string;
290
290
  error: string;
291
291
  placeholder: string;
@@ -333,8 +333,8 @@ declare const uiStringsObject: z.ZodObject<{
333
333
  results: string;
334
334
  };
335
335
  changelog: {
336
- title: string;
337
336
  description: string;
337
+ title: string;
338
338
  showReleases: string;
339
339
  };
340
340
  toc: {
@@ -377,15 +377,15 @@ declare const uiStringsObject: z.ZodObject<{
377
377
  toggleTheme: string;
378
378
  };
379
379
  notFound: {
380
- title: string;
381
380
  description: string;
381
+ title: string;
382
382
  home: string;
383
383
  };
384
384
  }, {
385
385
  ask?: {
386
- title?: string | undefined;
387
386
  label?: string | undefined;
388
387
  ai?: string | undefined;
388
+ title?: string | undefined;
389
389
  empty?: string | undefined;
390
390
  error?: string | undefined;
391
391
  placeholder?: string | undefined;
@@ -433,8 +433,8 @@ declare const uiStringsObject: z.ZodObject<{
433
433
  results?: string | undefined;
434
434
  } | undefined;
435
435
  changelog?: {
436
- title?: string | undefined;
437
436
  description?: string | undefined;
437
+ title?: string | undefined;
438
438
  showReleases?: string | undefined;
439
439
  } | undefined;
440
440
  toc?: {
@@ -477,8 +477,8 @@ declare const uiStringsObject: z.ZodObject<{
477
477
  toggleTheme?: string | undefined;
478
478
  } | undefined;
479
479
  notFound?: {
480
- title?: string | undefined;
481
480
  description?: string | undefined;
481
+ title?: string | undefined;
482
482
  home?: string | undefined;
483
483
  } | undefined;
484
484
  }>;
@@ -552,9 +552,9 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
552
552
  title: z.ZodDefault<z.ZodString>;
553
553
  you: z.ZodDefault<z.ZodString>;
554
554
  }, "strip", z.ZodTypeAny, {
555
- title: string;
556
555
  label: string;
557
556
  ai: string;
557
+ title: string;
558
558
  empty: string;
559
559
  error: string;
560
560
  placeholder: string;
@@ -565,9 +565,9 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
565
565
  tip: string;
566
566
  you: string;
567
567
  }, {
568
- title?: string | undefined;
569
568
  label?: string | undefined;
570
569
  ai?: string | undefined;
570
+ title?: string | undefined;
571
571
  empty?: string | undefined;
572
572
  error?: string | undefined;
573
573
  placeholder?: string | undefined;
@@ -590,12 +590,12 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
590
590
  showReleases: z.ZodDefault<z.ZodString>;
591
591
  title: z.ZodDefault<z.ZodString>;
592
592
  }, "strip", z.ZodTypeAny, {
593
- title: string;
594
593
  description: string;
594
+ title: string;
595
595
  showReleases: string;
596
596
  }, {
597
- title?: string | undefined;
598
597
  description?: string | undefined;
598
+ title?: string | undefined;
599
599
  showReleases?: string | undefined;
600
600
  }>>;
601
601
  content: z.ZodDefault<z.ZodObject<{
@@ -673,12 +673,12 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
673
673
  home: z.ZodDefault<z.ZodString>;
674
674
  title: z.ZodDefault<z.ZodString>;
675
675
  }, "strip", z.ZodTypeAny, {
676
- title: string;
677
676
  description: string;
677
+ title: string;
678
678
  home: string;
679
679
  }, {
680
- title?: string | undefined;
681
680
  description?: string | undefined;
681
+ title?: string | undefined;
682
682
  home?: string | undefined;
683
683
  }>>;
684
684
  page: z.ZodDefault<z.ZodObject<{
@@ -758,9 +758,9 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
758
758
  }>>;
759
759
  }, "strip", z.ZodTypeAny, {
760
760
  ask: {
761
- title: string;
762
761
  label: string;
763
762
  ai: string;
763
+ title: string;
764
764
  empty: string;
765
765
  error: string;
766
766
  placeholder: string;
@@ -808,8 +808,8 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
808
808
  results: string;
809
809
  };
810
810
  changelog: {
811
- title: string;
812
811
  description: string;
812
+ title: string;
813
813
  showReleases: string;
814
814
  };
815
815
  toc: {
@@ -852,15 +852,15 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
852
852
  toggleTheme: string;
853
853
  };
854
854
  notFound: {
855
- title: string;
856
855
  description: string;
856
+ title: string;
857
857
  home: string;
858
858
  };
859
859
  }, {
860
860
  ask?: {
861
- title?: string | undefined;
862
861
  label?: string | undefined;
863
862
  ai?: string | undefined;
863
+ title?: string | undefined;
864
864
  empty?: string | undefined;
865
865
  error?: string | undefined;
866
866
  placeholder?: string | undefined;
@@ -908,8 +908,8 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
908
908
  results?: string | undefined;
909
909
  } | undefined;
910
910
  changelog?: {
911
- title?: string | undefined;
912
911
  description?: string | undefined;
912
+ title?: string | undefined;
913
913
  showReleases?: string | undefined;
914
914
  } | undefined;
915
915
  toc?: {
@@ -952,8 +952,8 @@ export declare const uiStringsSchema: z.ZodDefault<z.ZodObject<{
952
952
  toggleTheme?: string | undefined;
953
953
  } | undefined;
954
954
  notFound?: {
955
- title?: string | undefined;
956
955
  description?: string | undefined;
956
+ title?: string | undefined;
957
957
  home?: string | undefined;
958
958
  } | undefined;
959
959
  }>>;