blume 1.6.2 → 1.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # blume
2
2
 
3
+ ## 1.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7d3fb47: Drop the strip of empty space above code blocks inside `<CodeGroup>`, `<Tabs>`, `<Steps>`, `<Callout>` and the other flush contexts. The 2.5rem top inset added to keep the copy button off a long first line read as a rendering bug over a one-line install command. A code switcher (a `<CodeGroup>`, a `ts2js` fence, code-only `<Tab>`s) now hosts a single copy button in its tab strip that copies whichever panel is showing, and every other bar-less block keeps the plain 1rem inset with enough end padding on the scrolling code that a long first line's tail clears the overlay button.
8
+
3
9
  ## 1.6.2
4
10
 
5
11
  ### Patch Changes
package/dist/cli/index.js CHANGED
@@ -20288,7 +20288,6 @@ var resolveSearchPopular = (popular, basePath) => popular.map(({ href, icon, lab
20288
20288
 
20289
20289
  // src/theme/code-block-padding.ts
20290
20290
  var CODE_PADDING_BLOCK_REM = 1;
20291
- var FLUSH_CODE_PADDING_TOP_REM = 2.5;
20292
20291
 
20293
20292
  // src/theme/entry.ts
20294
20293
  var DARK_VARIANT = `/* Dark mode is driven by data-theme on the <html> element. */
@@ -20864,27 +20863,19 @@ blume-tabs pre[data-language],
20864
20863
  padding-top: ${CODE_PADDING_BLOCK_REM}rem;
20865
20864
  }
20866
20865
 
20867
- /* Room for the copy button. The docs layout injects it into every \`.prose pre\`
20868
- absolutely positioned against the pre's border box, 1.875rem tall, at
20869
- \`top-2.5\` in the flush contexts above and \`top-2\` elsewhere and it is
20870
- unconditional, so wherever no language bar exists to hold it, it painted
20871
- over the first line of code: any line long enough to reach the button's
20872
- strip (a curl invocation, an install command, an import path) went under
20873
- it. Keyed on the attribute the docs layout stamps on <body>, so the strip
20874
- only appears where the injector runs (PageLayout pages run none), and on
20875
- \`.astro-code\` so the playground's response pre created after the
20876
- injector ran, never given a button keeps its plain inset. The first
20877
- selector is the injector's own flush predicate; the second covers the
20878
- remaining bar-less Shiki case, an untitled <CodeBlock> in plain prose, from
20879
- first paint. The third covers a raw \`<pre><code>\` written in prose — no
20880
- \`.astro-code\`, no language bar, but the injector gives it a button all
20881
- the same — keyed on that injected button, which is exactly what separates
20882
- it from the playground's pre. API panel blocks match, but their own
20883
- !important padding wins and they hide the injected button. */
20884
- [data-blume-code-copy] :is(blume-tabs, .not-prose) pre.astro-code,
20885
- [data-blume-code-copy] .prose pre.astro-code:not([data-language]),
20886
- [data-blume-code-copy] .prose pre:not([data-language]):has(> [data-blume-copy]) {
20887
- padding-top: ${FLUSH_CODE_PADDING_TOP_REM}rem;
20866
+ /* Where no language bar holds the copy button a flush block in tabs or a
20867
+ not-prose component, a bar-less block in prose the docs layout still pins
20868
+ one over the block's top-right corner, so a first line long enough to reach
20869
+ it would end underneath. A code switcher (CodeGroup, ts2js) hosts the button
20870
+ in its tab strip instead and needs nothing here; for every block that keeps
20871
+ an overlay button, give the scrolling code element enough end padding that
20872
+ the line's tail clears the button at the end of its scroll. Keyed on the
20873
+ injected button itself (which the playground's client-created response pre
20874
+ never gets), and \`.prose\`-scoped to outrank the base \`:where(pre code)\`
20875
+ inset. Not a vertical insetthat reserved a strip above every one-line
20876
+ command and read as a rendering bug. */
20877
+ .prose :is(blume-tabs pre, .not-prose pre, pre:not([data-language])):not(.twoslash, .twoslash pre, blume-panel-tabs *):has(> [data-blume-copy]) > code {
20878
+ padding-inline-end: 3.5rem;
20888
20879
  }
20889
20880
 
20890
20881
  blume-tabs pre[data-language]::before,
@@ -27377,5 +27368,5 @@ process.on("unhandledRejection", (error) => {
27377
27368
  });
27378
27369
  runMain(main, { rawArgs: normalizeHostArgs(process.argv.slice(2)) });
27379
27370
 
27380
- //# debugId=9AB8E5F1D71CCEF764756E2164756E21
27371
+ //# debugId=91C1BFDA6463CA2664756E2164756E21
27381
27372
  //# sourceMappingURL=index.js.map