@agent-native/core 0.101.10 → 0.101.12

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 (91) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/a2a/client.ts +23 -1
  5. package/corpus/core/src/a2a/handlers.ts +65 -1
  6. package/corpus/core/src/a2a/server.ts +124 -0
  7. package/corpus/core/src/a2a/task-store.ts +253 -0
  8. package/corpus/core/src/a2a/types.ts +26 -0
  9. package/corpus/core/src/agent/production-agent.ts +5 -2
  10. package/corpus/core/src/coding-tools/run-code.ts +65 -12
  11. package/corpus/core/src/extensions/actions.ts +141 -7
  12. package/corpus/core/src/mcp/builtin-tools.ts +25 -1
  13. package/corpus/core/src/scripts/call-agent.ts +22 -3
  14. package/corpus/core/src/server/agent-chat-plugin.ts +86 -1
  15. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +25 -0
  16. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +59 -0
  17. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +5 -2
  18. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +13 -4
  19. package/corpus/templates/analytics/server/lib/real-data-actions.ts +63 -1
  20. package/corpus/templates/analytics/server/plugins/agent-chat.ts +30 -0
  21. package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +23 -0
  22. package/corpus/templates/content/app/components/editor/MathRenderer.tsx +43 -0
  23. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +260 -4
  24. package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +78 -0
  25. package/corpus/templates/content/app/global.css +53 -0
  26. package/corpus/templates/content/app/i18n/zh-TW.ts +13 -0
  27. package/corpus/templates/content/app/i18n-data.ts +163 -0
  28. package/corpus/templates/content/app/root.tsx +2 -0
  29. package/corpus/templates/content/changelog/2026-07-14-latex-equations-render-in-documents-public-pages-and-exports.md +6 -0
  30. package/corpus/templates/content/package.json +1 -0
  31. package/corpus/templates/content/shared/document-export.ts +296 -25
  32. package/corpus/templates/content/shared/inline-math.ts +128 -0
  33. package/corpus/templates/content/shared/math-rendering.ts +50 -0
  34. package/corpus/templates/content/shared/nfm.ts +17 -14
  35. package/corpus/templates/content/vite.config.ts +0 -1
  36. package/corpus/templates/mail/.agents/skills/email-drafts/SKILL.md +17 -0
  37. package/corpus/templates/mail/AGENTS.md +21 -19
  38. package/corpus/templates/mail/actions/create-attachment-upload.ts +49 -0
  39. package/corpus/templates/mail/changelog/2026-07-14-connected-agents-can-now-securely-upload-local-files-for-mai.md +6 -0
  40. package/corpus/templates/mail/server/handlers/media.ts +84 -61
  41. package/corpus/templates/mail/server/lib/attachment-upload-ticket.ts +234 -0
  42. package/corpus/templates/mail/server/lib/mail-connector-catalog.ts +8 -4
  43. package/corpus/templates/mail/server/lib/media-upload.ts +114 -0
  44. package/corpus/templates/mail/server/plugins/auth.ts +9 -1
  45. package/corpus/templates/mail/server/routes/api/media/attachment-upload/[uploadId].put.ts +1 -0
  46. package/dist/a2a/client.d.ts +5 -1
  47. package/dist/a2a/client.d.ts.map +1 -1
  48. package/dist/a2a/client.js +18 -1
  49. package/dist/a2a/client.js.map +1 -1
  50. package/dist/a2a/handlers.d.ts.map +1 -1
  51. package/dist/a2a/handlers.js +57 -8
  52. package/dist/a2a/handlers.js.map +1 -1
  53. package/dist/a2a/server.d.ts.map +1 -1
  54. package/dist/a2a/server.js +87 -1
  55. package/dist/a2a/server.js.map +1 -1
  56. package/dist/a2a/task-store.d.ts +27 -0
  57. package/dist/a2a/task-store.d.ts.map +1 -1
  58. package/dist/a2a/task-store.js +216 -0
  59. package/dist/a2a/task-store.js.map +1 -1
  60. package/dist/a2a/types.d.ts +24 -0
  61. package/dist/a2a/types.d.ts.map +1 -1
  62. package/dist/a2a/types.js.map +1 -1
  63. package/dist/agent/production-agent.d.ts +1 -0
  64. package/dist/agent/production-agent.d.ts.map +1 -1
  65. package/dist/agent/production-agent.js +5 -2
  66. package/dist/agent/production-agent.js.map +1 -1
  67. package/dist/coding-tools/run-code.js +64 -11
  68. package/dist/coding-tools/run-code.js.map +1 -1
  69. package/dist/collab/struct-routes.d.ts +1 -1
  70. package/dist/extensions/actions.d.ts.map +1 -1
  71. package/dist/extensions/actions.js +129 -7
  72. package/dist/extensions/actions.js.map +1 -1
  73. package/dist/mcp/builtin-tools.d.ts.map +1 -1
  74. package/dist/mcp/builtin-tools.js +22 -3
  75. package/dist/mcp/builtin-tools.js.map +1 -1
  76. package/dist/notifications/routes.d.ts +2 -2
  77. package/dist/observability/routes.d.ts +5 -5
  78. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  79. package/dist/resources/handlers.d.ts +3 -3
  80. package/dist/scripts/call-agent.d.ts +1 -1
  81. package/dist/scripts/call-agent.d.ts.map +1 -1
  82. package/dist/scripts/call-agent.js +19 -1
  83. package/dist/scripts/call-agent.js.map +1 -1
  84. package/dist/secrets/routes.d.ts +9 -9
  85. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  86. package/dist/server/agent-chat-plugin.js +71 -2
  87. package/dist/server/agent-chat-plugin.js.map +1 -1
  88. package/dist/server/transcribe-voice.d.ts +1 -1
  89. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +25 -0
  90. package/package.json +1 -1
  91. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +25 -0
