@estiva-app/ui 0.64.0 → 0.65.0

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/dist/index.js CHANGED
@@ -2424,14 +2424,17 @@ function InlineChip({ tone = "neutral", icon, href, className, children, ...prop
2424
2424
  // src/codeColours.ts
2425
2425
  import { createElement } from "react";
2426
2426
  import { common, createLowlight } from "lowlight";
2427
- var lowlight = createLowlight(common);
2427
+ var instance;
2428
+ function lowlight() {
2429
+ return instance ??= createLowlight(common);
2430
+ }
2428
2431
  function draw(node, key) {
2429
2432
  if (node.type === "text") return node.value;
2430
2433
  return createElement("span", { key, className: node.properties?.className?.join(" ") }, (node.children ?? []).map(draw));
2431
2434
  }
2432
2435
  function codeColours(text, language) {
2433
- if (!language || !lowlight.registered(language)) return text;
2434
- return lowlight.highlight(language, text).children.map(draw);
2436
+ if (!language || !lowlight().registered(language)) return text;
2437
+ return lowlight().highlight(language, text).children.map(draw);
2435
2438
  }
2436
2439
 
2437
2440
  // src/RichText.tsx
@@ -2446,9 +2449,9 @@ var RICH_TEXT_CLASSES = {
2446
2449
  /* The line in the muted text grey, not the border grey: a border grey was 1.3 : 1 in Leaf (Katerina, 9 October). */
2447
2450
  // eslint-disable-next-line token-spacing/no-restricted-classes -- @estiva-escape: the quote line is Peek's, 3px, between the ramp's 2 and 4
2448
2451
  quote: "[&_blockquote>p]:m-0 [&_blockquote]:border-l-[3px] [&_blockquote]:border-text-muted [&_blockquote]:pl-2.5",
2449
- /* Code in a sentence is amber, its own colour (Katerina, 9 October: option I). */
2452
+ /* Code in a sentence: the code fill and a thin border, in the heading colour (Katerina, 9 October: option B; the amber of 0.64.0 was too much). */
2450
2453
  // eslint-disable-next-line token-values/no-restricted-classes -- @estiva-escape: code is 0.85 of the text around it, so it scales with a heading and with `small`; a named size is fixed
2451
- code: "[&_:not(pre)>code]:rounded-sm [&_:not(pre)>code]:bg-bg-code [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-text-code [&_code]:font-mono [&_code]:text-[0.85em] [&_code]:text-text-primary",
2454
+ code: "[&_:not(pre)>code]:rounded-sm [&_:not(pre)>code]:bg-bg-code [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:border [&_:not(pre)>code]:border-border-default [&_code]:font-mono [&_code]:text-[0.85em] [&_code]:text-text-primary",
2452
2455
  /* 12px either side, 10px above and below, looser lines than the text (Katerina, 9 October; 8px all round before). */
2453
2456
  // eslint-disable-next-line token-values/no-restricted-classes -- @estiva-escape: code is 0.85 of the text around it; the code inside the block is the block's own size, not 0.85 of it again
2454
2457
  codeBlock: "[&_pre>code]:text-[1em] [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:rounded-md [&_pre]:bg-bg-code [&_pre]:px-3 [&_pre]:py-2.5 [&_pre]:font-mono [&_pre]:text-[0.85em] [&_pre]:leading-relaxed [&_pre]:text-text-primary",