@epam/ai-dial-chat-shared 1.2.0-dev.219 → 1.2.0-dev.225
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/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -64
- package/index.d.ts +8 -0
- package/index.js +46 -45
- package/package.json +1 -1
- package/utils/syntax-highlighting.js +13 -0
|
@@ -2,82 +2,83 @@ import { CodeBlockTheme as e } from "../../../types/code-editor.js";
|
|
|
2
2
|
import { mergeClasses as t } from "../../../utils/merge-class.js";
|
|
3
3
|
import { buildCssVars as n } from "../../../utils/build-css-vars.js";
|
|
4
4
|
import { downloadTextFile as r, getFileExtensionForLanguage as i } from "../../../utils/file-download.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import s from "
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { isSyntaxHighlightingAllowed as a } from "../../../utils/syntax-highlighting.js";
|
|
6
|
+
import { CHAT_SHARED_CLASS as o } from "../../../constants/public-class-names.js";
|
|
7
|
+
import { useCodeCopy as s } from "../../../hooks/useCodeCopy.js";
|
|
8
|
+
import c from "./CodeBlock.module.scss.js";
|
|
9
|
+
import { restrainedSyntaxTheme as l } from "./syntax-theme.js";
|
|
10
|
+
import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, GhostIconButton as p } from "@epam/ai-dial-ui-kit";
|
|
11
|
+
import { Suspense as m, lazy as h, memo as g, useMemo as _ } from "react";
|
|
12
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
13
|
+
import { IconCheck as b, IconCopy as x, IconDownload as S } from "@tabler/icons-react";
|
|
13
14
|
//#region src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx
|
|
14
|
-
var
|
|
15
|
-
dark:
|
|
16
|
-
light:
|
|
17
|
-
},
|
|
15
|
+
var C = {
|
|
16
|
+
dark: l,
|
|
17
|
+
light: l
|
|
18
|
+
}, w = h(async () => {
|
|
18
19
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
19
20
|
return { default: e };
|
|
20
|
-
}),
|
|
21
|
-
let { isCopied:
|
|
22
|
-
r(
|
|
23
|
-
},
|
|
21
|
+
}), T = g(({ language: h, value: g, isStreaming: T, theme: E = e.Dark, copyLabel: D = "Copy code", copiedLabel: O = "Copied!", downloadLabel: k = "Download code", hideDownload: A = !1, containerClassName: j, headerClassName: M, codeClassName: N = "dial-code-text", languageLabelClassName: P = "dial-tiny-lead-semi-text", title: F, titleSlot: I, colors: L }) => {
|
|
22
|
+
let { isCopied: R, copy: z } = s(g), B = _(() => a(g), [g]), V = E === e.Light, H = () => {
|
|
23
|
+
r(g, `code.${i(h)}`);
|
|
24
|
+
}, U = /* @__PURE__ */ v("pre", {
|
|
24
25
|
className: "p-4",
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
className: t("whitespace-pre",
|
|
27
|
-
children:
|
|
26
|
+
children: /* @__PURE__ */ v("code", {
|
|
27
|
+
className: t("whitespace-pre", N),
|
|
28
|
+
children: g
|
|
28
29
|
})
|
|
29
30
|
});
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ y("div", {
|
|
31
32
|
style: n({
|
|
32
|
-
"--cm-code-block-bg":
|
|
33
|
-
"--cm-code-block-border":
|
|
34
|
-
"--cm-code-block-header-bg":
|
|
35
|
-
"--cm-code-block-language":
|
|
36
|
-
"--cm-code-block-copied":
|
|
37
|
-
"--cm-code-block-scrollbar":
|
|
33
|
+
"--cm-code-block-bg": L?.background,
|
|
34
|
+
"--cm-code-block-border": L?.border,
|
|
35
|
+
"--cm-code-block-header-bg": L?.headerBackground,
|
|
36
|
+
"--cm-code-block-language": L?.language,
|
|
37
|
+
"--cm-code-block-copied": L?.copied,
|
|
38
|
+
"--cm-code-block-scrollbar": L?.scrollbar
|
|
38
39
|
}),
|
|
39
|
-
className: t("my-4 max-w-full rounded-xl border [overflow:clip]",
|
|
40
|
+
className: t("my-4 max-w-full rounded-xl border [overflow:clip]", c.container, V && c.containerLight, j, o.codeBlock),
|
|
40
41
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4",
|
|
43
|
-
children: [
|
|
44
|
-
className: t(
|
|
45
|
-
children:
|
|
46
|
-
}), !
|
|
42
|
+
/* @__PURE__ */ y("div", {
|
|
43
|
+
className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", I == null ? "py-2" : "py-0", c.header, M, o.codeBlockHeader),
|
|
44
|
+
children: [I ?? /* @__PURE__ */ v("span", {
|
|
45
|
+
className: t(c.languageLabel, P),
|
|
46
|
+
children: F ?? h
|
|
47
|
+
}), !T && /* @__PURE__ */ y("div", {
|
|
47
48
|
className: "flex items-center gap-1",
|
|
48
|
-
children: [!
|
|
49
|
-
icon: /* @__PURE__ */
|
|
50
|
-
size:
|
|
51
|
-
stroke:
|
|
49
|
+
children: [!A && /* @__PURE__ */ v(p, {
|
|
50
|
+
icon: /* @__PURE__ */ v(S, {
|
|
51
|
+
size: u.SM,
|
|
52
|
+
stroke: d
|
|
52
53
|
}),
|
|
53
|
-
"aria-label":
|
|
54
|
-
size:
|
|
55
|
-
onClick:
|
|
56
|
-
}), /* @__PURE__ */
|
|
57
|
-
icon:
|
|
58
|
-
size:
|
|
59
|
-
className:
|
|
54
|
+
"aria-label": k,
|
|
55
|
+
size: f.Small,
|
|
56
|
+
onClick: H
|
|
57
|
+
}), /* @__PURE__ */ v(p, {
|
|
58
|
+
icon: R ? /* @__PURE__ */ v(b, {
|
|
59
|
+
size: u.SM,
|
|
60
|
+
className: c.copiedIcon,
|
|
60
61
|
"aria-hidden": !0,
|
|
61
|
-
stroke:
|
|
62
|
-
}) : /* @__PURE__ */
|
|
63
|
-
size:
|
|
62
|
+
stroke: d
|
|
63
|
+
}) : /* @__PURE__ */ v(x, {
|
|
64
|
+
size: u.SM,
|
|
64
65
|
"aria-hidden": !0,
|
|
65
|
-
stroke:
|
|
66
|
+
stroke: d
|
|
66
67
|
}),
|
|
67
|
-
"aria-label":
|
|
68
|
-
size:
|
|
69
|
-
onClick:
|
|
68
|
+
"aria-label": D,
|
|
69
|
+
size: f.Small,
|
|
70
|
+
onClick: z
|
|
70
71
|
})]
|
|
71
72
|
})]
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
className: t(
|
|
74
|
+
/* @__PURE__ */ v("div", {
|
|
75
|
+
className: t(c.scrollContainer, "max-h-[60vh] overflow-auto"),
|
|
75
76
|
dir: "ltr",
|
|
76
|
-
children:
|
|
77
|
-
fallback:
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
-
language:
|
|
80
|
-
style:
|
|
77
|
+
children: h && B ? /* @__PURE__ */ v(m, {
|
|
78
|
+
fallback: U,
|
|
79
|
+
children: /* @__PURE__ */ v(w, {
|
|
80
|
+
language: h,
|
|
81
|
+
style: C[E] ?? l,
|
|
81
82
|
customStyle: {
|
|
82
83
|
margin: 0,
|
|
83
84
|
borderRadius: 0,
|
|
@@ -87,19 +88,19 @@ var x = {
|
|
|
87
88
|
padding: "14px 16px",
|
|
88
89
|
letterSpacing: 0
|
|
89
90
|
},
|
|
90
|
-
codeTagProps: { className:
|
|
91
|
-
children:
|
|
91
|
+
codeTagProps: { className: N },
|
|
92
|
+
children: g
|
|
92
93
|
})
|
|
93
|
-
}) :
|
|
94
|
+
}) : U
|
|
94
95
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ v("span", {
|
|
96
97
|
role: "status",
|
|
97
98
|
"aria-live": "polite",
|
|
98
99
|
className: "sr-only",
|
|
99
|
-
children:
|
|
100
|
+
children: R ? O : ""
|
|
100
101
|
})
|
|
101
102
|
]
|
|
102
103
|
});
|
|
103
104
|
});
|
|
104
105
|
//#endregion
|
|
105
|
-
export {
|
|
106
|
+
export { T as MarkdownCodeBlock };
|
package/index.d.ts
CHANGED
|
@@ -1362,6 +1362,14 @@ export declare const isSkillSelectionUnsupported: (skillUrl: string | null | und
|
|
|
1362
1362
|
/** Returns `true` when `msg` is a `StatusMessage`. */
|
|
1363
1363
|
export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
|
|
1364
1364
|
|
|
1365
|
+
/**
|
|
1366
|
+
* Bounds input sent to synchronous syntax highlighters. Oversized input should
|
|
1367
|
+
* render as complete plain text instead. Limits count UTF-16 code units and
|
|
1368
|
+
* recognize LF, CRLF, and CR line endings. This is a size guard, not a timeout
|
|
1369
|
+
* or a guarantee against pathological grammars on smaller inputs.
|
|
1370
|
+
*/
|
|
1371
|
+
export declare const isSyntaxHighlightingAllowed: (text: string) => boolean;
|
|
1372
|
+
|
|
1365
1373
|
/** Returns whether any file in the batch is still queued or uploading. */
|
|
1366
1374
|
export declare const isUploadInProgress: (batchState: FileUploadBatchState | null) => boolean;
|
|
1367
1375
|
|
package/index.js
CHANGED
|
@@ -21,48 +21,49 @@ import { formatLastUsed as Y } from "./utils/format-last-used.js";
|
|
|
21
21
|
import { formatFileSize as X } from "./utils/format-file-size.js";
|
|
22
22
|
import { formatCost as Z, formatPrice as Q, formatUnitPrice as $ } from "./utils/format-price.js";
|
|
23
23
|
import { base64ToBlob as ee, downloadTextFile as te, ensureDownloadFilename as ne, getFileExtensionForLanguage as re, triggerAnchorDownload as ie, triggerBlobDownload as ae, tryBase64ToBytes as oe } from "./utils/file-download.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
|
|
24
|
+
import { isSyntaxHighlightingAllowed as se } from "./utils/syntax-highlighting.js";
|
|
25
|
+
import { ENTITY_TYPE_BG_COLOR as ce, ENTITY_TYPE_COLOR as le } from "./constants/entity-colors.js";
|
|
26
|
+
import { PROMPT_PARAM_DEFAULT_SEPARATOR as ue, PROMPT_PARAM_PATTERN as de, PROMPT_VARIABLE_CLASS_NAME as fe, buildPromptParamDefaults as pe, extractPromptParams as me, rehypePromptVariables as he, resolvePromptParams as ge } from "./utils/prompt-variables.js";
|
|
27
|
+
import { generateUUID as _e } from "./utils/generate-uuid.js";
|
|
28
|
+
import { BASE_LG_ICON_PROPS as ve, BASE_MD_ICON_PROPS as ye } from "./constants/icon.js";
|
|
29
|
+
import { HIDDEN_FILE as be, PUBLIC_BUCKET as xe } from "./constants/dial.js";
|
|
30
|
+
import { TAG_INPUT_TAG_CLASS_NAME as Se } from "./constants/tag-input.js";
|
|
31
|
+
import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Ce, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as we, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Te, RESIZABLE_TEXTAREA_CLASS_NAME as Ee } from "./constants/resizable-fields.js";
|
|
32
|
+
import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as De } from "./constants/markdown-editor.js";
|
|
33
|
+
import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as Oe, SELECT_LIST_MAX_HEIGHT_PX as ke } from "./constants/select-list.js";
|
|
34
|
+
import { DESKTOP_BREAKPOINT_PX as Ae, DESKTOP_MEDIA_QUERY as je, MOBILE_MAX_WIDTH_PX as Me, MOBILE_MEDIA_QUERY as Ne } from "./constants/breakpoint.js";
|
|
35
|
+
import { pickAvatarColor as Pe } from "./utils/avatar-color.js";
|
|
36
|
+
import { extractInitials as Fe } from "./utils/initials.js";
|
|
37
|
+
import { InitialsAvatar as Ie } from "./components/InitialsAvatar/InitialsAvatar.js";
|
|
38
|
+
import { DeploymentIcon as Le } from "./components/DeploymentIcon/DeploymentIcon.js";
|
|
39
|
+
import { CopyButton as Re, CopyIconButton as ze } from "./components/CopyButton/CopyButton.js";
|
|
40
|
+
import { PanelEmptyState as Be } from "./components/PanelEmptyState/PanelEmptyState.js";
|
|
41
|
+
import { ItemHeader as Ve } from "./components/ItemHeader/ItemHeader.js";
|
|
42
|
+
import { EntityTypeLabel as He } from "./components/EntityTypeLabel/EntityTypeLabel.js";
|
|
43
|
+
import { FeaturedChip as Ue } from "./components/FeaturedChip/FeaturedChip.js";
|
|
44
|
+
import { EntityHeader as We } from "./components/EntityHeader/EntityHeader.js";
|
|
45
|
+
import { ResourceSummary as Ge } from "./components/ResourceSummary/ResourceSummary.js";
|
|
46
|
+
import { TableHeader as Ke } from "./components/MarkdownRenderer/Table/TableHeader.js";
|
|
47
|
+
import { TextRefinementState as qe, useTextRefinement as Je } from "./hooks/useTextRefinement.js";
|
|
48
|
+
import { TextRefinementField as Ye } from "./components/TextRefinementField/TextRefinementField.js";
|
|
49
|
+
import { CHAT_SHARED_CLASS as Xe } from "./constants/public-class-names.js";
|
|
50
|
+
import { useCodeCopy as Ze } from "./hooks/useCodeCopy.js";
|
|
51
|
+
import { restrainedSyntaxTheme as Qe } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
|
|
52
|
+
import { MarkdownCodeBlock as $e } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
|
|
53
|
+
import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as et, MARKDOWN_TABLE_CSV_MIME_TYPE as tt, MarkdownTableCopyFormat as nt, serializeMarkdownTableRows as rt } from "./components/MarkdownRenderer/Table/table-serialization.js";
|
|
54
|
+
import { MarkdownTable as it } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
|
|
55
|
+
import { MarkdownRenderer as at, defaultMarkdownComponents as ot } from "./components/MarkdownRenderer/MarkdownRenderer.js";
|
|
56
|
+
import { COMPACT_MARKDOWN_CLASS_NAMES as st, DEFAULT_MARKDOWN_CLASS_NAMES as ct } from "./components/MarkdownRenderer/markdown-class-names.js";
|
|
57
|
+
import { PlainTextRenderer as lt } from "./components/MarkdownRenderer/PlainTextRenderer.js";
|
|
58
|
+
import { MDMessageViewer as ut } from "./components/MarkdownRenderer/MDMessageViewer.js";
|
|
59
|
+
import { MarkdownWithPlaceholders as dt } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
|
|
60
|
+
import { useCollapsedText as ft } from "./hooks/useCollapsedText.js";
|
|
61
|
+
import { useAvailableHeightCap as pt } from "./hooks/useAvailableHeightCap.js";
|
|
62
|
+
import { useIsMobile as mt } from "./hooks/useIsMobile.js";
|
|
63
|
+
import { DialFileManagerActionProfile as ht, DialFileManagerVariant as gt } from "./file-manager/file-manager-variant.js";
|
|
64
|
+
import { getParentFolderPath as _t, isHiddenPath as vt } from "./file-manager/path.js";
|
|
65
|
+
import { FileUploadStatus as yt, isUploadInProgress as bt } from "./file-manager/upload-batch.js";
|
|
66
|
+
import { useGridEditingScroll as xt } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
|
|
67
|
+
import { OperationLoaderModal as St } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
|
|
68
|
+
import { isSkillSelectionUnsupported as Ct } from "./utils/is-skill-selection-unsupported.js";
|
|
69
|
+
export { f as AttachmentErrorReason, p as AttachmentType, ve as BASE_LG_ICON_PROPS, ye as BASE_MD_ICON_PROPS, Xe as CHAT_SHARED_CLASS, st as COMPACT_MARKDOWN_CLASS_NAMES, m as CatalogEntityType, _ as CodeBlockTheme, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, Re as CopyButton, ze as CopyIconButton, ct as DEFAULT_MARKDOWN_CLASS_NAMES, et as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, Ae as DESKTOP_BREAKPOINT_PX, je as DESKTOP_MEDIA_QUERY, Le as DeploymentIcon, ht as DialFileManagerActionProfile, gt as DialFileManagerVariant, F as ENTITY_DESCRIPTION_MAX_LENGTH, I as ENTITY_INSTRUCTIONS_MAX_LENGTH, L as ENTITY_NAME_MAX_LENGTH, ce as ENTITY_TYPE_BG_COLOR, le as ENTITY_TYPE_COLOR, We as EntityHeader, He as EntityTypeLabel, Ue as FeaturedChip, h as FileExtension, yt as FileUploadStatus, a as FilterTab, be as HIDDEN_FILE, Ie as InitialsAvatar, Ve as ItemHeader, Ce as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, we as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, De as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, tt as MARKDOWN_TABLE_CSV_MIME_TYPE, ut as MDMessageViewer, g as MIMEType, v as MIME_TYPE_ALIASES, y as MIME_TYPE_AUDIO_PREFIX, b as MIME_TYPE_EXT_MAP, x as MIME_TYPE_WILDCARD, Me as MOBILE_MAX_WIDTH_PX, Ne as MOBILE_MEDIA_QUERY, $e as MarkdownCodeBlock, at as MarkdownRenderer, it as MarkdownTable, nt as MarkdownTableCopyFormat, dt as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, St as OperationLoaderModal, A as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ue as PROMPT_PARAM_DEFAULT_SEPARATOR, de as PROMPT_PARAM_PATTERN, fe as PROMPT_VARIABLE_CLASS_NAME, xe as PUBLIC_BUCKET, Be as PanelEmptyState, lt as PlainTextRenderer, Te as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Ee as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Ge as ResourceSummary, d as ResponseFormat, Oe as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, ke as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, Se as TAG_INPUT_TAG_CLASS_NAME, Ke as TableHeader, Ye as TextRefinementField, qe as TextRefinementState, ee as base64ToBlob, V as buildCssVars, pe as buildPromptParamDefaults, K as copyMarkdownAsRichText, q as copyToClipboard, ot as defaultMarkdownComponents, te as downloadTextFile, ne as ensureDownloadFilename, R as exceedsMaxLength, Fe as extractInitials, me as extractPromptParams, Z as formatCost, X as formatFileSize, Y as formatLastUsed, Q as formatPrice, $ as formatUnitPrice, _e as generateUUID, S as getAttachmentTypeFromMime, C as getBaseMimeType, re as getFileExtensionForLanguage, _t as getParentFolderPath, j as getUtf8ByteLength, z as hasControlCharacters, w as inferMimeTypeFromPath, D as isAnnotationSelector, G as isAudioTranscriptionSupported, vt as isHiddenPath, Ct as isSkillSelectionUnsupported, H as isStatusMessage, se as isSyntaxHighlightingAllowed, bt as isUploadInProgress, J as markdownToRichTextHtml, B as mergeClasses, U as messageAttachmentToDisplayAttachment, W as messageAttachmentsToDisplayAttachments, T as normalizeMimeType, O as normalizePersistedHtmlTagAttachmentType, k as normalizeRawAnnotations, Pe as pickAvatarColor, he as rehypePromptVariables, ge as resolvePromptParams, Qe as restrainedSyntaxTheme, M as sanitizeConversationName, rt as serializeMarkdownTableRows, N as stripTrailingDots, E as stripUrlQueryAndFragment, ie as triggerAnchorDownload, ae as triggerBlobDownload, P as truncateToUtf8Bytes, oe as tryBase64ToBytes, pt as useAvailableHeightCap, Ze as useCodeCopy, ft as useCollapsedText, xt as useGridEditingScroll, mt as useIsMobile, Je as useTextRefinement };
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/utils/syntax-highlighting.ts
|
|
2
|
+
var e = 5e4, t = 2e3, n = (n) => {
|
|
3
|
+
if (n.length > e) return !1;
|
|
4
|
+
let r = 0;
|
|
5
|
+
for (let e = 0; e < n.length; e++) {
|
|
6
|
+
let i = n[e];
|
|
7
|
+
if (i === "\n" || i === "\r") r = 0;
|
|
8
|
+
else if (++r > t) return !1;
|
|
9
|
+
}
|
|
10
|
+
return !0;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as isSyntaxHighlightingAllowed };
|