@imfusion/web-ui 0.5.1-dev.50.ga7a4f1c3 → 0.5.1-dev.51.gad24cd6e

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.
@@ -94,21 +94,24 @@ var O = {
94
94
  Inline: () => A,
95
95
  InlineLink: () => j
96
96
  });
97
- function A({ className: e, copyable: n = !1, highlighted: r, children: i, ...a }) {
98
- let { copied: o, copy: s } = D(), c = o ? T : E;
97
+ function A({ className: e, copyable: n = !1, children: r, ...i }) {
98
+ let { copied: a, copy: o } = D(), s = l(null), c = a ? T : E;
99
99
  return /* @__PURE__ */ f("code", {
100
- ...a,
100
+ ...i,
101
101
  "data-imf-ui-component": "Code.Inline",
102
102
  className: t(O.inline, e),
103
103
  children: [
104
- r ?? i,
104
+ /* @__PURE__ */ d("span", {
105
+ ref: s,
106
+ children: r
107
+ }),
105
108
  n && /* @__PURE__ */ d("span", { className: O.separator }),
106
109
  n && /* @__PURE__ */ d("button", {
107
110
  type: "button",
108
111
  className: O.inlineCopy,
109
- "data-copied": o || void 0,
110
- "aria-label": o ? "Copied" : "Copy",
111
- onClick: () => s(i),
112
+ "data-copied": a || void 0,
113
+ "aria-label": a ? "Copied" : "Copy",
114
+ onClick: () => o(s.current?.textContent ?? ""),
112
115
  children: /* @__PURE__ */ d(c, {
113
116
  size: 12,
114
117
  strokeWidth: 2,
@@ -145,8 +148,8 @@ function j({ className: e, kind: n = "external", children: r, ...i }) {
145
148
  });
146
149
  }
147
150
  j.displayName = "Code.InlineLink";
148
- function M({ className: e, language: n, hideCopy: r = !1, highlighted: i, children: a, ...o }) {
149
- let { copied: s, copy: c } = D(), l = s ? T : E;
151
+ function M({ className: e, language: n, hideCopy: r = !1, children: i, ...a }) {
152
+ let { copied: o, copy: s } = D(), c = l(null), u = o ? T : E;
150
153
  return /* @__PURE__ */ f("div", {
151
154
  "data-imf-ui-component": "Code.Block",
152
155
  className: t(O.block, e),
@@ -158,19 +161,22 @@ function M({ className: e, language: n, hideCopy: r = !1, highlighted: i, childr
158
161
  !r && /* @__PURE__ */ d("button", {
159
162
  type: "button",
160
163
  className: O.copy,
161
- "data-copied": s || void 0,
162
- "aria-label": s ? "Copied" : "Copy",
163
- onClick: () => c(a),
164
- children: /* @__PURE__ */ d(l, {
164
+ "data-copied": o || void 0,
165
+ "aria-label": o ? "Copied" : "Copy",
166
+ onClick: () => s(c.current?.textContent ?? ""),
167
+ children: /* @__PURE__ */ d(u, {
165
168
  size: 12,
166
169
  strokeWidth: 2,
167
170
  "aria-hidden": !0
168
171
  })
169
172
  }),
170
173
  /* @__PURE__ */ d("pre", {
171
- ...o,
174
+ ...a,
172
175
  className: O.pre,
173
- children: /* @__PURE__ */ d("code", { children: i ?? a })
176
+ children: /* @__PURE__ */ d("code", {
177
+ ref: c,
178
+ children: i
179
+ })
174
180
  })
175
181
  ]
176
182
  });
@@ -1,19 +1,15 @@
1
1
  type InlineProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
2
- /** The inline code, as a raw string — also the value copied when `copyable`. */
3
- children: string;
2
+ /** Code content shown in the chip. The copy button copies its rendered text. */
3
+ children: React.ReactNode;
4
4
  /** Show a small copy button on the right, behind a hairline separator. @default false */
5
5
  copyable?: boolean;
6
- /** Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot. */
7
- highlighted?: React.ReactNode;
8
6
  };
9
7
  /**
10
8
  * Code.Inline — an inline code fragment (a `<code>` chip) for use inside running
11
- * text. Dumb: styling only — syntax coloring arrives pre-rendered through the
12
- * `highlighted` slot (the code-highlight integration supplies it). `Typo.InlineCode`
13
- * renders this under the hood so inline-code chrome is defined in one place.
14
- * Children must be a string so an opted-in copy button has clean text to copy.
9
+ * text. `Typo.InlineCode` renders this under the hood so inline-code chrome is
10
+ * defined in one place. The copy button copies the rendered text.
15
11
  */
16
- export declare function Inline({ className, copyable, highlighted, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Inline({ className, copyable, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
17
13
  export declare namespace Inline {
18
14
  var displayName: string;
19
15
  }
@@ -36,24 +32,20 @@ export declare namespace InlineLink {
36
32
  var displayName: string;
37
33
  }
38
34
  type BlockProps = Omit<React.HTMLAttributes<HTMLPreElement>, "children"> & {
39
- /** The code to display, as a raw string — also the value copied by the copy button. */
40
- children: string;
35
+ /** Code content shown in the block. The copy button copies its rendered text. */
36
+ children: React.ReactNode;
41
37
  /** Language label shown in the corner notch. Omit to hide the notch. */
42
38
  language?: string;
43
39
  /** Hide the copy button. @default false */
44
40
  hideCopy?: boolean;
45
- /** Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot. */
46
- highlighted?: React.ReactNode;
47
41
  };
48
42
  /**
49
43
  * Code.Block — a fenced code block on a flat brand surface, with an optional
50
44
  * chamfered language notch (top-left) and a copy button (top-right). The
51
- * surface follows the global corner-radius token when a preset opts in.
52
- * Dumb: styling only — syntax coloring arrives pre-rendered through the
53
- * `highlighted` slot (the code-highlight integration supplies it). Children
54
- * must be a string so the copy button has clean text to copy.
45
+ * surface follows the global corner-radius token when a preset opts in. The
46
+ * copy button copies the rendered text.
55
47
  */
56
- export declare function Block({ className, language, hideCopy, highlighted, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function Block({ className, language, hideCopy, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
57
49
  export declare namespace Block {
58
50
  var displayName: string;
59
51
  }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as e, i as t, n, r, t as i } from "./meta-B8C51eyL.js";
2
2
  import { $ as a, $n as o, $t as s, A as c, An as l, At as u, B as d, Bn as f, Bt as p, Cn as m, Ct as h, D as g, Dn as _, Dt as v, E as y, En as b, Et as x, F as S, Fn as C, Ft as w, G as T, Gn as E, Gt as D, H as O, Hn as k, Ht as A, I as j, In as M, It as N, J as P, Jn as F, Jt as I, K as L, Kn as ee, Kt as te, L as ne, Ln as R, Lt as z, M as re, Mn as B, Mt as V, N as H, Nn as ie, Nt as ae, O as U, On as oe, Ot as se, P as ce, Pn as W, Pt as le, Q as ue, Qn as de, Qt as fe, R as G, Rn as pe, Rt as me, Sn as he, St as ge, T as _e, Tn as ve, Tt as ye, U as be, Un as xe, Ut as Se, V as Ce, Vn as we, Vt as Te, W as Ee, Wn as De, Wt as Oe, X as ke, Xn as Ae, Xt as je, Y as Me, Yn as Ne, Yt as Pe, Z as Fe, Zn as Ie, Zt as Le, _ as Re, _n as ze, _t as Be, an as Ve, ar as He, at as Ue, bn as We, bt as Ge, c as Ke, cn as qe, cr as Je, ct as Ye, d as Xe, dn as Ze, dr as Qe, dt as $e, en as et, er as tt, et as nt, f as rt, fn as it, fr as at, ft as ot, gn as st, gt as ct, hn as lt, ht as ut, in as dt, ir as ft, it as pt, j as mt, jn as ht, jt as K, k as gt, kn as _t, kt as vt, l as yt, ln as bt, lr as xt, lt as St, m as Ct, mn as wt, mr as Tt, mt as Et, nn as Dt, nr as Ot, nt as kt, on as At, or as jt, ot as Mt, p as Nt, pn as Pt, pr as Ft, pt as It, q as Lt, qn as q, qt as Rt, rn as zt, rr as Bt, rt as Vt, s as Ht, sn as Ut, sr as Wt, st as Gt, tn as J, tr as Kt, tt as qt, u as Jt, un as Yt, ur as Xt, ut as Zt, vn as Qt, vt as $t, wn as en, wt as tn, xn as nn, xt as rn, yn as an, yt as on, z as sn, zn as cn, zt as ln } from "./tabs-CVp_SgBl.js";
3
- import { a as un, c as dn, d as fn, l as pn, o as mn, r as hn, s as gn, t as _n, u as vn } from "./code-qBbqAHK-.js";
3
+ import { a as un, c as dn, d as fn, l as pn, o as mn, r as hn, s as gn, t as _n, u as vn } from "./code-B83kAmnS.js";
4
4
  import * as Y from "react";
5
5
  import { createContext as yn, useContext as bn, useEffect as xn, useLayoutEffect as Sn, useRef as Cn, useState as wn } from "react";
6
6
  import { Fragment as Tn, jsx as X, jsxs as En } from "react/jsx-runtime";
@@ -1,20 +1,22 @@
1
1
  import { Code } from '../../components/code';
2
2
  import { SupportedLanguage } from './highlighter';
3
- type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "highlighted" | "language"> & {
3
+ type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "children" | "language"> & {
4
4
  /** Language of `children`: grammar for tokenization and label for the corner notch. Omit to hide the notch and skip highlighting. */
5
+ children: string;
5
6
  language?: SupportedLanguage;
6
7
  };
7
- /** Code.Block — the core `Code.Block` with TanStack Highlight tokens filling its `highlighted` slot. */
8
- export declare function Block({ language, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
8
+ /** Code.Block — the core `Code.Block` with TanStack Highlight tokens rendered inside. */
9
+ export declare function Block({ language, children, ...props }: BlockProps): import('react').FunctionComponentElement<any>;
9
10
  export declare namespace Block {
10
11
  var displayName: string;
11
12
  }
12
- type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "highlighted"> & {
13
+ type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "children"> & {
13
14
  /** Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text. */
15
+ children: string;
14
16
  language?: SupportedLanguage;
15
17
  };
16
- /** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens filling its `highlighted` slot. */
17
- export declare function Inline({ language, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
18
+ /** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens rendered inside. */
19
+ export declare function Inline({ language, children, ...props }: InlineProps): import('react').FunctionComponentElement<any>;
18
20
  export declare namespace Inline {
19
21
  var displayName: string;
20
22
  }
@@ -1,17 +1,17 @@
1
1
  import { a as e, t } from "../meta-B8C51eyL.js";
2
- import { i as n, n as r, r as i } from "../code-qBbqAHK-.js";
3
- import { useMemo as a } from "react";
4
- import { jsx as o } from "react/jsx-runtime";
5
- import { createHighlighter as s, defineLanguage as c, renderNodesToHtml as l, renderTokens as u } from "@tanstack/highlight/core";
6
- import { css as d } from "@tanstack/highlight/languages/css";
7
- import { json as f } from "@tanstack/highlight/languages/json";
8
- import { plaintext as p } from "@tanstack/highlight/languages/plaintext";
9
- import { shell as m } from "@tanstack/highlight/languages/shell";
10
- import { ts as h } from "@tanstack/highlight/languages/ts";
11
- import { tsx as g } from "@tanstack/highlight/languages/tsx";
12
- import { python as _ } from "@tanstack/highlight/languages/python";
2
+ import { i as n, n as r, r as i } from "../code-B83kAmnS.js";
3
+ import { cloneElement as a, useMemo as o } from "react";
4
+ import { jsx as s } from "react/jsx-runtime";
5
+ import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
6
+ import { css as f } from "@tanstack/highlight/languages/css";
7
+ import { json as p } from "@tanstack/highlight/languages/json";
8
+ import { plaintext as m } from "@tanstack/highlight/languages/plaintext";
9
+ import { shell as h } from "@tanstack/highlight/languages/shell";
10
+ import { ts as g } from "@tanstack/highlight/languages/ts";
11
+ import { tsx as _ } from "@tanstack/highlight/languages/tsx";
12
+ import { python as v } from "@tanstack/highlight/languages/python";
13
13
  //#region src/integrations/code-highlight/language-patterns.ts
14
- function v(e, t, n = []) {
14
+ function y(e, t, n = []) {
15
15
  let r = [], i = new Uint8Array(e.length);
16
16
  for (let { start: e, end: t } of n) i.fill(1, e, t);
17
17
  for (let n of t) {
@@ -41,7 +41,7 @@ function v(e, t, n = []) {
41
41
  }
42
42
  //#endregion
43
43
  //#region src/integrations/code-highlight/languages/cmake.ts
44
- var y = [
44
+ var b = [
45
45
  {
46
46
  className: "string",
47
47
  regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
@@ -74,12 +74,12 @@ var y = [
74
74
  className: "operator",
75
75
  regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
76
76
  }
77
- ], b = c({
77
+ ], x = l({
78
78
  name: "cmake",
79
79
  tokenize(e) {
80
- return v(e, y);
80
+ return y(e, b);
81
81
  }
82
- }), x = [
82
+ }), S = [
83
83
  {
84
84
  className: "comment",
85
85
  regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
@@ -116,7 +116,7 @@ var y = [
116
116
  className: "operator",
117
117
  regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
118
118
  }
119
- ], S = c({
119
+ ], C = l({
120
120
  name: "cpp",
121
121
  aliases: [
122
122
  "c++",
@@ -125,19 +125,19 @@ var y = [
125
125
  "hpp"
126
126
  ],
127
127
  tokenize(e) {
128
- return v(e, x);
128
+ return y(e, S);
129
129
  }
130
- }), C = [{
130
+ }), w = [{
131
131
  className: "function",
132
132
  regex: /\b[A-Za-z_]\w*(?=\s*\()/g
133
- }], w = c({
133
+ }], T = l({
134
134
  name: "python",
135
135
  aliases: ["py"],
136
136
  tokenize(e, t) {
137
- let n = _.tokenize(e, t), r = v(e, C, n);
137
+ let n = v.tokenize(e, t), r = y(e, w, n);
138
138
  return [...n, ...r];
139
139
  }
140
- }), T = {
140
+ }), E = {
141
141
  tsx: { aliases: ["typescriptreact"] },
142
142
  ts: { aliases: ["typescript"] },
143
143
  css: { aliases: ["scss"] },
@@ -156,69 +156,67 @@ var y = [
156
156
  ] },
157
157
  python: { aliases: ["py"] },
158
158
  cmake: { aliases: [] }
159
- }, E = Object.keys(T), D = [...E, ...Object.values(T).flatMap(({ aliases: e }) => e)];
160
- function O(e) {
161
- return D.includes(e);
159
+ }, D = Object.keys(E), O = [...D, ...Object.values(E).flatMap(({ aliases: e }) => e)];
160
+ function k(e) {
161
+ return O.includes(e);
162
162
  }
163
- function k(e, t) {
163
+ function A(e, t) {
164
164
  return e.aliases.includes(t);
165
165
  }
166
- function A(e) {
167
- for (let [t, n] of Object.entries(T)) if (k(n, e)) return t;
166
+ function j(e) {
167
+ for (let [t, n] of Object.entries(E)) if (A(n, e)) return t;
168
168
  return e;
169
169
  }
170
- var j = s({
170
+ var M = c({
171
171
  languages: [
172
+ _,
172
173
  g,
173
- h,
174
- d,
175
- m,
176
174
  f,
177
- S,
178
- w,
179
- b,
180
- p
175
+ h,
176
+ p,
177
+ C,
178
+ T,
179
+ x,
180
+ m
181
181
  ],
182
182
  fallbackLanguage: "plaintext"
183
183
  });
184
- function M(e, t) {
185
- let n = A(t), { tokens: r } = j.tokenize(e, { lang: n });
186
- return l(u(r));
184
+ function N(e, t) {
185
+ let n = j(t), { tokens: r } = M.tokenize(e, { lang: n });
186
+ return u(d(r));
187
187
  }
188
188
  //#endregion
189
189
  //#region src/integrations/code-highlight/code-highlight.tsx
190
- var N = /* @__PURE__ */ e({
191
- Block: () => F,
192
- Inline: () => I,
190
+ var P = /* @__PURE__ */ e({
191
+ Block: () => I,
192
+ Inline: () => L,
193
193
  InlineLink: () => n
194
194
  });
195
- function P(e, t) {
196
- return a(() => {
197
- if (!(t == null || e === "")) return /* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: M(e, t) } });
195
+ function F(e, t) {
196
+ return o(() => {
197
+ if (!(t == null || e === "")) return /* @__PURE__ */ s("span", { dangerouslySetInnerHTML: { __html: N(e, t) } });
198
198
  }, [e, t]);
199
199
  }
200
- function F({ language: e, children: t, ...n }) {
201
- let i = P(t, e);
202
- return /* @__PURE__ */ o(r, {
200
+ function I({ language: e, children: t, ...n }) {
201
+ let i = F(t, e);
202
+ return a(/* @__PURE__ */ s(r, {
203
203
  ...n,
204
204
  language: e,
205
- highlighted: i,
206
205
  children: t
207
- });
206
+ }), { children: i ?? t });
208
207
  }
209
- F.displayName = "Code.Block";
210
- function I({ language: e, children: t, ...n }) {
211
- let r = P(t, e);
212
- return /* @__PURE__ */ o(i, {
208
+ I.displayName = "Code.Block";
209
+ function L({ language: e, children: t, ...n }) {
210
+ let r = F(t, e);
211
+ return a(/* @__PURE__ */ s(i, {
213
212
  ...n,
214
- highlighted: r,
215
213
  children: t
216
- });
214
+ }), { children: r ?? t });
217
215
  }
218
- I.displayName = "Code.Inline";
216
+ L.displayName = "Code.Inline";
219
217
  //#endregion
220
218
  //#region src/integrations/code-highlight/code-highlight.meta.ts
221
- var L = {
219
+ var R = {
222
220
  name: "CodeHighlight",
223
221
  category: t.display,
224
222
  status: "experimental",
@@ -234,4 +232,4 @@ var L = {
234
232
  }
235
233
  };
236
234
  //#endregion
237
- export { N as Code, E as SUPPORTED_LANGUAGES, L as codeHighlightMeta, O as isSupportedLanguage };
235
+ export { P as Code, D as SUPPORTED_LANGUAGES, R as codeHighlightMeta, k as isSupportedLanguage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.5.1-dev.50.ga7a4f1c3",
3
+ "version": "0.5.1-dev.51.gad24cd6e",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "license": "UNLICENSED",
@@ -491,14 +491,14 @@
491
491
  "subComponents": [
492
492
  {
493
493
  "name": "Code.Block",
494
- "description": "Code.Block — a fenced code block on a flat brand surface, with an optional\nchamfered language notch (top-left) and a copy button (top-right). The\nsurface follows the global corner-radius token when a preset opts in.\nDumb: styling only — syntax coloring arrives pre-rendered through the\n`highlighted` slot (the code-highlight integration supplies it). Children\nmust be a string so the copy button has clean text to copy.",
494
+ "description": "Code.Block — a fenced code block on a flat brand surface, with an optional\nchamfered language notch (top-left) and a copy button (top-right). The\nsurface follows the global corner-radius token when a preset opts in. The\ncopy button copies the rendered text.",
495
495
  "props": [
496
496
  {
497
497
  "name": "children",
498
498
  "required": true,
499
- "type": "string",
499
+ "type": "ReactNode",
500
500
  "defaultValue": null,
501
- "description": "The code to display, as a raw string — also the value copied by the copy button."
501
+ "description": "Code content shown in the block. The copy button copies its rendered text."
502
502
  },
503
503
  {
504
504
  "name": "hideCopy",
@@ -507,13 +507,6 @@
507
507
  "defaultValue": "false",
508
508
  "description": "Hide the copy button."
509
509
  },
510
- {
511
- "name": "highlighted",
512
- "required": false,
513
- "type": "ReactNode",
514
- "defaultValue": null,
515
- "description": "Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot."
516
- },
517
510
  {
518
511
  "name": "language",
519
512
  "required": false,
@@ -525,14 +518,14 @@
525
518
  },
526
519
  {
527
520
  "name": "Code.Inline",
528
- "description": "Code.Inline — an inline code fragment (a `<code>` chip) for use inside running\ntext. Dumb: styling only — syntax coloring arrives pre-rendered through the\n`highlighted` slot (the code-highlight integration supplies it). `Typo.InlineCode`\nrenders this under the hood so inline-code chrome is defined in one place.\nChildren must be a string so an opted-in copy button has clean text to copy.",
521
+ "description": "Code.Inline — an inline code fragment (a `<code>` chip) for use inside running\ntext. `Typo.InlineCode` renders this under the hood so inline-code chrome is\ndefined in one place. The copy button copies the rendered text.",
529
522
  "props": [
530
523
  {
531
524
  "name": "children",
532
525
  "required": true,
533
- "type": "string",
526
+ "type": "ReactNode",
534
527
  "defaultValue": null,
535
- "description": "The inline code, as a raw string — also the value copied when `copyable`."
528
+ "description": "Code content shown in the chip. The copy button copies its rendered text."
536
529
  },
537
530
  {
538
531
  "name": "copyable",
@@ -540,13 +533,6 @@
540
533
  "type": "boolean",
541
534
  "defaultValue": "false",
542
535
  "description": "Show a small copy button on the right, behind a hairline separator."
543
- },
544
- {
545
- "name": "highlighted",
546
- "required": false,
547
- "type": "ReactNode",
548
- "defaultValue": null,
549
- "description": "Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot."
550
536
  }
551
537
  ]
552
538
  },
@@ -4771,9 +4757,9 @@
4771
4757
  {
4772
4758
  "name": "children",
4773
4759
  "required": true,
4774
- "type": "string",
4760
+ "type": "ReactNode",
4775
4761
  "defaultValue": null,
4776
- "description": "The inline code, as a raw string — also the value copied when `copyable`."
4762
+ "description": "Code content shown in the chip. The copy button copies its rendered text."
4777
4763
  },
4778
4764
  {
4779
4765
  "name": "copyable",
@@ -4781,13 +4767,6 @@
4781
4767
  "type": "boolean",
4782
4768
  "defaultValue": "false",
4783
4769
  "description": "Show a small copy button on the right, behind a hairline separator."
4784
- },
4785
- {
4786
- "name": "highlighted",
4787
- "required": false,
4788
- "type": "ReactNode",
4789
- "defaultValue": null,
4790
- "description": "Pre-rendered display content (e.g. syntax-highlighted tokens) shown in place of `children`, which stays the copied value. The code-highlight integration fills this slot."
4791
4770
  }
4792
4771
  ]
4793
4772
  },
@@ -4915,14 +4894,14 @@
4915
4894
  "subComponents": [
4916
4895
  {
4917
4896
  "name": "CodeHighlight.Block",
4918
- "description": "Code.Block — the core `Code.Block` with TanStack Highlight tokens filling its `highlighted` slot.",
4897
+ "description": "Code.Block — the core `Code.Block` with TanStack Highlight tokens rendered inside.",
4919
4898
  "props": [
4920
4899
  {
4921
4900
  "name": "children",
4922
4901
  "required": true,
4923
4902
  "type": "string",
4924
4903
  "defaultValue": null,
4925
- "description": "The code to display, as a raw string — also the value copied by the copy button."
4904
+ "description": "Language of `children`: grammar for tokenization and label for the corner notch. Omit to hide the notch and skip highlighting."
4926
4905
  },
4927
4906
  {
4928
4907
  "name": "hideCopy",
@@ -4936,20 +4915,20 @@
4936
4915
  "required": false,
4937
4916
  "type": "SupportedLanguage",
4938
4917
  "defaultValue": null,
4939
- "description": "Language of `children`: grammar for tokenization and label for the corner notch. Omit to hide the notch and skip highlighting."
4918
+ "description": ""
4940
4919
  }
4941
4920
  ]
4942
4921
  },
4943
4922
  {
4944
4923
  "name": "CodeHighlight.Inline",
4945
- "description": "Code.Inline — the core `Code.Inline` with TanStack Highlight tokens filling its `highlighted` slot.",
4924
+ "description": "Code.Inline — the core `Code.Inline` with TanStack Highlight tokens rendered inside.",
4946
4925
  "props": [
4947
4926
  {
4948
4927
  "name": "children",
4949
4928
  "required": true,
4950
4929
  "type": "string",
4951
4930
  "defaultValue": null,
4952
- "description": "The inline code, as a raw string — also the value copied when `copyable`."
4931
+ "description": "Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text."
4953
4932
  },
4954
4933
  {
4955
4934
  "name": "copyable",
@@ -4963,7 +4942,7 @@
4963
4942
  "required": false,
4964
4943
  "type": "SupportedLanguage",
4965
4944
  "defaultValue": null,
4966
- "description": "Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text."
4945
+ "description": ""
4967
4946
  }
4968
4947
  ]
4969
4948
  },