@tdacorp/hyle-sdk 0.9.0 → 0.11.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.
Files changed (37) hide show
  1. package/README.md +80 -2
  2. package/bin/hyle-sdk-engage-keygen.mjs +3 -0
  3. package/dist/check-routes-bin.js +5 -1
  4. package/dist/{chunk-54JF4E53.js → chunk-N7ZQUAGM.js} +45 -2
  5. package/dist/chunk-R5EMI4HQ.js +61 -0
  6. package/dist/{chunk-6LW33475.js → chunk-S3LT6G4M.js} +536 -50
  7. package/dist/{chunk-XKR74Y5G.js → chunk-S7PCCEHP.js} +1 -1
  8. package/dist/comments.cjs +1048 -0
  9. package/dist/comments.d.cts +152 -0
  10. package/dist/comments.d.ts +152 -0
  11. package/dist/comments.js +1025 -0
  12. package/dist/{types-C1eCQ2As.d.ts → embed-BC8Tlc6A.d.cts} +44 -3
  13. package/dist/{types-BPPZrYOZ.d.cts → embed-CwSzvBUO.d.ts} +44 -3
  14. package/dist/engage-keygen-bin.js +67 -0
  15. package/dist/index.cjs +26 -1
  16. package/dist/index.d.cts +11 -3
  17. package/dist/index.d.ts +11 -3
  18. package/dist/index.js +5 -1
  19. package/dist/mermaid-diagram.js +9 -54
  20. package/dist/next.cjs +940 -58
  21. package/dist/next.d.cts +149 -6
  22. package/dist/next.d.ts +149 -6
  23. package/dist/next.js +390 -11
  24. package/dist/react.cjs +339 -49
  25. package/dist/react.d.cts +112 -7
  26. package/dist/react.d.ts +112 -7
  27. package/dist/react.js +7 -1
  28. package/dist/{resolve-Dpb6Orsj.d.ts → resolve-BYL8jMg0.d.ts} +1 -1
  29. package/dist/{resolve-D2rnnho9.d.cts → resolve-Ra8-y2U-.d.cts} +1 -1
  30. package/dist/styles.css +117 -0
  31. package/dist/{types-CHxH5E0S.d.cts → types-C72FwzOd.d.cts} +57 -1
  32. package/dist/{types-CHxH5E0S.d.ts → types-C72FwzOd.d.ts} +57 -1
  33. package/dist/use-cache.cjs +5 -1
  34. package/dist/use-cache.d.cts +2 -2
  35. package/dist/use-cache.d.ts +2 -2
  36. package/dist/use-cache.js +2 -2
  37. package/package.json +4 -3
@@ -39,7 +39,18 @@ var SHAPES = {
39
39
  chev: /* @__PURE__ */ jsx("path", { d: "m6 3.5 4.5 4.5L6 12.5" }),
40
40
  "chev-down": /* @__PURE__ */ jsx("path", { d: "m3.5 6 4.5 4.5L12.5 6" }),
41
41
  "chev-left": /* @__PURE__ */ jsx("path", { d: "M10 3.5 5.5 8 10 12.5" }),
42
- x: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" })
42
+ x: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" }),
43
+ heart: /* @__PURE__ */ jsx("path", { d: "M8 13.5S2.2 10 2.2 6.1A3 3 0 0 1 8 5a3 3 0 0 1 5.8 1.1C13.8 10 8 13.5 8 13.5z" }),
44
+ reply: /* @__PURE__ */ jsx("path", { d: "M6.5 3.5 2.5 7.5l4 4M2.5 7.5h6a5 5 0 0 1 5 5" }),
45
+ clock: /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6" }),
47
+ /* @__PURE__ */ jsx("path", { d: "M8 4.5V8l2.3 1.5" })
48
+ ] }),
49
+ ban: /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6" }),
51
+ /* @__PURE__ */ jsx("path", { d: "m3.8 12.2 8.4-8.4" })
52
+ ] }),
53
+ refresh: /* @__PURE__ */ jsx("path", { d: "M13 8a5 5 0 1 1-1.6-3.7M13 2.5v2.8h-2.8" })
43
54
  };
