@openpkg-ts/doc-generator 0.2.3 → 0.3.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.
@@ -331,8 +331,8 @@ var require_utils = __commonJS((exports) => {
331
331
  const origin = getLocationOrigin();
332
332
  return href.substring(origin.length);
333
333
  }
334
- function getDisplayName(Component) {
335
- return typeof Component === "string" ? Component : Component.displayName || Component.name || "Unknown";
334
+ function getDisplayName(Component2) {
335
+ return typeof Component2 === "string" ? Component2 : Component2.displayName || Component2.name || "Unknown";
336
336
  }
337
337
  function isResSent(res) {
338
338
  return res.finished || res.headersSent;
@@ -613,15 +613,15 @@ var require_sorted_routes = __commonJS((exports) => {
613
613
  routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
614
614
  }
615
615
  if (!this.placeholder) {
616
- const r2 = prefix === "/" ? "/" : prefix.slice(0, -1);
616
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
617
617
  if (this.optionalRestSlugName != null) {
618
- throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r2}" and "${r2}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
618
+ throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
619
619
  value: "E458",
620
620
  enumerable: false,
621
621
  configurable: true
622
622
  });
623
623
  }
624
- routes.unshift(r2);
624
+ routes.unshift(r);
625
625
  }
626
626
  if (this.restSlugName !== null) {
627
627
  routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
@@ -1079,28 +1079,28 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1079
1079
  n.pathToRegexp = n.tokensToRegexp = n.regexpToFunction = n.match = n.tokensToFunction = n.compile = n.parse = undefined;
1080
1080
  function lexer(e2) {
1081
1081
  var n2 = [];
1082
- var r2 = 0;
1083
- while (r2 < e2.length) {
1084
- var t = e2[r2];
1082
+ var r = 0;
1083
+ while (r < e2.length) {
1084
+ var t = e2[r];
1085
1085
  if (t === "*" || t === "+" || t === "?") {
1086
- n2.push({ type: "MODIFIER", index: r2, value: e2[r2++] });
1086
+ n2.push({ type: "MODIFIER", index: r, value: e2[r++] });
1087
1087
  continue;
1088
1088
  }
1089
1089
  if (t === "\\") {
1090
- n2.push({ type: "ESCAPED_CHAR", index: r2++, value: e2[r2++] });
1090
+ n2.push({ type: "ESCAPED_CHAR", index: r++, value: e2[r++] });
1091
1091
  continue;
1092
1092
  }
1093
1093
  if (t === "{") {
1094
- n2.push({ type: "OPEN", index: r2, value: e2[r2++] });
1094
+ n2.push({ type: "OPEN", index: r, value: e2[r++] });
1095
1095
  continue;
1096
1096
  }
1097
1097
  if (t === "}") {
1098
- n2.push({ type: "CLOSE", index: r2, value: e2[r2++] });
1098
+ n2.push({ type: "CLOSE", index: r, value: e2[r++] });
1099
1099
  continue;
1100
1100
  }
1101
1101
  if (t === ":") {
1102
1102
  var a = "";
1103
- var i = r2 + 1;
1103
+ var i = r + 1;
1104
1104
  while (i < e2.length) {
1105
1105
  var o = e2.charCodeAt(i);
1106
1106
  if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
@@ -1110,15 +1110,15 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1110
1110
  break;
1111
1111
  }
1112
1112
  if (!a)
1113
- throw new TypeError("Missing parameter name at ".concat(r2));
1114
- n2.push({ type: "NAME", index: r2, value: a });
1115
- r2 = i;
1113
+ throw new TypeError("Missing parameter name at ".concat(r));
1114
+ n2.push({ type: "NAME", index: r, value: a });
1115
+ r = i;
1116
1116
  continue;
1117
1117
  }
1118
1118
  if (t === "(") {
1119
1119
  var c = 1;
1120
1120
  var f = "";
1121
- var i = r2 + 1;
1121
+ var i = r + 1;
1122
1122
  if (e2[i] === "?") {
1123
1123
  throw new TypeError('Pattern cannot start with "?" at '.concat(i));
1124
1124
  }
@@ -1142,37 +1142,37 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1142
1142
  f += e2[i++];
1143
1143
  }
1144
1144
  if (c)
1145
- throw new TypeError("Unbalanced pattern at ".concat(r2));
1145
+ throw new TypeError("Unbalanced pattern at ".concat(r));
1146
1146
  if (!f)
1147
- throw new TypeError("Missing pattern at ".concat(r2));
1148
- n2.push({ type: "PATTERN", index: r2, value: f });
1149
- r2 = i;
1147
+ throw new TypeError("Missing pattern at ".concat(r));
1148
+ n2.push({ type: "PATTERN", index: r, value: f });
1149
+ r = i;
1150
1150
  continue;
1151
1151
  }
1152
- n2.push({ type: "CHAR", index: r2, value: e2[r2++] });
1152
+ n2.push({ type: "CHAR", index: r, value: e2[r++] });
1153
1153
  }
1154
- n2.push({ type: "END", index: r2, value: "" });
1154
+ n2.push({ type: "END", index: r, value: "" });
1155
1155
  return n2;
1156
1156
  }
1157
1157
  function parse(e2, n2) {
1158
1158
  if (n2 === undefined) {
1159
1159
  n2 = {};
1160
1160
  }
1161
- var r2 = lexer(e2);
1161
+ var r = lexer(e2);
1162
1162
  var t = n2.prefixes, a = t === undefined ? "./" : t, i = n2.delimiter, o = i === undefined ? "/#?" : i;
1163
1163
  var c = [];
1164
1164
  var f = 0;
1165
1165
  var u = 0;
1166
1166
  var p = "";
1167
1167
  var tryConsume = function(e3) {
1168
- if (u < r2.length && r2[u].type === e3)
1169
- return r2[u++].value;
1168
+ if (u < r.length && r[u].type === e3)
1169
+ return r[u++].value;
1170
1170
  };
1171
1171
  var mustConsume = function(e3) {
1172
1172
  var n3 = tryConsume(e3);
1173
1173
  if (n3 !== undefined)
1174
1174
  return n3;
1175
- var t2 = r2[u], a2 = t2.type, i2 = t2.index;
1175
+ var t2 = r[u], a2 = t2.type, i2 = t2.index;
1176
1176
  throw new TypeError("Unexpected ".concat(a2, " at ").concat(i2, ", expected ").concat(e3));
1177
1177
  };
1178
1178
  var consumeText = function() {
@@ -1184,8 +1184,8 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1184
1184
  return e3;
1185
1185
  };
1186
1186
  var isSafe = function(e3) {
1187
- for (var n3 = 0, r3 = o;n3 < r3.length; n3++) {
1188
- var t2 = r3[n3];
1187
+ for (var n3 = 0, r2 = o;n3 < r2.length; n3++) {
1188
+ var t2 = r2[n3];
1189
1189
  if (e3.indexOf(t2) > -1)
1190
1190
  return true;
1191
1191
  }
@@ -1193,15 +1193,15 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1193
1193
  };
1194
1194
  var safePattern = function(e3) {
1195
1195
  var n3 = c[c.length - 1];
1196
- var r3 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1197
- if (n3 && !r3) {
1196
+ var r2 = e3 || (n3 && typeof n3 === "string" ? n3 : "");
1197
+ if (n3 && !r2) {
1198
1198
  throw new TypeError('Must have text between two parameters, missing text after "'.concat(n3.name, '"'));
1199
1199
  }
1200
- if (!r3 || isSafe(r3))
1200
+ if (!r2 || isSafe(r2))
1201
1201
  return "[^".concat(escapeString(o), "]+?");
1202
- return "(?:(?!".concat(escapeString(r3), ")[^").concat(escapeString(o), "])+?");
1202
+ return "(?:(?!".concat(escapeString(r2), ")[^").concat(escapeString(o), "])+?");
1203
1203
  };
1204
- while (u < r2.length) {
1204
+ while (u < r.length) {
1205
1205
  var v = tryConsume("CHAR");
1206
1206
  var s = tryConsume("NAME");
1207
1207
  var d = tryConsume("PATTERN");
@@ -1250,21 +1250,21 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1250
1250
  if (n2 === undefined) {
1251
1251
  n2 = {};
1252
1252
  }
1253
- var r2 = flags(n2);
1253
+ var r = flags(n2);
1254
1254
  var t = n2.encode, a = t === undefined ? function(e3) {
1255
1255
  return e3;
1256
1256
  } : t, i = n2.validate, o = i === undefined ? true : i;
1257
1257
  var c = e2.map(function(e3) {
1258
1258
  if (typeof e3 === "object") {
1259
- return new RegExp("^(?:".concat(e3.pattern, ")$"), r2);
1259
+ return new RegExp("^(?:".concat(e3.pattern, ")$"), r);
1260
1260
  }
1261
1261
  });
1262
1262
  return function(n3) {
1263
- var r3 = "";
1263
+ var r2 = "";
1264
1264
  for (var t2 = 0;t2 < e2.length; t2++) {
1265
1265
  var i2 = e2[t2];
1266
1266
  if (typeof i2 === "string") {
1267
- r3 += i2;
1267
+ r2 += i2;
1268
1268
  continue;
1269
1269
  }
1270
1270
  var f = n3 ? n3[i2.name] : undefined;
@@ -1284,7 +1284,7 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1284
1284
  if (o && !c[t2].test(s)) {
1285
1285
  throw new TypeError('Expected all "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1286
1286
  }
1287
- r3 += i2.prefix + s + i2.suffix;
1287
+ r2 += i2.prefix + s + i2.suffix;
1288
1288
  }
1289
1289
  continue;
1290
1290
  }
@@ -1293,7 +1293,7 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1293
1293
  if (o && !c[t2].test(s)) {
1294
1294
  throw new TypeError('Expected "'.concat(i2.name, '" to match "').concat(i2.pattern, '", but got "').concat(s, '"'));
1295
1295
  }
1296
- r3 += i2.prefix + s + i2.suffix;
1296
+ r2 += i2.prefix + s + i2.suffix;
1297
1297
  continue;
1298
1298
  }
1299
1299
  if (u)
@@ -1301,25 +1301,25 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1301
1301
  var d = p ? "an array" : "a string";
1302
1302
  throw new TypeError('Expected "'.concat(i2.name, '" to be ').concat(d));
1303
1303
  }
1304
- return r3;
1304
+ return r2;
1305
1305
  };
1306
1306
  }
1307
1307
  n.tokensToFunction = tokensToFunction;
1308
1308
  function match(e2, n2) {
1309
- var r2 = [];
1310
- var t = pathToRegexp(e2, r2, n2);
1311
- return regexpToFunction(t, r2, n2);
1309
+ var r = [];
1310
+ var t = pathToRegexp(e2, r, n2);
1311
+ return regexpToFunction(t, r, n2);
1312
1312
  }
1313
1313
  n.match = match;
1314
- function regexpToFunction(e2, n2, r2) {
1315
- if (r2 === undefined) {
1316
- r2 = {};
1314
+ function regexpToFunction(e2, n2, r) {
1315
+ if (r === undefined) {
1316
+ r = {};
1317
1317
  }
1318
- var t = r2.decode, a = t === undefined ? function(e3) {
1318
+ var t = r.decode, a = t === undefined ? function(e3) {
1319
1319
  return e3;
1320
1320
  } : t;
1321
- return function(r3) {
1322
- var t2 = e2.exec(r3);
1321
+ return function(r2) {
1322
+ var t2 = e2.exec(r2);
1323
1323
  if (!t2)
1324
1324
  return false;
1325
1325
  var i = t2[0], o = t2.index;
@@ -1327,13 +1327,13 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1327
1327
  var _loop_1 = function(e3) {
1328
1328
  if (t2[e3] === undefined)
1329
1329
  return "continue";
1330
- var r4 = n2[e3 - 1];
1331
- if (r4.modifier === "*" || r4.modifier === "+") {
1332
- c[r4.name] = t2[e3].split(r4.prefix + r4.suffix).map(function(e4) {
1333
- return a(e4, r4);
1330
+ var r3 = n2[e3 - 1];
1331
+ if (r3.modifier === "*" || r3.modifier === "+") {
1332
+ c[r3.name] = t2[e3].split(r3.prefix + r3.suffix).map(function(e4) {
1333
+ return a(e4, r3);
1334
1334
  });
1335
1335
  } else {
1336
- c[r4.name] = a(t2[e3], r4);
1336
+ c[r3.name] = a(t2[e3], r3);
1337
1337
  }
1338
1338
  };
1339
1339
  for (var f = 1;f < t2.length; f++) {
@@ -1352,31 +1352,31 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1352
1352
  function regexpToRegexp(e2, n2) {
1353
1353
  if (!n2)
1354
1354
  return e2;
1355
- var r2 = /\((?:\?<(.*?)>)?(?!\?)/g;
1355
+ var r = /\((?:\?<(.*?)>)?(?!\?)/g;
1356
1356
  var t = 0;
1357
- var a = r2.exec(e2.source);
1357
+ var a = r.exec(e2.source);
1358
1358
  while (a) {
1359
1359
  n2.push({ name: a[1] || t++, prefix: "", suffix: "", modifier: "", pattern: "" });
1360
- a = r2.exec(e2.source);
1360
+ a = r.exec(e2.source);
1361
1361
  }
1362
1362
  return e2;
1363
1363
  }
1364
- function arrayToRegexp(e2, n2, r2) {
1364
+ function arrayToRegexp(e2, n2, r) {
1365
1365
  var t = e2.map(function(e3) {
1366
- return pathToRegexp(e3, n2, r2).source;
1366
+ return pathToRegexp(e3, n2, r).source;
1367
1367
  });
1368
- return new RegExp("(?:".concat(t.join("|"), ")"), flags(r2));
1368
+ return new RegExp("(?:".concat(t.join("|"), ")"), flags(r));
1369
1369
  }
1370
- function stringToRegexp(e2, n2, r2) {
1371
- return tokensToRegexp(parse(e2, r2), n2, r2);
1370
+ function stringToRegexp(e2, n2, r) {
1371
+ return tokensToRegexp(parse(e2, r), n2, r);
1372
1372
  }
1373
- function tokensToRegexp(e2, n2, r2) {
1374
- if (r2 === undefined) {
1375
- r2 = {};
1373
+ function tokensToRegexp(e2, n2, r) {
1374
+ if (r === undefined) {
1375
+ r = {};
1376
1376
  }
1377
- var t = r2.strict, a = t === undefined ? false : t, i = r2.start, o = i === undefined ? true : i, c = r2.end, f = c === undefined ? true : c, u = r2.encode, p = u === undefined ? function(e3) {
1377
+ var t = r.strict, a = t === undefined ? false : t, i = r.start, o = i === undefined ? true : i, c = r.end, f = c === undefined ? true : c, u = r.encode, p = u === undefined ? function(e3) {
1378
1378
  return e3;
1379
- } : u, v = r2.delimiter, s = v === undefined ? "/#?" : v, d = r2.endsWith, g = d === undefined ? "" : d;
1379
+ } : u, v = r.delimiter, s = v === undefined ? "/#?" : v, d = r.endsWith, g = d === undefined ? "" : d;
1380
1380
  var x = "[".concat(escapeString(g), "]|$");
1381
1381
  var h = "[".concat(escapeString(s), "]");
1382
1382
  var l = o ? "^" : "";
@@ -1411,7 +1411,7 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1411
1411
  if (f) {
1412
1412
  if (!a)
1413
1413
  l += "".concat(h, "?");
1414
- l += !r2.endsWith ? "$" : "(?=".concat(x, ")");
1414
+ l += !r.endsWith ? "$" : "(?=".concat(x, ")");
1415
1415
  } else {
1416
1416
  var A = e2[e2.length - 1];
1417
1417
  var _ = typeof A === "string" ? h.indexOf(A[A.length - 1]) > -1 : A === undefined;
@@ -1422,15 +1422,15 @@ var require_path_to_regexp = __commonJS((exports, module) => {
1422
1422
  l += "(?=".concat(h, "|").concat(x, ")");
1423
1423
  }
1424
1424
  }
1425
- return new RegExp(l, flags(r2));
1425
+ return new RegExp(l, flags(r));
1426
1426
  }
1427
1427
  n.tokensToRegexp = tokensToRegexp;
1428
- function pathToRegexp(e2, n2, r2) {
1428
+ function pathToRegexp(e2, n2, r) {
1429
1429
  if (e2 instanceof RegExp)
1430
1430
  return regexpToRegexp(e2, n2);
1431
1431
  if (Array.isArray(e2))
1432
- return arrayToRegexp(e2, n2, r2);
1433
- return stringToRegexp(e2, n2, r2);
1432
+ return arrayToRegexp(e2, n2, r);
1433
+ return stringToRegexp(e2, n2, r);
1434
1434
  }
1435
1435
  n.pathToRegexp = pathToRegexp;
1436
1436
  })();
@@ -3267,7 +3267,7 @@ var require_link = __commonJS((exports, module) => {
3267
3267
  }
3268
3268
  return (0, _formaturl.formatUrl)(urlObjOrString);
3269
3269
  }
3270
- var Link = /* @__PURE__ */ _react3.default.forwardRef(function LinkComponent(props, forwardedRef) {
3270
+ var Link3 = /* @__PURE__ */ _react3.default.forwardRef(function LinkComponent(props, forwardedRef) {
3271
3271
  let children;
3272
3272
  const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
3273
3273
  children = childrenProp;
@@ -3421,7 +3421,7 @@ var require_link = __commonJS((exports, module) => {
3421
3421
  var useLinkStatus = () => {
3422
3422
  return (0, _react3.useContext)(LinkStatusContext);
3423
3423
  };
3424
- var _default = Link;
3424
+ var _default = Link3;
3425
3425
  if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
3426
3426
  Object.defineProperty(exports.default, "__esModule", { value: true });
3427
3427
  Object.assign(exports.default, exports);
@@ -4197,1772 +4197,48 @@ function TypeTable({
4197
4197
  ]
4198
4198
  });
4199
4199
  }
4200
- // src/components/styled/ClassPage.tsx
4201
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
4202
-
4203
- function PropertyItem({ member }) {
4204
- const visibility = member.visibility ?? "public";
4205
- const flags = member.flags;
4206
- const isStatic = flags?.static;
4207
- const isReadonly = flags?.readonly;
4208
- const type = formatSchema(member.schema);
4209
- return /* @__PURE__ */ jsxs7("div", {
4210
- className: "py-3 border-b border-border last:border-0",
4211
- children: [
4212
- /* @__PURE__ */ jsxs7("div", {
4213
- className: "flex items-baseline gap-2 flex-wrap",
4214
- children: [
4215
- /* @__PURE__ */ jsxs7("span", {
4216
- className: "font-semibold text-foreground",
4217
- children: [
4218
- member.name,
4219
- ":"
4220
- ]
4221
- }),
4222
- /* @__PURE__ */ jsx8("span", {
4223
- className: "text-muted-foreground font-mono text-sm",
4224
- children: type
4225
- }),
4226
- visibility !== "public" && /* @__PURE__ */ jsx8("span", {
4227
- className: "text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground",
4228
- children: visibility
4229
- }),
4230
- isStatic && /* @__PURE__ */ jsx8("span", {
4231
- className: "text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 dark:text-blue-400",
4232
- children: "static"
4233
- }),
4234
- isReadonly && /* @__PURE__ */ jsx8("span", {
4235
- className: "text-xs px-1.5 py-0.5 rounded bg-purple-500/10 text-purple-600 dark:text-purple-400",
4236
- children: "readonly"
4237
- })
4238
- ]
4239
- }),
4240
- member.description && /* @__PURE__ */ jsx8("p", {
4241
- className: "text-sm text-muted-foreground mt-1",
4242
- children: member.description
4243
- })
4244
- ]
4245
- });
4246
- }
4247
- function ClassPage({ export: exp, spec, renderExample }) {
4248
- const hasExamples = exp.examples && exp.examples.length > 0;
4249
- const constructors = exp.members?.filter((m) => m.kind === "constructor") ?? [];
4250
- const properties = exp.members?.filter((m) => m.kind === "property" || m.kind === "field") ?? [];
4251
- const methods = exp.members?.filter((m) => m.kind === "method") ?? [];
4252
- const constructorSig = constructors[0]?.signatures?.[0];
4253
- const constructorParams = constructorSig?.parameters ?? [];
4254
- const exampleCode = hasExamples ? typeof exp.examples[0] === "string" ? exp.examples[0] : exp.examples[0].code : "";
4255
- return /* @__PURE__ */ jsxs7("div", {
4256
- className: "space-y-8",
4257
- children: [
4258
- exp.description && /* @__PURE__ */ jsx8("p", {
4259
- className: "text-muted-foreground text-lg leading-relaxed",
4260
- children: exp.description
4261
- }),
4262
- /* @__PURE__ */ jsx8("div", {
4263
- className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
4264
- children: /* @__PURE__ */ jsxs7("code", {
4265
- className: "font-mono text-sm text-foreground whitespace-pre",
4266
- children: [
4267
- "class ",
4268
- exp.name,
4269
- exp.extends ? ` extends ${exp.extends}` : "",
4270
- exp.implements?.length ? ` implements ${exp.implements.join(", ")}` : ""
4271
- ]
4272
- })
4273
- }),
4274
- /* @__PURE__ */ jsxs7("div", {
4275
- className: `grid gap-8 ${hasExamples ? "lg:grid-cols-2" : "grid-cols-1"}`,
4276
- children: [
4277
- /* @__PURE__ */ jsxs7("div", {
4278
- className: "space-y-8",
4279
- children: [
4280
- constructorParams.length > 0 && /* @__PURE__ */ jsxs7("section", {
4281
- children: [
4282
- /* @__PURE__ */ jsx8("h3", {
4283
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
4284
- children: "Constructor"
4285
- }),
4286
- /* @__PURE__ */ jsx8("div", {
4287
- className: "ml-2 border-l-2 border-border pl-4",
4288
- children: constructorParams.map((param, index) => /* @__PURE__ */ jsx8(ExpandableProperty, {
4289
- param
4290
- }, param.name ?? index))
4291
- })
4292
- ]
4293
- }),
4294
- methods.length > 0 && /* @__PURE__ */ jsxs7("section", {
4295
- children: [
4296
- /* @__PURE__ */ jsx8("h3", {
4297
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
4298
- children: "Methods"
4299
- }),
4300
- /* @__PURE__ */ jsx8("div", {
4301
- className: "rounded-lg border border-border overflow-hidden",
4302
- children: methods.map((member, index) => /* @__PURE__ */ jsx8(CollapsibleMethod, {
4303
- member,
4304
- defaultExpanded: index === 0
4305
- }, member.name ?? index))
4306
- })
4307
- ]
4308
- }),
4309
- properties.length > 0 && /* @__PURE__ */ jsxs7("section", {
4310
- children: [
4311
- /* @__PURE__ */ jsx8("h3", {
4312
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
4313
- children: "Properties"
4314
- }),
4315
- /* @__PURE__ */ jsx8("div", {
4316
- className: "rounded-lg border border-border bg-card px-4",
4317
- children: properties.map((member, index) => /* @__PURE__ */ jsx8(PropertyItem, {
4318
- member
4319
- }, member.name ?? index))
4320
- })
4321
- ]
4322
- })
4323
- ]
4324
- }),
4325
- hasExamples && /* @__PURE__ */ jsxs7("div", {
4326
- className: "lg:sticky lg:top-20 lg:self-start",
4327
- children: [
4328
- /* @__PURE__ */ jsx8("h3", {
4329
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
4330
- children: "Example"
4331
- }),
4332
- renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx8("pre", {
4333
- className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
4334
- children: /* @__PURE__ */ jsx8("code", {
4335
- className: "font-mono text-sm text-foreground",
4336
- children: exampleCode
4337
- })
4338
- })
4339
- ]
4340
- })
4341
- ]
4342
- })
4343
- ]
4344
- });
4345
- }
4346
-
4347
- // src/components/styled/EnumPage.tsx
4348
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
4200
+ // src/components/styled/index.ts
4201
+ import { CodeTabs as CodeTabs4, ImportSection as ImportSection4 } from "@doccov/ui/api";
4349
4202
 
4350
- function EnumPage({ export: exp, spec, renderExample }) {
4351
- const members = exp.members ?? [];
4352
- const hasExamples = exp.examples && exp.examples.length > 0;
4353
- const signature = buildSignatureString(exp);
4354
- return /* @__PURE__ */ jsxs8("div", {
4355
- className: "space-y-6",
4356
- children: [
4357
- exp.description && /* @__PURE__ */ jsx9("p", {
4358
- className: "text-muted-foreground text-base leading-relaxed",
4359
- children: exp.description
4360
- }),
4361
- /* @__PURE__ */ jsxs8("section", {
4362
- children: [
4363
- /* @__PURE__ */ jsx9("h2", {
4364
- className: "text-xl font-semibold mb-2",
4365
- children: "Declaration"
4366
- }),
4367
- /* @__PURE__ */ jsx9("div", {
4368
- className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
4369
- children: /* @__PURE__ */ jsx9("code", {
4370
- className: "font-mono text-sm text-foreground",
4371
- children: signature
4372
- })
4373
- }),
4374
- exp.deprecated && /* @__PURE__ */ jsxs8("div", {
4375
- className: "mt-2 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
4376
- children: [
4377
- /* @__PURE__ */ jsx9("strong", {
4378
- children: "Deprecated:"
4379
- }),
4380
- " This export is deprecated."
4381
- ]
4382
- })
4383
- ]
4384
- }),
4385
- members.length > 0 && /* @__PURE__ */ jsxs8("section", {
4386
- children: [
4387
- /* @__PURE__ */ jsx9("h2", {
4388
- className: "text-xl font-semibold mb-2",
4389
- children: "Members"
4390
- }),
4391
- /* @__PURE__ */ jsx9("div", {
4392
- className: "overflow-x-auto",
4393
- children: /* @__PURE__ */ jsxs8("table", {
4394
- className: "w-full text-sm border-collapse",
4395
- children: [
4396
- /* @__PURE__ */ jsx9("thead", {
4397
- children: /* @__PURE__ */ jsxs8("tr", {
4398
- className: "border-b border-border",
4399
- children: [
4400
- /* @__PURE__ */ jsx9("th", {
4401
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
4402
- children: "Name"
4403
- }),
4404
- /* @__PURE__ */ jsx9("th", {
4405
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
4406
- children: "Value"
4407
- }),
4408
- /* @__PURE__ */ jsx9("th", {
4409
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
4410
- children: "Description"
4411
- })
4412
- ]
4413
- })
4414
- }),
4415
- /* @__PURE__ */ jsx9("tbody", {
4416
- children: members.map((member, index) => {
4417
- const value = member.schema !== undefined ? typeof member.schema === "object" && member.schema !== null ? member.schema.const ?? member.schema.default ?? "-" : member.schema : "-";
4418
- return /* @__PURE__ */ jsxs8("tr", {
4419
- className: "border-b border-border last:border-0",
4420
- children: [
4421
- /* @__PURE__ */ jsx9("td", {
4422
- className: "py-2 px-3 align-top",
4423
- children: /* @__PURE__ */ jsx9("code", {
4424
- className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
4425
- children: member.name
4426
- })
4427
- }),
4428
- /* @__PURE__ */ jsx9("td", {
4429
- className: "py-2 px-3 align-top",
4430
- children: /* @__PURE__ */ jsx9("code", {
4431
- className: "font-mono text-xs text-muted-foreground",
4432
- children: String(value)
4433
- })
4434
- }),
4435
- /* @__PURE__ */ jsx9("td", {
4436
- className: "py-2 px-3 align-top text-muted-foreground",
4437
- children: member.description ?? ""
4438
- })
4439
- ]
4440
- }, member.name ?? index);
4441
- })
4442
- })
4443
- ]
4444
- })
4445
- })
4446
- ]
4447
- }),
4448
- hasExamples && /* @__PURE__ */ jsxs8("section", {
4449
- children: [
4450
- /* @__PURE__ */ jsx9("h2", {
4451
- className: "text-xl font-semibold mb-2",
4452
- children: "Examples"
4453
- }),
4454
- exp.examples.map((example, index) => {
4455
- const code = typeof example === "string" ? example : example.code;
4456
- return /* @__PURE__ */ jsx9("div", {
4457
- className: "mb-4",
4458
- children: renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx9("pre", {
4459
- className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
4460
- children: /* @__PURE__ */ jsx9("code", {
4461
- className: "font-mono text-sm text-foreground",
4462
- children: code
4463
- })
4464
- })
4465
- }, index);
4466
- })
4467
- ]
4468
- })
4469
- ]
4470
- });
4471
- }
4203
+ // src/components/styled/ClassPage.tsx
4204
+ import { cn as cn2 } from "@doccov/ui/lib/utils";
4205
+ import { CodeTabs, ImportSection } from "@doccov/ui/api";
4472
4206
 
4473
- // ../../node_modules/clsx/dist/clsx.mjs
4474
- function r(e) {
4475
- var t, f, n = "";
4476
- if (typeof e == "string" || typeof e == "number")
4477
- n += e;
4478
- else if (typeof e == "object")
4479
- if (Array.isArray(e)) {
4480
- var o = e.length;
4481
- for (t = 0;t < o; t++)
4482
- e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
4483
- } else
4484
- for (f in e)
4485
- e[f] && (n && (n += " "), n += f);
4486
- return n;
4487
- }
4488
- function clsx() {
4489
- for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
4490
- (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
4491
- return n;
4492
- }
4207
+ // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
4208
+ import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
4493
4209
 
4494
- // ../ui/node_modules/tailwind-merge/dist/bundle-mjs.mjs
4495
- var CLASS_PART_SEPARATOR = "-";
4496
- var createClassGroupUtils = (config) => {
4497
- const classMap = createClassMap(config);
4498
- const {
4499
- conflictingClassGroups,
4500
- conflictingClassGroupModifiers
4501
- } = config;
4502
- const getClassGroupId = (className) => {
4503
- const classParts = className.split(CLASS_PART_SEPARATOR);
4504
- if (classParts[0] === "" && classParts.length !== 1) {
4505
- classParts.shift();
4506
- }
4507
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
4508
- };
4509
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
4510
- const conflicts = conflictingClassGroups[classGroupId] || [];
4511
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
4512
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
4513
- }
4514
- return conflicts;
4515
- };
4516
- return {
4517
- getClassGroupId,
4518
- getConflictingClassGroupIds
4519
- };
4520
- };
4521
- var getGroupRecursive = (classParts, classPartObject) => {
4522
- if (classParts.length === 0) {
4523
- return classPartObject.classGroupId;
4524
- }
4525
- const currentClassPart = classParts[0];
4526
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
4527
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
4528
- if (classGroupFromNextClassPart) {
4529
- return classGroupFromNextClassPart;
4530
- }
4531
- if (classPartObject.validators.length === 0) {
4532
- return;
4533
- }
4534
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
4535
- return classPartObject.validators.find(({
4536
- validator
4537
- }) => validator(classRest))?.classGroupId;
4210
+ // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
4211
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
4212
+ var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
4213
+ var toPascalCase = (string) => {
4214
+ const camelCase = toCamelCase(string);
4215
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
4538
4216
  };
4539
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
4540
- var getGroupIdForArbitraryProperty = (className) => {
4541
- if (arbitraryPropertyRegex.test(className)) {
4542
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
4543
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
4544
- if (property) {
4545
- return "arbitrary.." + property;
4217
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
4218
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
4219
+ }).join(" ").trim();
4220
+ var hasA11yProp = (props) => {
4221
+ for (const prop in props) {
4222
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
4223
+ return true;
4546
4224
  }
4547
4225
  }
4548
4226
  };
4549
- var createClassMap = (config) => {
4550
- const {
4551
- theme,
4552
- prefix
4553
- } = config;
4554
- const classMap = {
4555
- nextPart: new Map,
4556
- validators: []
4557
- };
4558
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
4559
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
4560
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
4561
- });
4562
- return classMap;
4563
- };
4564
- var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
4565
- classGroup.forEach((classDefinition) => {
4566
- if (typeof classDefinition === "string") {
4567
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4568
- classPartObjectToEdit.classGroupId = classGroupId;
4569
- return;
4570
- }
4571
- if (typeof classDefinition === "function") {
4572
- if (isThemeGetter(classDefinition)) {
4573
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4574
- return;
4575
- }
4576
- classPartObject.validators.push({
4577
- validator: classDefinition,
4578
- classGroupId
4579
- });
4580
- return;
4581
- }
4582
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
4583
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
4584
- });
4585
- });
4586
- };
4587
- var getPart = (classPartObject, path) => {
4588
- let currentClassPartObject = classPartObject;
4589
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
4590
- if (!currentClassPartObject.nextPart.has(pathPart)) {
4591
- currentClassPartObject.nextPart.set(pathPart, {
4592
- nextPart: new Map,
4593
- validators: []
4594
- });
4595
- }
4596
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
4597
- });
4598
- return currentClassPartObject;
4599
- };
4600
- var isThemeGetter = (func) => func.isThemeGetter;
4601
- var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
4602
- if (!prefix) {
4603
- return classGroupEntries;
4604
- }
4605
- return classGroupEntries.map(([classGroupId, classGroup]) => {
4606
- const prefixedClassGroup = classGroup.map((classDefinition) => {
4607
- if (typeof classDefinition === "string") {
4608
- return prefix + classDefinition;
4609
- }
4610
- if (typeof classDefinition === "object") {
4611
- return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
4612
- }
4613
- return classDefinition;
4614
- });
4615
- return [classGroupId, prefixedClassGroup];
4616
- });
4617
- };
4618
- var createLruCache = (maxCacheSize) => {
4619
- if (maxCacheSize < 1) {
4620
- return {
4621
- get: () => {
4622
- return;
4623
- },
4624
- set: () => {}
4625
- };
4626
- }
4627
- let cacheSize = 0;
4628
- let cache = new Map;
4629
- let previousCache = new Map;
4630
- const update = (key, value) => {
4631
- cache.set(key, value);
4632
- cacheSize++;
4633
- if (cacheSize > maxCacheSize) {
4634
- cacheSize = 0;
4635
- previousCache = cache;
4636
- cache = new Map;
4637
- }
4638
- };
4639
- return {
4640
- get(key) {
4641
- let value = cache.get(key);
4642
- if (value !== undefined) {
4643
- return value;
4644
- }
4645
- if ((value = previousCache.get(key)) !== undefined) {
4646
- update(key, value);
4647
- return value;
4648
- }
4649
- },
4650
- set(key, value) {
4651
- if (cache.has(key)) {
4652
- cache.set(key, value);
4653
- } else {
4654
- update(key, value);
4655
- }
4656
- }
4657
- };
4658
- };
4659
- var IMPORTANT_MODIFIER = "!";
4660
- var createParseClassName = (config) => {
4661
- const {
4662
- separator,
4663
- experimentalParseClassName
4664
- } = config;
4665
- const isSeparatorSingleCharacter = separator.length === 1;
4666
- const firstSeparatorCharacter = separator[0];
4667
- const separatorLength = separator.length;
4668
- const parseClassName = (className) => {
4669
- const modifiers = [];
4670
- let bracketDepth = 0;
4671
- let modifierStart = 0;
4672
- let postfixModifierPosition;
4673
- for (let index = 0;index < className.length; index++) {
4674
- let currentCharacter = className[index];
4675
- if (bracketDepth === 0) {
4676
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
4677
- modifiers.push(className.slice(modifierStart, index));
4678
- modifierStart = index + separatorLength;
4679
- continue;
4680
- }
4681
- if (currentCharacter === "/") {
4682
- postfixModifierPosition = index;
4683
- continue;
4684
- }
4685
- }
4686
- if (currentCharacter === "[") {
4687
- bracketDepth++;
4688
- } else if (currentCharacter === "]") {
4689
- bracketDepth--;
4690
- }
4691
- }
4692
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
4693
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
4694
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
4695
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
4696
- return {
4697
- modifiers,
4698
- hasImportantModifier,
4699
- baseClassName,
4700
- maybePostfixModifierPosition
4701
- };
4702
- };
4703
- if (experimentalParseClassName) {
4704
- return (className) => experimentalParseClassName({
4705
- className,
4706
- parseClassName
4707
- });
4708
- }
4709
- return parseClassName;
4710
- };
4711
- var sortModifiers = (modifiers) => {
4712
- if (modifiers.length <= 1) {
4713
- return modifiers;
4714
- }
4715
- const sortedModifiers = [];
4716
- let unsortedModifiers = [];
4717
- modifiers.forEach((modifier) => {
4718
- const isArbitraryVariant = modifier[0] === "[";
4719
- if (isArbitraryVariant) {
4720
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
4721
- unsortedModifiers = [];
4722
- } else {
4723
- unsortedModifiers.push(modifier);
4724
- }
4725
- });
4726
- sortedModifiers.push(...unsortedModifiers.sort());
4727
- return sortedModifiers;
4728
- };
4729
- var createConfigUtils = (config) => ({
4730
- cache: createLruCache(config.cacheSize),
4731
- parseClassName: createParseClassName(config),
4732
- ...createClassGroupUtils(config)
4733
- });
4734
- var SPLIT_CLASSES_REGEX = /\s+/;
4735
- var mergeClassList = (classList, configUtils) => {
4736
- const {
4737
- parseClassName,
4738
- getClassGroupId,
4739
- getConflictingClassGroupIds
4740
- } = configUtils;
4741
- const classGroupsInConflict = [];
4742
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
4743
- let result = "";
4744
- for (let index = classNames.length - 1;index >= 0; index -= 1) {
4745
- const originalClassName = classNames[index];
4746
- const {
4747
- modifiers,
4748
- hasImportantModifier,
4749
- baseClassName,
4750
- maybePostfixModifierPosition
4751
- } = parseClassName(originalClassName);
4752
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
4753
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
4754
- if (!classGroupId) {
4755
- if (!hasPostfixModifier) {
4756
- result = originalClassName + (result.length > 0 ? " " + result : result);
4757
- continue;
4758
- }
4759
- classGroupId = getClassGroupId(baseClassName);
4760
- if (!classGroupId) {
4761
- result = originalClassName + (result.length > 0 ? " " + result : result);
4762
- continue;
4763
- }
4764
- hasPostfixModifier = false;
4765
- }
4766
- const variantModifier = sortModifiers(modifiers).join(":");
4767
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
4768
- const classId = modifierId + classGroupId;
4769
- if (classGroupsInConflict.includes(classId)) {
4770
- continue;
4771
- }
4772
- classGroupsInConflict.push(classId);
4773
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
4774
- for (let i = 0;i < conflictGroups.length; ++i) {
4775
- const group = conflictGroups[i];
4776
- classGroupsInConflict.push(modifierId + group);
4777
- }
4778
- result = originalClassName + (result.length > 0 ? " " + result : result);
4779
- }
4780
- return result;
4781
- };
4782
- function twJoin() {
4783
- let index = 0;
4784
- let argument;
4785
- let resolvedValue;
4786
- let string = "";
4787
- while (index < arguments.length) {
4788
- if (argument = arguments[index++]) {
4789
- if (resolvedValue = toValue(argument)) {
4790
- string && (string += " ");
4791
- string += resolvedValue;
4792
- }
4793
- }
4794
- }
4795
- return string;
4796
- }
4797
- var toValue = (mix) => {
4798
- if (typeof mix === "string") {
4799
- return mix;
4800
- }
4801
- let resolvedValue;
4802
- let string = "";
4803
- for (let k = 0;k < mix.length; k++) {
4804
- if (mix[k]) {
4805
- if (resolvedValue = toValue(mix[k])) {
4806
- string && (string += " ");
4807
- string += resolvedValue;
4808
- }
4809
- }
4810
- }
4811
- return string;
4812
- };
4813
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
4814
- let configUtils;
4815
- let cacheGet;
4816
- let cacheSet;
4817
- let functionToCall = initTailwindMerge;
4818
- function initTailwindMerge(classList) {
4819
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
4820
- configUtils = createConfigUtils(config);
4821
- cacheGet = configUtils.cache.get;
4822
- cacheSet = configUtils.cache.set;
4823
- functionToCall = tailwindMerge;
4824
- return tailwindMerge(classList);
4825
- }
4826
- function tailwindMerge(classList) {
4827
- const cachedResult = cacheGet(classList);
4828
- if (cachedResult) {
4829
- return cachedResult;
4830
- }
4831
- const result = mergeClassList(classList, configUtils);
4832
- cacheSet(classList, result);
4833
- return result;
4834
- }
4835
- return function callTailwindMerge() {
4836
- return functionToCall(twJoin.apply(null, arguments));
4837
- };
4838
- }
4839
- var fromTheme = (key) => {
4840
- const themeGetter = (theme) => theme[key] || [];
4841
- themeGetter.isThemeGetter = true;
4842
- return themeGetter;
4843
- };
4844
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
4845
- var fractionRegex = /^\d+\/\d+$/;
4846
- var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
4847
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
4848
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
4849
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
4850
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
4851
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
4852
- var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
4853
- var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
4854
- var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
4855
- var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
4856
- var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
4857
- var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
4858
- var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
4859
- var isTshirtSize = (value) => tshirtUnitRegex.test(value);
4860
- var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
4861
- var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
4862
- var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
4863
- var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
4864
- var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
4865
- var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
4866
- var isAny = () => true;
4867
- var getIsArbitraryValue = (value, label, testValue) => {
4868
- const result = arbitraryValueRegex.exec(value);
4869
- if (result) {
4870
- if (result[1]) {
4871
- return typeof label === "string" ? result[1] === label : label.has(result[1]);
4872
- }
4873
- return testValue(result[2]);
4874
- }
4875
- return false;
4876
- };
4877
- var isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
4878
- var isNever = () => false;
4879
- var isShadow = (value) => shadowRegex.test(value);
4880
- var isImage = (value) => imageRegex.test(value);
4881
- var getDefaultConfig = () => {
4882
- const colors = fromTheme("colors");
4883
- const spacing = fromTheme("spacing");
4884
- const blur = fromTheme("blur");
4885
- const brightness = fromTheme("brightness");
4886
- const borderColor = fromTheme("borderColor");
4887
- const borderRadius = fromTheme("borderRadius");
4888
- const borderSpacing = fromTheme("borderSpacing");
4889
- const borderWidth = fromTheme("borderWidth");
4890
- const contrast = fromTheme("contrast");
4891
- const grayscale = fromTheme("grayscale");
4892
- const hueRotate = fromTheme("hueRotate");
4893
- const invert = fromTheme("invert");
4894
- const gap = fromTheme("gap");
4895
- const gradientColorStops = fromTheme("gradientColorStops");
4896
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
4897
- const inset = fromTheme("inset");
4898
- const margin = fromTheme("margin");
4899
- const opacity = fromTheme("opacity");
4900
- const padding = fromTheme("padding");
4901
- const saturate = fromTheme("saturate");
4902
- const scale = fromTheme("scale");
4903
- const sepia = fromTheme("sepia");
4904
- const skew = fromTheme("skew");
4905
- const space = fromTheme("space");
4906
- const translate = fromTheme("translate");
4907
- const getOverscroll = () => ["auto", "contain", "none"];
4908
- const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
4909
- const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
4910
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
4911
- const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
4912
- const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
4913
- const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
4914
- const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
4915
- const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
4916
- const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
4917
- const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
4918
- const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
4919
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
4920
- return {
4921
- cacheSize: 500,
4922
- separator: ":",
4923
- theme: {
4924
- colors: [isAny],
4925
- spacing: [isLength, isArbitraryLength],
4926
- blur: ["none", "", isTshirtSize, isArbitraryValue],
4927
- brightness: getNumberAndArbitrary(),
4928
- borderColor: [colors],
4929
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
4930
- borderSpacing: getSpacingWithArbitrary(),
4931
- borderWidth: getLengthWithEmptyAndArbitrary(),
4932
- contrast: getNumberAndArbitrary(),
4933
- grayscale: getZeroAndEmpty(),
4934
- hueRotate: getNumberAndArbitrary(),
4935
- invert: getZeroAndEmpty(),
4936
- gap: getSpacingWithArbitrary(),
4937
- gradientColorStops: [colors],
4938
- gradientColorStopPositions: [isPercent, isArbitraryLength],
4939
- inset: getSpacingWithAutoAndArbitrary(),
4940
- margin: getSpacingWithAutoAndArbitrary(),
4941
- opacity: getNumberAndArbitrary(),
4942
- padding: getSpacingWithArbitrary(),
4943
- saturate: getNumberAndArbitrary(),
4944
- scale: getNumberAndArbitrary(),
4945
- sepia: getZeroAndEmpty(),
4946
- skew: getNumberAndArbitrary(),
4947
- space: getSpacingWithArbitrary(),
4948
- translate: getSpacingWithArbitrary()
4949
- },
4950
- classGroups: {
4951
- aspect: [{
4952
- aspect: ["auto", "square", "video", isArbitraryValue]
4953
- }],
4954
- container: ["container"],
4955
- columns: [{
4956
- columns: [isTshirtSize]
4957
- }],
4958
- "break-after": [{
4959
- "break-after": getBreaks()
4960
- }],
4961
- "break-before": [{
4962
- "break-before": getBreaks()
4963
- }],
4964
- "break-inside": [{
4965
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
4966
- }],
4967
- "box-decoration": [{
4968
- "box-decoration": ["slice", "clone"]
4969
- }],
4970
- box: [{
4971
- box: ["border", "content"]
4972
- }],
4973
- display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
4974
- float: [{
4975
- float: ["right", "left", "none", "start", "end"]
4976
- }],
4977
- clear: [{
4978
- clear: ["left", "right", "both", "none", "start", "end"]
4979
- }],
4980
- isolation: ["isolate", "isolation-auto"],
4981
- "object-fit": [{
4982
- object: ["contain", "cover", "fill", "none", "scale-down"]
4983
- }],
4984
- "object-position": [{
4985
- object: [...getPositions(), isArbitraryValue]
4986
- }],
4987
- overflow: [{
4988
- overflow: getOverflow()
4989
- }],
4990
- "overflow-x": [{
4991
- "overflow-x": getOverflow()
4992
- }],
4993
- "overflow-y": [{
4994
- "overflow-y": getOverflow()
4995
- }],
4996
- overscroll: [{
4997
- overscroll: getOverscroll()
4998
- }],
4999
- "overscroll-x": [{
5000
- "overscroll-x": getOverscroll()
5001
- }],
5002
- "overscroll-y": [{
5003
- "overscroll-y": getOverscroll()
5004
- }],
5005
- position: ["static", "fixed", "absolute", "relative", "sticky"],
5006
- inset: [{
5007
- inset: [inset]
5008
- }],
5009
- "inset-x": [{
5010
- "inset-x": [inset]
5011
- }],
5012
- "inset-y": [{
5013
- "inset-y": [inset]
5014
- }],
5015
- start: [{
5016
- start: [inset]
5017
- }],
5018
- end: [{
5019
- end: [inset]
5020
- }],
5021
- top: [{
5022
- top: [inset]
5023
- }],
5024
- right: [{
5025
- right: [inset]
5026
- }],
5027
- bottom: [{
5028
- bottom: [inset]
5029
- }],
5030
- left: [{
5031
- left: [inset]
5032
- }],
5033
- visibility: ["visible", "invisible", "collapse"],
5034
- z: [{
5035
- z: ["auto", isInteger, isArbitraryValue]
5036
- }],
5037
- basis: [{
5038
- basis: getSpacingWithAutoAndArbitrary()
5039
- }],
5040
- "flex-direction": [{
5041
- flex: ["row", "row-reverse", "col", "col-reverse"]
5042
- }],
5043
- "flex-wrap": [{
5044
- flex: ["wrap", "wrap-reverse", "nowrap"]
5045
- }],
5046
- flex: [{
5047
- flex: ["1", "auto", "initial", "none", isArbitraryValue]
5048
- }],
5049
- grow: [{
5050
- grow: getZeroAndEmpty()
5051
- }],
5052
- shrink: [{
5053
- shrink: getZeroAndEmpty()
5054
- }],
5055
- order: [{
5056
- order: ["first", "last", "none", isInteger, isArbitraryValue]
5057
- }],
5058
- "grid-cols": [{
5059
- "grid-cols": [isAny]
5060
- }],
5061
- "col-start-end": [{
5062
- col: ["auto", {
5063
- span: ["full", isInteger, isArbitraryValue]
5064
- }, isArbitraryValue]
5065
- }],
5066
- "col-start": [{
5067
- "col-start": getNumberWithAutoAndArbitrary()
5068
- }],
5069
- "col-end": [{
5070
- "col-end": getNumberWithAutoAndArbitrary()
5071
- }],
5072
- "grid-rows": [{
5073
- "grid-rows": [isAny]
5074
- }],
5075
- "row-start-end": [{
5076
- row: ["auto", {
5077
- span: [isInteger, isArbitraryValue]
5078
- }, isArbitraryValue]
5079
- }],
5080
- "row-start": [{
5081
- "row-start": getNumberWithAutoAndArbitrary()
5082
- }],
5083
- "row-end": [{
5084
- "row-end": getNumberWithAutoAndArbitrary()
5085
- }],
5086
- "grid-flow": [{
5087
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
5088
- }],
5089
- "auto-cols": [{
5090
- "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
5091
- }],
5092
- "auto-rows": [{
5093
- "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
5094
- }],
5095
- gap: [{
5096
- gap: [gap]
5097
- }],
5098
- "gap-x": [{
5099
- "gap-x": [gap]
5100
- }],
5101
- "gap-y": [{
5102
- "gap-y": [gap]
5103
- }],
5104
- "justify-content": [{
5105
- justify: ["normal", ...getAlign()]
5106
- }],
5107
- "justify-items": [{
5108
- "justify-items": ["start", "end", "center", "stretch"]
5109
- }],
5110
- "justify-self": [{
5111
- "justify-self": ["auto", "start", "end", "center", "stretch"]
5112
- }],
5113
- "align-content": [{
5114
- content: ["normal", ...getAlign(), "baseline"]
5115
- }],
5116
- "align-items": [{
5117
- items: ["start", "end", "center", "baseline", "stretch"]
5118
- }],
5119
- "align-self": [{
5120
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
5121
- }],
5122
- "place-content": [{
5123
- "place-content": [...getAlign(), "baseline"]
5124
- }],
5125
- "place-items": [{
5126
- "place-items": ["start", "end", "center", "baseline", "stretch"]
5127
- }],
5128
- "place-self": [{
5129
- "place-self": ["auto", "start", "end", "center", "stretch"]
5130
- }],
5131
- p: [{
5132
- p: [padding]
5133
- }],
5134
- px: [{
5135
- px: [padding]
5136
- }],
5137
- py: [{
5138
- py: [padding]
5139
- }],
5140
- ps: [{
5141
- ps: [padding]
5142
- }],
5143
- pe: [{
5144
- pe: [padding]
5145
- }],
5146
- pt: [{
5147
- pt: [padding]
5148
- }],
5149
- pr: [{
5150
- pr: [padding]
5151
- }],
5152
- pb: [{
5153
- pb: [padding]
5154
- }],
5155
- pl: [{
5156
- pl: [padding]
5157
- }],
5158
- m: [{
5159
- m: [margin]
5160
- }],
5161
- mx: [{
5162
- mx: [margin]
5163
- }],
5164
- my: [{
5165
- my: [margin]
5166
- }],
5167
- ms: [{
5168
- ms: [margin]
5169
- }],
5170
- me: [{
5171
- me: [margin]
5172
- }],
5173
- mt: [{
5174
- mt: [margin]
5175
- }],
5176
- mr: [{
5177
- mr: [margin]
5178
- }],
5179
- mb: [{
5180
- mb: [margin]
5181
- }],
5182
- ml: [{
5183
- ml: [margin]
5184
- }],
5185
- "space-x": [{
5186
- "space-x": [space]
5187
- }],
5188
- "space-x-reverse": ["space-x-reverse"],
5189
- "space-y": [{
5190
- "space-y": [space]
5191
- }],
5192
- "space-y-reverse": ["space-y-reverse"],
5193
- w: [{
5194
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
5195
- }],
5196
- "min-w": [{
5197
- "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
5198
- }],
5199
- "max-w": [{
5200
- "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
5201
- screen: [isTshirtSize]
5202
- }, isTshirtSize]
5203
- }],
5204
- h: [{
5205
- h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
5206
- }],
5207
- "min-h": [{
5208
- "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
5209
- }],
5210
- "max-h": [{
5211
- "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
5212
- }],
5213
- size: [{
5214
- size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
5215
- }],
5216
- "font-size": [{
5217
- text: ["base", isTshirtSize, isArbitraryLength]
5218
- }],
5219
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
5220
- "font-style": ["italic", "not-italic"],
5221
- "font-weight": [{
5222
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
5223
- }],
5224
- "font-family": [{
5225
- font: [isAny]
5226
- }],
5227
- "fvn-normal": ["normal-nums"],
5228
- "fvn-ordinal": ["ordinal"],
5229
- "fvn-slashed-zero": ["slashed-zero"],
5230
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
5231
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
5232
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
5233
- tracking: [{
5234
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
5235
- }],
5236
- "line-clamp": [{
5237
- "line-clamp": ["none", isNumber, isArbitraryNumber]
5238
- }],
5239
- leading: [{
5240
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
5241
- }],
5242
- "list-image": [{
5243
- "list-image": ["none", isArbitraryValue]
5244
- }],
5245
- "list-style-type": [{
5246
- list: ["none", "disc", "decimal", isArbitraryValue]
5247
- }],
5248
- "list-style-position": [{
5249
- list: ["inside", "outside"]
5250
- }],
5251
- "placeholder-color": [{
5252
- placeholder: [colors]
5253
- }],
5254
- "placeholder-opacity": [{
5255
- "placeholder-opacity": [opacity]
5256
- }],
5257
- "text-alignment": [{
5258
- text: ["left", "center", "right", "justify", "start", "end"]
5259
- }],
5260
- "text-color": [{
5261
- text: [colors]
5262
- }],
5263
- "text-opacity": [{
5264
- "text-opacity": [opacity]
5265
- }],
5266
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
5267
- "text-decoration-style": [{
5268
- decoration: [...getLineStyles(), "wavy"]
5269
- }],
5270
- "text-decoration-thickness": [{
5271
- decoration: ["auto", "from-font", isLength, isArbitraryLength]
5272
- }],
5273
- "underline-offset": [{
5274
- "underline-offset": ["auto", isLength, isArbitraryValue]
5275
- }],
5276
- "text-decoration-color": [{
5277
- decoration: [colors]
5278
- }],
5279
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
5280
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
5281
- "text-wrap": [{
5282
- text: ["wrap", "nowrap", "balance", "pretty"]
5283
- }],
5284
- indent: [{
5285
- indent: getSpacingWithArbitrary()
5286
- }],
5287
- "vertical-align": [{
5288
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
5289
- }],
5290
- whitespace: [{
5291
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
5292
- }],
5293
- break: [{
5294
- break: ["normal", "words", "all", "keep"]
5295
- }],
5296
- hyphens: [{
5297
- hyphens: ["none", "manual", "auto"]
5298
- }],
5299
- content: [{
5300
- content: ["none", isArbitraryValue]
5301
- }],
5302
- "bg-attachment": [{
5303
- bg: ["fixed", "local", "scroll"]
5304
- }],
5305
- "bg-clip": [{
5306
- "bg-clip": ["border", "padding", "content", "text"]
5307
- }],
5308
- "bg-opacity": [{
5309
- "bg-opacity": [opacity]
5310
- }],
5311
- "bg-origin": [{
5312
- "bg-origin": ["border", "padding", "content"]
5313
- }],
5314
- "bg-position": [{
5315
- bg: [...getPositions(), isArbitraryPosition]
5316
- }],
5317
- "bg-repeat": [{
5318
- bg: ["no-repeat", {
5319
- repeat: ["", "x", "y", "round", "space"]
5320
- }]
5321
- }],
5322
- "bg-size": [{
5323
- bg: ["auto", "cover", "contain", isArbitrarySize]
5324
- }],
5325
- "bg-image": [{
5326
- bg: ["none", {
5327
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
5328
- }, isArbitraryImage]
5329
- }],
5330
- "bg-color": [{
5331
- bg: [colors]
5332
- }],
5333
- "gradient-from-pos": [{
5334
- from: [gradientColorStopPositions]
5335
- }],
5336
- "gradient-via-pos": [{
5337
- via: [gradientColorStopPositions]
5338
- }],
5339
- "gradient-to-pos": [{
5340
- to: [gradientColorStopPositions]
5341
- }],
5342
- "gradient-from": [{
5343
- from: [gradientColorStops]
5344
- }],
5345
- "gradient-via": [{
5346
- via: [gradientColorStops]
5347
- }],
5348
- "gradient-to": [{
5349
- to: [gradientColorStops]
5350
- }],
5351
- rounded: [{
5352
- rounded: [borderRadius]
5353
- }],
5354
- "rounded-s": [{
5355
- "rounded-s": [borderRadius]
5356
- }],
5357
- "rounded-e": [{
5358
- "rounded-e": [borderRadius]
5359
- }],
5360
- "rounded-t": [{
5361
- "rounded-t": [borderRadius]
5362
- }],
5363
- "rounded-r": [{
5364
- "rounded-r": [borderRadius]
5365
- }],
5366
- "rounded-b": [{
5367
- "rounded-b": [borderRadius]
5368
- }],
5369
- "rounded-l": [{
5370
- "rounded-l": [borderRadius]
5371
- }],
5372
- "rounded-ss": [{
5373
- "rounded-ss": [borderRadius]
5374
- }],
5375
- "rounded-se": [{
5376
- "rounded-se": [borderRadius]
5377
- }],
5378
- "rounded-ee": [{
5379
- "rounded-ee": [borderRadius]
5380
- }],
5381
- "rounded-es": [{
5382
- "rounded-es": [borderRadius]
5383
- }],
5384
- "rounded-tl": [{
5385
- "rounded-tl": [borderRadius]
5386
- }],
5387
- "rounded-tr": [{
5388
- "rounded-tr": [borderRadius]
5389
- }],
5390
- "rounded-br": [{
5391
- "rounded-br": [borderRadius]
5392
- }],
5393
- "rounded-bl": [{
5394
- "rounded-bl": [borderRadius]
5395
- }],
5396
- "border-w": [{
5397
- border: [borderWidth]
5398
- }],
5399
- "border-w-x": [{
5400
- "border-x": [borderWidth]
5401
- }],
5402
- "border-w-y": [{
5403
- "border-y": [borderWidth]
5404
- }],
5405
- "border-w-s": [{
5406
- "border-s": [borderWidth]
5407
- }],
5408
- "border-w-e": [{
5409
- "border-e": [borderWidth]
5410
- }],
5411
- "border-w-t": [{
5412
- "border-t": [borderWidth]
5413
- }],
5414
- "border-w-r": [{
5415
- "border-r": [borderWidth]
5416
- }],
5417
- "border-w-b": [{
5418
- "border-b": [borderWidth]
5419
- }],
5420
- "border-w-l": [{
5421
- "border-l": [borderWidth]
5422
- }],
5423
- "border-opacity": [{
5424
- "border-opacity": [opacity]
5425
- }],
5426
- "border-style": [{
5427
- border: [...getLineStyles(), "hidden"]
5428
- }],
5429
- "divide-x": [{
5430
- "divide-x": [borderWidth]
5431
- }],
5432
- "divide-x-reverse": ["divide-x-reverse"],
5433
- "divide-y": [{
5434
- "divide-y": [borderWidth]
5435
- }],
5436
- "divide-y-reverse": ["divide-y-reverse"],
5437
- "divide-opacity": [{
5438
- "divide-opacity": [opacity]
5439
- }],
5440
- "divide-style": [{
5441
- divide: getLineStyles()
5442
- }],
5443
- "border-color": [{
5444
- border: [borderColor]
5445
- }],
5446
- "border-color-x": [{
5447
- "border-x": [borderColor]
5448
- }],
5449
- "border-color-y": [{
5450
- "border-y": [borderColor]
5451
- }],
5452
- "border-color-s": [{
5453
- "border-s": [borderColor]
5454
- }],
5455
- "border-color-e": [{
5456
- "border-e": [borderColor]
5457
- }],
5458
- "border-color-t": [{
5459
- "border-t": [borderColor]
5460
- }],
5461
- "border-color-r": [{
5462
- "border-r": [borderColor]
5463
- }],
5464
- "border-color-b": [{
5465
- "border-b": [borderColor]
5466
- }],
5467
- "border-color-l": [{
5468
- "border-l": [borderColor]
5469
- }],
5470
- "divide-color": [{
5471
- divide: [borderColor]
5472
- }],
5473
- "outline-style": [{
5474
- outline: ["", ...getLineStyles()]
5475
- }],
5476
- "outline-offset": [{
5477
- "outline-offset": [isLength, isArbitraryValue]
5478
- }],
5479
- "outline-w": [{
5480
- outline: [isLength, isArbitraryLength]
5481
- }],
5482
- "outline-color": [{
5483
- outline: [colors]
5484
- }],
5485
- "ring-w": [{
5486
- ring: getLengthWithEmptyAndArbitrary()
5487
- }],
5488
- "ring-w-inset": ["ring-inset"],
5489
- "ring-color": [{
5490
- ring: [colors]
5491
- }],
5492
- "ring-opacity": [{
5493
- "ring-opacity": [opacity]
5494
- }],
5495
- "ring-offset-w": [{
5496
- "ring-offset": [isLength, isArbitraryLength]
5497
- }],
5498
- "ring-offset-color": [{
5499
- "ring-offset": [colors]
5500
- }],
5501
- shadow: [{
5502
- shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
5503
- }],
5504
- "shadow-color": [{
5505
- shadow: [isAny]
5506
- }],
5507
- opacity: [{
5508
- opacity: [opacity]
5509
- }],
5510
- "mix-blend": [{
5511
- "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
5512
- }],
5513
- "bg-blend": [{
5514
- "bg-blend": getBlendModes()
5515
- }],
5516
- filter: [{
5517
- filter: ["", "none"]
5518
- }],
5519
- blur: [{
5520
- blur: [blur]
5521
- }],
5522
- brightness: [{
5523
- brightness: [brightness]
5524
- }],
5525
- contrast: [{
5526
- contrast: [contrast]
5527
- }],
5528
- "drop-shadow": [{
5529
- "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
5530
- }],
5531
- grayscale: [{
5532
- grayscale: [grayscale]
5533
- }],
5534
- "hue-rotate": [{
5535
- "hue-rotate": [hueRotate]
5536
- }],
5537
- invert: [{
5538
- invert: [invert]
5539
- }],
5540
- saturate: [{
5541
- saturate: [saturate]
5542
- }],
5543
- sepia: [{
5544
- sepia: [sepia]
5545
- }],
5546
- "backdrop-filter": [{
5547
- "backdrop-filter": ["", "none"]
5548
- }],
5549
- "backdrop-blur": [{
5550
- "backdrop-blur": [blur]
5551
- }],
5552
- "backdrop-brightness": [{
5553
- "backdrop-brightness": [brightness]
5554
- }],
5555
- "backdrop-contrast": [{
5556
- "backdrop-contrast": [contrast]
5557
- }],
5558
- "backdrop-grayscale": [{
5559
- "backdrop-grayscale": [grayscale]
5560
- }],
5561
- "backdrop-hue-rotate": [{
5562
- "backdrop-hue-rotate": [hueRotate]
5563
- }],
5564
- "backdrop-invert": [{
5565
- "backdrop-invert": [invert]
5566
- }],
5567
- "backdrop-opacity": [{
5568
- "backdrop-opacity": [opacity]
5569
- }],
5570
- "backdrop-saturate": [{
5571
- "backdrop-saturate": [saturate]
5572
- }],
5573
- "backdrop-sepia": [{
5574
- "backdrop-sepia": [sepia]
5575
- }],
5576
- "border-collapse": [{
5577
- border: ["collapse", "separate"]
5578
- }],
5579
- "border-spacing": [{
5580
- "border-spacing": [borderSpacing]
5581
- }],
5582
- "border-spacing-x": [{
5583
- "border-spacing-x": [borderSpacing]
5584
- }],
5585
- "border-spacing-y": [{
5586
- "border-spacing-y": [borderSpacing]
5587
- }],
5588
- "table-layout": [{
5589
- table: ["auto", "fixed"]
5590
- }],
5591
- caption: [{
5592
- caption: ["top", "bottom"]
5593
- }],
5594
- transition: [{
5595
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
5596
- }],
5597
- duration: [{
5598
- duration: getNumberAndArbitrary()
5599
- }],
5600
- ease: [{
5601
- ease: ["linear", "in", "out", "in-out", isArbitraryValue]
5602
- }],
5603
- delay: [{
5604
- delay: getNumberAndArbitrary()
5605
- }],
5606
- animate: [{
5607
- animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
5608
- }],
5609
- transform: [{
5610
- transform: ["", "gpu", "none"]
5611
- }],
5612
- scale: [{
5613
- scale: [scale]
5614
- }],
5615
- "scale-x": [{
5616
- "scale-x": [scale]
5617
- }],
5618
- "scale-y": [{
5619
- "scale-y": [scale]
5620
- }],
5621
- rotate: [{
5622
- rotate: [isInteger, isArbitraryValue]
5623
- }],
5624
- "translate-x": [{
5625
- "translate-x": [translate]
5626
- }],
5627
- "translate-y": [{
5628
- "translate-y": [translate]
5629
- }],
5630
- "skew-x": [{
5631
- "skew-x": [skew]
5632
- }],
5633
- "skew-y": [{
5634
- "skew-y": [skew]
5635
- }],
5636
- "transform-origin": [{
5637
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
5638
- }],
5639
- accent: [{
5640
- accent: ["auto", colors]
5641
- }],
5642
- appearance: [{
5643
- appearance: ["none", "auto"]
5644
- }],
5645
- cursor: [{
5646
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
5647
- }],
5648
- "caret-color": [{
5649
- caret: [colors]
5650
- }],
5651
- "pointer-events": [{
5652
- "pointer-events": ["none", "auto"]
5653
- }],
5654
- resize: [{
5655
- resize: ["none", "y", "x", ""]
5656
- }],
5657
- "scroll-behavior": [{
5658
- scroll: ["auto", "smooth"]
5659
- }],
5660
- "scroll-m": [{
5661
- "scroll-m": getSpacingWithArbitrary()
5662
- }],
5663
- "scroll-mx": [{
5664
- "scroll-mx": getSpacingWithArbitrary()
5665
- }],
5666
- "scroll-my": [{
5667
- "scroll-my": getSpacingWithArbitrary()
5668
- }],
5669
- "scroll-ms": [{
5670
- "scroll-ms": getSpacingWithArbitrary()
5671
- }],
5672
- "scroll-me": [{
5673
- "scroll-me": getSpacingWithArbitrary()
5674
- }],
5675
- "scroll-mt": [{
5676
- "scroll-mt": getSpacingWithArbitrary()
5677
- }],
5678
- "scroll-mr": [{
5679
- "scroll-mr": getSpacingWithArbitrary()
5680
- }],
5681
- "scroll-mb": [{
5682
- "scroll-mb": getSpacingWithArbitrary()
5683
- }],
5684
- "scroll-ml": [{
5685
- "scroll-ml": getSpacingWithArbitrary()
5686
- }],
5687
- "scroll-p": [{
5688
- "scroll-p": getSpacingWithArbitrary()
5689
- }],
5690
- "scroll-px": [{
5691
- "scroll-px": getSpacingWithArbitrary()
5692
- }],
5693
- "scroll-py": [{
5694
- "scroll-py": getSpacingWithArbitrary()
5695
- }],
5696
- "scroll-ps": [{
5697
- "scroll-ps": getSpacingWithArbitrary()
5698
- }],
5699
- "scroll-pe": [{
5700
- "scroll-pe": getSpacingWithArbitrary()
5701
- }],
5702
- "scroll-pt": [{
5703
- "scroll-pt": getSpacingWithArbitrary()
5704
- }],
5705
- "scroll-pr": [{
5706
- "scroll-pr": getSpacingWithArbitrary()
5707
- }],
5708
- "scroll-pb": [{
5709
- "scroll-pb": getSpacingWithArbitrary()
5710
- }],
5711
- "scroll-pl": [{
5712
- "scroll-pl": getSpacingWithArbitrary()
5713
- }],
5714
- "snap-align": [{
5715
- snap: ["start", "end", "center", "align-none"]
5716
- }],
5717
- "snap-stop": [{
5718
- snap: ["normal", "always"]
5719
- }],
5720
- "snap-type": [{
5721
- snap: ["none", "x", "y", "both"]
5722
- }],
5723
- "snap-strictness": [{
5724
- snap: ["mandatory", "proximity"]
5725
- }],
5726
- touch: [{
5727
- touch: ["auto", "none", "manipulation"]
5728
- }],
5729
- "touch-x": [{
5730
- "touch-pan": ["x", "left", "right"]
5731
- }],
5732
- "touch-y": [{
5733
- "touch-pan": ["y", "up", "down"]
5734
- }],
5735
- "touch-pz": ["touch-pinch-zoom"],
5736
- select: [{
5737
- select: ["none", "text", "all", "auto"]
5738
- }],
5739
- "will-change": [{
5740
- "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
5741
- }],
5742
- fill: [{
5743
- fill: [colors, "none"]
5744
- }],
5745
- "stroke-w": [{
5746
- stroke: [isLength, isArbitraryLength, isArbitraryNumber]
5747
- }],
5748
- stroke: [{
5749
- stroke: [colors, "none"]
5750
- }],
5751
- sr: ["sr-only", "not-sr-only"],
5752
- "forced-color-adjust": [{
5753
- "forced-color-adjust": ["auto", "none"]
5754
- }]
5755
- },
5756
- conflictingClassGroups: {
5757
- overflow: ["overflow-x", "overflow-y"],
5758
- overscroll: ["overscroll-x", "overscroll-y"],
5759
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
5760
- "inset-x": ["right", "left"],
5761
- "inset-y": ["top", "bottom"],
5762
- flex: ["basis", "grow", "shrink"],
5763
- gap: ["gap-x", "gap-y"],
5764
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
5765
- px: ["pr", "pl"],
5766
- py: ["pt", "pb"],
5767
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
5768
- mx: ["mr", "ml"],
5769
- my: ["mt", "mb"],
5770
- size: ["w", "h"],
5771
- "font-size": ["leading"],
5772
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
5773
- "fvn-ordinal": ["fvn-normal"],
5774
- "fvn-slashed-zero": ["fvn-normal"],
5775
- "fvn-figure": ["fvn-normal"],
5776
- "fvn-spacing": ["fvn-normal"],
5777
- "fvn-fraction": ["fvn-normal"],
5778
- "line-clamp": ["display", "overflow"],
5779
- rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
5780
- "rounded-s": ["rounded-ss", "rounded-es"],
5781
- "rounded-e": ["rounded-se", "rounded-ee"],
5782
- "rounded-t": ["rounded-tl", "rounded-tr"],
5783
- "rounded-r": ["rounded-tr", "rounded-br"],
5784
- "rounded-b": ["rounded-br", "rounded-bl"],
5785
- "rounded-l": ["rounded-tl", "rounded-bl"],
5786
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
5787
- "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
5788
- "border-w-x": ["border-w-r", "border-w-l"],
5789
- "border-w-y": ["border-w-t", "border-w-b"],
5790
- "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
5791
- "border-color-x": ["border-color-r", "border-color-l"],
5792
- "border-color-y": ["border-color-t", "border-color-b"],
5793
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
5794
- "scroll-mx": ["scroll-mr", "scroll-ml"],
5795
- "scroll-my": ["scroll-mt", "scroll-mb"],
5796
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
5797
- "scroll-px": ["scroll-pr", "scroll-pl"],
5798
- "scroll-py": ["scroll-pt", "scroll-pb"],
5799
- touch: ["touch-x", "touch-y", "touch-pz"],
5800
- "touch-x": ["touch"],
5801
- "touch-y": ["touch"],
5802
- "touch-pz": ["touch"]
5803
- },
5804
- conflictingClassGroupModifiers: {
5805
- "font-size": ["leading"]
5806
- }
5807
- };
5808
- };
5809
- var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
5810
-
5811
- // ../ui/src/lib/utils.ts
5812
- function cn(...inputs) {
5813
- return twMerge(clsx(inputs));
5814
- }
5815
-
5816
- // src/components/styled/ExportCard.tsx
5817
- var import_link = __toESM(require_link(), 1);
5818
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
5819
-
5820
- function ExportCard({
5821
- name,
5822
- description,
5823
- href,
5824
- kind = "function",
5825
- className
5826
- }) {
5827
- const isFunction = kind === "function";
5828
- return /* @__PURE__ */ jsxs9(import_link.default, {
5829
- href,
5830
- className: cn("group block rounded-lg border border-border bg-card/50 p-4", "transition-all duration-200", "hover:border-border/80 hover:bg-card hover:shadow-md", "hover:-translate-y-0.5", className),
5831
- children: [
5832
- /* @__PURE__ */ jsxs9("div", {
5833
- className: "flex items-baseline gap-1 mb-2",
5834
- children: [
5835
- /* @__PURE__ */ jsx10("span", {
5836
- className: "font-mono text-base font-medium text-foreground group-hover:text-primary transition-colors",
5837
- children: name
5838
- }),
5839
- isFunction && /* @__PURE__ */ jsx10("span", {
5840
- className: "font-mono text-base text-muted-foreground",
5841
- children: "()"
5842
- })
5843
- ]
5844
- }),
5845
- description && /* @__PURE__ */ jsx10("p", {
5846
- className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed",
5847
- children: description
5848
- })
5849
- ]
5850
- });
5851
- }
5852
-
5853
- // src/components/styled/ExportIndexPage.tsx
5854
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
5855
-
5856
- var KIND_ORDER = ["function", "class", "interface", "type", "enum", "variable"];
5857
- var KIND_LABELS = {
5858
- function: "Functions",
5859
- class: "Classes",
5860
- interface: "Interfaces",
5861
- type: "Types",
5862
- enum: "Enums",
5863
- variable: "Variables"
5864
- };
5865
- function groupByKind(exports) {
5866
- const groups = new Map;
5867
- for (const exp of exports) {
5868
- const kind = exp.kind || "variable";
5869
- const normalizedKind = KIND_ORDER.includes(kind) ? kind : "variable";
5870
- const list = groups.get(normalizedKind) || [];
5871
- list.push(exp);
5872
- groups.set(normalizedKind, list);
5873
- }
5874
- return KIND_ORDER.filter((kind) => groups.has(kind)).map((kind) => ({
5875
- kind,
5876
- label: KIND_LABELS[kind],
5877
- exports: groups.get(kind).sort((a, b) => a.name.localeCompare(b.name))
5878
- }));
5879
- }
5880
- function ExportIndexPage({
5881
- spec,
5882
- baseHref,
5883
- description,
5884
- className
5885
- }) {
5886
- if (false) {}
5887
- const groups = groupByKind(spec.exports);
5888
- return /* @__PURE__ */ jsxs10("div", {
5889
- className: cn("space-y-10 not-prose", className),
5890
- children: [
5891
- /* @__PURE__ */ jsxs10("div", {
5892
- children: [
5893
- /* @__PURE__ */ jsx11("h1", {
5894
- className: "text-3xl font-bold text-foreground mb-3",
5895
- children: spec.name || "API Reference"
5896
- }),
5897
- (description || spec.description) && /* @__PURE__ */ jsx11("p", {
5898
- className: "text-muted-foreground text-lg leading-relaxed max-w-3xl",
5899
- children: description || spec.description
5900
- })
5901
- ]
5902
- }),
5903
- groups.map((group) => /* @__PURE__ */ jsxs10("section", {
5904
- children: [
5905
- /* @__PURE__ */ jsx11("h2", {
5906
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
5907
- children: group.label
5908
- }),
5909
- /* @__PURE__ */ jsx11("div", {
5910
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
5911
- children: group.exports.map((exp) => /* @__PURE__ */ jsx11(ExportCard, {
5912
- name: exp.name,
5913
- description: exp.description,
5914
- href: `${baseHref}/${exp.id}`,
5915
- kind: exp.kind
5916
- }, exp.id))
5917
- })
5918
- ]
5919
- }, group.kind)),
5920
- groups.length === 0 && /* @__PURE__ */ jsx11("div", {
5921
- className: "rounded-lg border border-border bg-card/50 p-8 text-center",
5922
- children: /* @__PURE__ */ jsx11("p", {
5923
- className: "text-muted-foreground",
5924
- children: "No exports found in this package."
5925
- })
5926
- })
5927
- ]
5928
- });
5929
- }
5930
-
5931
- // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
5932
- import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
5933
-
5934
- // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
5935
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5936
- var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
5937
- var toPascalCase = (string) => {
5938
- const camelCase = toCamelCase(string);
5939
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
5940
- };
5941
- var mergeClasses = (...classes) => classes.filter((className, index, array) => {
5942
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
5943
- }).join(" ").trim();
5944
- var hasA11yProp = (props) => {
5945
- for (const prop in props) {
5946
- if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
5947
- return true;
5948
- }
5949
- }
5950
- };
5951
-
5952
- // ../../node_modules/lucide-react/dist/esm/Icon.js
5953
- import { forwardRef, createElement } from "react";
5954
-
5955
- // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
5956
- var defaultAttributes = {
5957
- xmlns: "http://www.w3.org/2000/svg",
5958
- width: 24,
5959
- height: 24,
5960
- viewBox: "0 0 24 24",
5961
- fill: "none",
5962
- stroke: "currentColor",
5963
- strokeWidth: 2,
5964
- strokeLinecap: "round",
5965
- strokeLinejoin: "round"
4227
+
4228
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
4229
+ import { forwardRef, createElement } from "react";
4230
+
4231
+ // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
4232
+ var defaultAttributes = {
4233
+ xmlns: "http://www.w3.org/2000/svg",
4234
+ width: 24,
4235
+ height: 24,
4236
+ viewBox: "0 0 24 24",
4237
+ fill: "none",
4238
+ stroke: "currentColor",
4239
+ strokeWidth: 2,
4240
+ strokeLinecap: "round",
4241
+ strokeLinejoin: "round"
5966
4242
  };
5967
4243
 
5968
4244
  // ../../node_modules/lucide-react/dist/esm/Icon.js
@@ -15629,7 +13905,7 @@ var __iconNode875 = [
15629
13905
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
15630
13906
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
15631
13907
  ];
15632
- var Link3 = createLucideIcon("link", __iconNode875);
13908
+ var Link = createLucideIcon("link", __iconNode875);
15633
13909
  // ../../node_modules/lucide-react/dist/esm/icons/linkedin.js
15634
13910
  var __iconNode876 = [
15635
13911
  [
@@ -23959,301 +22235,868 @@ var __iconNode1651 = [
23959
22235
  ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
23960
22236
  ];
23961
22237
  var ZoomOut = createLucideIcon("zoom-out", __iconNode1651);
23962
- // src/components/styled/FunctionPage.tsx
23963
- import { useState as useState7 } from "react";
22238
+ // src/components/styled/ClassPage.tsx
22239
+ import { useState as useState5 } from "react";
22240
+
22241
+ // src/components/styled/ParameterItem.tsx
22242
+ import { cn } from "@doccov/ui/lib/utils";
22243
+ import { useState as useState4 } from "react";
22244
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
22245
+
22246
+ function getNestedProperties2(schema) {
22247
+ if (!schema || typeof schema !== "object")
22248
+ return null;
22249
+ const s = schema;
22250
+ if (s.type === "object" && s.properties && typeof s.properties === "object") {
22251
+ return s.properties;
22252
+ }
22253
+ return null;
22254
+ }
22255
+ function getRequiredFields2(schema) {
22256
+ if (!schema || typeof schema !== "object")
22257
+ return [];
22258
+ const s = schema;
22259
+ if (Array.isArray(s.required)) {
22260
+ return s.required;
22261
+ }
22262
+ return [];
22263
+ }
22264
+ function countProperties2(schema) {
22265
+ const props = getNestedProperties2(schema);
22266
+ return props ? Object.keys(props).length : 0;
22267
+ }
22268
+ function NestedPropertyItem({
22269
+ name,
22270
+ schema,
22271
+ required = false,
22272
+ depth = 0
22273
+ }) {
22274
+ const [expanded, setExpanded] = useState4(false);
22275
+ const type = formatSchema(schema);
22276
+ const nestedProps = getNestedProperties2(schema);
22277
+ const nestedCount = countProperties2(schema);
22278
+ const hasNested = nestedCount > 0;
22279
+ const schemaObj = schema;
22280
+ const description = schemaObj?.description;
22281
+ return /* @__PURE__ */ jsxs7("div", {
22282
+ className: cn("border-t border-border first:border-t-0", depth > 0 && "ml-4"),
22283
+ children: [
22284
+ /* @__PURE__ */ jsx8("div", {
22285
+ className: "py-3",
22286
+ children: /* @__PURE__ */ jsxs7("div", {
22287
+ className: "flex items-start gap-2",
22288
+ children: [
22289
+ hasNested && /* @__PURE__ */ jsx8("button", {
22290
+ type: "button",
22291
+ onClick: () => setExpanded(!expanded),
22292
+ className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
22293
+ "aria-label": expanded ? "Collapse" : "Expand",
22294
+ children: /* @__PURE__ */ jsx8(ChevronRight, {
22295
+ size: 14,
22296
+ className: cn("transition-transform duration-200", expanded && "rotate-90")
22297
+ })
22298
+ }),
22299
+ !hasNested && /* @__PURE__ */ jsx8("div", {
22300
+ className: "w-5"
22301
+ }),
22302
+ /* @__PURE__ */ jsxs7("div", {
22303
+ className: "flex-1 min-w-0",
22304
+ children: [
22305
+ /* @__PURE__ */ jsxs7("div", {
22306
+ className: "flex items-baseline gap-2 flex-wrap",
22307
+ children: [
22308
+ /* @__PURE__ */ jsxs7("span", {
22309
+ className: "font-mono text-sm text-foreground",
22310
+ children: [
22311
+ name,
22312
+ !required && /* @__PURE__ */ jsx8("span", {
22313
+ className: "text-muted-foreground",
22314
+ children: "?"
22315
+ })
22316
+ ]
22317
+ }),
22318
+ /* @__PURE__ */ jsx8("span", {
22319
+ className: "font-mono text-sm text-muted-foreground",
22320
+ children: hasNested ? "object" : type
22321
+ }),
22322
+ hasNested && /* @__PURE__ */ jsxs7("button", {
22323
+ type: "button",
22324
+ onClick: () => setExpanded(!expanded),
22325
+ className: "text-xs text-primary hover:underline cursor-pointer",
22326
+ children: [
22327
+ nestedCount,
22328
+ " ",
22329
+ nestedCount === 1 ? "property" : "properties"
22330
+ ]
22331
+ })
22332
+ ]
22333
+ }),
22334
+ description && /* @__PURE__ */ jsx8("p", {
22335
+ className: "text-sm text-muted-foreground mt-1",
22336
+ children: description
22337
+ })
22338
+ ]
22339
+ })
22340
+ ]
22341
+ })
22342
+ }),
22343
+ hasNested && expanded && nestedProps && /* @__PURE__ */ jsx8("div", {
22344
+ className: "border-l border-border ml-2",
22345
+ children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx8(NestedPropertyItem, {
22346
+ name: propName,
22347
+ schema: propSchema,
22348
+ required: getRequiredFields2(schema).includes(propName),
22349
+ depth: depth + 1
22350
+ }, propName))
22351
+ })
22352
+ ]
22353
+ });
22354
+ }
22355
+ function ParameterItem({
22356
+ param,
22357
+ depth = 0,
22358
+ className
22359
+ }) {
22360
+ const [expanded, setExpanded] = useState4(false);
22361
+ const type = formatSchema(param.schema);
22362
+ const isRequired = param.required !== false;
22363
+ const nestedProps = getNestedProperties2(param.schema);
22364
+ const nestedCount = countProperties2(param.schema);
22365
+ const hasNested = nestedCount > 0;
22366
+ return /* @__PURE__ */ jsxs7("div", {
22367
+ className: cn("border-b border-border last:border-b-0", className),
22368
+ children: [
22369
+ /* @__PURE__ */ jsx8("div", {
22370
+ className: "py-3",
22371
+ children: /* @__PURE__ */ jsxs7("div", {
22372
+ className: "flex items-start gap-2",
22373
+ children: [
22374
+ hasNested && /* @__PURE__ */ jsx8("button", {
22375
+ type: "button",
22376
+ onClick: () => setExpanded(!expanded),
22377
+ className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
22378
+ "aria-label": expanded ? "Collapse" : "Expand",
22379
+ children: /* @__PURE__ */ jsx8(ChevronRight, {
22380
+ size: 14,
22381
+ className: cn("transition-transform duration-200", expanded && "rotate-90")
22382
+ })
22383
+ }),
22384
+ !hasNested && /* @__PURE__ */ jsx8("div", {
22385
+ className: "w-5"
22386
+ }),
22387
+ /* @__PURE__ */ jsxs7("div", {
22388
+ className: "flex-1 min-w-0",
22389
+ children: [
22390
+ /* @__PURE__ */ jsxs7("div", {
22391
+ className: "flex items-baseline gap-2 flex-wrap",
22392
+ children: [
22393
+ /* @__PURE__ */ jsx8("span", {
22394
+ className: "font-mono text-sm font-medium text-foreground",
22395
+ children: param.name
22396
+ }),
22397
+ isRequired && /* @__PURE__ */ jsx8("span", {
22398
+ className: "text-[10px] font-semibold px-1.5 py-0.5 rounded border border-border bg-muted text-muted-foreground uppercase tracking-wide",
22399
+ children: "Required"
22400
+ }),
22401
+ /* @__PURE__ */ jsx8("span", {
22402
+ className: "font-mono text-sm text-muted-foreground",
22403
+ children: hasNested ? "object" : type
22404
+ }),
22405
+ hasNested && /* @__PURE__ */ jsxs7("button", {
22406
+ type: "button",
22407
+ onClick: () => setExpanded(!expanded),
22408
+ className: "text-xs text-primary hover:underline cursor-pointer",
22409
+ children: [
22410
+ nestedCount,
22411
+ " ",
22412
+ nestedCount === 1 ? "property" : "properties"
22413
+ ]
22414
+ })
22415
+ ]
22416
+ }),
22417
+ param.description && /* @__PURE__ */ jsx8("p", {
22418
+ className: "text-sm text-muted-foreground mt-1",
22419
+ children: param.description
22420
+ })
22421
+ ]
22422
+ })
22423
+ ]
22424
+ })
22425
+ }),
22426
+ hasNested && expanded && nestedProps && /* @__PURE__ */ jsx8("div", {
22427
+ className: "border-l border-border ml-2 mb-3",
22428
+ children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx8(NestedPropertyItem, {
22429
+ name: propName,
22430
+ schema: propSchema,
22431
+ required: getRequiredFields2(param.schema).includes(propName),
22432
+ depth: depth + 1
22433
+ }, propName))
22434
+ })
22435
+ ]
22436
+ });
22437
+ }
22438
+
22439
+ // src/components/styled/ClassPage.tsx
22440
+ import { jsx as jsx9, jsxs as jsxs8, Fragment } from "react/jsx-runtime";
22441
+
22442
+ function PropertyItem({ member }) {
22443
+ const visibility = member.visibility ?? "public";
22444
+ const flags = member.flags;
22445
+ const isStatic = flags?.static;
22446
+ const isReadonly = flags?.readonly;
22447
+ const type = formatSchema(member.schema);
22448
+ return /* @__PURE__ */ jsxs8("div", {
22449
+ className: "py-4 first:pt-4 last:pb-4",
22450
+ children: [
22451
+ /* @__PURE__ */ jsxs8("div", {
22452
+ className: "flex items-center gap-2 flex-wrap",
22453
+ children: [
22454
+ /* @__PURE__ */ jsx9("code", {
22455
+ className: "font-mono text-sm font-medium text-foreground",
22456
+ children: member.name
22457
+ }),
22458
+ /* @__PURE__ */ jsx9("code", {
22459
+ className: "font-mono text-sm text-primary",
22460
+ children: type
22461
+ }),
22462
+ visibility !== "public" && /* @__PURE__ */ jsx9("span", {
22463
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground font-medium",
22464
+ children: visibility
22465
+ }),
22466
+ isStatic && /* @__PURE__ */ jsx9("span", {
22467
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400 font-medium",
22468
+ children: "static"
22469
+ }),
22470
+ isReadonly && /* @__PURE__ */ jsx9("span", {
22471
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-purple-500/10 text-purple-600 dark:text-purple-400 font-medium",
22472
+ children: "readonly"
22473
+ })
22474
+ ]
22475
+ }),
22476
+ member.description && /* @__PURE__ */ jsx9("p", {
22477
+ className: "text-sm text-muted-foreground mt-2 leading-relaxed",
22478
+ children: member.description
22479
+ })
22480
+ ]
22481
+ });
22482
+ }
22483
+ function MethodItem({ member }) {
22484
+ const sig = member.signatures?.[0];
22485
+ const params = sig?.parameters ?? [];
22486
+ const returnType = formatSchema(sig?.returns?.schema);
22487
+ const visibility = member.visibility ?? "public";
22488
+ const flags = member.flags;
22489
+ const isStatic = flags?.static;
22490
+ const isAsync = flags?.async;
22491
+ return /* @__PURE__ */ jsxs8("div", {
22492
+ className: "p-4",
22493
+ children: [
22494
+ /* @__PURE__ */ jsxs8("div", {
22495
+ className: "flex items-center gap-2 flex-wrap mb-1",
22496
+ children: [
22497
+ visibility !== "public" && /* @__PURE__ */ jsx9("span", {
22498
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-muted text-muted-foreground font-medium",
22499
+ children: visibility
22500
+ }),
22501
+ isStatic && /* @__PURE__ */ jsx9("span", {
22502
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400 font-medium",
22503
+ children: "static"
22504
+ }),
22505
+ isAsync && /* @__PURE__ */ jsx9("span", {
22506
+ className: "text-xs px-1.5 py-0.5 rounded-full bg-green-500/10 text-green-600 dark:text-green-400 font-medium",
22507
+ children: "async"
22508
+ })
22509
+ ]
22510
+ }),
22511
+ /* @__PURE__ */ jsxs8("code", {
22512
+ className: "font-mono text-sm text-foreground",
22513
+ children: [
22514
+ /* @__PURE__ */ jsx9("span", {
22515
+ className: "font-medium",
22516
+ children: member.name
22517
+ }),
22518
+ /* @__PURE__ */ jsx9("span", {
22519
+ className: "text-muted-foreground",
22520
+ children: "("
22521
+ }),
22522
+ params.map((p, i) => /* @__PURE__ */ jsxs8("span", {
22523
+ children: [
22524
+ i > 0 && /* @__PURE__ */ jsx9("span", {
22525
+ className: "text-muted-foreground",
22526
+ children: ", "
22527
+ }),
22528
+ /* @__PURE__ */ jsx9("span", {
22529
+ className: "text-muted-foreground",
22530
+ children: p.name
22531
+ }),
22532
+ p.required === false && /* @__PURE__ */ jsx9("span", {
22533
+ className: "text-muted-foreground",
22534
+ children: "?"
22535
+ }),
22536
+ /* @__PURE__ */ jsx9("span", {
22537
+ className: "text-muted-foreground",
22538
+ children: ": "
22539
+ }),
22540
+ /* @__PURE__ */ jsx9("span", {
22541
+ className: "text-primary",
22542
+ children: formatSchema(p.schema)
22543
+ })
22544
+ ]
22545
+ }, p.name)),
22546
+ /* @__PURE__ */ jsx9("span", {
22547
+ className: "text-muted-foreground",
22548
+ children: "): "
22549
+ }),
22550
+ /* @__PURE__ */ jsx9("span", {
22551
+ className: "text-primary",
22552
+ children: returnType
22553
+ })
22554
+ ]
22555
+ }),
22556
+ member.description && /* @__PURE__ */ jsx9("p", {
22557
+ className: "text-sm text-muted-foreground mt-2 leading-relaxed",
22558
+ children: member.description
22559
+ })
22560
+ ]
22561
+ });
22562
+ }
22563
+ function ClassPage({ export: exp, spec, renderExample }) {
22564
+ const [copied, setCopied] = useState5(false);
22565
+ const hasExamples = exp.examples && exp.examples.length > 0;
22566
+ const constructors = exp.members?.filter((m) => m.kind === "constructor") ?? [];
22567
+ const properties = exp.members?.filter((m) => m.kind === "property" || m.kind === "field") ?? [];
22568
+ const methods = exp.members?.filter((m) => m.kind === "method") ?? [];
22569
+ const staticProperties = properties.filter((m) => m.flags?.static);
22570
+ const instanceProperties = properties.filter((m) => !m.flags?.static);
22571
+ const staticMethods = methods.filter((m) => m.flags?.static);
22572
+ const instanceMethods = methods.filter((m) => !m.flags?.static);
22573
+ const constructorSig = constructors[0]?.signatures?.[0];
22574
+ const constructorParams = constructorSig?.parameters ?? [];
22575
+ const packageName = spec.meta.name || "package";
22576
+ const importStatement = `import { ${exp.name} } from '${packageName}'`;
22577
+ const handleCopyName = () => {
22578
+ navigator.clipboard.writeText(exp.name);
22579
+ setCopied(true);
22580
+ setTimeout(() => setCopied(false), 1200);
22581
+ };
22582
+ const codeTabs = hasExamples ? exp.examples.map((example, index) => {
22583
+ const code = typeof example === "string" ? example : example.code;
22584
+ const title = typeof example === "string" ? `Example ${index + 1}` : example.title || `Example ${index + 1}`;
22585
+ const filename = `${exp.name.toLowerCase().replace(/[^a-z0-9]/g, "-")}-${index + 1}.ts`;
22586
+ return {
22587
+ label: title,
22588
+ code,
22589
+ content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx9("pre", {
22590
+ className: "p-4 overflow-x-auto",
22591
+ children: /* @__PURE__ */ jsx9("code", {
22592
+ className: "font-mono text-sm text-foreground",
22593
+ children: code
22594
+ })
22595
+ })
22596
+ };
22597
+ }) : [];
22598
+ return /* @__PURE__ */ jsxs8("div", {
22599
+ className: "doccov-class-page not-prose",
22600
+ children: [
22601
+ /* @__PURE__ */ jsxs8("header", {
22602
+ className: "mb-6",
22603
+ children: [
22604
+ /* @__PURE__ */ jsxs8("div", {
22605
+ className: "flex items-center gap-3",
22606
+ children: [
22607
+ /* @__PURE__ */ jsx9("span", {
22608
+ className: "text-xs px-2 py-0.5 rounded-full font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400",
22609
+ children: "class"
22610
+ }),
22611
+ /* @__PURE__ */ jsx9("h1", {
22612
+ className: "font-mono text-3xl font-bold text-foreground tracking-tight",
22613
+ children: exp.name
22614
+ }),
22615
+ /* @__PURE__ */ jsx9("button", {
22616
+ type: "button",
22617
+ onClick: handleCopyName,
22618
+ className: cn2("p-1.5 rounded-md", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "transition-all cursor-pointer"),
22619
+ "aria-label": "Copy class name",
22620
+ children: copied ? /* @__PURE__ */ jsx9(Check, {
22621
+ size: 18
22622
+ }) : /* @__PURE__ */ jsx9(Copy, {
22623
+ size: 18
22624
+ })
22625
+ })
22626
+ ]
22627
+ }),
22628
+ (exp.extends || exp.implements?.length) && /* @__PURE__ */ jsxs8("div", {
22629
+ className: "mt-2 flex items-center gap-2 flex-wrap text-sm",
22630
+ children: [
22631
+ exp.extends && /* @__PURE__ */ jsxs8(Fragment, {
22632
+ children: [
22633
+ /* @__PURE__ */ jsx9("span", {
22634
+ className: "text-muted-foreground",
22635
+ children: "extends"
22636
+ }),
22637
+ /* @__PURE__ */ jsx9("code", {
22638
+ className: "font-mono text-primary",
22639
+ children: exp.extends
22640
+ })
22641
+ ]
22642
+ }),
22643
+ exp.implements?.length && /* @__PURE__ */ jsxs8(Fragment, {
22644
+ children: [
22645
+ /* @__PURE__ */ jsx9("span", {
22646
+ className: "text-muted-foreground",
22647
+ children: "implements"
22648
+ }),
22649
+ /* @__PURE__ */ jsx9("code", {
22650
+ className: "font-mono text-primary",
22651
+ children: exp.implements.join(", ")
22652
+ })
22653
+ ]
22654
+ })
22655
+ ]
22656
+ }),
22657
+ exp.description && /* @__PURE__ */ jsx9("p", {
22658
+ className: "mt-4 text-muted-foreground leading-relaxed text-base max-w-2xl",
22659
+ children: exp.description
22660
+ })
22661
+ ]
22662
+ }),
22663
+ /* @__PURE__ */ jsxs8("div", {
22664
+ className: cn2("grid gap-8 xl:gap-12", hasExamples ? "lg:grid-cols-[1fr,minmax(0,420px)]" : "grid-cols-1"),
22665
+ children: [
22666
+ /* @__PURE__ */ jsxs8("div", {
22667
+ className: "min-w-0 space-y-8",
22668
+ children: [
22669
+ /* @__PURE__ */ jsx9(ImportSection, {
22670
+ importStatement
22671
+ }),
22672
+ constructorParams.length > 0 && /* @__PURE__ */ jsxs8("section", {
22673
+ children: [
22674
+ /* @__PURE__ */ jsx9("h2", {
22675
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
22676
+ children: "Constructor"
22677
+ }),
22678
+ /* @__PURE__ */ jsx9("div", {
22679
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
22680
+ children: constructorParams.map((param, index) => /* @__PURE__ */ jsx9(ParameterItem, {
22681
+ param,
22682
+ className: "px-4"
22683
+ }, param.name ?? index))
22684
+ })
22685
+ ]
22686
+ }),
22687
+ (staticProperties.length > 0 || staticMethods.length > 0) && /* @__PURE__ */ jsxs8("section", {
22688
+ children: [
22689
+ /* @__PURE__ */ jsx9("h2", {
22690
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
22691
+ children: "Static Members"
22692
+ }),
22693
+ /* @__PURE__ */ jsxs8("div", {
22694
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
22695
+ children: [
22696
+ staticProperties.map((member, index) => /* @__PURE__ */ jsx9(PropertyItem, {
22697
+ member
22698
+ }, member.name ?? `prop-${index}`)),
22699
+ staticMethods.map((member, index) => /* @__PURE__ */ jsx9(MethodItem, {
22700
+ member
22701
+ }, member.name ?? `method-${index}`))
22702
+ ]
22703
+ })
22704
+ ]
22705
+ }),
22706
+ instanceMethods.length > 0 && /* @__PURE__ */ jsxs8("section", {
22707
+ children: [
22708
+ /* @__PURE__ */ jsx9("h2", {
22709
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
22710
+ children: "Methods"
22711
+ }),
22712
+ /* @__PURE__ */ jsx9("div", {
22713
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
22714
+ children: instanceMethods.map((member, index) => /* @__PURE__ */ jsx9(MethodItem, {
22715
+ member
22716
+ }, member.name ?? index))
22717
+ })
22718
+ ]
22719
+ }),
22720
+ instanceProperties.length > 0 && /* @__PURE__ */ jsxs8("section", {
22721
+ children: [
22722
+ /* @__PURE__ */ jsx9("h2", {
22723
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
22724
+ children: "Properties"
22725
+ }),
22726
+ /* @__PURE__ */ jsx9("div", {
22727
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border px-4",
22728
+ children: instanceProperties.map((member, index) => /* @__PURE__ */ jsx9(PropertyItem, {
22729
+ member
22730
+ }, member.name ?? index))
22731
+ })
22732
+ ]
22733
+ })
22734
+ ]
22735
+ }),
22736
+ hasExamples && /* @__PURE__ */ jsx9("aside", {
22737
+ className: "lg:sticky lg:top-16 lg:self-start lg:max-h-[calc(100vh-6rem)] lg:overflow-y-auto",
22738
+ children: codeTabs.length === 1 ? /* @__PURE__ */ jsx9("div", {
22739
+ className: "rounded-lg border border-border overflow-hidden bg-background",
22740
+ children: codeTabs[0].content
22741
+ }) : /* @__PURE__ */ jsx9(CodeTabs, {
22742
+ tabs: codeTabs,
22743
+ sticky: true
22744
+ })
22745
+ })
22746
+ ]
22747
+ })
22748
+ ]
22749
+ });
22750
+ }
23964
22751
 
23965
- // src/components/styled/CodeTabs.tsx
23966
- import { useState as useState4 } from "react";
23967
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
22752
+ // src/components/styled/EnumPage.tsx
22753
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
23968
22754
 
23969
- function CodeTabs({
23970
- tabs,
23971
- defaultIndex = 0,
23972
- className
23973
- }) {
23974
- const [activeIndex, setActiveIndex] = useState4(defaultIndex);
23975
- const [copied, setCopied] = useState4(false);
23976
- const activeTab = tabs[activeIndex];
23977
- const handleCopy = () => {
23978
- if (!activeTab)
23979
- return;
23980
- navigator.clipboard.writeText(activeTab.code);
23981
- setCopied(true);
23982
- setTimeout(() => setCopied(false), 1200);
23983
- };
23984
- if (!tabs.length)
23985
- return null;
23986
- return /* @__PURE__ */ jsxs11("div", {
23987
- className: cn("group rounded-lg border border-border overflow-hidden", className),
22755
+ function EnumPage({ export: exp, spec, renderExample }) {
22756
+ const members = exp.members ?? [];
22757
+ const hasExamples = exp.examples && exp.examples.length > 0;
22758
+ const signature = buildSignatureString(exp);
22759
+ return /* @__PURE__ */ jsxs9("div", {
22760
+ className: "space-y-6",
23988
22761
  children: [
23989
- /* @__PURE__ */ jsxs11("div", {
23990
- className: "flex items-center border-b border-border bg-muted/30",
22762
+ exp.description && /* @__PURE__ */ jsx10("p", {
22763
+ className: "text-muted-foreground text-base leading-relaxed",
22764
+ children: exp.description
22765
+ }),
22766
+ /* @__PURE__ */ jsxs9("section", {
23991
22767
  children: [
23992
- /* @__PURE__ */ jsx12("div", {
23993
- className: "flex-1 flex items-stretch",
23994
- children: tabs.map((tab, index) => /* @__PURE__ */ jsx12("button", {
23995
- type: "button",
23996
- onClick: () => setActiveIndex(index),
23997
- className: cn("px-4 py-2 text-sm font-mono transition-colors", "border-r border-border last:border-r-0", index === activeIndex ? "text-foreground bg-background/50" : "text-muted-foreground hover:text-foreground"),
23998
- children: tab.label
23999
- }, tab.label))
22768
+ /* @__PURE__ */ jsx10("h2", {
22769
+ className: "text-xl font-semibold mb-2",
22770
+ children: "Declaration"
24000
22771
  }),
24001
- /* @__PURE__ */ jsx12("button", {
24002
- type: "button",
24003
- onClick: handleCopy,
24004
- className: cn("p-2 mx-2", "text-muted-foreground hover:text-foreground", "opacity-0 group-hover:opacity-100 transition-opacity", "cursor-pointer"),
24005
- "aria-label": "Copy code",
24006
- children: copied ? /* @__PURE__ */ jsx12(Check, {
24007
- size: 16
24008
- }) : /* @__PURE__ */ jsx12(Copy, {
24009
- size: 16
22772
+ /* @__PURE__ */ jsx10("div", {
22773
+ className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
22774
+ children: /* @__PURE__ */ jsx10("code", {
22775
+ className: "font-mono text-sm text-foreground",
22776
+ children: signature
22777
+ })
22778
+ }),
22779
+ exp.deprecated && /* @__PURE__ */ jsxs9("div", {
22780
+ className: "mt-2 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
22781
+ children: [
22782
+ /* @__PURE__ */ jsx10("strong", {
22783
+ children: "Deprecated:"
22784
+ }),
22785
+ " This export is deprecated."
22786
+ ]
22787
+ })
22788
+ ]
22789
+ }),
22790
+ members.length > 0 && /* @__PURE__ */ jsxs9("section", {
22791
+ children: [
22792
+ /* @__PURE__ */ jsx10("h2", {
22793
+ className: "text-xl font-semibold mb-2",
22794
+ children: "Members"
22795
+ }),
22796
+ /* @__PURE__ */ jsx10("div", {
22797
+ className: "overflow-x-auto",
22798
+ children: /* @__PURE__ */ jsxs9("table", {
22799
+ className: "w-full text-sm border-collapse",
22800
+ children: [
22801
+ /* @__PURE__ */ jsx10("thead", {
22802
+ children: /* @__PURE__ */ jsxs9("tr", {
22803
+ className: "border-b border-border",
22804
+ children: [
22805
+ /* @__PURE__ */ jsx10("th", {
22806
+ className: "text-left py-2 px-3 font-medium text-muted-foreground",
22807
+ children: "Name"
22808
+ }),
22809
+ /* @__PURE__ */ jsx10("th", {
22810
+ className: "text-left py-2 px-3 font-medium text-muted-foreground",
22811
+ children: "Value"
22812
+ }),
22813
+ /* @__PURE__ */ jsx10("th", {
22814
+ className: "text-left py-2 px-3 font-medium text-muted-foreground",
22815
+ children: "Description"
22816
+ })
22817
+ ]
22818
+ })
22819
+ }),
22820
+ /* @__PURE__ */ jsx10("tbody", {
22821
+ children: members.map((member, index) => {
22822
+ const value = member.schema !== undefined ? typeof member.schema === "object" && member.schema !== null ? member.schema.const ?? member.schema.default ?? "-" : member.schema : "-";
22823
+ return /* @__PURE__ */ jsxs9("tr", {
22824
+ className: "border-b border-border last:border-0",
22825
+ children: [
22826
+ /* @__PURE__ */ jsx10("td", {
22827
+ className: "py-2 px-3 align-top",
22828
+ children: /* @__PURE__ */ jsx10("code", {
22829
+ className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
22830
+ children: member.name
22831
+ })
22832
+ }),
22833
+ /* @__PURE__ */ jsx10("td", {
22834
+ className: "py-2 px-3 align-top",
22835
+ children: /* @__PURE__ */ jsx10("code", {
22836
+ className: "font-mono text-xs text-muted-foreground",
22837
+ children: String(value)
22838
+ })
22839
+ }),
22840
+ /* @__PURE__ */ jsx10("td", {
22841
+ className: "py-2 px-3 align-top text-muted-foreground",
22842
+ children: member.description ?? ""
22843
+ })
22844
+ ]
22845
+ }, member.name ?? index);
22846
+ })
22847
+ })
22848
+ ]
24010
22849
  })
24011
22850
  })
24012
22851
  ]
24013
22852
  }),
24014
- /* @__PURE__ */ jsx12("div", {
24015
- className: "bg-background",
24016
- children: activeTab?.content
22853
+ hasExamples && /* @__PURE__ */ jsxs9("section", {
22854
+ children: [
22855
+ /* @__PURE__ */ jsx10("h2", {
22856
+ className: "text-xl font-semibold mb-2",
22857
+ children: "Examples"
22858
+ }),
22859
+ exp.examples.map((example, index) => {
22860
+ const code = typeof example === "string" ? example : example.code;
22861
+ return /* @__PURE__ */ jsx10("div", {
22862
+ className: "mb-4",
22863
+ children: renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx10("pre", {
22864
+ className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
22865
+ children: /* @__PURE__ */ jsx10("code", {
22866
+ className: "font-mono text-sm text-foreground",
22867
+ children: code
22868
+ })
22869
+ })
22870
+ }, index);
22871
+ })
22872
+ ]
24017
22873
  })
24018
22874
  ]
24019
22875
  });
24020
22876
  }
24021
22877
 
24022
- // src/components/styled/ImportSection.tsx
24023
- import { useState as useState5 } from "react";
24024
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
22878
+ // src/components/styled/ExportIndexPage.tsx
22879
+ import { cn as cn4 } from "@doccov/ui/lib/utils";
22880
+ import { useState as useState6, useMemo } from "react";
22881
+
22882
+ // src/components/styled/ExportCard.tsx
22883
+ var import_link3 = __toESM(require_link(), 1);
22884
+ import { cn as cn3 } from "@doccov/ui/lib/utils";
22885
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
24025
22886
 
24026
- function ImportSection({
24027
- importStatement,
22887
+ var KIND_COLORS = {
22888
+ function: "group-hover:text-blue-600 dark:group-hover:text-blue-400",
22889
+ class: "group-hover:text-purple-600 dark:group-hover:text-purple-400",
22890
+ interface: "group-hover:text-green-600 dark:group-hover:text-green-400",
22891
+ type: "group-hover:text-amber-600 dark:group-hover:text-amber-400",
22892
+ enum: "group-hover:text-rose-600 dark:group-hover:text-rose-400",
22893
+ variable: "group-hover:text-cyan-600 dark:group-hover:text-cyan-400"
22894
+ };
22895
+ var KIND_BADGE_COLORS = {
22896
+ function: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
22897
+ class: "bg-purple-500/10 text-purple-600 dark:text-purple-400",
22898
+ interface: "bg-green-500/10 text-green-600 dark:text-green-400",
22899
+ type: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
22900
+ enum: "bg-rose-500/10 text-rose-600 dark:text-rose-400",
22901
+ variable: "bg-cyan-500/10 text-cyan-600 dark:text-cyan-400"
22902
+ };
22903
+ function ExportCard({
22904
+ name,
22905
+ description,
22906
+ href,
22907
+ kind = "function",
24028
22908
  className
24029
22909
  }) {
24030
- const [copied, setCopied] = useState5(false);
24031
- const handleCopy = () => {
24032
- navigator.clipboard.writeText(importStatement);
24033
- setCopied(true);
24034
- setTimeout(() => setCopied(false), 1200);
24035
- };
24036
- return /* @__PURE__ */ jsxs12("div", {
24037
- className: cn("group flex items-center justify-between gap-3", "rounded-lg border border-border bg-muted/30 px-4 py-3", className),
22910
+ const isFunction = kind === "function";
22911
+ const hoverColor = KIND_COLORS[kind];
22912
+ const badgeColor = KIND_BADGE_COLORS[kind];
22913
+ return /* @__PURE__ */ jsxs10(import_link3.default, {
22914
+ href,
22915
+ className: cn3("group block rounded-lg border border-border bg-card/50 p-4", "transition-all duration-200 ease-out", "hover:border-primary/30 hover:bg-card hover:shadow-lg hover:shadow-primary/5", "hover:-translate-y-1", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", className),
24038
22916
  children: [
24039
- /* @__PURE__ */ jsx13("code", {
24040
- className: "font-mono text-sm text-foreground overflow-x-auto",
24041
- children: importStatement
22917
+ /* @__PURE__ */ jsxs10("div", {
22918
+ className: "flex items-center gap-2 mb-2",
22919
+ children: [
22920
+ /* @__PURE__ */ jsx11("span", {
22921
+ className: cn3("font-mono text-base font-medium text-foreground transition-colors duration-200", hoverColor),
22922
+ children: name
22923
+ }),
22924
+ isFunction && /* @__PURE__ */ jsx11("span", {
22925
+ className: "font-mono text-base text-muted-foreground",
22926
+ children: "()"
22927
+ }),
22928
+ /* @__PURE__ */ jsx11("span", {
22929
+ className: cn3("ml-auto text-xs px-2 py-0.5 rounded-full font-medium", badgeColor),
22930
+ children: kind
22931
+ })
22932
+ ]
24042
22933
  }),
24043
- /* @__PURE__ */ jsx13("button", {
24044
- type: "button",
24045
- onClick: handleCopy,
24046
- className: cn("shrink-0 p-1.5 rounded", "text-muted-foreground hover:text-foreground", "opacity-0 group-hover:opacity-100 transition-opacity duration-200", "cursor-pointer"),
24047
- "aria-label": "Copy import statement",
24048
- children: copied ? /* @__PURE__ */ jsx13(Check, {
24049
- size: 16
24050
- }) : /* @__PURE__ */ jsx13(Copy, {
24051
- size: 16
24052
- })
22934
+ description && /* @__PURE__ */ jsx11("p", {
22935
+ className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed group-hover:text-muted-foreground/80 transition-colors",
22936
+ children: description
24053
22937
  })
24054
22938
  ]
24055
22939
  });
24056
22940
  }
24057
22941
 
24058
- // src/components/styled/ParameterItem.tsx
24059
- import { useState as useState6 } from "react";
24060
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
22942
+ // src/components/styled/ExportIndexPage.tsx
22943
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
24061
22944
 
24062
- function getNestedProperties2(schema) {
24063
- if (!schema || typeof schema !== "object")
24064
- return null;
24065
- const s = schema;
24066
- if (s.type === "object" && s.properties && typeof s.properties === "object") {
24067
- return s.properties;
24068
- }
24069
- return null;
24070
- }
24071
- function getRequiredFields2(schema) {
24072
- if (!schema || typeof schema !== "object")
24073
- return [];
24074
- const s = schema;
24075
- if (Array.isArray(s.required)) {
24076
- return s.required;
22945
+ var KIND_ORDER = ["function", "class", "interface", "type", "enum", "variable"];
22946
+ var KIND_LABELS = {
22947
+ function: "Functions",
22948
+ class: "Classes",
22949
+ interface: "Interfaces",
22950
+ type: "Types",
22951
+ enum: "Enums",
22952
+ variable: "Variables"
22953
+ };
22954
+ function groupByKind(exports) {
22955
+ const groups = new Map;
22956
+ for (const exp of exports) {
22957
+ const kind = exp.kind || "variable";
22958
+ const normalizedKind = KIND_ORDER.includes(kind) ? kind : "variable";
22959
+ const list = groups.get(normalizedKind) || [];
22960
+ list.push(exp);
22961
+ groups.set(normalizedKind, list);
24077
22962
  }
24078
- return [];
24079
- }
24080
- function countProperties2(schema) {
24081
- const props = getNestedProperties2(schema);
24082
- return props ? Object.keys(props).length : 0;
24083
- }
24084
- function NestedPropertyItem({
24085
- name,
24086
- schema,
24087
- required = false,
24088
- depth = 0
24089
- }) {
24090
- const [expanded, setExpanded] = useState6(false);
24091
- const type = formatSchema(schema);
24092
- const nestedProps = getNestedProperties2(schema);
24093
- const nestedCount = countProperties2(schema);
24094
- const hasNested = nestedCount > 0;
24095
- const schemaObj = schema;
24096
- const description = schemaObj?.description;
24097
- return /* @__PURE__ */ jsxs13("div", {
24098
- className: cn("border-t border-border first:border-t-0", depth > 0 && "ml-4"),
24099
- children: [
24100
- /* @__PURE__ */ jsx14("div", {
24101
- className: "py-3",
24102
- children: /* @__PURE__ */ jsxs13("div", {
24103
- className: "flex items-start gap-2",
24104
- children: [
24105
- hasNested && /* @__PURE__ */ jsx14("button", {
24106
- type: "button",
24107
- onClick: () => setExpanded(!expanded),
24108
- className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
24109
- "aria-label": expanded ? "Collapse" : "Expand",
24110
- children: /* @__PURE__ */ jsx14(ChevronRight, {
24111
- size: 14,
24112
- className: cn("transition-transform duration-200", expanded && "rotate-90")
24113
- })
24114
- }),
24115
- !hasNested && /* @__PURE__ */ jsx14("div", {
24116
- className: "w-5"
24117
- }),
24118
- /* @__PURE__ */ jsxs13("div", {
24119
- className: "flex-1 min-w-0",
24120
- children: [
24121
- /* @__PURE__ */ jsxs13("div", {
24122
- className: "flex items-baseline gap-2 flex-wrap",
24123
- children: [
24124
- /* @__PURE__ */ jsxs13("span", {
24125
- className: "font-mono text-sm text-foreground",
24126
- children: [
24127
- name,
24128
- !required && /* @__PURE__ */ jsx14("span", {
24129
- className: "text-muted-foreground",
24130
- children: "?"
24131
- })
24132
- ]
24133
- }),
24134
- /* @__PURE__ */ jsx14("span", {
24135
- className: "font-mono text-sm text-muted-foreground",
24136
- children: hasNested ? "object" : type
24137
- }),
24138
- hasNested && /* @__PURE__ */ jsxs13("button", {
24139
- type: "button",
24140
- onClick: () => setExpanded(!expanded),
24141
- className: "text-xs text-primary hover:underline cursor-pointer",
24142
- children: [
24143
- nestedCount,
24144
- " ",
24145
- nestedCount === 1 ? "property" : "properties"
24146
- ]
24147
- })
24148
- ]
24149
- }),
24150
- description && /* @__PURE__ */ jsx14("p", {
24151
- className: "text-sm text-muted-foreground mt-1",
24152
- children: description
24153
- })
24154
- ]
24155
- })
24156
- ]
24157
- })
24158
- }),
24159
- hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
24160
- className: "border-l border-border ml-2",
24161
- children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
24162
- name: propName,
24163
- schema: propSchema,
24164
- required: getRequiredFields2(schema).includes(propName),
24165
- depth: depth + 1
24166
- }, propName))
24167
- })
24168
- ]
24169
- });
22963
+ return KIND_ORDER.filter((kind) => groups.has(kind)).map((kind) => ({
22964
+ kind,
22965
+ label: KIND_LABELS[kind],
22966
+ exports: groups.get(kind).sort((a, b) => a.name.localeCompare(b.name))
22967
+ }));
24170
22968
  }
24171
- function ParameterItem({
24172
- param,
24173
- depth = 0,
24174
- className
22969
+ function ExportIndexPage({
22970
+ spec,
22971
+ baseHref,
22972
+ description,
22973
+ className,
22974
+ showSearch = true,
22975
+ showFilters = true
24175
22976
  }) {
24176
- const [expanded, setExpanded] = useState6(false);
24177
- const type = formatSchema(param.schema);
24178
- const isRequired = param.required !== false;
24179
- const nestedProps = getNestedProperties2(param.schema);
24180
- const nestedCount = countProperties2(param.schema);
24181
- const hasNested = nestedCount > 0;
24182
- return /* @__PURE__ */ jsxs13("div", {
24183
- className: cn("border-b border-border last:border-b-0", className),
22977
+ const [searchQuery, setSearchQuery] = useState6("");
22978
+ const [activeFilter, setActiveFilter] = useState6("all");
22979
+ if (false) {}
22980
+ const allGroups = useMemo(() => groupByKind(spec.exports), [spec.exports]);
22981
+ const filteredGroups = useMemo(() => {
22982
+ const query = searchQuery.toLowerCase().trim();
22983
+ return allGroups.filter((group) => activeFilter === "all" || group.kind === activeFilter).map((group) => ({
22984
+ ...group,
22985
+ exports: group.exports.filter((exp) => {
22986
+ if (!query)
22987
+ return true;
22988
+ return exp.name.toLowerCase().includes(query) || exp.description?.toLowerCase().includes(query);
22989
+ })
22990
+ })).filter((group) => group.exports.length > 0);
22991
+ }, [allGroups, searchQuery, activeFilter]);
22992
+ const availableKinds = useMemo(() => allGroups.map((g) => g.kind), [allGroups]);
22993
+ const totalExports = filteredGroups.reduce((sum, g) => sum + g.exports.length, 0);
22994
+ return /* @__PURE__ */ jsxs11("div", {
22995
+ className: cn4("space-y-8 not-prose", className),
24184
22996
  children: [
24185
- /* @__PURE__ */ jsx14("div", {
24186
- className: "py-3",
24187
- children: /* @__PURE__ */ jsxs13("div", {
24188
- className: "flex items-start gap-2",
24189
- children: [
24190
- hasNested && /* @__PURE__ */ jsx14("button", {
24191
- type: "button",
24192
- onClick: () => setExpanded(!expanded),
24193
- className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
24194
- "aria-label": expanded ? "Collapse" : "Expand",
24195
- children: /* @__PURE__ */ jsx14(ChevronRight, {
24196
- size: 14,
24197
- className: cn("transition-transform duration-200", expanded && "rotate-90")
22997
+ /* @__PURE__ */ jsxs11("div", {
22998
+ children: [
22999
+ /* @__PURE__ */ jsx12("h1", {
23000
+ className: "text-3xl font-bold text-foreground mb-3",
23001
+ children: spec.meta.name || "API Reference"
23002
+ }),
23003
+ (description || spec.meta.description) && /* @__PURE__ */ jsx12("p", {
23004
+ className: "text-muted-foreground text-lg leading-relaxed max-w-3xl",
23005
+ children: description || spec.meta.description
23006
+ })
23007
+ ]
23008
+ }),
23009
+ (showSearch || showFilters) && /* @__PURE__ */ jsxs11("div", {
23010
+ className: "space-y-4",
23011
+ children: [
23012
+ showSearch && /* @__PURE__ */ jsxs11("div", {
23013
+ className: "relative max-w-md",
23014
+ children: [
23015
+ /* @__PURE__ */ jsx12(Search, {
23016
+ size: 18,
23017
+ className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
23018
+ }),
23019
+ /* @__PURE__ */ jsx12("input", {
23020
+ type: "text",
23021
+ placeholder: "Search exports...",
23022
+ value: searchQuery,
23023
+ onChange: (e) => setSearchQuery(e.target.value),
23024
+ className: cn4("w-full pl-10 pr-4 py-2 rounded-lg", "border border-border bg-background", "text-sm text-foreground placeholder:text-muted-foreground", "focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent", "transition-shadow")
24198
23025
  })
24199
- }),
24200
- !hasNested && /* @__PURE__ */ jsx14("div", {
24201
- className: "w-5"
24202
- }),
24203
- /* @__PURE__ */ jsxs13("div", {
24204
- className: "flex-1 min-w-0",
24205
- children: [
24206
- /* @__PURE__ */ jsxs13("div", {
24207
- className: "flex items-baseline gap-2 flex-wrap",
24208
- children: [
24209
- /* @__PURE__ */ jsx14("span", {
24210
- className: "font-mono text-sm font-medium text-foreground",
24211
- children: param.name
24212
- }),
24213
- isRequired && /* @__PURE__ */ jsx14("span", {
24214
- className: "text-[10px] font-semibold px-1.5 py-0.5 rounded border border-border bg-muted text-muted-foreground uppercase tracking-wide",
24215
- children: "Required"
24216
- }),
24217
- /* @__PURE__ */ jsx14("span", {
24218
- className: "font-mono text-sm text-muted-foreground",
24219
- children: hasNested ? "object" : type
24220
- }),
24221
- hasNested && /* @__PURE__ */ jsxs13("button", {
24222
- type: "button",
24223
- onClick: () => setExpanded(!expanded),
24224
- className: "text-xs text-primary hover:underline cursor-pointer",
24225
- children: [
24226
- nestedCount,
24227
- " ",
24228
- nestedCount === 1 ? "property" : "properties"
24229
- ]
24230
- })
24231
- ]
24232
- }),
24233
- param.description && /* @__PURE__ */ jsx14("p", {
24234
- className: "text-sm text-muted-foreground mt-1",
24235
- children: param.description
24236
- })
24237
- ]
24238
- })
24239
- ]
24240
- })
23026
+ ]
23027
+ }),
23028
+ showFilters && availableKinds.length > 1 && /* @__PURE__ */ jsxs11("div", {
23029
+ className: "flex flex-wrap gap-2",
23030
+ children: [
23031
+ /* @__PURE__ */ jsx12("button", {
23032
+ type: "button",
23033
+ onClick: () => setActiveFilter("all"),
23034
+ className: cn4("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === "all" ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
23035
+ children: "All"
23036
+ }),
23037
+ availableKinds.map((kind) => /* @__PURE__ */ jsx12("button", {
23038
+ type: "button",
23039
+ onClick: () => setActiveFilter(kind),
23040
+ className: cn4("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === kind ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
23041
+ children: KIND_LABELS[kind]
23042
+ }, kind))
23043
+ ]
23044
+ })
23045
+ ]
24241
23046
  }),
24242
- hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
24243
- className: "border-l border-border ml-2 mb-3",
24244
- children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
24245
- name: propName,
24246
- schema: propSchema,
24247
- required: getRequiredFields2(param.schema).includes(propName),
24248
- depth: depth + 1
24249
- }, propName))
23047
+ (searchQuery || activeFilter !== "all") && /* @__PURE__ */ jsxs11("p", {
23048
+ className: "text-sm text-muted-foreground",
23049
+ children: [
23050
+ totalExports,
23051
+ " ",
23052
+ totalExports === 1 ? "result" : "results",
23053
+ searchQuery && ` for "${searchQuery}"`
23054
+ ]
23055
+ }),
23056
+ filteredGroups.map((group) => /* @__PURE__ */ jsxs11("section", {
23057
+ children: [
23058
+ /* @__PURE__ */ jsx12("h2", {
23059
+ className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
23060
+ children: group.label
23061
+ }),
23062
+ /* @__PURE__ */ jsx12("div", {
23063
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
23064
+ children: group.exports.map((exp) => /* @__PURE__ */ jsx12(ExportCard, {
23065
+ name: exp.name,
23066
+ description: exp.description,
23067
+ href: `${baseHref}/${group.kind}s/${exp.id}`,
23068
+ kind: exp.kind
23069
+ }, exp.id))
23070
+ })
23071
+ ]
23072
+ }, group.kind)),
23073
+ filteredGroups.length === 0 && /* @__PURE__ */ jsxs11("div", {
23074
+ className: "rounded-lg border border-border bg-card/50 p-8 text-center",
23075
+ children: [
23076
+ /* @__PURE__ */ jsx12("p", {
23077
+ className: "text-muted-foreground",
23078
+ children: searchQuery || activeFilter !== "all" ? "No exports match your search." : "No exports found in this package."
23079
+ }),
23080
+ (searchQuery || activeFilter !== "all") && /* @__PURE__ */ jsx12("button", {
23081
+ type: "button",
23082
+ onClick: () => {
23083
+ setSearchQuery("");
23084
+ setActiveFilter("all");
23085
+ },
23086
+ className: "mt-3 text-sm text-primary hover:underline cursor-pointer",
23087
+ children: "Clear filters"
23088
+ })
23089
+ ]
24250
23090
  })
24251
23091
  ]
24252
23092
  });
24253
23093
  }
24254
23094
 
24255
23095
  // src/components/styled/FunctionPage.tsx
24256
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
23096
+ import { cn as cn5 } from "@doccov/ui/lib/utils";
23097
+ import { CodeTabs as CodeTabs2, ImportSection as ImportSection2 } from "@doccov/ui/api";
23098
+ import { useState as useState7 } from "react";
23099
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
24257
23100
 
24258
23101
  function FunctionPage({
24259
23102
  export: exp,
@@ -24264,7 +23107,7 @@ function FunctionPage({
24264
23107
  const sig = exp.signatures?.[0];
24265
23108
  const hasExamples = exp.examples && exp.examples.length > 0;
24266
23109
  const hasParams = sig?.parameters && sig.parameters.length > 0;
24267
- const packageName = spec.name || "package";
23110
+ const packageName = spec.meta.name || "package";
24268
23111
  const importStatement = `import { ${exp.name} } from '${packageName}'`;
24269
23112
  const handleCopyName = () => {
24270
23113
  navigator.clipboard.writeText(exp.name);
@@ -24278,89 +23121,95 @@ function FunctionPage({
24278
23121
  return {
24279
23122
  label: title,
24280
23123
  code,
24281
- content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx15("pre", {
23124
+ content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx13("pre", {
24282
23125
  className: "p-4 overflow-x-auto",
24283
- children: /* @__PURE__ */ jsx15("code", {
23126
+ children: /* @__PURE__ */ jsx13("code", {
24284
23127
  className: "font-mono text-sm text-foreground",
24285
23128
  children: code
24286
23129
  })
24287
23130
  })
24288
23131
  };
24289
23132
  }) : [];
24290
- return /* @__PURE__ */ jsxs14("div", {
24291
- className: "space-y-6 not-prose",
23133
+ return /* @__PURE__ */ jsxs12("div", {
23134
+ className: "doccov-function-page not-prose",
24292
23135
  children: [
24293
- /* @__PURE__ */ jsxs14("div", {
24294
- className: "flex items-center gap-3",
23136
+ /* @__PURE__ */ jsxs12("header", {
23137
+ className: "mb-6",
24295
23138
  children: [
24296
- /* @__PURE__ */ jsxs14("h1", {
24297
- className: "font-mono text-2xl font-semibold text-foreground",
23139
+ /* @__PURE__ */ jsxs12("div", {
23140
+ className: "flex items-center gap-3",
24298
23141
  children: [
24299
- exp.name,
24300
- /* @__PURE__ */ jsx15("span", {
24301
- className: "text-muted-foreground",
24302
- children: "()"
23142
+ /* @__PURE__ */ jsxs12("h1", {
23143
+ className: "font-mono text-3xl font-bold text-foreground tracking-tight",
23144
+ children: [
23145
+ exp.name,
23146
+ /* @__PURE__ */ jsx13("span", {
23147
+ className: "text-muted-foreground font-normal",
23148
+ children: "()"
23149
+ })
23150
+ ]
23151
+ }),
23152
+ /* @__PURE__ */ jsx13("button", {
23153
+ type: "button",
23154
+ onClick: handleCopyName,
23155
+ className: cn5("p-1.5 rounded-md", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "transition-all cursor-pointer"),
23156
+ "aria-label": "Copy function name",
23157
+ children: copied ? /* @__PURE__ */ jsx13(Check, {
23158
+ size: 18
23159
+ }) : /* @__PURE__ */ jsx13(Copy, {
23160
+ size: 18
23161
+ })
24303
23162
  })
24304
23163
  ]
24305
23164
  }),
24306
- /* @__PURE__ */ jsx15("button", {
24307
- type: "button",
24308
- onClick: handleCopyName,
24309
- className: cn("p-1.5 rounded", "text-muted-foreground hover:text-foreground", "transition-colors cursor-pointer"),
24310
- "aria-label": "Copy function name",
24311
- children: copied ? /* @__PURE__ */ jsx15(Check, {
24312
- size: 16
24313
- }) : /* @__PURE__ */ jsx15(Copy, {
24314
- size: 16
24315
- })
23165
+ exp.description && /* @__PURE__ */ jsx13("p", {
23166
+ className: "mt-4 text-muted-foreground leading-relaxed text-base max-w-2xl",
23167
+ children: exp.description
24316
23168
  })
24317
23169
  ]
24318
23170
  }),
24319
- exp.description && /* @__PURE__ */ jsx15("p", {
24320
- className: "text-muted-foreground leading-relaxed text-base",
24321
- children: exp.description
24322
- }),
24323
- /* @__PURE__ */ jsx15(ImportSection, {
24324
- importStatement
24325
- }),
24326
- /* @__PURE__ */ jsxs14("div", {
24327
- className: cn("grid gap-8", hasExamples ? "lg:grid-cols-2" : "grid-cols-1"),
23171
+ /* @__PURE__ */ jsxs12("div", {
23172
+ className: cn5("grid gap-8 xl:gap-12", hasExamples ? "lg:grid-cols-[1fr,minmax(0,420px)]" : "grid-cols-1"),
24328
23173
  children: [
24329
- /* @__PURE__ */ jsxs14("div", {
24330
- className: "space-y-8",
23174
+ /* @__PURE__ */ jsxs12("div", {
23175
+ className: "min-w-0 space-y-8",
24331
23176
  children: [
24332
- hasParams && /* @__PURE__ */ jsxs14("section", {
23177
+ /* @__PURE__ */ jsx13(ImportSection2, {
23178
+ importStatement
23179
+ }),
23180
+ hasParams && /* @__PURE__ */ jsxs12("section", {
24333
23181
  children: [
24334
- /* @__PURE__ */ jsx15("h2", {
24335
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
23182
+ /* @__PURE__ */ jsx13("h2", {
23183
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
24336
23184
  children: "Parameters"
24337
23185
  }),
24338
- /* @__PURE__ */ jsx15("div", {
24339
- className: "rounded-lg border border-border bg-card/50",
24340
- children: sig.parameters.map((param, index) => /* @__PURE__ */ jsx15(ParameterItem, {
24341
- param
23186
+ /* @__PURE__ */ jsx13("div", {
23187
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
23188
+ children: sig.parameters.map((param, index) => /* @__PURE__ */ jsx13(ParameterItem, {
23189
+ param,
23190
+ className: "px-4"
24342
23191
  }, param.name ?? index))
24343
23192
  })
24344
23193
  ]
24345
23194
  }),
24346
- sig?.returns && /* @__PURE__ */ jsxs14("section", {
23195
+ sig?.returns && /* @__PURE__ */ jsxs12("section", {
24347
23196
  children: [
24348
- /* @__PURE__ */ jsx15("h2", {
24349
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
23197
+ /* @__PURE__ */ jsx13("h2", {
23198
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
24350
23199
  children: "Returns"
24351
23200
  }),
24352
- /* @__PURE__ */ jsxs14("div", {
23201
+ /* @__PURE__ */ jsxs12("div", {
24353
23202
  className: "rounded-lg border border-border bg-card/50 p-4",
24354
23203
  children: [
24355
- /* @__PURE__ */ jsx15("div", {
23204
+ /* @__PURE__ */ jsx13("div", {
24356
23205
  className: "flex items-baseline gap-2 mb-2",
24357
- children: /* @__PURE__ */ jsx15("span", {
24358
- className: "font-mono text-sm text-foreground",
23206
+ children: /* @__PURE__ */ jsx13("span", {
23207
+ className: "font-mono text-sm font-medium text-foreground",
24359
23208
  children: formatSchema(sig.returns.schema)
24360
23209
  })
24361
23210
  }),
24362
- sig.returns.description && /* @__PURE__ */ jsx15("p", {
24363
- className: "text-sm text-muted-foreground",
23211
+ sig.returns.description && /* @__PURE__ */ jsx13("p", {
23212
+ className: "text-sm text-muted-foreground leading-relaxed",
24364
23213
  children: sig.returns.description
24365
23214
  })
24366
23215
  ]
@@ -24369,20 +23218,15 @@ function FunctionPage({
24369
23218
  })
24370
23219
  ]
24371
23220
  }),
24372
- hasExamples && /* @__PURE__ */ jsxs14("div", {
24373
- className: "lg:sticky lg:top-20 lg:self-start",
24374
- children: [
24375
- /* @__PURE__ */ jsx15("h2", {
24376
- className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
24377
- children: "Examples"
24378
- }),
24379
- codeTabs.length === 1 ? /* @__PURE__ */ jsx15("div", {
24380
- className: "rounded-lg border border-border overflow-hidden bg-background",
24381
- children: codeTabs[0].content
24382
- }) : /* @__PURE__ */ jsx15(CodeTabs, {
24383
- tabs: codeTabs
24384
- })
24385
- ]
23221
+ hasExamples && /* @__PURE__ */ jsx13("aside", {
23222
+ className: "lg:sticky lg:top-16 lg:self-start lg:max-h-[calc(100vh-6rem)] lg:overflow-y-auto",
23223
+ children: codeTabs.length === 1 ? /* @__PURE__ */ jsx13("div", {
23224
+ className: "rounded-lg border border-border overflow-hidden bg-background",
23225
+ children: codeTabs[0].content
23226
+ }) : /* @__PURE__ */ jsx13(CodeTabs2, {
23227
+ tabs: codeTabs,
23228
+ sticky: true
23229
+ })
24386
23230
  })
24387
23231
  ]
24388
23232
  })
@@ -24391,41 +23235,81 @@ function FunctionPage({
24391
23235
  }
24392
23236
 
24393
23237
  // src/components/styled/InterfacePage.tsx
24394
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
23238
+ import { cn as cn6 } from "@doccov/ui/lib/utils";
23239
+ import { CodeTabs as CodeTabs3, ImportSection as ImportSection3 } from "@doccov/ui/api";
23240
+ import { useState as useState8 } from "react";
23241
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
24395
23242
 
24396
23243
  function InterfacePage({
24397
23244
  export: exp,
24398
23245
  spec,
24399
23246
  renderExample
24400
23247
  }) {
23248
+ const [copied, setCopied] = useState8(false);
24401
23249
  const properties = exp.members?.filter((m) => m.kind === "property" || m.kind === "field" || !m.kind);
24402
23250
  const methods = exp.members?.filter((m) => m.kind === "method" || m.kind === "function");
24403
23251
  const hasExamples = exp.examples && exp.examples.length > 0;
24404
- const signature = buildSignatureString(exp);
24405
- return /* @__PURE__ */ jsxs15("div", {
24406
- className: "space-y-6",
23252
+ const packageName = spec.meta.name || "package";
23253
+ const importStatement = `import type { ${exp.name} } from '${packageName}'`;
23254
+ const handleCopyName = () => {
23255
+ navigator.clipboard.writeText(exp.name);
23256
+ setCopied(true);
23257
+ setTimeout(() => setCopied(false), 1200);
23258
+ };
23259
+ const codeTabs = hasExamples ? exp.examples.map((example, index) => {
23260
+ const code = typeof example === "string" ? example : example.code;
23261
+ const title = typeof example === "string" ? `Example ${index + 1}` : example.title || `Example ${index + 1}`;
23262
+ const filename = `${exp.name.toLowerCase().replace(/[^a-z0-9]/g, "-")}-${index + 1}.ts`;
23263
+ return {
23264
+ label: title,
23265
+ code,
23266
+ content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx14("pre", {
23267
+ className: "p-4 overflow-x-auto",
23268
+ children: /* @__PURE__ */ jsx14("code", {
23269
+ className: "font-mono text-sm text-foreground",
23270
+ children: code
23271
+ })
23272
+ })
23273
+ };
23274
+ }) : [];
23275
+ return /* @__PURE__ */ jsxs13("div", {
23276
+ className: "doccov-interface-page not-prose",
24407
23277
  children: [
24408
- exp.description && /* @__PURE__ */ jsx16("p", {
24409
- className: "text-muted-foreground text-base leading-relaxed",
24410
- children: exp.description
24411
- }),
24412
- /* @__PURE__ */ jsxs15("section", {
23278
+ /* @__PURE__ */ jsxs13("header", {
23279
+ className: "mb-6",
24413
23280
  children: [
24414
- /* @__PURE__ */ jsx16("h2", {
24415
- className: "text-xl font-semibold mb-2",
24416
- children: "Declaration"
23281
+ /* @__PURE__ */ jsxs13("div", {
23282
+ className: "flex items-center gap-3",
23283
+ children: [
23284
+ /* @__PURE__ */ jsx14("span", {
23285
+ className: cn6("text-xs px-2 py-0.5 rounded-full font-medium", exp.kind === "type" ? "bg-amber-500/10 text-amber-600 dark:text-amber-400" : "bg-green-500/10 text-green-600 dark:text-green-400"),
23286
+ children: exp.kind === "type" ? "type" : "interface"
23287
+ }),
23288
+ /* @__PURE__ */ jsx14("h1", {
23289
+ className: "font-mono text-3xl font-bold text-foreground tracking-tight",
23290
+ children: exp.name
23291
+ }),
23292
+ /* @__PURE__ */ jsx14("button", {
23293
+ type: "button",
23294
+ onClick: handleCopyName,
23295
+ className: cn6("p-1.5 rounded-md", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "transition-all cursor-pointer"),
23296
+ "aria-label": "Copy type name",
23297
+ children: copied ? /* @__PURE__ */ jsx14(Check, {
23298
+ size: 18
23299
+ }) : /* @__PURE__ */ jsx14(Copy, {
23300
+ size: 18
23301
+ })
23302
+ })
23303
+ ]
24417
23304
  }),
24418
- /* @__PURE__ */ jsx16("div", {
24419
- className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
24420
- children: /* @__PURE__ */ jsx16("code", {
24421
- className: "font-mono text-sm text-foreground",
24422
- children: signature
24423
- })
23305
+ exp.description && /* @__PURE__ */ jsx14("p", {
23306
+ className: "mt-4 text-muted-foreground leading-relaxed text-base max-w-2xl",
23307
+ children: exp.description
24424
23308
  }),
24425
- exp.deprecated && /* @__PURE__ */ jsxs15("div", {
24426
- className: "mt-2 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
23309
+ exp.deprecated && /* @__PURE__ */ jsxs13("div", {
23310
+ className: "mt-4 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
24427
23311
  children: [
24428
- /* @__PURE__ */ jsx16("strong", {
23312
+ /* @__PURE__ */ jsx14("strong", {
24429
23313
  children: "Deprecated:"
24430
23314
  }),
24431
23315
  " This export is deprecated."
@@ -24433,145 +23317,131 @@ function InterfacePage({
24433
23317
  })
24434
23318
  ]
24435
23319
  }),
24436
- exp.extends && /* @__PURE__ */ jsxs15("section", {
24437
- children: [
24438
- /* @__PURE__ */ jsx16("h2", {
24439
- className: "text-xl font-semibold mb-2",
24440
- children: "Extends"
24441
- }),
24442
- /* @__PURE__ */ jsx16("div", {
24443
- className: "rounded-lg border border-border bg-card p-4",
24444
- children: /* @__PURE__ */ jsx16("code", {
24445
- className: "font-mono text-sm text-primary",
24446
- children: exp.extends
24447
- })
24448
- })
24449
- ]
24450
- }),
24451
- properties && properties.length > 0 && /* @__PURE__ */ jsxs15("section", {
23320
+ /* @__PURE__ */ jsxs13("div", {
23321
+ className: cn6("grid gap-8 xl:gap-12", hasExamples ? "lg:grid-cols-[1fr,minmax(0,420px)]" : "grid-cols-1"),
24452
23322
  children: [
24453
- /* @__PURE__ */ jsx16("h2", {
24454
- className: "text-xl font-semibold mb-2",
24455
- children: "Properties"
24456
- }),
24457
- /* @__PURE__ */ jsx16("div", {
24458
- className: "overflow-x-auto",
24459
- children: /* @__PURE__ */ jsxs15("table", {
24460
- className: "w-full text-sm border-collapse",
24461
- children: [
24462
- /* @__PURE__ */ jsx16("thead", {
24463
- children: /* @__PURE__ */ jsxs15("tr", {
24464
- className: "border-b border-border",
24465
- children: [
24466
- /* @__PURE__ */ jsx16("th", {
24467
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
24468
- children: "Name"
24469
- }),
24470
- /* @__PURE__ */ jsx16("th", {
24471
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
24472
- children: "Type"
24473
- }),
24474
- /* @__PURE__ */ jsx16("th", {
24475
- className: "text-left py-2 px-3 font-medium text-muted-foreground",
24476
- children: "Description"
24477
- })
24478
- ]
23323
+ /* @__PURE__ */ jsxs13("div", {
23324
+ className: "min-w-0 space-y-8",
23325
+ children: [
23326
+ /* @__PURE__ */ jsx14(ImportSection3, {
23327
+ importStatement
23328
+ }),
23329
+ exp.extends && /* @__PURE__ */ jsxs13("section", {
23330
+ children: [
23331
+ /* @__PURE__ */ jsx14("h2", {
23332
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
23333
+ children: "Extends"
23334
+ }),
23335
+ /* @__PURE__ */ jsx14("div", {
23336
+ className: "rounded-lg border border-border bg-card/50 p-4",
23337
+ children: /* @__PURE__ */ jsx14("code", {
23338
+ className: "font-mono text-sm text-primary",
23339
+ children: exp.extends
23340
+ })
24479
23341
  })
24480
- }),
24481
- /* @__PURE__ */ jsx16("tbody", {
24482
- children: properties.map((prop, index) => /* @__PURE__ */ jsxs15("tr", {
24483
- className: "border-b border-border last:border-0",
24484
- children: [
24485
- /* @__PURE__ */ jsx16("td", {
24486
- className: "py-2 px-3 align-top",
24487
- children: /* @__PURE__ */ jsx16("code", {
24488
- className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
24489
- children: prop.name
24490
- })
24491
- }),
24492
- /* @__PURE__ */ jsx16("td", {
24493
- className: "py-2 px-3 align-top",
24494
- children: /* @__PURE__ */ jsx16("code", {
24495
- className: "font-mono text-xs text-muted-foreground",
24496
- children: formatSchema(prop.schema)
24497
- })
24498
- }),
24499
- /* @__PURE__ */ jsx16("td", {
24500
- className: "py-2 px-3 align-top text-muted-foreground",
24501
- children: prop.description ?? ""
24502
- })
24503
- ]
24504
- }, prop.name ?? index))
24505
- })
24506
- ]
24507
- })
24508
- })
24509
- ]
24510
- }),
24511
- methods && methods.length > 0 && /* @__PURE__ */ jsxs15("section", {
24512
- children: [
24513
- /* @__PURE__ */ jsx16("h2", {
24514
- className: "text-xl font-semibold mb-2",
24515
- children: "Methods"
24516
- }),
24517
- /* @__PURE__ */ jsx16("div", {
24518
- className: "space-y-4",
24519
- children: methods.map((method, index) => {
24520
- const sig = method.signatures?.[0];
24521
- const params = sig?.parameters ?? [];
24522
- const returnType = formatSchema(sig?.returns?.schema);
24523
- return /* @__PURE__ */ jsxs15("div", {
24524
- className: "rounded-lg border border-border p-4",
23342
+ ]
23343
+ }),
23344
+ properties && properties.length > 0 && /* @__PURE__ */ jsxs13("section", {
24525
23345
  children: [
24526
- /* @__PURE__ */ jsxs15("code", {
24527
- className: "font-mono text-sm text-primary",
24528
- children: [
24529
- method.name,
24530
- "(",
24531
- params.map((p) => {
24532
- const optional = p.required === false ? "?" : "";
24533
- const type = formatSchema(p.schema);
24534
- return `${p.name}${optional}: ${type}`;
24535
- }).join(", "),
24536
- "): ",
24537
- returnType
24538
- ]
23346
+ /* @__PURE__ */ jsx14("h2", {
23347
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
23348
+ children: "Properties"
24539
23349
  }),
24540
- method.description && /* @__PURE__ */ jsx16("p", {
24541
- className: "text-sm text-muted-foreground mt-2",
24542
- children: method.description
23350
+ /* @__PURE__ */ jsx14("div", {
23351
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
23352
+ children: properties.map((prop, index) => /* @__PURE__ */ jsx14(ParameterItem, {
23353
+ param: {
23354
+ name: prop.name,
23355
+ schema: prop.schema,
23356
+ description: prop.description,
23357
+ required: prop.required
23358
+ },
23359
+ className: "px-4"
23360
+ }, prop.name ?? index))
24543
23361
  })
24544
23362
  ]
24545
- }, method.name ?? index);
24546
- })
24547
- })
24548
- ]
24549
- }),
24550
- hasExamples && /* @__PURE__ */ jsxs15("section", {
24551
- children: [
24552
- /* @__PURE__ */ jsx16("h2", {
24553
- className: "text-xl font-semibold mb-2",
24554
- children: "Examples"
24555
- }),
24556
- exp.examples.map((example, index) => {
24557
- const code = typeof example === "string" ? example : example.code;
24558
- const title = typeof example === "string" ? undefined : example.title;
24559
- return /* @__PURE__ */ jsxs15("div", {
24560
- className: "mb-4",
24561
- children: [
24562
- title && /* @__PURE__ */ jsx16("h3", {
24563
- className: "text-sm font-medium mb-2",
24564
- children: title
24565
- }),
24566
- renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx16("pre", {
24567
- className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
24568
- children: /* @__PURE__ */ jsx16("code", {
24569
- className: "font-mono text-sm text-foreground",
24570
- children: code
23363
+ }),
23364
+ methods && methods.length > 0 && /* @__PURE__ */ jsxs13("section", {
23365
+ children: [
23366
+ /* @__PURE__ */ jsx14("h2", {
23367
+ className: "text-xs font-semibold uppercase tracking-widest text-muted-foreground mb-4",
23368
+ children: "Methods"
23369
+ }),
23370
+ /* @__PURE__ */ jsx14("div", {
23371
+ className: "rounded-lg border border-border bg-card/50 divide-y divide-border",
23372
+ children: methods.map((method, index) => {
23373
+ const sig = method.signatures?.[0];
23374
+ const params = sig?.parameters ?? [];
23375
+ const returnType = formatSchema(sig?.returns?.schema);
23376
+ return /* @__PURE__ */ jsxs13("div", {
23377
+ className: "p-4",
23378
+ children: [
23379
+ /* @__PURE__ */ jsxs13("code", {
23380
+ className: "font-mono text-sm text-foreground",
23381
+ children: [
23382
+ /* @__PURE__ */ jsx14("span", {
23383
+ className: "font-medium",
23384
+ children: method.name
23385
+ }),
23386
+ /* @__PURE__ */ jsx14("span", {
23387
+ className: "text-muted-foreground",
23388
+ children: "("
23389
+ }),
23390
+ params.map((p, i) => /* @__PURE__ */ jsxs13("span", {
23391
+ children: [
23392
+ i > 0 && /* @__PURE__ */ jsx14("span", {
23393
+ className: "text-muted-foreground",
23394
+ children: ", "
23395
+ }),
23396
+ /* @__PURE__ */ jsx14("span", {
23397
+ className: "text-muted-foreground",
23398
+ children: p.name
23399
+ }),
23400
+ p.required === false && /* @__PURE__ */ jsx14("span", {
23401
+ className: "text-muted-foreground",
23402
+ children: "?"
23403
+ }),
23404
+ /* @__PURE__ */ jsx14("span", {
23405
+ className: "text-muted-foreground",
23406
+ children: ": "
23407
+ }),
23408
+ /* @__PURE__ */ jsx14("span", {
23409
+ className: "text-primary",
23410
+ children: formatSchema(p.schema)
23411
+ })
23412
+ ]
23413
+ }, p.name)),
23414
+ /* @__PURE__ */ jsx14("span", {
23415
+ className: "text-muted-foreground",
23416
+ children: "): "
23417
+ }),
23418
+ /* @__PURE__ */ jsx14("span", {
23419
+ className: "text-primary",
23420
+ children: returnType
23421
+ })
23422
+ ]
23423
+ }),
23424
+ method.description && /* @__PURE__ */ jsx14("p", {
23425
+ className: "text-sm text-muted-foreground mt-2 leading-relaxed",
23426
+ children: method.description
23427
+ })
23428
+ ]
23429
+ }, method.name ?? index);
23430
+ })
24571
23431
  })
24572
- })
24573
- ]
24574
- }, index);
23432
+ ]
23433
+ })
23434
+ ]
23435
+ }),
23436
+ hasExamples && /* @__PURE__ */ jsx14("aside", {
23437
+ className: "lg:sticky lg:top-16 lg:self-start lg:max-h-[calc(100vh-6rem)] lg:overflow-y-auto",
23438
+ children: codeTabs.length === 1 ? /* @__PURE__ */ jsx14("div", {
23439
+ className: "rounded-lg border border-border overflow-hidden bg-background",
23440
+ children: codeTabs[0].content
23441
+ }) : /* @__PURE__ */ jsx14(CodeTabs3, {
23442
+ tabs: codeTabs,
23443
+ sticky: true
23444
+ })
24575
23445
  })
24576
23446
  ]
24577
23447
  })
@@ -24580,7 +23450,7 @@ function InterfacePage({
24580
23450
  }
24581
23451
 
24582
23452
  // src/components/styled/VariablePage.tsx
24583
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
23453
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
24584
23454
 
24585
23455
  function VariablePage({
24586
23456
  export: exp,
@@ -24590,16 +23460,16 @@ function VariablePage({
24590
23460
  const typeValue = typeof exp.type === "string" ? exp.type : formatSchema(exp.schema);
24591
23461
  const hasExamples = exp.examples && exp.examples.length > 0;
24592
23462
  const exampleCode = hasExamples ? typeof exp.examples[0] === "string" ? exp.examples[0] : exp.examples[0].code : "";
24593
- return /* @__PURE__ */ jsxs16("div", {
23463
+ return /* @__PURE__ */ jsxs14("div", {
24594
23464
  className: "space-y-8",
24595
23465
  children: [
24596
- exp.description && /* @__PURE__ */ jsx17("p", {
23466
+ exp.description && /* @__PURE__ */ jsx15("p", {
24597
23467
  className: "text-muted-foreground text-lg leading-relaxed",
24598
23468
  children: exp.description
24599
23469
  }),
24600
- /* @__PURE__ */ jsx17("div", {
23470
+ /* @__PURE__ */ jsx15("div", {
24601
23471
  className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
24602
- children: /* @__PURE__ */ jsxs16("code", {
23472
+ children: /* @__PURE__ */ jsxs14("code", {
24603
23473
  className: "font-mono text-sm text-foreground whitespace-pre",
24604
23474
  children: [
24605
23475
  "const ",
@@ -24609,29 +23479,29 @@ function VariablePage({
24609
23479
  ]
24610
23480
  })
24611
23481
  }),
24612
- exp.deprecated && /* @__PURE__ */ jsxs16("div", {
23482
+ exp.deprecated && /* @__PURE__ */ jsxs14("div", {
24613
23483
  className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
24614
23484
  children: [
24615
- /* @__PURE__ */ jsx17("strong", {
23485
+ /* @__PURE__ */ jsx15("strong", {
24616
23486
  children: "Deprecated:"
24617
23487
  }),
24618
23488
  " This export is deprecated."
24619
23489
  ]
24620
23490
  }),
24621
- /* @__PURE__ */ jsxs16("div", {
23491
+ /* @__PURE__ */ jsxs14("div", {
24622
23492
  className: `grid gap-8 ${hasExamples ? "lg:grid-cols-2" : "grid-cols-1"}`,
24623
23493
  children: [
24624
- /* @__PURE__ */ jsx17("div", {
23494
+ /* @__PURE__ */ jsx15("div", {
24625
23495
  className: "space-y-6",
24626
- children: /* @__PURE__ */ jsxs16("div", {
23496
+ children: /* @__PURE__ */ jsxs14("div", {
24627
23497
  children: [
24628
- /* @__PURE__ */ jsx17("h3", {
23498
+ /* @__PURE__ */ jsx15("h3", {
24629
23499
  className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
24630
23500
  children: "Type"
24631
23501
  }),
24632
- /* @__PURE__ */ jsx17("div", {
23502
+ /* @__PURE__ */ jsx15("div", {
24633
23503
  className: "rounded-lg border border-border bg-card p-4",
24634
- children: /* @__PURE__ */ jsx17("code", {
23504
+ children: /* @__PURE__ */ jsx15("code", {
24635
23505
  className: "font-mono text-sm text-primary",
24636
23506
  children: typeValue
24637
23507
  })
@@ -24639,18 +23509,18 @@ function VariablePage({
24639
23509
  ]
24640
23510
  })
24641
23511
  }),
24642
- hasExamples && /* @__PURE__ */ jsxs16("div", {
23512
+ hasExamples && /* @__PURE__ */ jsxs14("div", {
24643
23513
  children: [
24644
- /* @__PURE__ */ jsxs16("h3", {
23514
+ /* @__PURE__ */ jsxs14("h3", {
24645
23515
  className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
24646
23516
  children: [
24647
23517
  exp.name,
24648
23518
  " usage"
24649
23519
  ]
24650
23520
  }),
24651
- renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx17("pre", {
23521
+ renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx15("pre", {
24652
23522
  className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
24653
- children: /* @__PURE__ */ jsx17("code", {
23523
+ children: /* @__PURE__ */ jsx15("code", {
24654
23524
  className: "font-mono text-sm text-foreground",
24655
23525
  children: exampleCode
24656
23526
  })
@@ -24664,16 +23534,16 @@ function VariablePage({
24664
23534
  }
24665
23535
 
24666
23536
  // src/components/styled/APIPage.tsx
24667
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
23537
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
24668
23538
 
24669
23539
  function NotFound({ id }) {
24670
- return /* @__PURE__ */ jsx18("div", {
23540
+ return /* @__PURE__ */ jsx16("div", {
24671
23541
  className: "rounded-lg border border-border bg-card p-6 text-center",
24672
- children: /* @__PURE__ */ jsxs17("p", {
23542
+ children: /* @__PURE__ */ jsxs15("p", {
24673
23543
  className: "text-muted-foreground",
24674
23544
  children: [
24675
23545
  "Export ",
24676
- /* @__PURE__ */ jsx18("code", {
23546
+ /* @__PURE__ */ jsx16("code", {
24677
23547
  className: "font-mono text-primary",
24678
23548
  children: id
24679
23549
  }),
@@ -24683,17 +23553,17 @@ function NotFound({ id }) {
24683
23553
  });
24684
23554
  }
24685
23555
  function NoSpec() {
24686
- return /* @__PURE__ */ jsx18("div", {
23556
+ return /* @__PURE__ */ jsx16("div", {
24687
23557
  className: "rounded-lg border border-red-500/20 bg-red-500/10 p-6 text-center",
24688
- children: /* @__PURE__ */ jsxs17("p", {
23558
+ children: /* @__PURE__ */ jsxs15("p", {
24689
23559
  className: "text-red-600 dark:text-red-400",
24690
23560
  children: [
24691
23561
  "No spec provided. Pass either ",
24692
- /* @__PURE__ */ jsx18("code", {
23562
+ /* @__PURE__ */ jsx16("code", {
24693
23563
  children: "spec"
24694
23564
  }),
24695
23565
  " or ",
24696
- /* @__PURE__ */ jsx18("code", {
23566
+ /* @__PURE__ */ jsx16("code", {
24697
23567
  children: "instance"
24698
23568
  }),
24699
23569
  " prop."
@@ -24711,10 +23581,10 @@ function APIPage({
24711
23581
  }) {
24712
23582
  const resolvedSpec = spec ?? instance?.spec;
24713
23583
  if (!resolvedSpec) {
24714
- return /* @__PURE__ */ jsx18(NoSpec, {});
23584
+ return /* @__PURE__ */ jsx16(NoSpec, {});
24715
23585
  }
24716
23586
  if (!id) {
24717
- return /* @__PURE__ */ jsx18(ExportIndexPage, {
23587
+ return /* @__PURE__ */ jsx16(ExportIndexPage, {
24718
23588
  spec: resolvedSpec,
24719
23589
  baseHref,
24720
23590
  description
@@ -24722,31 +23592,31 @@ function APIPage({
24722
23592
  }
24723
23593
  const exp = resolvedSpec.exports.find((e) => e.id === id);
24724
23594
  if (!exp) {
24725
- return /* @__PURE__ */ jsx18(NotFound, {
23595
+ return /* @__PURE__ */ jsx16(NotFound, {
24726
23596
  id
24727
23597
  });
24728
23598
  }
24729
23599
  const pageProps = { export: exp, spec: resolvedSpec, renderExample };
24730
23600
  switch (exp.kind) {
24731
23601
  case "function":
24732
- return /* @__PURE__ */ jsx18(FunctionPage, {
23602
+ return /* @__PURE__ */ jsx16(FunctionPage, {
24733
23603
  ...pageProps
24734
23604
  });
24735
23605
  case "class":
24736
- return /* @__PURE__ */ jsx18(ClassPage, {
23606
+ return /* @__PURE__ */ jsx16(ClassPage, {
24737
23607
  ...pageProps
24738
23608
  });
24739
23609
  case "interface":
24740
23610
  case "type":
24741
- return /* @__PURE__ */ jsx18(InterfacePage, {
23611
+ return /* @__PURE__ */ jsx16(InterfacePage, {
24742
23612
  ...pageProps
24743
23613
  });
24744
23614
  case "enum":
24745
- return /* @__PURE__ */ jsx18(EnumPage, {
23615
+ return /* @__PURE__ */ jsx16(EnumPage, {
24746
23616
  ...pageProps
24747
23617
  });
24748
23618
  default:
24749
- return /* @__PURE__ */ jsx18(VariablePage, {
23619
+ return /* @__PURE__ */ jsx16(VariablePage, {
24750
23620
  ...pageProps
24751
23621
  });
24752
23622
  }
@@ -24767,7 +23637,7 @@ export {
24767
23637
  MembersTable,
24768
23638
  MemberRow,
24769
23639
  InterfacePage,
24770
- ImportSection,
23640
+ ImportSection4 as ImportSection,
24771
23641
  FunctionPage,
24772
23642
  ExportIndexPage,
24773
23643
  ExportCard,
@@ -24775,7 +23645,7 @@ export {
24775
23645
  ExampleBlock,
24776
23646
  EnumPage,
24777
23647
  CollapsibleMethod,
24778
- CodeTabs,
23648
+ CodeTabs4 as CodeTabs,
24779
23649
  ClassPage,
24780
23650
  APIPage
24781
23651
  };