@almadar/ui 5.21.2 → 5.21.4

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.
@@ -12,10 +12,6 @@ var FaIcons = require('react-icons/fa');
12
12
  var reactDom = require('react-dom');
13
13
  var evaluator = require('@almadar/evaluator');
14
14
  var reactRouterDom = require('react-router-dom');
15
- var ReactMarkdown = require('react-markdown');
16
- var remarkGfm = require('remark-gfm');
17
- var remarkMath = require('remark-math');
18
- var rehypeKatex = require('rehype-katex');
19
15
  var SyntaxHighlighter = require('react-syntax-highlighter/dist/esm/prism-light.js');
20
16
  var dark = require('react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js');
21
17
  var syntax = require('@almadar/syntax');
@@ -35,6 +31,10 @@ var langDiff = require('react-syntax-highlighter/dist/esm/languages/prism/diff.j
35
31
  var langToml = require('react-syntax-highlighter/dist/esm/languages/prism/toml.js');
36
32
  var langGo = require('react-syntax-highlighter/dist/esm/languages/prism/go.js');
37
33
  var langGraphql = require('react-syntax-highlighter/dist/esm/languages/prism/graphql.js');
34
+ var ReactMarkdown = require('react-markdown');
35
+ var remarkGfm = require('remark-gfm');
36
+ var remarkMath = require('remark-math');
37
+ var rehypeKatex = require('rehype-katex');
38
38
  var core = require('@almadar/core');
39
39
  var core$1 = require('@dnd-kit/core');
40
40
  var sortable = require('@dnd-kit/sortable');
@@ -69,10 +69,6 @@ var LucideIcons2__namespace = /*#__PURE__*/_interopNamespace(LucideIcons2);
69
69
  var PhosphorIcons__namespace = /*#__PURE__*/_interopNamespace(PhosphorIcons);
70
70
  var TablerIcons__namespace = /*#__PURE__*/_interopNamespace(TablerIcons);
71
71
  var FaIcons__namespace = /*#__PURE__*/_interopNamespace(FaIcons);
72
- var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
73
- var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
74
- var remarkMath__default = /*#__PURE__*/_interopDefault(remarkMath);
75
- var rehypeKatex__default = /*#__PURE__*/_interopDefault(rehypeKatex);
76
72
  var SyntaxHighlighter__default = /*#__PURE__*/_interopDefault(SyntaxHighlighter);
77
73
  var dark__default = /*#__PURE__*/_interopDefault(dark);
78
74
  var langJson__default = /*#__PURE__*/_interopDefault(langJson);
@@ -91,6 +87,10 @@ var langDiff__default = /*#__PURE__*/_interopDefault(langDiff);
91
87
  var langToml__default = /*#__PURE__*/_interopDefault(langToml);
92
88
  var langGo__default = /*#__PURE__*/_interopDefault(langGo);
93
89
  var langGraphql__default = /*#__PURE__*/_interopDefault(langGraphql);
90
+ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
91
+ var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
92
+ var remarkMath__default = /*#__PURE__*/_interopDefault(remarkMath);
93
+ var rehypeKatex__default = /*#__PURE__*/_interopDefault(rehypeKatex);
94
94
 
95
95
  var __defProp = Object.defineProperty;
96
96
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -17009,136 +17009,6 @@ var init_katex_min = __esm({
17009
17009
  "node_modules/katex/dist/katex.min.css"() {
17010
17010
  }
17011
17011
  });
17012
- var MarkdownContent;
17013
- var init_MarkdownContent = __esm({
17014
- "components/core/molecules/markdown/MarkdownContent.tsx"() {
17015
- init_katex_min();
17016
- init_Box();
17017
- init_useTranslate();
17018
- init_cn();
17019
- MarkdownContent = React97__namespace.default.memo(
17020
- ({ content, direction, className }) => {
17021
- const { t: _t } = useTranslate();
17022
- const safeContent = typeof content === "string" ? content : String(content ?? "");
17023
- return /* @__PURE__ */ jsxRuntime.jsx(
17024
- Box,
17025
- {
17026
- className: cn("prose max-w-none", className),
17027
- style: {
17028
- "--tw-prose-body": "var(--color-foreground)",
17029
- "--tw-prose-headings": "var(--color-foreground)",
17030
- "--tw-prose-lead": "var(--color-muted-foreground)",
17031
- "--tw-prose-links": "var(--color-primary)",
17032
- "--tw-prose-bold": "var(--color-foreground)",
17033
- "--tw-prose-counters": "var(--color-muted-foreground)",
17034
- "--tw-prose-bullets": "var(--color-muted-foreground)",
17035
- "--tw-prose-hr": "var(--color-border)",
17036
- "--tw-prose-quotes": "var(--color-foreground)",
17037
- "--tw-prose-quote-borders": "var(--color-primary)",
17038
- "--tw-prose-captions": "var(--color-muted-foreground)",
17039
- "--tw-prose-code": "var(--color-foreground)",
17040
- "--tw-prose-pre-code": "var(--color-foreground)",
17041
- "--tw-prose-pre-bg": "var(--color-muted)",
17042
- "--tw-prose-th-borders": "var(--color-border)",
17043
- "--tw-prose-td-borders": "var(--color-border)",
17044
- direction
17045
- },
17046
- children: /* @__PURE__ */ jsxRuntime.jsx(
17047
- ReactMarkdown__default.default,
17048
- {
17049
- remarkPlugins: [remarkMath__default.default, remarkGfm__default.default],
17050
- rehypePlugins: [
17051
- [rehypeKatex__default.default, { strict: false, throwOnError: false }]
17052
- ],
17053
- components: {
17054
- // Handle inline code only — fenced code blocks are parsed out separately
17055
- code({ className: codeClassName, children, ...props }) {
17056
- return /* @__PURE__ */ jsxRuntime.jsx(
17057
- "code",
17058
- {
17059
- ...props,
17060
- className: codeClassName,
17061
- style: {
17062
- backgroundColor: "var(--color-muted)",
17063
- color: "var(--color-foreground)",
17064
- border: "1px solid var(--color-border)",
17065
- padding: "0.125rem 0.375rem",
17066
- borderRadius: "0.25rem",
17067
- fontSize: "0.875em",
17068
- fontFamily: "ui-monospace, monospace"
17069
- },
17070
- children
17071
- }
17072
- );
17073
- },
17074
- // Style links
17075
- a({ href, children, ...props }) {
17076
- return /* @__PURE__ */ jsxRuntime.jsx(
17077
- "a",
17078
- {
17079
- href,
17080
- ...props,
17081
- className: "text-[var(--color-primary)] hover:underline",
17082
- target: href?.startsWith("http") ? "_blank" : void 0,
17083
- rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
17084
- children
17085
- }
17086
- );
17087
- },
17088
- // Style tables
17089
- table({ children, ...props }) {
17090
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsxRuntime.jsx(
17091
- "table",
17092
- {
17093
- ...props,
17094
- className: "min-w-full border-collapse border border-[var(--color-border)]",
17095
- children
17096
- }
17097
- ) });
17098
- },
17099
- th({ children, ...props }) {
17100
- return /* @__PURE__ */ jsxRuntime.jsx(
17101
- "th",
17102
- {
17103
- ...props,
17104
- className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
17105
- children
17106
- }
17107
- );
17108
- },
17109
- td({ children, ...props }) {
17110
- return /* @__PURE__ */ jsxRuntime.jsx(
17111
- "td",
17112
- {
17113
- ...props,
17114
- className: "border border-[var(--color-border)] px-4 py-2",
17115
- children
17116
- }
17117
- );
17118
- },
17119
- // Style blockquotes
17120
- blockquote({ children, ...props }) {
17121
- return /* @__PURE__ */ jsxRuntime.jsx(
17122
- "blockquote",
17123
- {
17124
- ...props,
17125
- className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
17126
- children
17127
- }
17128
- );
17129
- }
17130
- },
17131
- children: safeContent
17132
- }
17133
- )
17134
- }
17135
- );
17136
- },
17137
- (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
17138
- );
17139
- MarkdownContent.displayName = "MarkdownContent";
17140
- }
17141
- });
17142
17012
  function computeFoldRegions(code) {
17143
17013
  const lines = code.split("\n");
17144
17014
  const regions = [];
@@ -17684,6 +17554,155 @@ var init_CodeBlock = __esm({
17684
17554
  CodeBlock.displayName = "CodeBlock";
17685
17555
  }
17686
17556
  });