44
55
  function Icon({ name, className }) {
45
56
  return /* @__PURE__ */ jsx("svg", { className: className ? `hyle-ic ${className}` : "hyle-ic", viewBox: "0 0 16 16", "aria-hidden": "true", children: SHAPES[name] });
@@ -218,14 +229,205 @@ function clean(node, depth, ctx2, budget) {
218
229
  const tagName = tag === "h1" ? "h2" : tag;
219
230
  return [{ type: "element", tagName, properties, children: VOID.has(tag) ? [] : children }];
220
231
  }
221
- function sanitizeHast(tree, title) {
232
+ function sanitizeHast(tree, title, description) {
222
233
  const raw = isObject(tree) && tree.type === "root" && Array.isArray(tree.children) ? tree.children : [];
223
- const first = raw.find((n) => isObject(n) && n.type === "element");
234
+ const elements = raw.filter((n) => isObject(n) && n.type === "element");
235
+ const [first] = elements;
224
236
  const skip = title !== void 0 && isObject(first) && first.tagName === "h1" && textOf(first).trim() === title.trim() ? first : void 0;
237
+ const lead = elements[skip ? 1 : 0];
238
+ const repeat = description && isObject(lead) && lead.tagName === "p" && textOf(lead).trim().startsWith(description.trim()) ? lead : void 0;
225
239
  const budget = { nodes: 0, text: 0 };
226
- return { type: "root", children: raw.filter((n) => n !== skip).flatMap((n) => clean(n, 0, { katex: false }, budget)) };
240
+ return { type: "root", children: raw.filter((n) => n !== skip && n !== repeat).flatMap((n) => clean(n, 0, { katex: false }, budget)) };
227
241
  }
228
242
 
243
+ // src/react/comments-labels.ts
244
+ var COMMENT_LABELS_EN = {
245
+ heading: "Comments",
246
+ countLabel: "{n} comments",
247
+ likeArticle: "Like this article",
248
+ likedArticle: "Liked",
249
+ likeArticleSignIn: "(sign in), ",
250
+ likeComment: "Like this comment, ",
251
+ likeCommentSignIn: "Sign in to like this comment, ",
252
+ signInTitle: "Sign in to join the discussion",
253
+ signInBody: "Anyone can read. To comment or like, sign in.",
254
+ signIn: "Sign in",
255
+ commentingAs: "Commenting as {name}",
256
+ write: "Write a comment",
257
+ placeholder: "Add to the discussion",
258
+ help: "Markdown: links, emphasis, code and quotes.",
259
+ chars: "{n} / {max}",
260
+ post: "Post comment",
261
+ posting: "Posting",
262
+ reply: "Reply",
263
+ replyTo: "Reply to {name}",
264
+ replyPlaceholder: "Write a reply",
265
+ cancel: "Cancel",
266
+ edit: "Edit",
267
+ editLeft: "({n} min left)",
268
+ save: "Save",
269
+ delete: "Delete",
270
+ deleteConfirm: "Delete this comment?",
271
+ keep: "Keep",
272
+ you: "You",
273
+ edited: "edited",
274
+ removed: "This comment was removed.",
275
+ removedByModerator: "This comment was removed by a moderator.",
276
+ removedByAuthor: "This comment was deleted by its author.",
277
+ depthEnd: "Replies end at this depth",
278
+ held: "Awaiting approval.",
279
+ heldBanner: "Thanks, your comment is awaiting approval",
280
+ heldBannerBody: "New commenters may be reviewed first. You will see it here, marked as pending, until a moderator approves it. Nobody else can see it yet.",
281
+ heldNote: "Only you can see this until a moderator approves it.",
282
+ heldLive: "Comment awaiting approval",
283
+ postedLive: "Comment posted",
284
+ deletedLive: "Comment deleted",
285
+ savedLive: "Comment saved",
286
+ empty: "No comments yet",
287
+ emptyBody: "Start the discussion. Comments may be reviewed before they appear.",
288
+ loading: "Loading comments",
289
+ loadError: "Comments could not be loaded",
290
+ loadErrorBody: "The article is fine. The comments service did not answer.",
291
+ retry: "Try again",
292
+ postError: "Your comment was not posted. We kept your text, so nothing is lost. Check your connection and try again.",
293
+ tooLong: "That comment is too long or empty. Comments are 1 to 4000 characters.",
294
+ editClosed: "Comments can be edited for ten minutes after posting. That time has passed.",
295
+ actionError: "That did not go through. Please try again.",
296
+ rateTitle: "You are commenting too quickly",
297
+ rateBody: "Please wait before posting again. Your draft is kept in the box below.",
298
+ rateWait: "You can post again in {n} seconds.",
299
+ bannedTitle: "You cannot comment right now",
300
+ bannedBody: "Commenting is not available for your account on this site. You can still read every comment. If you think this is a mistake, contact the site team.",
301
+ expired: "Your session ended. Sign in again to post. Your text is kept.",
302
+ more: "Load more comments",
303
+ truncated: "Showing the first 500 comments.",
304
+ justNow: "just now"
305
+ };
306
+ var COMMENT_LABELS_FR = {
307
+ heading: "Commentaires",
308
+ countLabel: "{n} commentaires",
309
+ likeArticle: "Aimer cet article",
310
+ likedArticle: "Aim\xE9",
311
+ likeArticleSignIn: "(connexion requise), ",
312
+ likeComment: "Aimer ce commentaire, ",
313
+ likeCommentSignIn: "Connectez-vous pour aimer ce commentaire, ",
314
+ signInTitle: "Connectez-vous pour participer \xE0 la discussion",
315
+ signInBody: "Tout le monde peut lire. Pour commenter ou aimer, connectez-vous.",
316
+ signIn: "Se connecter",
317
+ commentingAs: "Vous commentez en tant que {name}",
318
+ write: "\xC9crire un commentaire",
319
+ placeholder: "Participez \xE0 la discussion",
320
+ help: "Markdown : liens, emphase, code et citations.",
321
+ chars: "{n} / {max}",
322
+ post: "Publier le commentaire",
323
+ posting: "Publication",
324
+ reply: "R\xE9pondre",
325
+ replyTo: "R\xE9pondre \xE0 {name}",
326
+ replyPlaceholder: "\xC9crire une r\xE9ponse",
327
+ cancel: "Annuler",
328
+ edit: "Modifier",
329
+ editLeft: "({n} min restantes)",
330
+ save: "Enregistrer",
331
+ delete: "Supprimer",
332
+ deleteConfirm: "Supprimer ce commentaire ?",
333
+ keep: "Conserver",
334
+ you: "Vous",
335
+ edited: "modifi\xE9",
336
+ removed: "Ce commentaire a \xE9t\xE9 retir\xE9.",
337
+ removedByModerator: "Ce commentaire a \xE9t\xE9 retir\xE9 par un mod\xE9rateur.",
338
+ removedByAuthor: "Ce commentaire a \xE9t\xE9 supprim\xE9 par son auteur.",
339
+ depthEnd: "Les r\xE9ponses s'arr\xEAtent \xE0 ce niveau",
340
+ held: "En attente d'approbation.",
341
+ heldBanner: "Merci, votre commentaire est en attente d'approbation",
342
+ heldBannerBody: "Les nouveaux commentaires peuvent \xEAtre relus d'abord. Vous le voyez ici, marqu\xE9 en attente, jusqu'\xE0 son approbation par un mod\xE9rateur. Personne d'autre ne peut le voir.",
343
+ heldNote: "Vous seul le voyez tant qu'un mod\xE9rateur ne l'a pas approuv\xE9.",
344
+ heldLive: "Commentaire en attente d'approbation",
345
+ postedLive: "Commentaire publi\xE9",
346
+ deletedLive: "Commentaire supprim\xE9",
347
+ savedLive: "Commentaire enregistr\xE9",
348
+ empty: "Aucun commentaire pour l'instant",
349
+ emptyBody: "Lancez la discussion. Les commentaires peuvent \xEAtre relus avant d'appara\xEEtre.",
350
+ loading: "Chargement des commentaires",
351
+ loadError: "Les commentaires n'ont pas pu \xEAtre charg\xE9s",
352
+ loadErrorBody: "L'article est intact. Le service de commentaires n'a pas r\xE9pondu.",
353
+ retry: "R\xE9essayer",
354
+ postError: "Votre commentaire n'a pas \xE9t\xE9 publi\xE9. Votre texte est conserv\xE9. V\xE9rifiez votre connexion et r\xE9essayez.",
355
+ tooLong: "Ce commentaire est trop long ou vide. Un commentaire compte de 1 \xE0 4000 caract\xE8res.",
356
+ editClosed: "Un commentaire peut \xEAtre modifi\xE9 pendant dix minutes apr\xE8s sa publication. Ce d\xE9lai est \xE9coul\xE9.",
357
+ actionError: "L'action a \xE9chou\xE9. R\xE9essayez.",
358
+ rateTitle: "Vous commentez trop vite",
359
+ rateBody: "Patientez avant de publier \xE0 nouveau. Votre brouillon est conserv\xE9 dans la zone ci-dessous.",
360
+ rateWait: "Vous pourrez publier \xE0 nouveau dans {n} secondes.",
361
+ bannedTitle: "Vous ne pouvez pas commenter pour le moment",
362
+ bannedBody: "Les commentaires ne sont pas disponibles pour votre compte sur ce site. Vous pouvez toujours tout lire. Si vous pensez \xE0 une erreur, contactez l'\xE9quipe du site.",
363
+ expired: "Votre session a expir\xE9. Reconnectez-vous pour publier. Votre texte est conserv\xE9.",
364
+ more: "Charger plus de commentaires",
365
+ truncated: "Affichage des 500 premiers commentaires.",
366
+ justNow: "\xE0 l'instant"
367
+ };
368
+ var COMMENT_LABELS_ES = {
369
+ heading: "Comentarios",
370
+ countLabel: "{n} comentarios",
371
+ likeArticle: "Me gusta este art\xEDculo",
372
+ likedArticle: "Te gusta",
373
+ likeArticleSignIn: "(inicia sesi\xF3n), ",
374
+ likeComment: "Me gusta este comentario, ",
375
+ likeCommentSignIn: "Inicia sesi\xF3n para dar me gusta a este comentario, ",
376
+ signInTitle: "Inicia sesi\xF3n para unirte a la conversaci\xF3n",
377
+ signInBody: "Todos pueden leer. Para comentar o dar me gusta, inicia sesi\xF3n.",
378
+ signIn: "Iniciar sesi\xF3n",
379
+ commentingAs: "Comentando como {name}",
380
+ write: "Escribe un comentario",
381
+ placeholder: "A\xF1ade a la conversaci\xF3n",
382
+ help: "Markdown: enlaces, \xE9nfasis, c\xF3digo y citas.",
383
+ chars: "{n} / {max}",
384
+ post: "Publicar comentario",
385
+ posting: "Publicando",
386
+ reply: "Responder",
387
+ replyTo: "Responder a {name}",
388
+ replyPlaceholder: "Escribe una respuesta",
389
+ cancel: "Cancelar",
390
+ edit: "Editar",
391
+ editLeft: "(quedan {n} min)",
392
+ save: "Guardar",
393
+ delete: "Eliminar",
394
+ deleteConfirm: "\xBFEliminar este comentario?",
395
+ keep: "Conservar",
396
+ you: "T\xFA",
397
+ edited: "editado",
398
+ removed: "Este comentario fue eliminado.",
399
+ removedByModerator: "Un moderador elimin\xF3 este comentario.",
400
+ removedByAuthor: "Su autor elimin\xF3 este comentario.",
401
+ depthEnd: "Las respuestas terminan en este nivel",
402
+ held: "Pendiente de aprobaci\xF3n.",
403
+ heldBanner: "Gracias, tu comentario est\xE1 pendiente de aprobaci\xF3n",
404
+ heldBannerBody: "Los comentarios nuevos pueden revisarse primero. Lo ves aqu\xED, marcado como pendiente, hasta que un moderador lo apruebe. Nadie m\xE1s puede verlo todav\xEDa.",
405
+ heldNote: "Solo t\xFA lo ves hasta que un moderador lo apruebe.",
406
+ heldLive: "Comentario pendiente de aprobaci\xF3n",
407
+ postedLive: "Comentario publicado",
408
+ deletedLive: "Comentario eliminado",
409
+ savedLive: "Comentario guardado",
410
+ empty: "A\xFAn no hay comentarios",
411
+ emptyBody: "Empieza la conversaci\xF3n. Los comentarios pueden revisarse antes de aparecer.",
412
+ loading: "Cargando comentarios",
413
+ loadError: "No se pudieron cargar los comentarios",
414
+ loadErrorBody: "El art\xEDculo est\xE1 bien. El servicio de comentarios no respondi\xF3.",
415
+ retry: "Reintentar",
416
+ postError: "Tu comentario no se public\xF3. Hemos conservado tu texto. Revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",
417
+ tooLong: "Ese comentario es demasiado largo o est\xE1 vac\xEDo. Los comentarios tienen de 1 a 4000 caracteres.",
418
+ editClosed: "Un comentario puede editarse durante diez minutos tras publicarlo. Ese tiempo ya pas\xF3.",
419
+ actionError: "No se pudo completar. Int\xE9ntalo de nuevo.",
420
+ rateTitle: "Est\xE1s comentando demasiado r\xE1pido",
421
+ rateBody: "Espera antes de publicar de nuevo. Tu borrador se conserva en el cuadro de abajo.",
422
+ rateWait: "Podr\xE1s publicar de nuevo en {n} segundos.",
423
+ bannedTitle: "No puedes comentar por ahora",
424
+ bannedBody: "Los comentarios no est\xE1n disponibles para tu cuenta en este sitio. A\xFAn puedes leerlos todos. Si crees que es un error, contacta con el equipo del sitio.",
425
+ expired: "Tu sesi\xF3n termin\xF3. Inicia sesi\xF3n de nuevo para publicar. Tu texto se conserva.",
426
+ more: "Cargar m\xE1s comentarios",
427
+ truncated: "Se muestran los primeros 500 comentarios.",
428
+ justNow: "ahora mismo"
429
+ };
430
+
229
431
  // src/react/viewer/labels.ts
230
432
  var VIEWER_LABELS_EN = {
231
433
  expand: "Expand diagram",
@@ -343,6 +545,8 @@ var en = {
343
545
  fallbackTitle: "Not translated into {language} yet.",
344
546
  fallbackBody: "You are reading the original.",
345
547
  older: "Older posts",
548
+ viewAll: "View all",
549
+ readAtSource: "Read at source",
346
550
  emptyTitle: "Nothing published here yet",
347
551
  emptyBody: "Documents published to this section will appear here, newest first.",
348
552
  docs: "Documentation",
@@ -363,7 +567,8 @@ var en = {
363
567
  unKind: "Unavailable",
364
568
  unTitle: "This page is temporarily unavailable",
365
569
  unBody: "The content could not be loaded. Please try again in a moment.",
366
- viewer: VIEWER_LABELS_EN
570
+ viewer: VIEWER_LABELS_EN,
571
+ comments: COMMENT_LABELS_EN
367
572
  };
368
573
  var fr = {
369
574
  toc: "Sur cette page",
@@ -386,6 +591,8 @@ var fr = {
386
591
  fallbackTitle: "Pas encore traduit en {language}.",
387
592
  fallbackBody: "Vous lisez l'original.",
388
593
  older: "Articles plus anciens",
594
+ viewAll: "Tout voir",
595
+ readAtSource: "Lire \xE0 la source",
389
596
  emptyTitle: "Rien n'est encore publi\xE9 ici",
390
597
  emptyBody: "Les documents publi\xE9s dans cette section appara\xEEtront ici, du plus r\xE9cent au plus ancien.",
391
598
  docs: "Documentation",
@@ -406,7 +613,8 @@ var fr = {
406
613
  unKind: "Indisponible",
407
614
  unTitle: "Cette page est momentan\xE9ment indisponible",
408
615
  unBody: "Le contenu n'a pas pu \xEAtre charg\xE9. R\xE9essayez dans un instant.",
409
- viewer: VIEWER_LABELS_FR
616
+ viewer: VIEWER_LABELS_FR,
617
+ comments: COMMENT_LABELS_FR
410
618
  };
411
619
  var es = {
412
620
  toc: "En esta p\xE1gina",
@@ -429,6 +637,8 @@ var es = {
429
637
  fallbackTitle: "A\xFAn no est\xE1 traducida al {language}.",
430
638
  fallbackBody: "Est\xE1s leyendo el original.",
431
639
  older: "Entradas anteriores",
640
+ viewAll: "Ver todo",
641
+ readAtSource: "Leer en la fuente",
432
642
  emptyTitle: "A\xFAn no hay nada publicado aqu\xED",
433
643
  emptyBody: "Los documentos publicados en esta secci\xF3n aparecer\xE1n aqu\xED, del m\xE1s reciente al m\xE1s antiguo.",
434
644
  docs: "Documentaci\xF3n",
@@ -449,7 +659,8 @@ var es = {
449
659
  unKind: "No disponible",
450
660
  unTitle: "Esta p\xE1gina no est\xE1 disponible por el momento",
451
661
  unBody: "No se pudo cargar el contenido. Int\xE9ntalo de nuevo en un momento.",
452
- viewer: VIEWER_LABELS_ES
662
+ viewer: VIEWER_LABELS_ES,
663
+ comments: COMMENT_LABELS_ES
453
664
  };
454
665
  var TABLE = { en, fr, es };
455
666
  function stringsFor(locale) {
@@ -532,10 +743,10 @@ function buildComponents(c, s) {
532
743
  for (const key of overrides) if (c[key]) defaults[key] = c[key];
533
744
  return defaults;
534
745
  }
535
- function HastContent({ tree, title, components = {}, locale }) {
746
+ function HastContent({ tree, title, description, components = {}, locale }) {
536
747
  let root;
537
748
  try {
538
- root = sanitizeHast(tree, title);
749
+ root = sanitizeHast(tree, title, description);
539
750
  } catch (error) {
540
751
  if (!(error instanceof HastLimitError)) throw error;
541
752
  const s = stringsFor(locale);
@@ -561,6 +772,7 @@ function TrustedServerHtml({ html }) {
561
772
  import { MermaidDiagram as MermaidDiagram2 } from "./mermaid-diagram.js";
562
773
 
563
774
  // src/react/pages.tsx
775
+ import { Comments } from "./comments.js";
564
776
  import { Fragment as Fragment4, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
565
777
  function Slot({ name, slots, tag: Tag = "div", className }) {
566
778
  const fill = slots?.[name];
@@ -629,7 +841,7 @@ function Toc({ toc, c, aside }) {
629
841
  }
630
842
  function Body({ article, components, locale }) {
631
843
  const { content, publication } = article;
632
- return /* @__PURE__ */ jsx4("div", { className: "hyle-body hyle-prose", lang: article.fallback ? void 0 : publication.locale, children: content.format === "hast" ? /* @__PURE__ */ jsx4(HastContent, { tree: content.tree, title: publication.title, components: components ?? {}, locale }) : /* @__PURE__ */ jsx4(TrustedServerHtml, { html: content.html }) });
844
+ return /* @__PURE__ */ jsx4("div", { className: "hyle-body hyle-prose", lang: article.fallback ? void 0 : publication.locale, children: content.format === "hast" ? /* @__PURE__ */ jsx4(HastContent, { tree: content.tree, title: publication.title, description: publication.description, components: components ?? {}, locale }) : /* @__PURE__ */ jsx4(TrustedServerHtml, { html: content.html }) });
633
845
  }
634
846
  function Languages({ alternates, current, c }) {
635
847
  if (alternates.length < 2) return null;
@@ -642,7 +854,32 @@ function Languages({ alternates, current, c }) {
642
854
  }) })
643
855
  ] });
644
856
  }
645
- function ArticlePage({ article, ...base }) {
857
+ var BARE_HTTPS_ORIGIN = /^https:\/\/[^/]+$/;
858
+ function articleJsonLd(article, origin, c, author) {
859
+ const { publication: pub } = article;
860
+ const url = (path) => origin + encodeURI(c.href(path, pub.locale));
861
+ const graph = {
862
+ "@context": "https://schema.org",
863
+ "@graph": [
864
+ {
865
+ "@type": "BlogPosting",
866
+ headline: pub.title,
867
+ ...pub.description ? { description: pub.description } : {},
868
+ datePublished: pub.published_at,
869
+ ...pub.updated_at ? { dateModified: pub.updated_at } : {},
870
+ ...author ? { author: { "@type": "Person", name: author } } : {},
871
+ inLanguage: pub.locale,
872
+ mainEntityOfPage: url(pub.canonical_path)
873
+ },
874
+ {
875
+ "@type": "BreadcrumbList",
876
+ itemListElement: article.breadcrumbs.map((b, i) => ({ "@type": "ListItem", position: i + 1, name: b.title, item: url(b.canonical_path) }))
877
+ }
878
+ ]
879
+ };
880
+ return JSON.stringify(graph).replace(/</g, "\\u003c");
881
+ }
882
+ function ArticlePage({ article, engagement, origin, ...base }) {
646
883
  const { publication: pub } = article;
647
884
  const c = ctx(base, pub.locale);
648
885
  const { s } = c;
@@ -687,9 +924,11 @@ function ArticlePage({ article, ...base }) {
687
924
  ] }),
688
925
  toc.narrow,
689
926
  /* @__PURE__ */ jsx4(Body, { article, components: base.components, locale: c.locale }),
927
+ engagement ? /* @__PURE__ */ jsx4(Comments, { path: pub.canonical_path, endpoint: engagement.endpoint ?? "/api/hyle/engage", signInHref: engagement.signInHref, locale: c.locale, labels: s.comments }) : null,
690
928
  /* @__PURE__ */ jsx4(Pager, { prev: article.prev, next: article.next, c }),
691
929
  /* @__PURE__ */ jsx4(Slot, { name: "article.after", slots: base.slots, className: "hyle-after" }),
692
- toc.wide
930
+ toc.wide,
931
+ origin && BARE_HTTPS_ORIGIN.test(origin) ? /* @__PURE__ */ jsx4("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: articleJsonLd(article, origin, c, author) } }) : null
693
932
  ] }) });
694
933
  }
695
934
  function ListPage({ list, olderHref, description, ...base }) {
@@ -786,9 +1025,250 @@ function Redirecting({ from, to, ...base }) {
786
1025
  ] }) });
787
1026
  }
