highsoft-ui 1.0.136 → 1.0.138

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.
Files changed (50) hide show
  1. package/CLAUDE.md +22 -0
  2. package/dist/{Button-CTdphXmG.js → Button-Dc8NFRWQ.js} +1 -1
  3. package/dist/{ButtonGroup-D5_sI3QL.js → ButtonGroup-CYmrw7gQ.js} +1 -1
  4. package/dist/{Checkbox-Yg8sUFcu.js → Checkbox-CErz7eBz.js} +1 -1
  5. package/dist/CodeBlock-DtYddgyU.js +3044 -0
  6. package/dist/{CookiePolicyModal-DGM4bMoR.js → CookiePolicyModal-DdXZ2d36.js} +2 -2
  7. package/dist/{CopyCode-DS-3fQBn.js → CopyCode-DH9Jh7PD.js} +2 -2
  8. package/dist/{Dropdown-CgbtoeLA.js → Dropdown-DbXr3sb-.js} +1 -1
  9. package/dist/{Footer-DSJzETEs.js → Footer-CcrBEAxZ.js} +7 -7
  10. package/dist/{FooterBottom-BHQ-77CT.js → FooterBottom-Dtttgp4F.js} +1 -1
  11. package/dist/{FooterHelp-B1zOPX-K.js → FooterHelp-CfoW8dhY.js} +1 -1
  12. package/dist/{FooterLinks-BxVVi8kz.js → FooterLinks-CSAfsyJP.js} +2 -2
  13. package/dist/{Header-4bkW4MNM.js → Header-Ga_hYsOa.js} +6 -6
  14. package/dist/{InputGrouped-RLCBTqtp.js → InputGrouped-CIokpRn5.js} +2 -2
  15. package/dist/{Label-gTAMwE0j.js → Label-BM4vL0vA.js} +1 -1
  16. package/dist/{NewsletterSignup-BawMuwkc.js → NewsletterSignup-Dw9YbhEh.js} +2 -2
  17. package/dist/{Notification-icY33paf.js → Notification-BgmhEw6w.js} +3 -3
  18. package/dist/{PrefPanel-0iwUb8OU.js → PrefPanel-BG4jW8wc.js} +2 -2
  19. package/dist/{RoadmapDetails-BPt5Ava0.js → RoadmapDetails-DXxJNZh9.js} +2 -2
  20. package/dist/{Search-CF_Qyaff.js → Search-CpJ2XTLG.js} +2 -2
  21. package/dist/{YoutubeModal-CiBt7a4G.js → YoutubeModal-DGj2INF0.js} +1 -1
  22. package/dist/components/Button/index.js +1 -1
  23. package/dist/components/ButtonGroup/index.js +1 -1
  24. package/dist/components/Checkbox/index.js +1 -1
  25. package/dist/components/CodeBlock/index.js +2 -0
  26. package/dist/components/CopyCode/index.js +1 -1
  27. package/dist/components/Dropdown/index.js +1 -1
  28. package/dist/components/Footer/CookiePolicyModal.js +1 -1
  29. package/dist/components/Footer/FooterBottom.js +1 -1
  30. package/dist/components/Footer/FooterHelp.js +1 -1
  31. package/dist/components/Footer/FooterLinks.js +1 -1
  32. package/dist/components/Footer/YoutubeModal.js +1 -1
  33. package/dist/components/Footer/index.js +1 -1
  34. package/dist/components/Header/index.js +1 -1
  35. package/dist/components/InputGrouped/index.js +1 -1
  36. package/dist/components/Label/index.js +1 -1
  37. package/dist/components/Modal/ModalContactFooter.js +2 -2
  38. package/dist/components/Modal/index.js +2 -2
  39. package/dist/components/NewsletterSignup/index.js +1 -1
  40. package/dist/components/Notification/index.js +1 -1
  41. package/dist/components/PrefPanel/index.js +1 -1
  42. package/dist/components/RoadmapDetails/index.js +1 -1
  43. package/dist/components/Search/index.js +1 -1
  44. package/dist/{esm-Co_Guu6S.js → esm-CDDjSK4f.js} +1 -1
  45. package/dist/highsoft-ui.css +1 -1
  46. package/dist/lib/components/CodeBlock/index.d.ts +48 -0
  47. package/dist/lib/main.d.ts +2 -0
  48. package/dist/main.js +31 -30
  49. package/dist/scss/variables.scss +22 -0
  50. package/package.json +4 -3
package/CLAUDE.md CHANGED
@@ -248,6 +248,28 @@ Pill-shaped inline code display with integrated copy button and success state.
248
248
  - **`children`:** `string` — the code text to display and copy
249
249
  - **`duration`:** ms for success state (default: 2000)
250
250
 
251
+ ### CodeBlock
252
+ Code viewer with syntax colors, a line-number gutter, diff lines and a copy button — all from plain `code`, no setup.
253
+ ```tsx
254
+ <CodeBlock lang="ts" code={source} />
255
+
256
+ // Added / removed lines — mark them with [!code ++] / [!code --]:
257
+ <CodeBlock lang="ts" code={`const a = 1 // [!code --]
258
+ const a = 2 // [!code ++]`} />
259
+
260
+ // Bring your own highlighter (Shiki etc.) for a custom theme / SSR:
261
+ <CodeBlock lang="ts" code={source} html={preHighlightedHtml} />
262
+ ```
263
+ - **`code`:** raw code (required). Lines ending with `// [!code ++]` / `// [!code --]` render as added (green) / removed (red); copy returns the resulting code with markers stripped and removed lines dropped.
264
+ - **`html`:** pre-highlighted HTML (e.g. Shiki) — overrides the built-in Prism highlighter; use for an exact theme or SSR.
265
+ - **`lang`:** `bash`, `js`, `ts`, `json`, `python`, `html`, `css`, `text`, … — drives the header icon/badge and the highlighter grammar.
266
+ - **`showLines`:** line-number gutter (default `true`).
267
+ - **`syntax`:** built-in Prism highlighting (default `true`); set `false` for plain, uncolored code.
268
+ - **`diff`:** parse `[!code ++]` / `[!code --]` markers (default `true`); set `false` to show code that literally contains those tokens.
269
+ - **`wrap`:** soft-wrap long lines (default `true`); set `false` for horizontal scrolling with a pinned line-number gutter.
270
+ - **`copyLabel`:** copy button label (default `'Copy code'`).
271
+ - Colors come from `--code-block-*` design tokens (light/dark automatic). Code renders in IBM Plex Mono — load `@fontsource/ibm-plex-mono` (or it falls back to the system monospace).
272
+
251
273
  ### Layout
252
274
  ```tsx
253
275
  <Header />
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-BWCAbrjV.js";
2
- import { C as t } from "./esm-Co_Guu6S.js";
2
+ import { C as t } from "./esm-CDDjSK4f.js";
3
3
  import { forwardRef as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  var a = {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-BWCAbrjV.js";
2
- import { t } from "./Button-CTdphXmG.js";
2
+ import { t } from "./Button-Dc8NFRWQ.js";
3
3
  import { useEffect as n, useState as r } from "react";
4
4
  import { jsx as i } from "react/jsx-runtime";
5
5
  var a = {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-BWCAbrjV.js";
2
- import { S as t } from "./esm-Co_Guu6S.js";
2
+ import { S as t } from "./esm-CDDjSK4f.js";
3
3
  import { createContext as n, useCallback as r, useContext as i, useEffect as a, useId as o, useRef as s, useState as c } from "react";
4
4
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
5
  var d = {