17557
+ var MarkdownContent;
17558
+ var init_MarkdownContent = __esm({
17559
+ "components/core/molecules/markdown/MarkdownContent.tsx"() {
17560
+ init_katex_min();
17561
+ init_Box();
17562
+ init_CodeBlock();
17563
+ init_useTranslate();
17564
+ init_cn();
17565
+ MarkdownContent = React97__namespace.default.memo(
17566
+ ({ content, direction, className }) => {
17567
+ const { t: _t } = useTranslate();
17568
+ const safeContent = typeof content === "string" ? content : String(content ?? "");
17569
+ return /* @__PURE__ */ jsxRuntime.jsx(
17570
+ Box,
17571
+ {
17572
+ className: cn("prose max-w-none", className),
17573
+ style: {
17574
+ color: "var(--color-foreground)",
17575
+ "--tw-prose-body": "var(--color-foreground)",
17576
+ "--tw-prose-headings": "var(--color-foreground)",
17577
+ "--tw-prose-lead": "var(--color-muted-foreground)",
17578
+ "--tw-prose-links": "var(--color-primary)",
17579
+ "--tw-prose-bold": "var(--color-foreground)",
17580
+ "--tw-prose-counters": "var(--color-muted-foreground)",
17581
+ "--tw-prose-bullets": "var(--color-muted-foreground)",
17582
+ "--tw-prose-hr": "var(--color-border)",
17583
+ "--tw-prose-quotes": "var(--color-foreground)",
17584
+ "--tw-prose-quote-borders": "var(--color-primary)",
17585
+ "--tw-prose-captions": "var(--color-muted-foreground)",
17586
+ "--tw-prose-code": "var(--color-foreground)",
17587
+ "--tw-prose-pre-code": "var(--color-foreground)",
17588
+ "--tw-prose-pre-bg": "var(--color-muted)",
17589
+ "--tw-prose-th-borders": "var(--color-border)",
17590
+ "--tw-prose-td-borders": "var(--color-border)",
17591
+ direction
17592
+ },
17593
+ children: /* @__PURE__ */ jsxRuntime.jsx(
17594
+ ReactMarkdown__default.default,
17595
+ {
17596
+ remarkPlugins: [remarkMath__default.default, remarkGfm__default.default],
17597
+ rehypePlugins: [
17598
+ [rehypeKatex__default.default, { strict: false, throwOnError: false }]
17599
+ ],
17600
+ components: {
17601
+ code({
17602
+ className: codeClassName,
17603
+ children,
17604
+ inline,
17605
+ ...props
17606
+ }) {
17607
+ if (!inline) {
17608
+ const match = /language-(\w+)/.exec(codeClassName ?? "");
17609
+ const language = match ? match[1] : "text";
17610
+ const code = String(children).replace(/\n$/, "");
17611
+ return /* @__PURE__ */ jsxRuntime.jsx(
17612
+ CodeBlock,
17613
+ {
17614
+ code,
17615
+ language,
17616
+ maxHeight: "60vh"
17617
+ }
17618
+ );
17619
+ }
17620
+ return /* @__PURE__ */ jsxRuntime.jsx(
17621
+ "code",
17622
+ {
17623
+ ...props,
17624
+ className: codeClassName,
17625
+ style: {
17626
+ backgroundColor: "var(--color-muted)",
17627
+ color: "var(--color-foreground)",
17628
+ border: "1px solid var(--color-border)",
17629
+ padding: "0.125rem 0.375rem",
17630
+ borderRadius: "0.25rem",
17631
+ fontSize: "0.875em",
17632
+ fontFamily: "ui-monospace, monospace"
17633
+ },
17634
+ children
17635
+ }
17636
+ );
17637
+ },
17638
+ // Style links
17639
+ a({ href, children, ...props }) {
17640
+ return /* @__PURE__ */ jsxRuntime.jsx(
17641
+ "a",
17642
+ {
17643
+ href,
17644
+ ...props,
17645
+ className: "text-[var(--color-primary)] hover:underline",
17646
+ target: href?.startsWith("http") ? "_blank" : void 0,
17647
+ rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
17648
+ children
17649
+ }
17650
+ );
17651
+ },
17652
+ // Style tables
17653
+ table({ children, ...props }) {
17654
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsxRuntime.jsx(
17655
+ "table",
17656
+ {
17657
+ ...props,
17658
+ className: "min-w-full border-collapse border border-[var(--color-border)]",
17659
+ children
17660
+ }
17661
+ ) });
17662
+ },
17663
+ th({ children, ...props }) {
17664
+ return /* @__PURE__ */ jsxRuntime.jsx(
17665
+ "th",
17666
+ {
17667
+ ...props,
17668
+ className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
17669
+ children
17670
+ }
17671
+ );
17672
+ },
17673
+ td({ children, ...props }) {
17674
+ return /* @__PURE__ */ jsxRuntime.jsx(
17675
+ "td",
17676
+ {
17677
+ ...props,
17678
+ className: "border border-[var(--color-border)] px-4 py-2",
17679
+ children
17680
+ }
17681
+ );
17682
+ },
17683
+ // Style blockquotes
17684
+ blockquote({ children, ...props }) {
17685
+ return /* @__PURE__ */ jsxRuntime.jsx(
17686
+ "blockquote",
17687
+ {
17688
+ ...props,
17689
+ className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
17690
+ children
17691
+ }
17692
+ );
17693
+ }
17694
+ },
17695
+ children: safeContent
17696
+ }
17697
+ )
17698
+ }
17699
+ );
17700
+ },
17701
+ (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
17702
+ );
17703
+ MarkdownContent.displayName = "MarkdownContent";
17704
+ }
17705
+ });
17687
17706
  function useLongPress(onLongPress, options = {}) {
17688
17707
  const { duration = 500, moveThreshold = 10 } = options;
17689
17708
  const timerRef = React97.useRef(null);
@@ -40953,6 +40972,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
40953
40972
  {
40954
40973
  className: "prose prose-sm max-w-none",
40955
40974
  style: {
40975
+ color: "var(--color-foreground)",
40956
40976
  "--tw-prose-body": "var(--color-foreground)",
40957
40977
  "--tw-prose-headings": "var(--color-foreground)",
40958
40978
  "--tw-prose-bold": "var(--color-foreground)",
@@ -40976,6 +40996,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
40976
40996
  {
40977
40997
  className: "mt-1 prose prose-sm max-w-none break-words",
40978
40998
  style: {
40999
+ color: "var(--color-foreground)",
40979
41000
  "--tw-prose-body": "var(--color-foreground)",
40980
41001
  "--tw-prose-headings": "var(--color-foreground)",
40981
41002
  "--tw-prose-bold": "var(--color-foreground)",
package/dist/avl/index.js CHANGED
@@ -12,10 +12,6 @@ import * as FaIcons from 'react-icons/fa';
12
12
  import { createPortal } from 'react-dom';
13
13
  import { evaluate, createMinimalContext } from '@almadar/evaluator';
14
14
  import { Link, Outlet, useLocation } from 'react-router-dom';
15
- import ReactMarkdown from 'react-markdown';
16
- import remarkGfm from 'remark-gfm';
17
- import remarkMath from 'remark-math';
18
- import rehypeKatex from 'rehype-katex';
19
15
  import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
20
16
  import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js';
21
17
  import { orbLanguage, loloLanguage, ORB_COLORS } from '@almadar/syntax';
@@ -35,6 +31,10 @@ import langDiff from 'react-syntax-highlighter/dist/esm/languages/prism/diff.js'
35
31
  import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js';
36
32
  import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
37
33
  import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
34
+ import ReactMarkdown from 'react-markdown';
35
+ import remarkGfm from 'remark-gfm';
36
+ import remarkMath from 'remark-math';
37
+ import rehypeKatex from 'rehype-katex';
38
38
  import { FieldTypeSchema, isInlineTrait, isPageReference, isEntityCall, schemaToIR, getPage, isCircuitEvent } from '@almadar/core';
39
39
  import { useDroppable, useDraggable, DndContext, DragOverlay, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
40
40
  import { sortableKeyboardCoordinates, useSortable, arrayMove, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
@@ -16960,136 +16960,6 @@ var init_katex_min = __esm({
16960
16960
  "node_modules/katex/dist/katex.min.css"() {
16961
16961
  }
16962
16962
  });
16963
- var MarkdownContent;
16964
- var init_MarkdownContent = __esm({
16965
- "components/core/molecules/markdown/MarkdownContent.tsx"() {
16966
- init_katex_min();
16967
- init_Box();
16968
- init_useTranslate();
16969
- init_cn();
16970
- MarkdownContent = React97__default.memo(
16971
- ({ content, direction, className }) => {
16972
- const { t: _t } = useTranslate();
16973
- const safeContent = typeof content === "string" ? content : String(content ?? "");
16974
- return /* @__PURE__ */ jsx(
16975
- Box,
16976
- {
16977
- className: cn("prose max-w-none", className),
16978
- style: {
16979
- "--tw-prose-body": "var(--color-foreground)",
16980
- "--tw-prose-headings": "var(--color-foreground)",
16981
- "--tw-prose-lead": "var(--color-muted-foreground)",
16982
- "--tw-prose-links": "var(--color-primary)",
16983
- "--tw-prose-bold": "var(--color-foreground)",
16984
- "--tw-prose-counters": "var(--color-muted-foreground)",
16985
- "--tw-prose-bullets": "var(--color-muted-foreground)",
16986
- "--tw-prose-hr": "var(--color-border)",
16987
- "--tw-prose-quotes": "var(--color-foreground)",
16988
- "--tw-prose-quote-borders": "var(--color-primary)",
16989
- "--tw-prose-captions": "var(--color-muted-foreground)",
16990
- "--tw-prose-code": "var(--color-foreground)",
16991
- "--tw-prose-pre-code": "var(--color-foreground)",
16992
- "--tw-prose-pre-bg": "var(--color-muted)",
16993
- "--tw-prose-th-borders": "var(--color-border)",
16994
- "--tw-prose-td-borders": "var(--color-border)",
16995
- direction
16996
- },
16997
- children: /* @__PURE__ */ jsx(
16998
- ReactMarkdown,
16999
- {
17000
- remarkPlugins: [remarkMath, remarkGfm],
17001
- rehypePlugins: [
17002
- [rehypeKatex, { strict: false, throwOnError: false }]
17003
- ],
17004
- components: {
17005
- // Handle inline code only — fenced code blocks are parsed out separately
17006
- code({ className: codeClassName, children, ...props }) {
17007
- return /* @__PURE__ */ jsx(
17008
- "code",
17009
- {
17010
- ...props,
17011
- className: codeClassName,
17012
- style: {
17013
- backgroundColor: "var(--color-muted)",
17014
- color: "var(--color-foreground)",
17015
- border: "1px solid var(--color-border)",
17016
- padding: "0.125rem 0.375rem",
17017
- borderRadius: "0.25rem",
17018
- fontSize: "0.875em",
17019
- fontFamily: "ui-monospace, monospace"
17020
- },
17021
- children
17022
- }
17023
- );
17024
- },
17025
- // Style links
17026
- a({ href, children, ...props }) {
17027
- return /* @__PURE__ */ jsx(
17028
- "a",
17029
- {
17030
- href,
17031
- ...props,
17032
- className: "text-[var(--color-primary)] hover:underline",
17033
- target: href?.startsWith("http") ? "_blank" : void 0,
17034
- rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
17035
- children
17036
- }
17037
- );
17038
- },
17039
- // Style tables
17040
- table({ children, ...props }) {
17041
- return /* @__PURE__ */ jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsx(
17042
- "table",
17043
- {
17044
- ...props,
17045
- className: "min-w-full border-collapse border border-[var(--color-border)]",
17046
- children
17047
- }
17048
- ) });
17049
- },
17050
- th({ children, ...props }) {
17051
- return /* @__PURE__ */ jsx(
17052
- "th",
17053
- {
17054
- ...props,
17055
- className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
17056
- children
17057
- }
17058
- );
17059
- },
17060
- td({ children, ...props }) {
17061
- return /* @__PURE__ */ jsx(
17062
- "td",
17063
- {
17064
- ...props,
17065
- className: "border border-[var(--color-border)] px-4 py-2",
17066
- children
17067
- }
17068
- );
17069
- },
17070
- // Style blockquotes
17071
- blockquote({ children, ...props }) {
17072
- return /* @__PURE__ */ jsx(
17073
- "blockquote",
17074
- {
17075
- ...props,
17076
- className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
17077
- children
17078
- }
17079
- );
17080
- }
17081
- },
17082
- children: safeContent
17083
- }
17084
- )
17085
- }
17086
- );
17087
- },
17088
- (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
17089
- );
17090
- MarkdownContent.displayName = "MarkdownContent";
17091
- }
17092
- });
17093
16963
  function computeFoldRegions(code) {
17094
16964
  const lines = code.split("\n");
17095
16965
  const regions = [];
@@ -17635,6 +17505,155 @@ var init_CodeBlock = __esm({
17635
17505
  CodeBlock.displayName = "CodeBlock";
17636
17506
  }
17637
17507
  });
17508
+ var MarkdownContent;
17509
+ var init_MarkdownContent = __esm({
17510
+ "components/core/molecules/markdown/MarkdownContent.tsx"() {
17511
+ init_katex_min();
17512
+ init_Box();
17513
+ init_CodeBlock();
17514
+ init_useTranslate();
17515
+ init_cn();
17516
+ MarkdownContent = React97__default.memo(
17517
+ ({ content, direction, className }) => {
17518
+ const { t: _t } = useTranslate();
17519
+ const safeContent = typeof content === "string" ? content : String(content ?? "");
17520
+ return /* @__PURE__ */ jsx(
17521
+ Box,
17522
+ {
17523
+ className: cn("prose max-w-none", className),
17524
+ style: {
17525
+ color: "var(--color-foreground)",
17526
+ "--tw-prose-body": "var(--color-foreground)",
17527
+ "--tw-prose-headings": "var(--color-foreground)",
17528
+ "--tw-prose-lead": "var(--color-muted-foreground)",
17529
+ "--tw-prose-links": "var(--color-primary)",
17530
+ "--tw-prose-bold": "var(--color-foreground)",
17531
+ "--tw-prose-counters": "var(--color-muted-foreground)",
17532
+ "--tw-prose-bullets": "var(--color-muted-foreground)",
17533
+ "--tw-prose-hr": "var(--color-border)",
17534
+ "--tw-prose-quotes": "var(--color-foreground)",
17535
+ "--tw-prose-quote-borders": "var(--color-primary)",
17536
+ "--tw-prose-captions": "var(--color-muted-foreground)",
17537
+ "--tw-prose-code": "var(--color-foreground)",
17538
+ "--tw-prose-pre-code": "var(--color-foreground)",
17539
+ "--tw-prose-pre-bg": "var(--color-muted)",
17540
+ "--tw-prose-th-borders": "var(--color-border)",
17541
+ "--tw-prose-td-borders": "var(--color-border)",
17542
+ direction
17543
+ },
17544
+ children: /* @__PURE__ */ jsx(
17545
+ ReactMarkdown,
17546
+ {
17547
+ remarkPlugins: [remarkMath, remarkGfm],
17548
+ rehypePlugins: [
17549
+ [rehypeKatex, { strict: false, throwOnError: false }]
17550
+ ],
17551
+ components: {
17552
+ code({
17553
+ className: codeClassName,
17554
+ children,
17555
+ inline,
17556
+ ...props
17557
+ }) {
17558
+ if (!inline) {
17559
+ const match = /language-(\w+)/.exec(codeClassName ?? "");
17560
+ const language = match ? match[1] : "text";
17561
+ const code = String(children).replace(/\n$/, "");
17562
+ return /* @__PURE__ */ jsx(
17563
+ CodeBlock,
17564
+ {
17565
+ code,
17566
+ language,
17567
+ maxHeight: "60vh"
17568
+ }
17569
+ );
17570
+ }
17571
+ return /* @__PURE__ */ jsx(
17572
+ "code",
17573
+ {
17574
+ ...props,
17575
+ className: codeClassName,
17576
+ style: {
17577
+ backgroundColor: "var(--color-muted)",
17578
+ color: "var(--color-foreground)",
17579
+ border: "1px solid var(--color-border)",
17580
+ padding: "0.125rem 0.375rem",
17581
+ borderRadius: "0.25rem",
17582
+ fontSize: "0.875em",
17583
+ fontFamily: "ui-monospace, monospace"
17584
+ },
17585
+ children
17586
+ }
17587
+ );
17588
+ },
17589
+ // Style links
17590
+ a({ href, children, ...props }) {
17591
+ return /* @__PURE__ */ jsx(
17592
+ "a",
17593
+ {
17594
+ href,
17595
+ ...props,
17596
+ className: "text-[var(--color-primary)] hover:underline",
17597
+ target: href?.startsWith("http") ? "_blank" : void 0,
17598
+ rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
17599
+ children
17600
+ }
17601
+ );
17602
+ },
17603
+ // Style tables
17604
+ table({ children, ...props }) {
17605
+ return /* @__PURE__ */ jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsx(
17606
+ "table",
17607
+ {
17608
+ ...props,
17609
+ className: "min-w-full border-collapse border border-[var(--color-border)]",
17610
+ children
17611
+ }
17612
+ ) });
17613
+ },
17614
+ th({ children, ...props }) {
17615
+ return /* @__PURE__ */ jsx(
17616
+ "th",
17617
+ {
17618
+ ...props,
17619
+ className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
17620
+ children
17621
+ }
17622
+ );
17623
+ },
17624
+ td({ children, ...props }) {
17625
+ return /* @__PURE__ */ jsx(
17626
+ "td",
17627
+ {
17628
+ ...props,
17629
+ className: "border border-[var(--color-border)] px-4 py-2",
17630
+ children
17631
+ }
17632
+ );
17633
+ },
17634
+ // Style blockquotes
17635
+ blockquote({ children, ...props }) {
17636
+ return /* @__PURE__ */ jsx(
17637
+ "blockquote",
17638
+ {
17639
+ ...props,
17640
+ className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
17641
+ children
17642
+ }
17643
+ );
17644
+ }
17645
+ },
17646
+ children: safeContent
17647
+ }
17648
+ )
17649
+ }
17650
+ );
17651
+ },
17652
+ (prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
17653
+ );
17654
+ MarkdownContent.displayName = "MarkdownContent";
17655
+ }
17656
+ });
17638
17657
  function useLongPress(onLongPress, options = {}) {
17639
17658
  const { duration = 500, moveThreshold = 10 } = options;
17640
17659
  const timerRef = useRef(null);
@@ -40904,6 +40923,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
40904
40923
  {
40905
40924
  className: "prose prose-sm max-w-none",
40906
40925
  style: {
40926
+ color: "var(--color-foreground)",
40907
40927
  "--tw-prose-body": "var(--color-foreground)",
40908
40928
  "--tw-prose-headings": "var(--color-foreground)",
40909
40929
  "--tw-prose-bold": "var(--color-foreground)",
@@ -40927,6 +40947,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
40927
40947
  {
40928
40948
  className: "mt-1 prose prose-sm max-w-none break-words",
40929
40949
  style: {
40950
+ color: "var(--color-foreground)",
40930
40951
  "--tw-prose-body": "var(--color-foreground)",
40931
40952
  "--tw-prose-headings": "var(--color-foreground)",
40932
40953
  "--tw-prose-bold": "var(--color-foreground)",