788
1027
 
1028
+ // src/react/index.ts
1029
+ import { Comments as Comments2 } from "./comments.js";
1030
+
1031
+ // src/react/comments-api.ts
1032
+ var isObject2 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
1033
+ var count = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? Math.trunc(v) : 0;
1034
+ function toComment(raw) {
1035
+ if (!isObject2(raw) || typeof raw.id !== "string" || typeof raw.created_at !== "string") return void 0;
1036
+ const depth = typeof raw.depth === "number" ? Math.min(4, Math.max(1, Math.trunc(raw.depth))) : 1;
1037
+ const author = isObject2(raw.author) && typeof raw.author.name === "string" ? raw.author.name : void 0;
1038
+ const name = typeof raw.author_name === "string" ? raw.author_name : author;
1039
+ const body = isObject2(raw.body) && raw.body.format === "hast" ? { format: "hast", tree: raw.body.tree } : null;
1040
+ const removed = raw.removed === true || body === null;
1041
+ return {
1042
+ id: raw.id,
1043
+ parent_id: typeof raw.parent_id === "string" ? raw.parent_id : null,
1044
+ depth,
1045
+ author_name: name ?? null,
1046
+ created_at: raw.created_at,
1047
+ edited_at: typeof raw.edited_at === "string" ? raw.edited_at : null,
1048
+ like_count: count(raw.like_count),
1049
+ removed,
1050
+ ...removed && (raw.removed_by === "moderator" || raw.removed_by === "author") ? { removed_by: raw.removed_by } : {},
1051
+ body,
1052
+ // Viewer members exist only on a live comment of a viewer-aware listing; a tombstone never carries them.
1053
+ ...!removed && typeof raw.mine === "boolean" ? { mine: raw.mine, liked_by_me: raw.liked_by_me === true, can_edit_until: typeof raw.can_edit_until === "string" ? raw.can_edit_until : null } : {}
1054
+ };
1055
+ }
1056
+ function toHeld(raw) {
1057
+ if (!isObject2(raw) || typeof raw.id !== "string" || typeof raw.created_at !== "string" || !isObject2(raw.body) || raw.body.format !== "hast") return void 0;
1058
+ const author = isObject2(raw.author) && typeof raw.author.name === "string" ? raw.author.name : null;
1059
+ return {
1060
+ id: raw.id,
1061
+ parent_id: typeof raw.parent_id === "string" ? raw.parent_id : null,
1062
+ depth: typeof raw.depth === "number" ? Math.min(4, Math.max(1, Math.trunc(raw.depth))) : 1,
1063
+ author_name: author,
1064
+ created_at: raw.created_at,
1065
+ edited_at: typeof raw.edited_at === "string" ? raw.edited_at : null,
1066
+ can_edit_until: typeof raw.can_edit_until === "string" ? raw.can_edit_until : null,
1067
+ body: { format: "hast", tree: raw.body.tree }
1068
+ };
1069
+ }
1070
+ function parseListing(data) {
1071
+ if (!isObject2(data) || data.kind !== "comments" || !Array.isArray(data.comments)) return void 0;
1072
+ const comments = data.comments.map(toComment).filter((c) => c !== void 0);
1073
+ const viewer = Array.isArray(data.mine_held) ? { liked_by_me: data.liked_by_me === true, mine_held: data.mine_held.slice(0, 5).map(toHeld).filter((h) => h !== void 0) } : {};
1074
+ return { cp: 1, kind: "comments", publication_id: String(data.publication_id ?? ""), comment_count: count(data.comment_count), like_count: count(data.like_count), truncated: data.truncated === true, comments, ...viewer };
1075
+ }
1076
+ var untilMs = (iso) => {
1077
+ const t = iso ? Date.parse(iso) : NaN;
1078
+ return Number.isFinite(t) ? t : void 0;
1079
+ };
1080
+ function buildThread(listing, localHeld) {
1081
+ const byId = /* @__PURE__ */ new Map();
1082
+ const roots = [];
1083
+ const place = (node, parentId) => {
1084
+ const parent = parentId ? byId.get(parentId) : void 0;
1085
+ (parent ? parent.kids : roots).push(node);
1086
+ };
1087
+ for (const c of listing.comments) {
1088
+ if (byId.has(c.id)) continue;
1089
+ const removed = c.removed;
1090
+ const node = {
1091
+ id: c.id,
1092
+ depth: c.depth,
1093
+ status: removed ? "removed" : "visible",
1094
+ removedBy: removed ? c.removed_by : void 0,
1095
+ mine: !removed && c.mine === true,
1096
+ canEditUntil: untilMs(c.can_edit_until),
1097
+ likedByMe: !removed && c.liked_by_me === true,
1098
+ name: removed ? null : c.author_name ?? null,
1099
+ createdAt: c.created_at,
1100
+ editedAt: c.edited_at,
1101
+ likes: c.like_count,
1102
+ tree: c.body?.tree,
1103
+ text: void 0,
1104
+ kids: []
1105
+ };
1106
+ place(node, c.parent_id === c.id ? null : c.parent_id);
1107
+ byId.set(c.id, node);
1108
+ }
1109
+ const mine = [];
1110
+ const addHeld = (node, parentId, oldestFirst) => {
1111
+ const parent = parentId ? byId.get(parentId) : void 0;
1112
+ if (parent) parent.kids.push(node);
1113
+ else if (oldestFirst) mine.unshift(node);
1114
+ else mine.push(node);
1115
+ };
1116
+ const heldIds = /* @__PURE__ */ new Set();
1117
+ for (const h of listing.mine_held ?? []) {
1118
+ heldIds.add(h.id);
1119
+ const parent = h.parent_id ? byId.get(h.parent_id) : void 0;
1120
+ addHeld({ id: h.id, depth: Math.min(4, (parent?.depth ?? h.depth - 1) + 1), status: "held", removedBy: void 0, mine: true, canEditUntil: untilMs(h.can_edit_until), likedByMe: false, name: h.author_name, createdAt: h.created_at, editedAt: h.edited_at, likes: 0, tree: h.body?.tree, text: void 0, kids: [] }, h.parent_id, true);
1121
+ }
1122
+ if (listing.mine_held === void 0) {
1123
+ for (const h of localHeld) {
1124
+ if (byId.has(h.id) || heldIds.has(h.id)) continue;
1125
+ const parent = h.parentId ? byId.get(h.parentId) : void 0;
1126
+ addHeld({ id: h.id, depth: Math.min(4, (parent?.depth ?? 0) + 1), status: "held", removedBy: void 0, mine: true, canEditUntil: void 0, likedByMe: false, name: h.name, createdAt: h.createdAt, editedAt: null, likes: 0, tree: void 0, text: h.text, kids: [] }, h.parentId, false);
1127
+ }
1128
+ }
1129
+ return [...mine, ...roots];
1130
+ }
1131
+
1132
+ // src/react/comments-body.tsx
1133
+ import { toJsxRuntime as toJsxRuntime2 } from "hast-util-to-jsx-runtime";
1134
+ import { Fragment as Fragment5 } from "react";
1135
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1136
+ import { jsx as jsx6 } from "react/jsx-runtime";
1137
+ var ALLOWED = /* @__PURE__ */ new Set(["p", "a", "em", "strong", "del", "code", "pre", "blockquote", "ul", "ol", "li", "br"]);
1138
+ var LINK_REL = "nofollow ugc noopener noreferrer";
1139
+ function narrow(node) {
1140
+ if (node.type === "text") return [node];
1141
+ if (node.type !== "element") return [];
1142
+ const children = node.children.flatMap(narrow);
1143
+ if (!ALLOWED.has(node.tagName)) return children;
1144
+ if (node.tagName === "a") {
1145
+ const href = node.properties.href;
1146
+ if (!isSafeUrl(href, "href")) return children;
1147
+ return [{ type: "element", tagName: "a", properties: { href: String(href), rel: LINK_REL.split(" ") }, children }];
1148
+ }
1149
+ return [{ type: "element", tagName: node.tagName, properties: {}, children: node.tagName === "br" ? [] : children }];
1150
+ }
1151
+ function CommentBody({ tree }) {
1152
+ let children;
1153
+ try {
1154
+ children = sanitizeHast(tree).children.flatMap((n) => narrow(n));
1155
+ } catch (error) {
1156
+ if (error instanceof HastLimitError) return null;
1157
+ throw error;
1158
+ }
1159
+ return /* @__PURE__ */ jsx6("div", { className: "hyle-cm-body", children: toJsxRuntime2({ type: "root", children }, { Fragment: Fragment5, jsx: jsx5, jsxs: jsxs5, elementAttributeNameCase: "react", stylePropertyNameCase: "dom" }) });
1160
+ }
1161
+
1162
+ // src/react/embed.tsx
1163
+ import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1164
+ function HyleListView({ items, layout = "list", title, headingLevel = 2, moreHref, ...base }) {
1165
+ const c = ctx(base, "en");
1166
+ const { s, Link } = c;
1167
+ const Row = base.slots?.["list.item"];
1168
+ const Heading = `h${headingLevel}`;
1169
+ const safe = items.filter((item) => item.canonical_path.startsWith("/"));
1170
+ if (safe.length === 0) return base.slots?.["list.empty"] ? /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", "data-layout": layout, children: /* @__PURE__ */ jsx7(Slot, { name: "list.empty", slots: base.slots }) }) : null;
1171
+ return /* @__PURE__ */ jsxs6("div", { className: "hyle hyle-embed", "data-layout": layout, lang: c.locale, children: [
1172
+ title ? /* @__PURE__ */ jsx7(Heading, { className: "hyle-title", children: title }) : null,
1173
+ /* @__PURE__ */ jsx7("ul", { className: "hyle-items", children: safe.map((item) => /* @__PURE__ */ jsx7("li", { children: Row ? /* @__PURE__ */ jsx7(Row, { item, href: c.href(item.canonical_path), locale: c.locale }) : /* @__PURE__ */ jsxs6(Link, { className: "hyle-item", href: c.href(item.canonical_path), children: [
1174
+ /* @__PURE__ */ jsx7("time", { dateTime: item.published_at, title: item.published_at, children: formatDate(item.published_at, c.locale) }),
1175
+ /* @__PURE__ */ jsxs6("div", { children: [
1176
+ /* @__PURE__ */ jsx7("span", { className: "t", children: item.title }),
1177
+ item.description ? /* @__PURE__ */ jsx7("p", { children: item.description }) : null
1178
+ ] })
1179
+ ] }) }, item.canonical_path)) }),
1180
+ moreHref ? /* @__PURE__ */ jsx7("a", { className: "hyle-more", href: moreHref, children: s.viewAll }) : null
1181
+ ] });
1182
+ }
1183
+ function HyleArticleView({ article, headingLevel = 2, ...base }) {
1184
+ const { publication: pub } = article;
1185
+ const c = ctx(base, pub.locale);
1186
+ const Heading = `h${headingLevel}`;
1187
+ return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsxs6("article", { lang: c.locale, children: [
1188
+ /* @__PURE__ */ jsxs6("header", { className: "hyle-head", children: [
1189
+ /* @__PURE__ */ jsx7(Heading, { className: "hyle-title", children: pub.title }),
1190
+ pub.description ? /* @__PURE__ */ jsx7("p", { className: "hyle-desc", children: pub.description }) : null,
1191
+ /* @__PURE__ */ jsx7("div", { className: "hyle-meta", children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7("time", { dateTime: pub.published_at, title: pub.published_at, children: formatDate(pub.published_at, c.locale) }) }) })
1192
+ ] }),
1193
+ /* @__PURE__ */ jsx7(Body, { article, components: base.components, locale: c.locale }),
1194
+ pub.canonical_path.startsWith("/") ? /* @__PURE__ */ jsxs6("a", { className: "hyle-more", href: c.href(pub.canonical_path, pub.locale), rel: "bookmark", children: [
1195
+ c.s.readAtSource,
1196
+ /* @__PURE__ */ jsxs6("span", { className: "hyle-sr", children: [
1197
+ ": ",
1198
+ pub.title
1199
+ ] })
1200
+ ] }) : null
1201
+ ] }) });
1202
+ }
1203
+ var initials = (name) => name.trim().split(/\s+/).slice(0, 2).map((w) => [...w][0] ?? "").join("").toUpperCase() || "?";
1204
+ function StaticThread({ nodes, locale, s, level = 1 }) {
1205
+ return /* @__PURE__ */ jsx7("ol", { className: "hyle-cm-list", role: "list", children: nodes.map((node) => {
1206
+ const kids = node.kids.length > 0 && level < 32 ? /* @__PURE__ */ jsx7(StaticThread, { nodes: node.kids, locale, s, level: level + 1 }) : null;
1207
+ if (node.status === "removed") {
1208
+ const why = node.removedBy === "moderator" ? s.removedByModerator : node.removedBy === "author" ? s.removedByAuthor : s.removed;
1209
+ return /* @__PURE__ */ jsxs6("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "removed", "data-removed-by": node.removedBy, children: [
1210
+ /* @__PURE__ */ jsxs6("article", { "aria-label": why, children: [
1211
+ /* @__PURE__ */ jsx7("span", { className: "hyle-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(Icon, { name: "ban" }) }),
1212
+ /* @__PURE__ */ jsx7("div", { className: "hyle-cm-main", children: /* @__PURE__ */ jsx7("div", { className: "hyle-cm-body", children: /* @__PURE__ */ jsx7("p", { children: why }) }) })
1213
+ ] }),
1214
+ kids
1215
+ ] }, node.id);
1216
+ }
1217
+ return /* @__PURE__ */ jsxs6("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "visible", children: [
1218
+ /* @__PURE__ */ jsxs6("article", { children: [
1219
+ /* @__PURE__ */ jsx7("span", { className: "hyle-avatar", "aria-hidden": "true", children: initials(node.name ?? "") }),
1220
+ /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-main", children: [
1221
+ /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-by", children: [
1222
+ /* @__PURE__ */ jsx7("b", { children: node.name }),
1223
+ /* @__PURE__ */ jsxs6("span", { children: [
1224
+ /* @__PURE__ */ jsx7("time", { dateTime: node.createdAt, title: node.createdAt, children: formatDate(node.createdAt, locale) }),
1225
+ node.editedAt ? /* @__PURE__ */ jsxs6(Fragment6, { children: [
1226
+ " ",
1227
+ /* @__PURE__ */ jsx7("span", { "aria-hidden": "true", children: "\xB7" }),
1228
+ " ",
1229
+ /* @__PURE__ */ jsx7("span", { children: s.edited })
1230
+ ] }) : null
1231
+ ] })
1232
+ ] }),
1233
+ /* @__PURE__ */ jsx7(CommentBody, { tree: node.tree })
1234
+ ] })
1235
+ ] }),
1236
+ kids
1237
+ ] }, node.id);
1238
+ }) });
1239
+ }
1240
+ function HyleCommentsView({ listing, locale }) {
1241
+ const thread = buildThread(listing, []);
1242
+ if (thread.length === 0) return null;
1243
+ const s = stringsFor(locale).comments;
1244
+ return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsxs6("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", lang: locale, children: [
1245
+ /* @__PURE__ */ jsx7("div", { className: "hyle-cm-head", children: /* @__PURE__ */ jsxs6("h2", { children: [
1246
+ s.heading,
1247
+ " ",
1248
+ /* @__PURE__ */ jsx7("span", { className: "hyle-cm-count", "aria-label": s.countLabel.replace("{n}", String(listing.comment_count)), children: listing.comment_count })
1249
+ ] }) }),
1250
+ /* @__PURE__ */ jsx7(StaticThread, { nodes: thread, locale, s }),
1251
+ listing.truncated ? /* @__PURE__ */ jsx7("p", { className: "hyle-cm-note", children: s.truncated }) : null
1252
+ ] }) });
1253
+ }
1254
+ function HyleCommentsFallback({ locale }) {
1255
+ const s = stringsFor(locale).comments;
1256
+ return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsx7("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", children: /* @__PURE__ */ jsxs6("div", { role: "status", "aria-live": "polite", "aria-busy": "true", children: [
1257
+ /* @__PURE__ */ jsx7("span", { className: "hyle-sr", children: s.loading }),
1258
+ /* @__PURE__ */ jsx7("div", { "aria-hidden": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-sk", children: [
1259
+ /* @__PURE__ */ jsx7("span", { className: "hyle-sk c" }),
1260
+ /* @__PURE__ */ jsxs6("div", { children: [
1261
+ /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: 120 } }),
1262
+ /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: "100%" } }),
1263
+ /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: "72%" } })
1264
+ ] })
1265
+ ] }, i)) })
1266
+ ] }) }) });
1267
+ }
1268
+
789
1269
  // src/react/docs.tsx
