blume 1.0.3 → 1.0.4
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 +29 -0
- package/dist/cli/index.js +441 -259
- package/dist/cli/index.js.map +12 -11
- package/dist/types/core/config-input.d.ts +27 -8
- package/dist/types/core/data.d.ts +12 -0
- package/dist/types/core/i18n-ui.d.ts +136 -136
- package/dist/types/core/schema.d.ts +420 -350
- package/dist/types/core/types.d.ts +10 -0
- package/dist/types/openapi/references.d.ts +12 -7
- package/docs/advanced/api-reference.mdx +11 -3
- package/docs/configuration/seo.mdx +20 -1
- package/docs/content/components.mdx +1 -2
- package/docs/content/navigation.mdx +10 -0
- package/docs/content/syntax.mdx +116 -4
- package/package.json +1 -1
- package/skills/blume-migrate/SKILL.md +170 -0
- package/skills/blume-migrate/assets/oxfmt@0.55.0.patch +20 -0
- package/skills/blume-migrate/references/docusaurus.md +95 -0
- package/skills/blume-migrate/references/fumadocs.md +95 -0
- package/skills/blume-migrate/references/mintlify.md +155 -0
- package/skills/blume-migrate/references/monorepo.md +224 -0
- package/skills/blume-migrate/references/nextra.md +76 -0
- package/skills/blume-migrate/references/starlight.md +116 -0
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +466 -0
- package/src/astro/component-slots.ts +3 -2
- package/src/astro/generate.ts +82 -23
- package/src/astro/templates.ts +93 -34
- package/src/components/content/Callout.astro +8 -2
- package/src/components/content/Prompt.astro +25 -13
- package/src/components/layout/Header.astro +4 -8
- package/src/components/layout/Logo.astro +13 -1
- package/src/components/layout/PageFeedback.astro +1 -1
- package/src/components/layout/PageLayout.astro +4 -8
- package/src/components/layout/Pagination.astro +6 -6
- package/src/components/layout/RootLayout.astro +4 -8
- package/src/components/layout/Search.astro +1 -1
- package/src/components/layout/nav-utils.ts +9 -7
- package/src/core/config-input.ts +29 -8
- package/src/core/data.ts +9 -1
- package/src/core/navigation.ts +55 -13
- package/src/core/schema.ts +17 -1
- package/src/core/sources/watch.ts +5 -0
- package/src/core/types.ts +10 -0
- package/src/markdown/index.ts +2 -0
- package/src/markdown/language-icon.ts +2 -1
- package/src/markdown/table-wrap.ts +43 -0
- package/src/og/card.ts +39 -12
- package/src/og/index.ts +1 -1
- package/src/og/logo.ts +21 -0
- package/src/openapi/references.ts +19 -16
- package/src/theme/entry.ts +50 -5
package/src/theme/entry.ts
CHANGED
|
@@ -16,6 +16,15 @@ interface TailwindEntryOptions {
|
|
|
16
16
|
const DARK_VARIANT = `/* Dark mode is driven by data-theme on the <html> element. */
|
|
17
17
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));`;
|
|
18
18
|
|
|
19
|
+
/** Keep browser-provided UI in sync with the active theme in both sheets. */
|
|
20
|
+
const COLOR_SCHEME_DEFAULTS = `:root {
|
|
21
|
+
color-scheme: light;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:root[data-theme="dark"] {
|
|
25
|
+
color-scheme: dark;
|
|
26
|
+
}`;
|
|
27
|
+
|
|
19
28
|
/**
|
|
20
29
|
* The default `--blume-*` design tokens (light + dark), shared by the app
|
|
21
30
|
* sheet and the isolated example-preview sheet so previews inherit the site's
|
|
@@ -141,6 +150,8 @@ ${options.sources.map((source) => `@source "${source}";`).join("\n")}
|
|
|
141
150
|
|
|
142
151
|
${DARK_VARIANT}
|
|
143
152
|
|
|
153
|
+
${COLOR_SCHEME_DEFAULTS}
|
|
154
|
+
|
|
144
155
|
${TOKEN_DEFAULTS}
|
|
145
156
|
|
|
146
157
|
${THEME_MAPPING}
|
|
@@ -386,13 +397,16 @@ blume-diff {
|
|
|
386
397
|
|
|
387
398
|
/* Language icon (simple-icons) sits at the header's left edge; the label shifts
|
|
388
399
|
right to make room. Injected at build time by the language-icon transformer.
|
|
389
|
-
|
|
390
|
-
|
|
400
|
+
The icon is gated on data-language (the header bar), not just data-icon: the
|
|
401
|
+
transformer runs whenever icons are on, but a header-less standalone
|
|
402
|
+
CodeBlock (no title) never gets data-language, so without this gate the
|
|
403
|
+
absolutely-positioned icon would overlap the first code line. Fenced code
|
|
404
|
+
and titled blocks always have a header, so the icon shows there. */
|
|
391
405
|
.blume-lang-icon {
|
|
392
406
|
display: none;
|
|
393
407
|
}
|
|
394
408
|
|
|
395
|
-
.prose > :where(pre[data-icon]) > .blume-lang-icon {
|
|
409
|
+
.prose > :where(pre[data-language][data-icon]) > .blume-lang-icon {
|
|
396
410
|
color: var(--blume-muted-foreground);
|
|
397
411
|
display: block;
|
|
398
412
|
height: 0.875rem;
|
|
@@ -402,7 +416,7 @@ blume-diff {
|
|
|
402
416
|
width: 0.875rem;
|
|
403
417
|
}
|
|
404
418
|
|
|
405
|
-
.prose > :where(pre[data-icon])::before {
|
|
419
|
+
.prose > :where(pre[data-language][data-icon])::before {
|
|
406
420
|
padding-left: 2.5rem;
|
|
407
421
|
}
|
|
408
422
|
|
|
@@ -453,11 +467,40 @@ blume-diff {
|
|
|
453
467
|
font-size: 0.8125rem;
|
|
454
468
|
}
|
|
455
469
|
|
|
470
|
+
/* Scroll wide tables in place; the wrapper is added by the blume:table-wrap hast
|
|
471
|
+
plugin. The border+radius frames the scroll viewport so a clipped wide table
|
|
472
|
+
reads as scrollable rather than cut off, and carries the table's vertical
|
|
473
|
+
rhythm (the inner table's own margin is zeroed so it fills the frame). */
|
|
474
|
+
.blume-table-scroll {
|
|
475
|
+
overflow-x: auto;
|
|
476
|
+
-webkit-overflow-scrolling: touch;
|
|
477
|
+
margin: 1.5rem 0;
|
|
478
|
+
border: 1px solid var(--blume-border);
|
|
479
|
+
border-radius: var(--blume-radius);
|
|
480
|
+
}
|
|
481
|
+
.blume-table-scroll > table {
|
|
482
|
+
margin: 0;
|
|
483
|
+
}
|
|
484
|
+
/* Restore inner padding on every cell. Typography zeroes the first/last cell's
|
|
485
|
+
inline padding so a borderless table aligns to the prose margin; inside the
|
|
486
|
+
framed wrapper that leaves edge text touching the border. The :is() selector
|
|
487
|
+
outweighs Typography's :where()-scoped rules so the outer columns get it too. */
|
|
488
|
+
.blume-table-scroll :is(th, td) {
|
|
489
|
+
padding: 0.5rem 0.75rem;
|
|
490
|
+
}
|
|
491
|
+
/* Keep column labels on one line so a two-word header does not wrap into a
|
|
492
|
+
ragged stack; the table just scrolls a little wider instead. Body cells keep
|
|
493
|
+
wrapping so a wide table stays a scroll away, not an endless horizontal run. */
|
|
494
|
+
.blume-table-scroll th {
|
|
495
|
+
white-space: nowrap;
|
|
496
|
+
}
|
|
497
|
+
|
|
456
498
|
/* GFM renders cells as <td><code> directly, which the descendant form alone
|
|
457
499
|
never matches (a cell is not its own descendant). */
|
|
458
500
|
.prose :where(td, th) > code,
|
|
459
501
|
.prose :where(td, th) :not(pre) > code {
|
|
460
|
-
|
|
502
|
+
overflow-wrap: break-word;
|
|
503
|
+
white-space: normal;
|
|
461
504
|
}
|
|
462
505
|
|
|
463
506
|
blume-tabs pre,
|
|
@@ -717,6 +760,8 @@ ${options.sources.map((source) => `@source "${source}";`).join("\n")}
|
|
|
717
760
|
|
|
718
761
|
${DARK_VARIANT}
|
|
719
762
|
|
|
763
|
+
${COLOR_SCHEME_DEFAULTS}
|
|
764
|
+
|
|
720
765
|
${TOKEN_DEFAULTS}
|
|
721
766
|
|
|
722
767
|
${THEME_MAPPING}
|