@@ -1,3 +1,4 @@
1
+ import { findTrailingPlainInlineMath } from "@shared/inline-math";
1
2
  import {
2
3
  escapeHtml,
3
4
  indentMarkdown,
@@ -10,6 +11,7 @@ import {
10
11
  IconExternalLink,
11
12
  IconFileText,
12
13
  } from "@tabler/icons-react";
14
+ import { InputRule } from "@tiptap/core";
13
15
  import type { Fragment, Node as ProseMirrorNode } from "@tiptap/pm/model";
14
16
  import {
15
17
  Mark,
@@ -21,6 +23,8 @@ import {
21
23
  type NodeViewProps,
22
24
  } from "@tiptap/react";
23
25
 
26
+ import { MathRenderer } from "../MathRenderer";
27
+
24
28
  const BLOCK_ATOM_TAGS = [
25
29
  "page",
26
30
  "database",
@@ -452,6 +456,17 @@ function BlockAtomView({ node, extension }: NodeViewProps) {
452
456
  const canOpenLocalPage = Boolean(pageLink && options.onOpenPageLink);
453
457
  const externalUrl = safeExternalPageUrl(attrs.url || attrs.href || null);
454
458
 
459
+ if (tagName === "equation") {
460
+ return (
461
+ <NodeViewWrapper
462
+ className="content-equation"
463
+ data-latex={label || attrs.latex || ""}
464
+ >
465
+ <MathRenderer latex={label || attrs.latex || ""} displayMode={true} />
466
+ </NodeViewWrapper>
467
+ );
468
+ }
469
+
455
470
  if (tagName === "page") {
456
471
  const openPage = () => {
457
472
  if (pageLink && options.onOpenPageLink) {
@@ -511,6 +526,36 @@ function BlockAtomView({ node, extension }: NodeViewProps) {
511
526
  );
512
527
  }
513
528
 
529
+ function InlineAtomView({ node }: NodeViewProps) {
530
+ const tagName = (node.attrs.tagName || "mention") as string;
531
+ const label = (node.attrs.label || "") as string;
532
+ const attrs = parseAttrsJson(node.attrs.attrsJson as string);
533
+
534
+ if (tagName === "math") {
535
+ const latex = label || attrs.latex || "";
536
+ return (
537
+ <NodeViewWrapper
538
+ as="span"
539
+ className="content-inline-equation"
540
+ contentEditable={false}
541
+ data-latex={latex}
542
+ >
543
+ <MathRenderer latex={latex} displayMode={false} />
544
+ </NodeViewWrapper>
545
+ );
546
+ }
547
+
548
+ return (
549
+ <NodeViewWrapper
550
+ as="span"
551
+ className="notion-inline-atom"
552
+ contentEditable={false}
553
+ >
554
+ {label || humanizeTag(tagName)}
555
+ </NodeViewWrapper>
556
+ );
557
+ }
558
+
514
559
  export const NotionSpanMark = Mark.create({
515
560
  name: "notionSpan",
516
561
 
@@ -975,6 +1020,35 @@ export const NotionInlineAtom = Node.create({
975
1020
  atom: true,
976
1021
  selectable: false,
977
1022
 
1023
+ addInputRules() {
1024
+ return [
1025
+ new InputRule({
1026
+ find: (text) => {
1027
+ const match = findTrailingPlainInlineMath(text);
1028
+ if (!match) return null;
1029
+ return {
1030
+ index: match.from,
1031
+ text: text.slice(match.from, match.to),
1032
+ data: { latex: match.latex },
1033
+ };
1034
+ },
1035
+ handler: ({ state, range, match }) => {
1036
+ const latex = match.data?.latex;
1037
+ if (typeof latex !== "string") return null;
1038
+
1039
+ const mathNode = state.schema.nodes.notionInlineAtom?.create({
1040
+ tagName: "math",
1041
+ attrsJson: "{}",
1042
+ label: latex,
1043
+ });
1044
+ if (!mathNode) return null;
1045
+
1046
+ state.tr.replaceWith(range.from, range.to, mathNode).scrollIntoView();
1047
+ },
1048
+ }),
1049
+ ];
1050
+ },
1051
+
978
1052
  addAttributes() {
979
1053
  return {
980
1054
  tagName: { default: "mention-user" },
@@ -1023,6 +1097,10 @@ export const NotionInlineAtom = Node.create({
1023
1097
  ];
1024
1098
  },
1025
1099
 
1100
+ addNodeView() {
1101
+ return ReactNodeViewRenderer(InlineAtomView);
1102
+ },
1103
+
1026
1104
  addStorage() {
1027
1105
  return {
1028
1106
  markdown: {
@@ -1218,6 +1218,59 @@ div[data-notion-column] > :last-child {
1218
1218
  white-space: nowrap;
1219
1219
  }
1220
1220
 
1221
+ .content-inline-equation {
1222
+ display: inline-block;
1223
+ max-width: 100%;
1224
+ margin: 0 0.08em;
1225
+ vertical-align: -0.08em;
1226
+ }
1227
+
1228
+ .content-equation {
1229
+ display: block;
1230
+ max-width: 100%;
1231
+ margin: 1em 0;
1232
+ overflow-x: auto;
1233
+ padding: 0.25rem 0;
1234
+ }
1235
+
1236
+ .content-math {
1237
+ color: inherit;
1238
+ }
1239
+
1240
+ .content-math--inline {
1241
+ display: inline-block;
1242
+ }
1243
+
1244
+ .content-math--block {
1245
+ display: block;
1246
+ min-width: max-content;
1247
+ text-align: center;
1248
+ }
1249
+
1250
+ .content-math-error {
1251
+ border: 1px solid hsl(var(--destructive) / 0.3);
1252
+ border-radius: 0.375rem;
1253
+ background: hsl(var(--destructive) / 0.06);
1254
+ color: hsl(var(--foreground));
1255
+ font-family:
1256
+ "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas,
1257
+ monospace;
1258
+ white-space: pre-wrap;
1259
+ }
1260
+
1261
+ .content-math-error--inline {
1262
+ padding: 0.05rem 0.25rem;
1263
+ font-size: 0.9em;
1264
+ }
1265
+
1266
+ .content-math-error--block {
1267
+ display: block;
1268
+ width: 100%;
1269
+ padding: 0.75rem 0.9rem;
1270
+ overflow-wrap: anywhere;
1271
+ text-align: left;
1272
+ }
1273
+
1221
1274
  .notion-editor span[data-notion-span="true"][underline="true"] {
1222
1275
  text-decoration: underline;
1223
1276
  text-underline-offset: 3px;
@@ -393,6 +393,8 @@ const messages = {
393
393
  audio: "音訊",
394
394
  audioDescription: "上傳或嵌入音訊",
395
395
  basicBlocks: "基本塊",
396
+ blockEquation: "區塊公式",
397
+ blockEquationDescription: "在獨立一行顯示 LaTeX 公式",
396
398
  blocks: "積木",
397
399
  bulletedList: "專案符號清單",
398
400
  bulletedListDescription: "無序清單",
@@ -403,6 +405,7 @@ const messages = {
403
405
  collapsibleBlockDescription: "可折疊塊",
404
406
  database: "資料庫",
405
407
  databaseDescription: "此頁面中的內嵌資料庫",
408
+ cancelEquation: "取消",
406
409
  divider: "分頻器",
407
410
  dividerDescription: "水平尺",
408
411
  generate: "生成",
@@ -413,6 +416,9 @@ const messages = {
413
416
  heading4Description: "副標題",
414
417
  image: "圖片",
415
418
  imageDescription: "上傳或嵌入圖片",
419
+ inlineEquation: "行內公式",
420
+ inlineEquationDescription: "在文字中加入 LaTeX 公式",
421
+ insertEquation: "插入",
416
422
  localComponents: "本機元件",
417
423
  media: "媒體",
418
424
  numberedList: "編號清單",
@@ -420,6 +426,13 @@ const messages = {
420
426
  page: "頁面",
421
427
  pageDescription: "建立子頁面",
422
428
  pages: "頁面數",
429
+ equationInputLabel: "LaTeX 公式",
430
+ equationInsertFailed: "無法插入公式。",
431
+ equationNeedsRepair: "請修正 LaTeX 以查看預覽。",
432
+ equationPlaceholder: String.raw`輸入 LaTeX,例如 \frac{a}{b}`,
433
+ equationPreview: "預覽",
434
+ equationPreviewEmpty: "公式將顯示於此。",
435
+ equationSubmitHint: "輸入時會即時更新預覽。按 Cmd/Ctrl+Enter 插入。",
423
436
  quote: "報價",
424
437
  quoteDescription: "塊報價",
425
438
  table: "表",
@@ -2729,6 +2729,8 @@ const editorSlashMessages = {
2729
2729
  audio: "Audio",
2730
2730
  audioDescription: "Upload or embed audio",
2731
2731
  basicBlocks: "Basic blocks",
2732
+ blockEquation: "Block equation",
2733
+ blockEquationDescription: "Display a LaTeX equation on its own line",
2732
2734
  blocks: "Blocks",
2733
2735
  bulletedList: "Bulleted list",
2734
2736
  bulletedListDescription: "Unordered list",
@@ -2739,6 +2741,7 @@ const editorSlashMessages = {
2739
2741
  collapsibleBlockDescription: "Collapsible block",
2740
2742
  database: "Database",
2741
2743
  databaseDescription: "Inline database in this page",
2744
+ cancelEquation: "Cancel",
2742
2745
  divider: "Divider",
2743
2746
  dividerDescription: "Horizontal rule",
2744
2747
  generate: "Generate",
@@ -2749,6 +2752,9 @@ const editorSlashMessages = {
2749
2752
  heading4Description: "Subheading",
2750
2753
  image: "Image",
2751
2754
  imageDescription: "Upload or embed image",
2755
+ inlineEquation: "Inline equation",
2756
+ inlineEquationDescription: "Add a LaTeX equation within text",
2757
+ insertEquation: "Insert",
2752
2758
  localComponents: "Local components",
2753
2759
  media: "Media",
2754
2760
  numberedList: "Numbered list",
@@ -2756,6 +2762,14 @@ const editorSlashMessages = {
2756
2762
  page: "Page",
2757
2763
  pageDescription: "Create a child page",
2758
2764
  pages: "Pages",
2765
+ equationInputLabel: "LaTeX equation",
2766
+ equationInsertFailed: "Could not insert the equation.",
2767
+ equationNeedsRepair: "Fix the LaTeX to see a preview.",
2768
+ equationPlaceholder: String.raw`Type LaTeX, for example \frac{a}{b}`,
2769
+ equationPreview: "Preview",
2770
+ equationPreviewEmpty: "Your equation will appear here.",
2771
+ equationSubmitHint:
2772
+ "Preview updates as you type. Press Cmd/Ctrl+Enter to insert.",
2759
2773
  quote: "Quote",
2760
2774
  quoteDescription: "Block quote",
2761
2775
  table: "Table",
@@ -10293,6 +10307,21 @@ const contentExactEnglishTranslations = {
10293
10307
  "zh-CN": {
10294
10308
  editor: {
10295
10309
  failedToCreatePage: "创建页面失败",
10310
+ slash: {
10311
+ blockEquation: "块级公式",
10312
+ blockEquationDescription: "在单独一行显示 LaTeX 公式",
10313
+ cancelEquation: "取消",
10314
+ inlineEquation: "行内公式",
10315
+ inlineEquationDescription: "在文本中添加 LaTeX 公式",
10316
+ insertEquation: "插入",
10317
+ equationInputLabel: "LaTeX 公式",
10318
+ equationInsertFailed: "无法插入公式。",
10319
+ equationNeedsRepair: "请修正 LaTeX 以查看预览。",
10320
+ equationPlaceholder: String.raw`输入 LaTeX,例如 \frac{a}{b}`,
10321
+ equationPreview: "预览",
10322
+ equationPreviewEmpty: "公式将在此处显示。",
10323
+ equationSubmitHint: "输入时会实时更新预览。按 Cmd/Ctrl+Enter 插入。",
10324
+ },
10296
10325
  toolbar: {
10297
10326
  copiedPageLink: "已复制页面链接",
10298
10327
  copyPageLink: "复制页面链接",
@@ -10306,6 +10335,23 @@ const contentExactEnglishTranslations = {
10306
10335
  "es-ES": {
10307
10336
  editor: {
10308
10337
  failedToCreatePage: "No se pudo crear la página",
10338
+ slash: {
10339
+ blockEquation: "Ecuación en bloque",
10340
+ blockEquationDescription:
10341
+ "Muestra una ecuación LaTeX en su propia línea",
10342
+ cancelEquation: "Cancelar",
10343
+ inlineEquation: "Ecuación en línea",
10344
+ inlineEquationDescription: "Añade una ecuación LaTeX dentro del texto",
10345
+ insertEquation: "Insertar",
10346
+ equationInputLabel: "Ecuación LaTeX",
10347
+ equationInsertFailed: "No se pudo insertar la ecuación.",
10348
+ equationNeedsRepair: "Corrige el LaTeX para ver la vista previa.",
10349
+ equationPlaceholder: String.raw`Escribe LaTeX, por ejemplo \frac{a}{b}`,
10350
+ equationPreview: "Vista previa",
10351
+ equationPreviewEmpty: "Tu ecuación aparecerá aquí.",
10352
+ equationSubmitHint:
10353
+ "La vista previa se actualiza mientras escribes. Pulsa Cmd/Ctrl+Enter para insertar.",
10354
+ },
10309
10355
  toolbar: {
10310
10356
  copiedPageLink: "Enlace de página copiado",
10311
10357
  copyPageLink: "Copiar enlace de página",
@@ -10320,6 +10366,23 @@ const contentExactEnglishTranslations = {
10320
10366
  "fr-FR": {
10321
10367
  editor: {
10322
10368
  failedToCreatePage: "Impossible de créer la page",
10369
+ slash: {
10370
+ blockEquation: "Équation en bloc",
10371
+ blockEquationDescription:
10372
+ "Afficher une équation LaTeX sur sa propre ligne",
10373
+ cancelEquation: "Annuler",
10374
+ inlineEquation: "Équation en ligne",
10375
+ inlineEquationDescription: "Ajouter une équation LaTeX dans le texte",
10376
+ insertEquation: "Insérer",
10377
+ equationInputLabel: "Équation LaTeX",
10378
+ equationInsertFailed: "Impossible d’insérer l’équation.",
10379
+ equationNeedsRepair: "Corrigez le LaTeX pour afficher un aperçu.",
10380
+ equationPlaceholder: String.raw`Saisissez du LaTeX, par exemple \frac{a}{b}`,
10381
+ equationPreview: "Aperçu",
10382
+ equationPreviewEmpty: "Votre équation apparaîtra ici.",
10383
+ equationSubmitHint:
10384
+ "L’aperçu se met à jour pendant la saisie. Appuyez sur Cmd/Ctrl+Entrée pour insérer.",
10385
+ },
10323
10386
  toolbar: {
10324
10387
  copiedPageLink: "Lien de la page copié",
10325
10388
  copyPageLink: "Copier le lien de la page",
@@ -10334,6 +10397,24 @@ const contentExactEnglishTranslations = {
10334
10397
  "de-DE": {
10335
10398
  editor: {
10336
10399
  failedToCreatePage: "Seite konnte nicht erstellt werden",
10400
+ slash: {
10401
+ blockEquation: "Blockgleichung",
10402
+ blockEquationDescription:
10403
+ "Eine LaTeX-Gleichung in einer eigenen Zeile anzeigen",
10404
+ cancelEquation: "Abbrechen",
10405
+ inlineEquation: "Inline-Gleichung",
10406
+ inlineEquationDescription: "Eine LaTeX-Gleichung in Text einfügen",
10407
+ insertEquation: "Einfügen",
10408
+ equationInputLabel: "LaTeX-Gleichung",
10409
+ equationInsertFailed: "Die Gleichung konnte nicht eingefügt werden.",
10410
+ equationNeedsRepair:
10411
+ "Korrigieren Sie das LaTeX, um eine Vorschau zu sehen.",
10412
+ equationPlaceholder: String.raw`LaTeX eingeben, zum Beispiel \frac{a}{b}`,
10413
+ equationPreview: "Vorschau",
10414
+ equationPreviewEmpty: "Ihre Gleichung wird hier angezeigt.",
10415
+ equationSubmitHint:
10416
+ "Die Vorschau wird während der Eingabe aktualisiert. Mit Cmd/Ctrl+Enter einfügen.",
10417
+ },
10337
10418
  toolbar: {
10338
10419
  copiedPageLink: "Seitenlink kopiert",
10339
10420
  copyPageLink: "Seitenlink kopieren",
@@ -10348,6 +10429,23 @@ const contentExactEnglishTranslations = {
10348
10429
  "ja-JP": {
10349
10430
  editor: {
10350
10431
  failedToCreatePage: "ページを作成できませんでした",
10432
+ slash: {
10433
+ blockEquation: "ブロック数式",
10434
+ blockEquationDescription: "LaTeX 数式を独立した行に表示します",
10435
+ cancelEquation: "キャンセル",
10436
+ inlineEquation: "インライン数式",
10437
+ inlineEquationDescription: "テキスト内に LaTeX 数式を追加します",
10438
+ insertEquation: "挿入",
10439
+ equationInputLabel: "LaTeX 数式",
10440
+ equationInsertFailed: "数式を挿入できませんでした。",
10441
+ equationNeedsRepair:
10442
+ "プレビューを表示するには LaTeX を修正してください。",
10443
+ equationPlaceholder: String.raw`LaTeX を入力(例:\frac{a}{b})`,
10444
+ equationPreview: "プレビュー",
10445
+ equationPreviewEmpty: "ここに数式が表示されます。",
10446
+ equationSubmitHint:
10447
+ "入力中にプレビューが更新されます。Cmd/Ctrl+Enter で挿入します。",
10448
+ },
10351
10449
  toolbar: {
10352
10450
  copiedPageLink: "ページリンクをコピーしました",
10353
10451
  copyPageLink: "ページリンクをコピー",
@@ -10362,6 +10460,22 @@ const contentExactEnglishTranslations = {
10362
10460
  "ko-KR": {
10363
10461
  editor: {
10364
10462
  failedToCreatePage: "페이지를 만들지 못했습니다",
10463
+ slash: {
10464
+ blockEquation: "블록 수식",
10465
+ blockEquationDescription: "LaTeX 수식을 별도 줄에 표시합니다",
10466
+ cancelEquation: "취소",
10467
+ inlineEquation: "인라인 수식",
10468
+ inlineEquationDescription: "텍스트 안에 LaTeX 수식을 추가합니다",
10469
+ insertEquation: "삽입",
10470
+ equationInputLabel: "LaTeX 수식",
10471
+ equationInsertFailed: "수식을 삽입하지 못했습니다.",
10472
+ equationNeedsRepair: "미리 보려면 LaTeX를 수정하세요.",
10473
+ equationPlaceholder: String.raw`LaTeX를 입력하세요. 예: \frac{a}{b}`,
10474
+ equationPreview: "미리보기",
10475
+ equationPreviewEmpty: "여기에 수식이 표시됩니다.",
10476
+ equationSubmitHint:
10477
+ "입력하는 동안 미리보기가 업데이트됩니다. Cmd/Ctrl+Enter로 삽입하세요.",
10478
+ },
10365
10479
  toolbar: {
10366
10480
  copiedPageLink: "페이지 링크를 복사했습니다",
10367
10481
  copyPageLink: "페이지 링크 복사",
@@ -10376,6 +10490,23 @@ const contentExactEnglishTranslations = {
10376
10490
  "pt-BR": {
10377
10491
  editor: {
10378
10492
  failedToCreatePage: "Não foi possível criar a página",
10493
+ slash: {
10494
+ blockEquation: "Equação em bloco",
10495
+ blockEquationDescription:
10496
+ "Exiba uma equação LaTeX em uma linha própria",
10497
+ cancelEquation: "Cancelar",
10498
+ inlineEquation: "Equação em linha",
10499
+ inlineEquationDescription: "Adicione uma equação LaTeX dentro do texto",
10500
+ insertEquation: "Inserir",
10501
+ equationInputLabel: "Equação LaTeX",
10502
+ equationInsertFailed: "Não foi possível inserir a equação.",
10503
+ equationNeedsRepair: "Corrija o LaTeX para ver uma prévia.",
10504
+ equationPlaceholder: String.raw`Digite LaTeX, por exemplo \frac{a}{b}`,
10505
+ equationPreview: "Prévia",
10506
+ equationPreviewEmpty: "Sua equação aparecerá aqui.",
10507
+ equationSubmitHint:
10508
+ "A prévia é atualizada enquanto você digita. Pressione Cmd/Ctrl+Enter para inserir.",
10509
+ },
10379
10510
  toolbar: {
10380
10511
  copiedPageLink: "Link da página copiado",
10381
10512
  copyPageLink: "Copiar link da página",
@@ -10390,6 +10521,22 @@ const contentExactEnglishTranslations = {
10390
10521
  "hi-IN": {
10391
10522
  editor: {
10392
10523
  failedToCreatePage: "पेज नहीं बनाया जा सका",
10524
+ slash: {
10525
+ blockEquation: "ब्लॉक समीकरण",
10526
+ blockEquationDescription: "LaTeX समीकरण को अलग पंक्ति में दिखाएँ",
10527
+ cancelEquation: "रद्द करें",
10528
+ inlineEquation: "इनलाइन समीकरण",
10529
+ inlineEquationDescription: "टेक्स्ट के भीतर LaTeX समीकरण जोड़ें",
10530
+ insertEquation: "सम्मिलित करें",
10531
+ equationInputLabel: "LaTeX समीकरण",
10532
+ equationInsertFailed: "समीकरण सम्मिलित नहीं किया जा सका।",
10533
+ equationNeedsRepair: "पूर्वावलोकन देखने के लिए LaTeX ठीक करें।",
10534
+ equationPlaceholder: String.raw`LaTeX लिखें, जैसे \frac{a}{b}`,
10535
+ equationPreview: "पूर्वावलोकन",
10536
+ equationPreviewEmpty: "आपका समीकरण यहाँ दिखाई देगा।",
10537
+ equationSubmitHint:
10538
+ "लिखते समय पूर्वावलोकन अपडेट होता है। सम्मिलित करने के लिए Cmd/Ctrl+Enter दबाएँ।",
10539
+ },
10393
10540
  toolbar: {
10394
10541
  copiedPageLink: "पेज लिंक कॉपी किया गया",
10395
10542
  copyPageLink: "पेज लिंक कॉपी करें",
@@ -10403,6 +10550,22 @@ const contentExactEnglishTranslations = {
10403
10550
  "ar-SA": {
10404
10551
  editor: {
10405
10552
  failedToCreatePage: "تعذر إنشاء الصفحة",
10553
+ slash: {
10554
+ blockEquation: "معادلة مستقلة",
10555
+ blockEquationDescription: "اعرض معادلة LaTeX في سطر مستقل",
10556
+ cancelEquation: "إلغاء",
10557
+ inlineEquation: "معادلة ضمن السطر",
10558
+ inlineEquationDescription: "أضف معادلة LaTeX داخل النص",
10559
+ insertEquation: "إدراج",
10560
+ equationInputLabel: "معادلة LaTeX",
10561
+ equationInsertFailed: "تعذر إدراج المعادلة.",
10562
+ equationNeedsRepair: "صحح LaTeX لعرض المعاينة.",
10563
+ equationPlaceholder: String.raw`اكتب LaTeX، مثل \frac{a}{b}`,
10564
+ equationPreview: "معاينة",
10565
+ equationPreviewEmpty: "ستظهر معادلتك هنا.",
10566
+ equationSubmitHint:
10567
+ "تتحدث المعاينة أثناء الكتابة. اضغط Cmd/Ctrl+Enter للإدراج.",
10568
+ },
10406
10569
  toolbar: {
10407
10570
  copiedPageLink: "تم نسخ رابط الصفحة",
10408
10571
  copyPageLink: "نسخ رابط الصفحة",
@@ -62,6 +62,7 @@ import {
62
62
  } from "./lib/content-command-search";
63
63
 
64
64
  import stylesheet from "./global.css?url";
65
+ import katexStylesheet from "katex/dist/katex.min.css?url";
65
66
  configureTracking({
66
67
  getDefaultProps: (_name, properties) => ({
67
68
  ...properties,
@@ -71,6 +72,7 @@ configureTracking({
71
72
 
72
73
  export const links: LinksFunction = () => [
73
74
  { rel: "stylesheet", href: stylesheet },
75
+ { rel: "stylesheet", href: katexStylesheet },
74
76
  ];
75
77
 
76
78
  interface RootLoaderData {
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: added
3
+ date: 2026-07-14
4
+ ---
5
+
6
+ Create inline or block LaTeX equations from the slash menu or by typing `$…$`, with live validation and preview; existing GitHub-style equation syntax remains compatible, and equations render on public pages and in exports.
@@ -55,6 +55,7 @@
55
55
  "h3": "catalog:",
56
56
  "highlight.js": "^11.11.1",
57
57
  "isbot": "^5",
58
+ "katex": "0.17.0",
58
59
  "lowlight": "^3.3.0",
59
60
  "prosemirror-markdown": "^1.13.4",
60
61
  "remark-mdx": "^3.1.1",