790
1270
  import { DocsEnhance } from "./docs-enhance.js";
791
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1271
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
792
1272
  var ROOT_ID = "hyle-docs";
793
1273
  var NAV_ID = "hyle-docs-nav";
794
1274
  function navTreeOf(article) {
@@ -812,15 +1292,15 @@ function pathTo(nodes, path) {
812
1292
  }
813
1293
  function Branch({ nodes, current, onPath, c }) {
814
1294
  const { Link } = c;
815
- return /* @__PURE__ */ jsx5("ul", { children: nodes.map((node) => {
816
- const link = /* @__PURE__ */ jsx5(Link, { href: c.href(node.canonical_path), ...node.canonical_path === current ? { "aria-current": "page" } : {}, children: node.title });
817
- if (node.children.length === 0) return /* @__PURE__ */ jsx5("li", { children: link }, node.canonical_path);
818
- return /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs5("details", { ...onPath.has(node.canonical_path) ? { open: true } : {}, children: [
819
- /* @__PURE__ */ jsxs5("summary", { children: [
820
- /* @__PURE__ */ jsx5(Icon, { name: "chev" }),
1295
+ return /* @__PURE__ */ jsx8("ul", { children: nodes.map((node) => {
1296
+ const link = /* @__PURE__ */ jsx8(Link, { href: c.href(node.canonical_path), ...node.canonical_path === current ? { "aria-current": "page" } : {}, children: node.title });
1297
+ if (node.children.length === 0) return /* @__PURE__ */ jsx8("li", { children: link }, node.canonical_path);
1298
+ return /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsxs7("details", { ...onPath.has(node.canonical_path) ? { open: true } : {}, children: [
1299
+ /* @__PURE__ */ jsxs7("summary", { children: [
1300
+ /* @__PURE__ */ jsx8(Icon, { name: "chev" }),
821
1301
  link
822
1302
  ] }),
823
- /* @__PURE__ */ jsx5(Branch, { nodes: node.children, current, onPath, c })
1303
+ /* @__PURE__ */ jsx8(Branch, { nodes: node.children, current, onPath, c })
824
1304
  ] }) }, node.canonical_path);
825
1305
  }) });
826
1306
  }
@@ -834,47 +1314,47 @@ function DocsPage({ article, ...base }) {
834
1314
  const siteName = article.breadcrumbs[0]?.title ?? "";
835
1315
  const headingIds = article.toc.filter((t) => t.depth === 2 || t.depth === 3).map((t) => scopeId(t.id));
836
1316
  const notTranslated = article.fallback ? s.fallbackTitle.replace("{language}", languageName(article.fallback.requested_locale, c.locale)) : void 0;
837
- return /* @__PURE__ */ jsx5(Shell, { children: /* @__PURE__ */ jsxs5("div", { className: "hyle-docs", id: ROOT_ID, lang: c.locale, children: [
838
- /* @__PURE__ */ jsx5(DocsEnhance, { headingIds, rootId: ROOT_ID }),
839
- /* @__PURE__ */ jsxs5("button", { type: "button", className: "hyle-nav-bar", popoverTarget: NAV_ID, children: [
840
- /* @__PURE__ */ jsx5(Icon, { name: "file" }),
1317
+ return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("div", { className: "hyle-docs", id: ROOT_ID, lang: c.locale, children: [
1318
+ /* @__PURE__ */ jsx8(DocsEnhance, { headingIds, rootId: ROOT_ID }),
1319
+ /* @__PURE__ */ jsxs7("button", { type: "button", className: "hyle-nav-bar", popoverTarget: NAV_ID, children: [
1320
+ /* @__PURE__ */ jsx8(Icon, { name: "file" }),
841
1321
  s.menu,
842
- /* @__PURE__ */ jsx5("span", { className: "cur", children: pub.title }),
843
- /* @__PURE__ */ jsx5(Icon, { name: "chev-down", className: "hyle-chev" })
1322
+ /* @__PURE__ */ jsx8("span", { className: "cur", children: pub.title }),
1323
+ /* @__PURE__ */ jsx8(Icon, { name: "chev-down", className: "hyle-chev" })
844
1324
  ] }),
845
- /* @__PURE__ */ jsxs5("aside", { className: "hyle-nav-d", id: NAV_ID, popover: "auto", "aria-label": s.docs, children: [
846
- /* @__PURE__ */ jsxs5("div", { className: "hyle-side-head", children: [
847
- /* @__PURE__ */ jsx5("b", { children: siteName }),
848
- /* @__PURE__ */ jsx5(Slot, { name: "docs.version", slots: base.slots, tag: "span" }),
849
- /* @__PURE__ */ jsx5("button", { type: "button", className: "hyle-nav-x", popoverTarget: NAV_ID, popoverTargetAction: "hide", "aria-label": s.closeMenu, children: /* @__PURE__ */ jsx5(Icon, { name: "x" }) })
1325
+ /* @__PURE__ */ jsxs7("aside", { className: "hyle-nav-d", id: NAV_ID, popover: "auto", "aria-label": s.docs, children: [
1326
+ /* @__PURE__ */ jsxs7("div", { className: "hyle-side-head", children: [
1327
+ /* @__PURE__ */ jsx8("b", { children: siteName }),
1328
+ /* @__PURE__ */ jsx8(Slot, { name: "docs.version", slots: base.slots, tag: "span" }),
1329
+ /* @__PURE__ */ jsx8("button", { type: "button", className: "hyle-nav-x", popoverTarget: NAV_ID, popoverTargetAction: "hide", "aria-label": s.closeMenu, children: /* @__PURE__ */ jsx8(Icon, { name: "x" }) })
850
1330
  ] }),
851
- /* @__PURE__ */ jsx5(Slot, { name: "docs.sidebar-header", slots: base.slots, className: "hyle-side-slot" }),
852
- /* @__PURE__ */ jsx5("nav", { className: "hyle-tree", "aria-label": s.docs, children: /* @__PURE__ */ jsx5(Branch, { nodes: tree, current: pub.canonical_path, onPath, c }) }),
853
- /* @__PURE__ */ jsx5(Slot, { name: "docs.sidebar-footer", slots: base.slots, className: "hyle-side-slot" })
1331
+ /* @__PURE__ */ jsx8(Slot, { name: "docs.sidebar-header", slots: base.slots, className: "hyle-side-slot" }),
1332
+ /* @__PURE__ */ jsx8("nav", { className: "hyle-tree", "aria-label": s.docs, children: /* @__PURE__ */ jsx8(Branch, { nodes: tree, current: pub.canonical_path, onPath, c }) }),
1333
+ /* @__PURE__ */ jsx8(Slot, { name: "docs.sidebar-footer", slots: base.slots, className: "hyle-side-slot" })
854
1334
  ] }),
855
- /* @__PURE__ */ jsxs5("div", { className: "hyle-docs-main", "data-hyle-page": "docs", children: [
856
- notTranslated ? /* @__PURE__ */ jsxs5("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
857
- /* @__PURE__ */ jsx5(Icon, { name: "alert" }),
858
- /* @__PURE__ */ jsxs5("div", { children: [
859
- /* @__PURE__ */ jsx5("b", { children: notTranslated }),
1335
+ /* @__PURE__ */ jsxs7("div", { className: "hyle-docs-main", "data-hyle-page": "docs", children: [
1336
+ notTranslated ? /* @__PURE__ */ jsxs7("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
1337
+ /* @__PURE__ */ jsx8(Icon, { name: "alert" }),
1338
+ /* @__PURE__ */ jsxs7("div", { children: [
1339
+ /* @__PURE__ */ jsx8("b", { children: notTranslated }),
860
1340
  " ",
861
1341
  s.fallbackBody
862
1342
  ] })
863
1343
  ] }) : null,
864
- /* @__PURE__ */ jsx5("nav", { className: "hyle-crumbs", "aria-label": s.crumbs, children: /* @__PURE__ */ jsx5("ol", { children: article.breadcrumbs.map((b, i) => /* @__PURE__ */ jsx5("li", { "aria-current": i === article.breadcrumbs.length - 1 ? "page" : void 0, children: i === article.breadcrumbs.length - 1 ? b.title : /* @__PURE__ */ jsx5(Link, { href: c.href(b.canonical_path), children: b.title }) }, b.canonical_path)) }) }),
865
- /* @__PURE__ */ jsx5("h1", { className: "hyle-title", children: pub.title }),
866
- pub.description ? /* @__PURE__ */ jsx5("p", { className: "hyle-desc", children: pub.description }) : null,
867
- /* @__PURE__ */ jsxs5("p", { className: "hyle-updated", children: [
868
- /* @__PURE__ */ jsx5(Icon, { name: "calendar" }),
1344
+ /* @__PURE__ */ jsx8("nav", { className: "hyle-crumbs", "aria-label": s.crumbs, children: /* @__PURE__ */ jsx8("ol", { children: article.breadcrumbs.map((b, i) => /* @__PURE__ */ jsx8("li", { "aria-current": i === article.breadcrumbs.length - 1 ? "page" : void 0, children: i === article.breadcrumbs.length - 1 ? b.title : /* @__PURE__ */ jsx8(Link, { href: c.href(b.canonical_path), children: b.title }) }, b.canonical_path)) }) }),
1345
+ /* @__PURE__ */ jsx8("h1", { className: "hyle-title", children: pub.title }),
1346
+ pub.description ? /* @__PURE__ */ jsx8("p", { className: "hyle-desc", children: pub.description }) : null,
1347
+ /* @__PURE__ */ jsxs7("p", { className: "hyle-updated", children: [
1348
+ /* @__PURE__ */ jsx8(Icon, { name: "calendar" }),
869
1349
  s.updated,
870
1350
  " ",
871
- /* @__PURE__ */ jsx5("time", { dateTime: pub.updated_at, title: pub.updated_at, children: formatDate(pub.updated_at, c.locale) })
1351
+ /* @__PURE__ */ jsx8("time", { dateTime: pub.updated_at, title: pub.updated_at, children: formatDate(pub.updated_at, c.locale) })
872
1352
  ] }),
873
1353
  toc.narrow,
874
- /* @__PURE__ */ jsx5(Body, { article, components: base.components, locale: c.locale }),
875
- /* @__PURE__ */ jsx5(Pager, { prev: article.prev, next: article.next, c }),
876
- /* @__PURE__ */ jsx5(Slot, { name: "docs.after", slots: base.slots, className: "hyle-after" }),
877
- /* @__PURE__ */ jsx5("span", { className: "hyle-docs-end", "aria-hidden": "true" })
1354
+ /* @__PURE__ */ jsx8(Body, { article, components: base.components, locale: c.locale }),
1355
+ /* @__PURE__ */ jsx8(Pager, { prev: article.prev, next: article.next, c }),
1356
+ /* @__PURE__ */ jsx8(Slot, { name: "docs.after", slots: base.slots, className: "hyle-after" }),
1357
+ /* @__PURE__ */ jsx8("span", { className: "hyle-docs-end", "aria-hidden": "true" })
878
1358
  ] }),
879
1359
  toc.wide
880
1360
  ] }) });
@@ -893,6 +1373,12 @@ export {
893
1373
  NotFound,
894
1374
  Unavailable,
895
1375
  Redirecting,
1376
+ parseListing,
1377
+ HyleListView,
1378
+ HyleArticleView,
1379
+ HyleCommentsView,
1380
+ HyleCommentsFallback,
896
1381
  DocsPage,
897
- MermaidDiagram2 as MermaidDiagram
1382
+ MermaidDiagram2 as MermaidDiagram,
1383
+ Comments2 as Comments
898
1384
  };