@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.
- package/dist/avl/index.cjs +159 -138
- package/dist/avl/index.js +155 -134
- package/dist/components/index.cjs +159 -138
- package/dist/components/index.js +155 -134
- package/dist/providers/index.cjs +159 -138
- package/dist/providers/index.js +155 -134
- package/dist/runtime/index.cjs +159 -138
- package/dist/runtime/index.js +155 -134
- package/package.json +1 -1
|
@@ -14,10 +14,6 @@ var evaluator = require('@almadar/evaluator');
|
|
|
14
14
|
var reactDom = require('react-dom');
|
|
15
15
|
var reactRouterDom = require('react-router-dom');
|
|
16
16
|
var ELK = require('elkjs/lib/elk.bundled.js');
|
|
17
|
-
var ReactMarkdown = require('react-markdown');
|
|
18
|
-
var remarkGfm = require('remark-gfm');
|
|
19
|
-
var remarkMath = require('remark-math');
|
|
20
|
-
var rehypeKatex = require('rehype-katex');
|
|
21
17
|
var SyntaxHighlighter = require('react-syntax-highlighter/dist/esm/prism-light.js');
|
|
22
18
|
var dark = require('react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js');
|
|
23
19
|
var syntax = require('@almadar/syntax');
|
|
@@ -37,6 +33,10 @@ var langDiff = require('react-syntax-highlighter/dist/esm/languages/prism/diff.j
|
|
|
37
33
|
var langToml = require('react-syntax-highlighter/dist/esm/languages/prism/toml.js');
|
|
38
34
|
var langGo = require('react-syntax-highlighter/dist/esm/languages/prism/go.js');
|
|
39
35
|
var langGraphql = require('react-syntax-highlighter/dist/esm/languages/prism/graphql.js');
|
|
36
|
+
var ReactMarkdown = require('react-markdown');
|
|
37
|
+
var remarkGfm = require('remark-gfm');
|
|
38
|
+
var remarkMath = require('remark-math');
|
|
39
|
+
var rehypeKatex = require('rehype-katex');
|
|
40
40
|
var core$1 = require('@almadar/core');
|
|
41
41
|
var core = require('@dnd-kit/core');
|
|
42
42
|
var sortable = require('@dnd-kit/sortable');
|
|
@@ -73,10 +73,6 @@ var PhosphorIcons__namespace = /*#__PURE__*/_interopNamespace(PhosphorIcons);
|
|
|
73
73
|
var TablerIcons__namespace = /*#__PURE__*/_interopNamespace(TablerIcons);
|
|
74
74
|
var FaIcons__namespace = /*#__PURE__*/_interopNamespace(FaIcons);
|
|
75
75
|
var ELK__default = /*#__PURE__*/_interopDefault(ELK);
|
|
76
|
-
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
77
|
-
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
78
|
-
var remarkMath__default = /*#__PURE__*/_interopDefault(remarkMath);
|
|
79
|
-
var rehypeKatex__default = /*#__PURE__*/_interopDefault(rehypeKatex);
|
|
80
76
|
var SyntaxHighlighter__default = /*#__PURE__*/_interopDefault(SyntaxHighlighter);
|
|
81
77
|
var dark__default = /*#__PURE__*/_interopDefault(dark);
|
|
82
78
|
var langJson__default = /*#__PURE__*/_interopDefault(langJson);
|
|
@@ -95,6 +91,10 @@ var langDiff__default = /*#__PURE__*/_interopDefault(langDiff);
|
|
|
95
91
|
var langToml__default = /*#__PURE__*/_interopDefault(langToml);
|
|
96
92
|
var langGo__default = /*#__PURE__*/_interopDefault(langGo);
|
|
97
93
|
var langGraphql__default = /*#__PURE__*/_interopDefault(langGraphql);
|
|
94
|
+
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
95
|
+
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
96
|
+
var remarkMath__default = /*#__PURE__*/_interopDefault(remarkMath);
|
|
97
|
+
var rehypeKatex__default = /*#__PURE__*/_interopDefault(rehypeKatex);
|
|
98
98
|
|
|
99
99
|
var __defProp = Object.defineProperty;
|
|
100
100
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -12347,136 +12347,6 @@ var init_katex_min = __esm({
|
|
|
12347
12347
|
"node_modules/katex/dist/katex.min.css"() {
|
|
12348
12348
|
}
|
|
12349
12349
|
});
|
|
12350
|
-
exports.MarkdownContent = void 0;
|
|
12351
|
-
var init_MarkdownContent = __esm({
|
|
12352
|
-
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
12353
|
-
init_katex_min();
|
|
12354
|
-
init_Box();
|
|
12355
|
-
init_useTranslate();
|
|
12356
|
-
init_cn();
|
|
12357
|
-
exports.MarkdownContent = React79__namespace.default.memo(
|
|
12358
|
-
({ content, direction, className }) => {
|
|
12359
|
-
const { t: _t } = useTranslate();
|
|
12360
|
-
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
12361
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12362
|
-
exports.Box,
|
|
12363
|
-
{
|
|
12364
|
-
className: cn("prose max-w-none", className),
|
|
12365
|
-
style: {
|
|
12366
|
-
"--tw-prose-body": "var(--color-foreground)",
|
|
12367
|
-
"--tw-prose-headings": "var(--color-foreground)",
|
|
12368
|
-
"--tw-prose-lead": "var(--color-muted-foreground)",
|
|
12369
|
-
"--tw-prose-links": "var(--color-primary)",
|
|
12370
|
-
"--tw-prose-bold": "var(--color-foreground)",
|
|
12371
|
-
"--tw-prose-counters": "var(--color-muted-foreground)",
|
|
12372
|
-
"--tw-prose-bullets": "var(--color-muted-foreground)",
|
|
12373
|
-
"--tw-prose-hr": "var(--color-border)",
|
|
12374
|
-
"--tw-prose-quotes": "var(--color-foreground)",
|
|
12375
|
-
"--tw-prose-quote-borders": "var(--color-primary)",
|
|
12376
|
-
"--tw-prose-captions": "var(--color-muted-foreground)",
|
|
12377
|
-
"--tw-prose-code": "var(--color-foreground)",
|
|
12378
|
-
"--tw-prose-pre-code": "var(--color-foreground)",
|
|
12379
|
-
"--tw-prose-pre-bg": "var(--color-muted)",
|
|
12380
|
-
"--tw-prose-th-borders": "var(--color-border)",
|
|
12381
|
-
"--tw-prose-td-borders": "var(--color-border)",
|
|
12382
|
-
direction
|
|
12383
|
-
},
|
|
12384
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12385
|
-
ReactMarkdown__default.default,
|
|
12386
|
-
{
|
|
12387
|
-
remarkPlugins: [remarkMath__default.default, remarkGfm__default.default],
|
|
12388
|
-
rehypePlugins: [
|
|
12389
|
-
[rehypeKatex__default.default, { strict: false, throwOnError: false }]
|
|
12390
|
-
],
|
|
12391
|
-
components: {
|
|
12392
|
-
// Handle inline code only — fenced code blocks are parsed out separately
|
|
12393
|
-
code({ className: codeClassName, children, ...props }) {
|
|
12394
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12395
|
-
"code",
|
|
12396
|
-
{
|
|
12397
|
-
...props,
|
|
12398
|
-
className: codeClassName,
|
|
12399
|
-
style: {
|
|
12400
|
-
backgroundColor: "var(--color-muted)",
|
|
12401
|
-
color: "var(--color-foreground)",
|
|
12402
|
-
border: "1px solid var(--color-border)",
|
|
12403
|
-
padding: "0.125rem 0.375rem",
|
|
12404
|
-
borderRadius: "0.25rem",
|
|
12405
|
-
fontSize: "0.875em",
|
|
12406
|
-
fontFamily: "ui-monospace, monospace"
|
|
12407
|
-
},
|
|
12408
|
-
children
|
|
12409
|
-
}
|
|
12410
|
-
);
|
|
12411
|
-
},
|
|
12412
|
-
// Style links
|
|
12413
|
-
a({ href, children, ...props }) {
|
|
12414
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12415
|
-
"a",
|
|
12416
|
-
{
|
|
12417
|
-
href,
|
|
12418
|
-
...props,
|
|
12419
|
-
className: "text-[var(--color-primary)] hover:underline",
|
|
12420
|
-
target: href?.startsWith("http") ? "_blank" : void 0,
|
|
12421
|
-
rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
|
|
12422
|
-
children
|
|
12423
|
-
}
|
|
12424
|
-
);
|
|
12425
|
-
},
|
|
12426
|
-
// Style tables
|
|
12427
|
-
table({ children, ...props }) {
|
|
12428
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12429
|
-
"table",
|
|
12430
|
-
{
|
|
12431
|
-
...props,
|
|
12432
|
-
className: "min-w-full border-collapse border border-[var(--color-border)]",
|
|
12433
|
-
children
|
|
12434
|
-
}
|
|
12435
|
-
) });
|
|
12436
|
-
},
|
|
12437
|
-
th({ children, ...props }) {
|
|
12438
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12439
|
-
"th",
|
|
12440
|
-
{
|
|
12441
|
-
...props,
|
|
12442
|
-
className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
|
|
12443
|
-
children
|
|
12444
|
-
}
|
|
12445
|
-
);
|
|
12446
|
-
},
|
|
12447
|
-
td({ children, ...props }) {
|
|
12448
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12449
|
-
"td",
|
|
12450
|
-
{
|
|
12451
|
-
...props,
|
|
12452
|
-
className: "border border-[var(--color-border)] px-4 py-2",
|
|
12453
|
-
children
|
|
12454
|
-
}
|
|
12455
|
-
);
|
|
12456
|
-
},
|
|
12457
|
-
// Style blockquotes
|
|
12458
|
-
blockquote({ children, ...props }) {
|
|
12459
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12460
|
-
"blockquote",
|
|
12461
|
-
{
|
|
12462
|
-
...props,
|
|
12463
|
-
className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
|
|
12464
|
-
children
|
|
12465
|
-
}
|
|
12466
|
-
);
|
|
12467
|
-
}
|
|
12468
|
-
},
|
|
12469
|
-
children: safeContent
|
|
12470
|
-
}
|
|
12471
|
-
)
|
|
12472
|
-
}
|
|
12473
|
-
);
|
|
12474
|
-
},
|
|
12475
|
-
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
12476
|
-
);
|
|
12477
|
-
exports.MarkdownContent.displayName = "MarkdownContent";
|
|
12478
|
-
}
|
|
12479
|
-
});
|
|
12480
12350
|
function computeFoldRegions(code) {
|
|
12481
12351
|
const lines = code.split("\n");
|
|
12482
12352
|
const regions = [];
|
|
@@ -13022,6 +12892,155 @@ var init_CodeBlock = __esm({
|
|
|
13022
12892
|
exports.CodeBlock.displayName = "CodeBlock";
|
|
13023
12893
|
}
|
|
13024
12894
|
});
|
|
12895
|
+
exports.MarkdownContent = void 0;
|
|
12896
|
+
var init_MarkdownContent = __esm({
|
|
12897
|
+
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
12898
|
+
init_katex_min();
|
|
12899
|
+
init_Box();
|
|
12900
|
+
init_CodeBlock();
|
|
12901
|
+
init_useTranslate();
|
|
12902
|
+
init_cn();
|
|
12903
|
+
exports.MarkdownContent = React79__namespace.default.memo(
|
|
12904
|
+
({ content, direction, className }) => {
|
|
12905
|
+
const { t: _t } = useTranslate();
|
|
12906
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
12907
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12908
|
+
exports.Box,
|
|
12909
|
+
{
|
|
12910
|
+
className: cn("prose max-w-none", className),
|
|
12911
|
+
style: {
|
|
12912
|
+
color: "var(--color-foreground)",
|
|
12913
|
+
"--tw-prose-body": "var(--color-foreground)",
|
|
12914
|
+
"--tw-prose-headings": "var(--color-foreground)",
|
|
12915
|
+
"--tw-prose-lead": "var(--color-muted-foreground)",
|
|
12916
|
+
"--tw-prose-links": "var(--color-primary)",
|
|
12917
|
+
"--tw-prose-bold": "var(--color-foreground)",
|
|
12918
|
+
"--tw-prose-counters": "var(--color-muted-foreground)",
|
|
12919
|
+
"--tw-prose-bullets": "var(--color-muted-foreground)",
|
|
12920
|
+
"--tw-prose-hr": "var(--color-border)",
|
|
12921
|
+
"--tw-prose-quotes": "var(--color-foreground)",
|
|
12922
|
+
"--tw-prose-quote-borders": "var(--color-primary)",
|
|
12923
|
+
"--tw-prose-captions": "var(--color-muted-foreground)",
|
|
12924
|
+
"--tw-prose-code": "var(--color-foreground)",
|
|
12925
|
+
"--tw-prose-pre-code": "var(--color-foreground)",
|
|
12926
|
+
"--tw-prose-pre-bg": "var(--color-muted)",
|
|
12927
|
+
"--tw-prose-th-borders": "var(--color-border)",
|
|
12928
|
+
"--tw-prose-td-borders": "var(--color-border)",
|
|
12929
|
+
direction
|
|
12930
|
+
},
|
|
12931
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12932
|
+
ReactMarkdown__default.default,
|
|
12933
|
+
{
|
|
12934
|
+
remarkPlugins: [remarkMath__default.default, remarkGfm__default.default],
|
|
12935
|
+
rehypePlugins: [
|
|
12936
|
+
[rehypeKatex__default.default, { strict: false, throwOnError: false }]
|
|
12937
|
+
],
|
|
12938
|
+
components: {
|
|
12939
|
+
code({
|
|
12940
|
+
className: codeClassName,
|
|
12941
|
+
children,
|
|
12942
|
+
inline,
|
|
12943
|
+
...props
|
|
12944
|
+
}) {
|
|
12945
|
+
if (!inline) {
|
|
12946
|
+
const match = /language-(\w+)/.exec(codeClassName ?? "");
|
|
12947
|
+
const language = match ? match[1] : "text";
|
|
12948
|
+
const code = String(children).replace(/\n$/, "");
|
|
12949
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12950
|
+
exports.CodeBlock,
|
|
12951
|
+
{
|
|
12952
|
+
code,
|
|
12953
|
+
language,
|
|
12954
|
+
maxHeight: "60vh"
|
|
12955
|
+
}
|
|
12956
|
+
);
|
|
12957
|
+
}
|
|
12958
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12959
|
+
"code",
|
|
12960
|
+
{
|
|
12961
|
+
...props,
|
|
12962
|
+
className: codeClassName,
|
|
12963
|
+
style: {
|
|
12964
|
+
backgroundColor: "var(--color-muted)",
|
|
12965
|
+
color: "var(--color-foreground)",
|
|
12966
|
+
border: "1px solid var(--color-border)",
|
|
12967
|
+
padding: "0.125rem 0.375rem",
|
|
12968
|
+
borderRadius: "0.25rem",
|
|
12969
|
+
fontSize: "0.875em",
|
|
12970
|
+
fontFamily: "ui-monospace, monospace"
|
|
12971
|
+
},
|
|
12972
|
+
children
|
|
12973
|
+
}
|
|
12974
|
+
);
|
|
12975
|
+
},
|
|
12976
|
+
// Style links
|
|
12977
|
+
a({ href, children, ...props }) {
|
|
12978
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12979
|
+
"a",
|
|
12980
|
+
{
|
|
12981
|
+
href,
|
|
12982
|
+
...props,
|
|
12983
|
+
className: "text-[var(--color-primary)] hover:underline",
|
|
12984
|
+
target: href?.startsWith("http") ? "_blank" : void 0,
|
|
12985
|
+
rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
|
|
12986
|
+
children
|
|
12987
|
+
}
|
|
12988
|
+
);
|
|
12989
|
+
},
|
|
12990
|
+
// Style tables
|
|
12991
|
+
table({ children, ...props }) {
|
|
12992
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12993
|
+
"table",
|
|
12994
|
+
{
|
|
12995
|
+
...props,
|
|
12996
|
+
className: "min-w-full border-collapse border border-[var(--color-border)]",
|
|
12997
|
+
children
|
|
12998
|
+
}
|
|
12999
|
+
) });
|
|
13000
|
+
},
|
|
13001
|
+
th({ children, ...props }) {
|
|
13002
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13003
|
+
"th",
|
|
13004
|
+
{
|
|
13005
|
+
...props,
|
|
13006
|
+
className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
|
|
13007
|
+
children
|
|
13008
|
+
}
|
|
13009
|
+
);
|
|
13010
|
+
},
|
|
13011
|
+
td({ children, ...props }) {
|
|
13012
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13013
|
+
"td",
|
|
13014
|
+
{
|
|
13015
|
+
...props,
|
|
13016
|
+
className: "border border-[var(--color-border)] px-4 py-2",
|
|
13017
|
+
children
|
|
13018
|
+
}
|
|
13019
|
+
);
|
|
13020
|
+
},
|
|
13021
|
+
// Style blockquotes
|
|
13022
|
+
blockquote({ children, ...props }) {
|
|
13023
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13024
|
+
"blockquote",
|
|
13025
|
+
{
|
|
13026
|
+
...props,
|
|
13027
|
+
className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
|
|
13028
|
+
children
|
|
13029
|
+
}
|
|
13030
|
+
);
|
|
13031
|
+
}
|
|
13032
|
+
},
|
|
13033
|
+
children: safeContent
|
|
13034
|
+
}
|
|
13035
|
+
)
|
|
13036
|
+
}
|
|
13037
|
+
);
|
|
13038
|
+
},
|
|
13039
|
+
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
13040
|
+
);
|
|
13041
|
+
exports.MarkdownContent.displayName = "MarkdownContent";
|
|
13042
|
+
}
|
|
13043
|
+
});
|
|
13025
13044
|
function useLongPress(onLongPress, options = {}) {
|
|
13026
13045
|
const { duration = 500, moveThreshold = 10 } = options;
|
|
13027
13046
|
const timerRef = React79.useRef(null);
|
|
@@ -37722,6 +37741,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
|
|
|
37722
37741
|
{
|
|
37723
37742
|
className: "prose prose-sm max-w-none",
|
|
37724
37743
|
style: {
|
|
37744
|
+
color: "var(--color-foreground)",
|
|
37725
37745
|
"--tw-prose-body": "var(--color-foreground)",
|
|
37726
37746
|
"--tw-prose-headings": "var(--color-foreground)",
|
|
37727
37747
|
"--tw-prose-bold": "var(--color-foreground)",
|
|
@@ -37745,6 +37765,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
|
|
|
37745
37765
|
{
|
|
37746
37766
|
className: "mt-1 prose prose-sm max-w-none break-words",
|
|
37747
37767
|
style: {
|
|
37768
|
+
color: "var(--color-foreground)",
|
|
37748
37769
|
"--tw-prose-body": "var(--color-foreground)",
|
|
37749
37770
|
"--tw-prose-headings": "var(--color-foreground)",
|
|
37750
37771
|
"--tw-prose-bold": "var(--color-foreground)",
|
package/dist/components/index.js
CHANGED
|
@@ -14,10 +14,6 @@ import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
16
16
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
17
|
-
import ReactMarkdown from 'react-markdown';
|
|
18
|
-
import remarkGfm from 'remark-gfm';
|
|
19
|
-
import remarkMath from 'remark-math';
|
|
20
|
-
import rehypeKatex from 'rehype-katex';
|
|
21
17
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
22
18
|
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js';
|
|
23
19
|
import { orbLanguage, loloLanguage, ORB_COLORS } from '@almadar/syntax';
|
|
@@ -37,6 +33,10 @@ import langDiff from 'react-syntax-highlighter/dist/esm/languages/prism/diff.js'
|
|
|
37
33
|
import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js';
|
|
38
34
|
import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
|
|
39
35
|
import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
|
|
36
|
+
import ReactMarkdown from 'react-markdown';
|
|
37
|
+
import remarkGfm from 'remark-gfm';
|
|
38
|
+
import remarkMath from 'remark-math';
|
|
39
|
+
import rehypeKatex from 'rehype-katex';
|
|
40
40
|
import { isInlineTrait } from '@almadar/core';
|
|
41
41
|
import { DndContext, useSensors, useSensor, PointerSensor, KeyboardSensor, useDroppable, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
42
42
|
import { useSortable, arrayMove, sortableKeyboardCoordinates, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
@@ -12298,136 +12298,6 @@ var init_katex_min = __esm({
|
|
|
12298
12298
|
"node_modules/katex/dist/katex.min.css"() {
|
|
12299
12299
|
}
|
|
12300
12300
|
});
|
|
12301
|
-
var MarkdownContent;
|
|
12302
|
-
var init_MarkdownContent = __esm({
|
|
12303
|
-
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
12304
|
-
init_katex_min();
|
|
12305
|
-
init_Box();
|
|
12306
|
-
init_useTranslate();
|
|
12307
|
-
init_cn();
|
|
12308
|
-
MarkdownContent = React79__default.memo(
|
|
12309
|
-
({ content, direction, className }) => {
|
|
12310
|
-
const { t: _t } = useTranslate();
|
|
12311
|
-
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
12312
|
-
return /* @__PURE__ */ jsx(
|
|
12313
|
-
Box,
|
|
12314
|
-
{
|
|
12315
|
-
className: cn("prose max-w-none", className),
|
|
12316
|
-
style: {
|
|
12317
|
-
"--tw-prose-body": "var(--color-foreground)",
|
|
12318
|
-
"--tw-prose-headings": "var(--color-foreground)",
|
|
12319
|
-
"--tw-prose-lead": "var(--color-muted-foreground)",
|
|
12320
|
-
"--tw-prose-links": "var(--color-primary)",
|
|
12321
|
-
"--tw-prose-bold": "var(--color-foreground)",
|
|
12322
|
-
"--tw-prose-counters": "var(--color-muted-foreground)",
|
|
12323
|
-
"--tw-prose-bullets": "var(--color-muted-foreground)",
|
|
12324
|
-
"--tw-prose-hr": "var(--color-border)",
|
|
12325
|
-
"--tw-prose-quotes": "var(--color-foreground)",
|
|
12326
|
-
"--tw-prose-quote-borders": "var(--color-primary)",
|
|
12327
|
-
"--tw-prose-captions": "var(--color-muted-foreground)",
|
|
12328
|
-
"--tw-prose-code": "var(--color-foreground)",
|
|
12329
|
-
"--tw-prose-pre-code": "var(--color-foreground)",
|
|
12330
|
-
"--tw-prose-pre-bg": "var(--color-muted)",
|
|
12331
|
-
"--tw-prose-th-borders": "var(--color-border)",
|
|
12332
|
-
"--tw-prose-td-borders": "var(--color-border)",
|
|
12333
|
-
direction
|
|
12334
|
-
},
|
|
12335
|
-
children: /* @__PURE__ */ jsx(
|
|
12336
|
-
ReactMarkdown,
|
|
12337
|
-
{
|
|
12338
|
-
remarkPlugins: [remarkMath, remarkGfm],
|
|
12339
|
-
rehypePlugins: [
|
|
12340
|
-
[rehypeKatex, { strict: false, throwOnError: false }]
|
|
12341
|
-
],
|
|
12342
|
-
components: {
|
|
12343
|
-
// Handle inline code only — fenced code blocks are parsed out separately
|
|
12344
|
-
code({ className: codeClassName, children, ...props }) {
|
|
12345
|
-
return /* @__PURE__ */ jsx(
|
|
12346
|
-
"code",
|
|
12347
|
-
{
|
|
12348
|
-
...props,
|
|
12349
|
-
className: codeClassName,
|
|
12350
|
-
style: {
|
|
12351
|
-
backgroundColor: "var(--color-muted)",
|
|
12352
|
-
color: "var(--color-foreground)",
|
|
12353
|
-
border: "1px solid var(--color-border)",
|
|
12354
|
-
padding: "0.125rem 0.375rem",
|
|
12355
|
-
borderRadius: "0.25rem",
|
|
12356
|
-
fontSize: "0.875em",
|
|
12357
|
-
fontFamily: "ui-monospace, monospace"
|
|
12358
|
-
},
|
|
12359
|
-
children
|
|
12360
|
-
}
|
|
12361
|
-
);
|
|
12362
|
-
},
|
|
12363
|
-
// Style links
|
|
12364
|
-
a({ href, children, ...props }) {
|
|
12365
|
-
return /* @__PURE__ */ jsx(
|
|
12366
|
-
"a",
|
|
12367
|
-
{
|
|
12368
|
-
href,
|
|
12369
|
-
...props,
|
|
12370
|
-
className: "text-[var(--color-primary)] hover:underline",
|
|
12371
|
-
target: href?.startsWith("http") ? "_blank" : void 0,
|
|
12372
|
-
rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
|
|
12373
|
-
children
|
|
12374
|
-
}
|
|
12375
|
-
);
|
|
12376
|
-
},
|
|
12377
|
-
// Style tables
|
|
12378
|
-
table({ children, ...props }) {
|
|
12379
|
-
return /* @__PURE__ */ jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsx(
|
|
12380
|
-
"table",
|
|
12381
|
-
{
|
|
12382
|
-
...props,
|
|
12383
|
-
className: "min-w-full border-collapse border border-[var(--color-border)]",
|
|
12384
|
-
children
|
|
12385
|
-
}
|
|
12386
|
-
) });
|
|
12387
|
-
},
|
|
12388
|
-
th({ children, ...props }) {
|
|
12389
|
-
return /* @__PURE__ */ jsx(
|
|
12390
|
-
"th",
|
|
12391
|
-
{
|
|
12392
|
-
...props,
|
|
12393
|
-
className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
|
|
12394
|
-
children
|
|
12395
|
-
}
|
|
12396
|
-
);
|
|
12397
|
-
},
|
|
12398
|
-
td({ children, ...props }) {
|
|
12399
|
-
return /* @__PURE__ */ jsx(
|
|
12400
|
-
"td",
|
|
12401
|
-
{
|
|
12402
|
-
...props,
|
|
12403
|
-
className: "border border-[var(--color-border)] px-4 py-2",
|
|
12404
|
-
children
|
|
12405
|
-
}
|
|
12406
|
-
);
|
|
12407
|
-
},
|
|
12408
|
-
// Style blockquotes
|
|
12409
|
-
blockquote({ children, ...props }) {
|
|
12410
|
-
return /* @__PURE__ */ jsx(
|
|
12411
|
-
"blockquote",
|
|
12412
|
-
{
|
|
12413
|
-
...props,
|
|
12414
|
-
className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
|
|
12415
|
-
children
|
|
12416
|
-
}
|
|
12417
|
-
);
|
|
12418
|
-
}
|
|
12419
|
-
},
|
|
12420
|
-
children: safeContent
|
|
12421
|
-
}
|
|
12422
|
-
)
|
|
12423
|
-
}
|
|
12424
|
-
);
|
|
12425
|
-
},
|
|
12426
|
-
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
12427
|
-
);
|
|
12428
|
-
MarkdownContent.displayName = "MarkdownContent";
|
|
12429
|
-
}
|
|
12430
|
-
});
|
|
12431
12301
|
function computeFoldRegions(code) {
|
|
12432
12302
|
const lines = code.split("\n");
|
|
12433
12303
|
const regions = [];
|
|
@@ -12973,6 +12843,155 @@ var init_CodeBlock = __esm({
|
|
|
12973
12843
|
CodeBlock.displayName = "CodeBlock";
|
|
12974
12844
|
}
|
|
12975
12845
|
});
|
|
12846
|
+
var MarkdownContent;
|
|
12847
|
+
var init_MarkdownContent = __esm({
|
|
12848
|
+
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
12849
|
+
init_katex_min();
|
|
12850
|
+
init_Box();
|
|
12851
|
+
init_CodeBlock();
|
|
12852
|
+
init_useTranslate();
|
|
12853
|
+
init_cn();
|
|
12854
|
+
MarkdownContent = React79__default.memo(
|
|
12855
|
+
({ content, direction, className }) => {
|
|
12856
|
+
const { t: _t } = useTranslate();
|
|
12857
|
+
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
12858
|
+
return /* @__PURE__ */ jsx(
|
|
12859
|
+
Box,
|
|
12860
|
+
{
|
|
12861
|
+
className: cn("prose max-w-none", className),
|
|
12862
|
+
style: {
|
|
12863
|
+
color: "var(--color-foreground)",
|
|
12864
|
+
"--tw-prose-body": "var(--color-foreground)",
|
|
12865
|
+
"--tw-prose-headings": "var(--color-foreground)",
|
|
12866
|
+
"--tw-prose-lead": "var(--color-muted-foreground)",
|
|
12867
|
+
"--tw-prose-links": "var(--color-primary)",
|
|
12868
|
+
"--tw-prose-bold": "var(--color-foreground)",
|
|
12869
|
+
"--tw-prose-counters": "var(--color-muted-foreground)",
|
|
12870
|
+
"--tw-prose-bullets": "var(--color-muted-foreground)",
|
|
12871
|
+
"--tw-prose-hr": "var(--color-border)",
|
|
12872
|
+
"--tw-prose-quotes": "var(--color-foreground)",
|
|
12873
|
+
"--tw-prose-quote-borders": "var(--color-primary)",
|
|
12874
|
+
"--tw-prose-captions": "var(--color-muted-foreground)",
|
|
12875
|
+
"--tw-prose-code": "var(--color-foreground)",
|
|
12876
|
+
"--tw-prose-pre-code": "var(--color-foreground)",
|
|
12877
|
+
"--tw-prose-pre-bg": "var(--color-muted)",
|
|
12878
|
+
"--tw-prose-th-borders": "var(--color-border)",
|
|
12879
|
+
"--tw-prose-td-borders": "var(--color-border)",
|
|
12880
|
+
direction
|
|
12881
|
+
},
|
|
12882
|
+
children: /* @__PURE__ */ jsx(
|
|
12883
|
+
ReactMarkdown,
|
|
12884
|
+
{
|
|
12885
|
+
remarkPlugins: [remarkMath, remarkGfm],
|
|
12886
|
+
rehypePlugins: [
|
|
12887
|
+
[rehypeKatex, { strict: false, throwOnError: false }]
|
|
12888
|
+
],
|
|
12889
|
+
components: {
|
|
12890
|
+
code({
|
|
12891
|
+
className: codeClassName,
|
|
12892
|
+
children,
|
|
12893
|
+
inline,
|
|
12894
|
+
...props
|
|
12895
|
+
}) {
|
|
12896
|
+
if (!inline) {
|
|
12897
|
+
const match = /language-(\w+)/.exec(codeClassName ?? "");
|
|
12898
|
+
const language = match ? match[1] : "text";
|
|
12899
|
+
const code = String(children).replace(/\n$/, "");
|
|
12900
|
+
return /* @__PURE__ */ jsx(
|
|
12901
|
+
CodeBlock,
|
|
12902
|
+
{
|
|
12903
|
+
code,
|
|
12904
|
+
language,
|
|
12905
|
+
maxHeight: "60vh"
|
|
12906
|
+
}
|
|
12907
|
+
);
|
|
12908
|
+
}
|
|
12909
|
+
return /* @__PURE__ */ jsx(
|
|
12910
|
+
"code",
|
|
12911
|
+
{
|
|
12912
|
+
...props,
|
|
12913
|
+
className: codeClassName,
|
|
12914
|
+
style: {
|
|
12915
|
+
backgroundColor: "var(--color-muted)",
|
|
12916
|
+
color: "var(--color-foreground)",
|
|
12917
|
+
border: "1px solid var(--color-border)",
|
|
12918
|
+
padding: "0.125rem 0.375rem",
|
|
12919
|
+
borderRadius: "0.25rem",
|
|
12920
|
+
fontSize: "0.875em",
|
|
12921
|
+
fontFamily: "ui-monospace, monospace"
|
|
12922
|
+
},
|
|
12923
|
+
children
|
|
12924
|
+
}
|
|
12925
|
+
);
|
|
12926
|
+
},
|
|
12927
|
+
// Style links
|
|
12928
|
+
a({ href, children, ...props }) {
|
|
12929
|
+
return /* @__PURE__ */ jsx(
|
|
12930
|
+
"a",
|
|
12931
|
+
{
|
|
12932
|
+
href,
|
|
12933
|
+
...props,
|
|
12934
|
+
className: "text-[var(--color-primary)] hover:underline",
|
|
12935
|
+
target: href?.startsWith("http") ? "_blank" : void 0,
|
|
12936
|
+
rel: href?.startsWith("http") ? "noopener noreferrer" : void 0,
|
|
12937
|
+
children
|
|
12938
|
+
}
|
|
12939
|
+
);
|
|
12940
|
+
},
|
|
12941
|
+
// Style tables
|
|
12942
|
+
table({ children, ...props }) {
|
|
12943
|
+
return /* @__PURE__ */ jsx("div", { className: "overflow-x-auto my-4", children: /* @__PURE__ */ jsx(
|
|
12944
|
+
"table",
|
|
12945
|
+
{
|
|
12946
|
+
...props,
|
|
12947
|
+
className: "min-w-full border-collapse border border-[var(--color-border)]",
|
|
12948
|
+
children
|
|
12949
|
+
}
|
|
12950
|
+
) });
|
|
12951
|
+
},
|
|
12952
|
+
th({ children, ...props }) {
|
|
12953
|
+
return /* @__PURE__ */ jsx(
|
|
12954
|
+
"th",
|
|
12955
|
+
{
|
|
12956
|
+
...props,
|
|
12957
|
+
className: "border border-[var(--color-border)] bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
|
|
12958
|
+
children
|
|
12959
|
+
}
|
|
12960
|
+
);
|
|
12961
|
+
},
|
|
12962
|
+
td({ children, ...props }) {
|
|
12963
|
+
return /* @__PURE__ */ jsx(
|
|
12964
|
+
"td",
|
|
12965
|
+
{
|
|
12966
|
+
...props,
|
|
12967
|
+
className: "border border-[var(--color-border)] px-4 py-2",
|
|
12968
|
+
children
|
|
12969
|
+
}
|
|
12970
|
+
);
|
|
12971
|
+
},
|
|
12972
|
+
// Style blockquotes
|
|
12973
|
+
blockquote({ children, ...props }) {
|
|
12974
|
+
return /* @__PURE__ */ jsx(
|
|
12975
|
+
"blockquote",
|
|
12976
|
+
{
|
|
12977
|
+
...props,
|
|
12978
|
+
className: "border-l-4 border-[var(--color-primary)] pl-4 italic text-[var(--color-foreground)] my-4",
|
|
12979
|
+
children
|
|
12980
|
+
}
|
|
12981
|
+
);
|
|
12982
|
+
}
|
|
12983
|
+
},
|
|
12984
|
+
children: safeContent
|
|
12985
|
+
}
|
|
12986
|
+
)
|
|
12987
|
+
}
|
|
12988
|
+
);
|
|
12989
|
+
},
|
|
12990
|
+
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
12991
|
+
);
|
|
12992
|
+
MarkdownContent.displayName = "MarkdownContent";
|
|
12993
|
+
}
|
|
12994
|
+
});
|
|
12976
12995
|
function useLongPress(onLongPress, options = {}) {
|
|
12977
12996
|
const { duration = 500, moveThreshold = 10 } = options;
|
|
12978
12997
|
const timerRef = useRef(null);
|
|
@@ -37673,6 +37692,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
|
|
|
37673
37692
|
{
|
|
37674
37693
|
className: "prose prose-sm max-w-none",
|
|
37675
37694
|
style: {
|
|
37695
|
+
color: "var(--color-foreground)",
|
|
37676
37696
|
"--tw-prose-body": "var(--color-foreground)",
|
|
37677
37697
|
"--tw-prose-headings": "var(--color-foreground)",
|
|
37678
37698
|
"--tw-prose-bold": "var(--color-foreground)",
|
|
@@ -37696,6 +37716,7 @@ function renderRichFieldValue(value, fieldName, fieldType) {
|
|
|
37696
37716
|
{
|
|
37697
37717
|
className: "mt-1 prose prose-sm max-w-none break-words",
|
|
37698
37718
|
style: {
|
|
37719
|
+
color: "var(--color-foreground)",
|
|
37699
37720
|
"--tw-prose-body": "var(--color-foreground)",
|
|
37700
37721
|
"--tw-prose-headings": "var(--color-foreground)",
|
|
37701
37722
|
"--tw-prose-bold": "var(--color-foreground)",
|