xmlui 0.9.35 → 0.9.37
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/lib/{apiInterceptorWorker-CyDpwnty.mjs → apiInterceptorWorker-5JLbCSKz.mjs} +1 -1
- package/dist/lib/{index-BaxIicW9.mjs → index-qQpSddXH.mjs} +151 -95
- package/dist/lib/index.css +60 -58
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{server-common-B1bqw3bO.mjs → server-common-D9McswSL.mjs} +37 -26
- package/dist/lib/xmlui.mjs +1 -1
- package/dist/metadata/style.css +60 -58
- package/dist/metadata/xmlui-metadata.mjs +50 -42
- package/dist/metadata/xmlui-metadata.umd.js +50 -42
- package/dist/scripts/package.json +2 -2
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +1 -1
- package/dist/scripts/src/components/Markdown/Markdown.js +10 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +109 -47
- package/dist/scripts/src/components/NavGroup/NavGroup.js +1 -1
- package/dist/scripts/src/components/Text/Text.js +1 -0
- package/dist/standalone/xmlui-standalone.umd.js +213 -155
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError, s as setupWorker } from "./index-
|
|
1
|
+
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError, s as setupWorker } from "./index-qQpSddXH.mjs";
|
|
2
2
|
import { delay as delay$1, HttpResponse, http } from "msw";
|
|
3
3
|
import { isArray, isObject, mapValues } from "lodash-es";
|
|
4
4
|
import Dexie from "dexie";
|
|
@@ -1433,17 +1433,18 @@ function getElementRef(element) {
|
|
|
1433
1433
|
return element.props.ref || element.ref;
|
|
1434
1434
|
}
|
|
1435
1435
|
const themeVars$M = `'{"textColor-FormItemLabel": "var(--xmlui-textColor-FormItemLabel)", "fontFamily-FormItemLabel": "var(--xmlui-fontFamily-FormItemLabel)", "fontSize-FormItemLabel": "var(--xmlui-fontSize-FormItemLabel)", "fontWeight-FormItemLabel": "var(--xmlui-fontWeight-FormItemLabel)", "fontStyle-FormItemLabel": "var(--xmlui-fontStyle-FormItemLabel)", "textTransform-FormItemLabel": "var(--xmlui-textTransform-FormItemLabel)", "textColor-FormItemLabel-required": "var(--xmlui-textColor-FormItemLabel-required)", "fontSize-FormItemLabel-required": "var(--xmlui-fontSize-FormItemLabel-required)", "fontWeight-FormItemLabel-required": "var(--xmlui-fontWeight-FormItemLabel-required)", "fontStyle-FormItemLabel-required": "var(--xmlui-fontStyle-FormItemLabel-required)", "textTransform-FormItemLabel-required": "var(--xmlui-textTransform-FormItemLabel-required)", "textColor-FormItemLabel-requiredMark": "var(--xmlui-textColor-FormItemLabel-requiredMark)"}'`;
|
|
1436
|
-
const container$3 = "
|
|
1437
|
-
const top$1 = "
|
|
1438
|
-
const end = "
|
|
1439
|
-
const bottom$1 = "
|
|
1440
|
-
const start = "
|
|
1441
|
-
const shrinkToLabel = "
|
|
1442
|
-
const
|
|
1443
|
-
const
|
|
1444
|
-
const
|
|
1445
|
-
const
|
|
1446
|
-
const
|
|
1436
|
+
const container$3 = "_container_rso68_13";
|
|
1437
|
+
const top$1 = "_top_rso68_20";
|
|
1438
|
+
const end = "_end_rso68_25";
|
|
1439
|
+
const bottom$1 = "_bottom_rso68_31";
|
|
1440
|
+
const start = "_start_rso68_36";
|
|
1441
|
+
const shrinkToLabel = "_shrinkToLabel_rso68_42";
|
|
1442
|
+
const itemWithLabel = "_itemWithLabel_rso68_45";
|
|
1443
|
+
const inputLabel = "_inputLabel_rso68_48";
|
|
1444
|
+
const disabled$8 = "_disabled_rso68_61";
|
|
1445
|
+
const labelBreak = "_labelBreak_rso68_65";
|
|
1446
|
+
const required = "_required_rso68_69";
|
|
1447
|
+
const requiredMark = "_requiredMark_rso68_76";
|
|
1447
1448
|
const styles$11 = {
|
|
1448
1449
|
themeVars: themeVars$M,
|
|
1449
1450
|
container: container$3,
|
|
@@ -1452,6 +1453,7 @@ const styles$11 = {
|
|
|
1452
1453
|
bottom: bottom$1,
|
|
1453
1454
|
start,
|
|
1454
1455
|
shrinkToLabel,
|
|
1456
|
+
itemWithLabel,
|
|
1455
1457
|
inputLabel,
|
|
1456
1458
|
disabled: disabled$8,
|
|
1457
1459
|
labelBreak,
|
|
@@ -1514,7 +1516,7 @@ const ItemWithLabel = forwardRef(function ItemWithLabel2({
|
|
|
1514
1516
|
if (label2 === void 0 && !validationResult) {
|
|
1515
1517
|
return /* @__PURE__ */ jsx(Slot, { style: style2, id: inputId, ref, children });
|
|
1516
1518
|
}
|
|
1517
|
-
return /* @__PURE__ */ jsxs("div", { style: style2, ref, children: [
|
|
1519
|
+
return /* @__PURE__ */ jsxs("div", { style: style2, ref, className: styles$11.itemWithLabel, children: [
|
|
1518
1520
|
/* @__PURE__ */ jsxs(
|
|
1519
1521
|
"div",
|
|
1520
1522
|
{
|
|
@@ -7388,35 +7390,35 @@ const h6ComponentRenderer = createComponentRenderer(
|
|
|
7388
7390
|
}
|
|
7389
7391
|
);
|
|
7390
7392
|
const themeVars$B = `'{"marginTop-Text-default": "var(--xmlui-marginTop-Text-default)", "marginBottom-Text-default": "var(--xmlui-marginBottom-Text-default)", "marginLeft-Text-default": "var(--xmlui-marginLeft-Text-default)", "marginRight-Text-default": "var(--xmlui-marginRight-Text-default)", "verticalAlign-Text-default": "var(--xmlui-verticalAlign-Text-default)", "marginTop-Text-markdown": "var(--xmlui-marginTop-Text-markdown)", "marginBottom-Text-markdown": "var(--xmlui-marginBottom-Text-markdown)", "marginLeft-Text-markdown": "var(--xmlui-marginLeft-Text-markdown)", "marginRight-Text-markdown": "var(--xmlui-marginRight-Text-markdown)", "verticalAlign-Text-markdown": "var(--xmlui-verticalAlign-Text-markdown)", "marginTop-Text-abbr": "var(--xmlui-marginTop-Text-abbr)", "marginBottom-Text-abbr": "var(--xmlui-marginBottom-Text-abbr)", "marginLeft-Text-abbr": "var(--xmlui-marginLeft-Text-abbr)", "marginRight-Text-abbr": "var(--xmlui-marginRight-Text-abbr)", "verticalAlign-Text-abbr": "var(--xmlui-verticalAlign-Text-abbr)", "marginTop-Text-cite": "var(--xmlui-marginTop-Text-cite)", "marginBottom-Text-cite": "var(--xmlui-marginBottom-Text-cite)", "marginLeft-Text-cite": "var(--xmlui-marginLeft-Text-cite)", "marginRight-Text-cite": "var(--xmlui-marginRight-Text-cite)", "verticalAlign-Text-cite": "var(--xmlui-verticalAlign-Text-cite)", "marginTop-Text-em": "var(--xmlui-marginTop-Text-em)", "marginBottom-Text-em": "var(--xmlui-marginBottom-Text-em)", "marginLeft-Text-em": "var(--xmlui-marginLeft-Text-em)", "marginRight-Text-em": "var(--xmlui-marginRight-Text-em)", "verticalAlign-Text-em": "var(--xmlui-verticalAlign-Text-em)", "marginTop-Text-codefence": "var(--xmlui-marginTop-Text-codefence)", "marginBottom-Text-codefence": "var(--xmlui-marginBottom-Text-codefence)", "marginTop-Text-code": "var(--xmlui-marginTop-Text-code)", "marginBottom-Text-code": "var(--xmlui-marginBottom-Text-code)", "marginLeft-Text-code": "var(--xmlui-marginLeft-Text-code)", "marginRight-Text-code": "var(--xmlui-marginRight-Text-code)", "verticalAlign-Text-code": "var(--xmlui-verticalAlign-Text-code)", "marginLeft-Text-codefence": "var(--xmlui-marginLeft-Text-codefence)", "marginRight-Text-codefence": "var(--xmlui-marginRight-Text-codefence)", "verticalAlign-Text-codefence": "var(--xmlui-verticalAlign-Text-codefence)", "marginTop-Text-deleted": "var(--xmlui-marginTop-Text-deleted)", "marginBottom-Text-deleted": "var(--xmlui-marginBottom-Text-deleted)", "marginLeft-Text-deleted": "var(--xmlui-marginLeft-Text-deleted)", "marginRight-Text-deleted": "var(--xmlui-marginRight-Text-deleted)", "verticalAlign-Text-deleted": "var(--xmlui-verticalAlign-Text-deleted)", "marginTop-Text-inserted": "var(--xmlui-marginTop-Text-inserted)", "marginBottom-Text-inserted": "var(--xmlui-marginBottom-Text-inserted)", "marginLeft-Text-inserted": "var(--xmlui-marginLeft-Text-inserted)", "marginRight-Text-inserted": "var(--xmlui-marginRight-Text-inserted)", "verticalAlign-Text-inserted": "var(--xmlui-verticalAlign-Text-inserted)", "marginTop-Text-keyboard": "var(--xmlui-marginTop-Text-keyboard)", "marginBottom-Text-keyboard": "var(--xmlui-marginBottom-Text-keyboard)", "marginLeft-Text-keyboard": "var(--xmlui-marginLeft-Text-keyboard)", "marginRight-Text-keyboard": "var(--xmlui-marginRight-Text-keyboard)", "verticalAlign-Text-keyboard": "var(--xmlui-verticalAlign-Text-keyboard)", "marginTop-Text-marked": "var(--xmlui-marginTop-Text-marked)", "marginBottom-Text-marked": "var(--xmlui-marginBottom-Text-marked)", "marginLeft-Text-marked": "var(--xmlui-marginLeft-Text-marked)", "marginRight-Text-marked": "var(--xmlui-marginRight-Text-marked)", "verticalAlign-Text-marked": "var(--xmlui-verticalAlign-Text-marked)", "marginTop-Text-mono": "var(--xmlui-marginTop-Text-mono)", "marginBottom-Text-mono": "var(--xmlui-marginBottom-Text-mono)", "marginLeft-Text-mono": "var(--xmlui-marginLeft-Text-mono)", "marginRight-Text-mono": "var(--xmlui-marginRight-Text-mono)", "verticalAlign-Text-mono": "var(--xmlui-verticalAlign-Text-mono)", "marginTop-Text-sample": "var(--xmlui-marginTop-Text-sample)", "marginBottom-Text-sample": "var(--xmlui-marginBottom-Text-sample)", "marginLeft-Text-sample": "var(--xmlui-marginLeft-Text-sample)", "marginRight-Text-sample": "var(--xmlui-marginRight-Text-sample)", "verticalAlign-Text-sample": "var(--xmlui-verticalAlign-Text-sample)", "marginTop-Text-sup": "var(--xmlui-marginTop-Text-sup)", "marginBottom-Text-sup": "var(--xmlui-marginBottom-Text-sup)", "marginLeft-Text-sup": "var(--xmlui-marginLeft-Text-sup)", "marginRight-Text-sup": "var(--xmlui-marginRight-Text-sup)", "verticalAlign-Text-sup": "var(--xmlui-verticalAlign-Text-sup)", "marginTop-Text-sub": "var(--xmlui-marginTop-Text-sub)", "marginBottom-Text-sub": "var(--xmlui-marginBottom-Text-sub)", "marginLeft-Text-sub": "var(--xmlui-marginLeft-Text-sub)", "marginRight-Text-sub": "var(--xmlui-marginRight-Text-sub)", "verticalAlign-Text-sub": "var(--xmlui-verticalAlign-Text-sub)", "marginTop-Text-var": "var(--xmlui-marginTop-Text-var)", "marginBottom-Text-var": "var(--xmlui-marginBottom-Text-var)", "marginLeft-Text-var": "var(--xmlui-marginLeft-Text-var)", "marginRight-Text-var": "var(--xmlui-marginRight-Text-var)", "verticalAlign-Text-var": "var(--xmlui-verticalAlign-Text-var)", "marginTop-Text-title": "var(--xmlui-marginTop-Text-title)", "marginBottom-Text-title": "var(--xmlui-marginBottom-Text-title)", "marginLeft-Text-title": "var(--xmlui-marginLeft-Text-title)", "marginRight-Text-title": "var(--xmlui-marginRight-Text-title)", "verticalAlign-Text-title": "var(--xmlui-verticalAlign-Text-title)", "marginTop-Text-subtitle": "var(--xmlui-marginTop-Text-subtitle)", "marginBottom-Text-subtitle": "var(--xmlui-marginBottom-Text-subtitle)", "marginLeft-Text-subtitle": "var(--xmlui-marginLeft-Text-subtitle)", "marginRight-Text-subtitle": "var(--xmlui-marginRight-Text-subtitle)", "verticalAlign-Text-subtitle": "var(--xmlui-verticalAlign-Text-subtitle)", "marginTop-Text-small": "var(--xmlui-marginTop-Text-small)", "marginBottom-Text-small": "var(--xmlui-marginBottom-Text-small)", "marginLeft-Text-small": "var(--xmlui-marginLeft-Text-small)", "marginRight-Text-small": "var(--xmlui-marginRight-Text-small)", "verticalAlign-Text-small": "var(--xmlui-verticalAlign-Text-small)", "marginTop-Text-caption": "var(--xmlui-marginTop-Text-caption)", "marginBottom-Text-caption": "var(--xmlui-marginBottom-Text-caption)", "marginLeft-Text-caption": "var(--xmlui-marginLeft-Text-caption)", "marginRight-Text-caption": "var(--xmlui-marginRight-Text-caption)", "verticalAlign-Text-caption": "var(--xmlui-verticalAlign-Text-caption)", "marginTop-Text-placeholder": "var(--xmlui-marginTop-Text-placeholder)", "marginBottom-Text-placeholder": "var(--xmlui-marginBottom-Text-placeholder)", "marginLeft-Text-placeholder": "var(--xmlui-marginLeft-Text-placeholder)", "marginRight-Text-placeholder": "var(--xmlui-marginRight-Text-placeholder)", "verticalAlign-Text-placeholder": "var(--xmlui-verticalAlign-Text-placeholder)", "marginTop-Text-paragraph": "var(--xmlui-marginTop-Text-paragraph)", "marginBottom-Text-paragraph": "var(--xmlui-marginBottom-Text-paragraph)", "marginLeft-Text-paragraph": "var(--xmlui-marginLeft-Text-paragraph)", "marginRight-Text-paragraph": "var(--xmlui-marginRight-Text-paragraph)", "verticalAlign-Text-paragraph": "var(--xmlui-verticalAlign-Text-paragraph)", "marginTop-Text-subheading": "var(--xmlui-marginTop-Text-subheading)", "marginBottom-Text-subheading": "var(--xmlui-marginBottom-Text-subheading)", "marginLeft-Text-subheading": "var(--xmlui-marginLeft-Text-subheading)", "marginRight-Text-subheading": "var(--xmlui-marginRight-Text-subheading)", "verticalAlign-Text-subheading": "var(--xmlui-verticalAlign-Text-subheading)", "marginTop-Text-tableheading": "var(--xmlui-marginTop-Text-tableheading)", "marginBottom-Text-tableheading": "var(--xmlui-marginBottom-Text-tableheading)", "marginLeft-Text-tableheading": "var(--xmlui-marginLeft-Text-tableheading)", "marginRight-Text-tableheading": "var(--xmlui-marginRight-Text-tableheading)", "verticalAlign-Text-tableheading": "var(--xmlui-verticalAlign-Text-tableheading)", "marginTop-Text-secondary": "var(--xmlui-marginTop-Text-secondary)", "marginBottom-Text-secondary": "var(--xmlui-marginBottom-Text-secondary)", "marginLeft-Text-secondary": "var(--xmlui-marginLeft-Text-secondary)", "marginRight-Text-secondary": "var(--xmlui-marginRight-Text-secondary)", "verticalAlign-Text-secondary": "var(--xmlui-verticalAlign-Text-secondary)"}'`;
|
|
7391
|
-
const text = "
|
|
7392
|
-
const markdown = "
|
|
7393
|
-
const abbr = "
|
|
7394
|
-
const cite = "
|
|
7395
|
-
const em = "
|
|
7396
|
-
const codefence = "
|
|
7397
|
-
const code = "
|
|
7398
|
-
const textcode = "
|
|
7399
|
-
const deleted = "
|
|
7400
|
-
const inserted = "
|
|
7401
|
-
const keyboard = "
|
|
7402
|
-
const marked = "
|
|
7403
|
-
const mono = "
|
|
7404
|
-
const sample = "
|
|
7405
|
-
const sup = "
|
|
7406
|
-
const sub = "
|
|
7407
|
-
const title$3 = "
|
|
7408
|
-
const subtitle = "
|
|
7409
|
-
const small = "
|
|
7410
|
-
const caption$1 = "
|
|
7411
|
-
const placeholder$2 = "
|
|
7412
|
-
const paragraph = "
|
|
7413
|
-
const subheading = "
|
|
7414
|
-
const tableheading = "
|
|
7415
|
-
const secondary = "
|
|
7416
|
-
const strong = "
|
|
7417
|
-
const truncateOverflow = "
|
|
7418
|
-
const preserveLinebreaks = "
|
|
7419
|
-
const noEllipsis = "
|
|
7393
|
+
const text = "_text_a71fu_13";
|
|
7394
|
+
const markdown = "_markdown_a71fu_75";
|
|
7395
|
+
const abbr = "_abbr_a71fu_132";
|
|
7396
|
+
const cite = "_cite_a71fu_189";
|
|
7397
|
+
const em = "_em_a71fu_246";
|
|
7398
|
+
const codefence = "_codefence_a71fu_303";
|
|
7399
|
+
const code = "_code_a71fu_303";
|
|
7400
|
+
const textcode = "_textcode_a71fu_308";
|
|
7401
|
+
const deleted = "_deleted_a71fu_456";
|
|
7402
|
+
const inserted = "_inserted_a71fu_528";
|
|
7403
|
+
const keyboard = "_keyboard_a71fu_600";
|
|
7404
|
+
const marked = "_marked_a71fu_657";
|
|
7405
|
+
const mono = "_mono_a71fu_729";
|
|
7406
|
+
const sample = "_sample_a71fu_786";
|
|
7407
|
+
const sup = "_sup_a71fu_843";
|
|
7408
|
+
const sub = "_sub_a71fu_900";
|
|
7409
|
+
const title$3 = "_title_a71fu_1014";
|
|
7410
|
+
const subtitle = "_subtitle_a71fu_1071";
|
|
7411
|
+
const small = "_small_a71fu_1128";
|
|
7412
|
+
const caption$1 = "_caption_a71fu_1185";
|
|
7413
|
+
const placeholder$2 = "_placeholder_a71fu_1242";
|
|
7414
|
+
const paragraph = "_paragraph_a71fu_1299";
|
|
7415
|
+
const subheading = "_subheading_a71fu_1356";
|
|
7416
|
+
const tableheading = "_tableheading_a71fu_1413";
|
|
7417
|
+
const secondary = "_secondary_a71fu_1470";
|
|
7418
|
+
const strong = "_strong_a71fu_1527";
|
|
7419
|
+
const truncateOverflow = "_truncateOverflow_a71fu_1535";
|
|
7420
|
+
const preserveLinebreaks = "_preserveLinebreaks_a71fu_1542";
|
|
7421
|
+
const noEllipsis = "_noEllipsis_a71fu_1546";
|
|
7420
7422
|
const styles$R = {
|
|
7421
7423
|
themeVars: themeVars$B,
|
|
7422
7424
|
text,
|
|
@@ -7435,7 +7437,7 @@ const styles$R = {
|
|
|
7435
7437
|
sample,
|
|
7436
7438
|
sup,
|
|
7437
7439
|
sub,
|
|
7438
|
-
"var": "
|
|
7440
|
+
"var": "_var_a71fu_957",
|
|
7439
7441
|
title: title$3,
|
|
7440
7442
|
subtitle,
|
|
7441
7443
|
small,
|
|
@@ -7528,6 +7530,7 @@ const TextMd = createMetadata({
|
|
|
7528
7530
|
[`textColor-${COMP$18}`]: "$textColor-primary",
|
|
7529
7531
|
[`fontFamily-${COMP$18}`]: "$fontFamily",
|
|
7530
7532
|
[`fontWeight-${COMP$18}`]: "$fontWeight-normal",
|
|
7533
|
+
[`fontSize-${COMP$18}-codefence`]: "$fontSize-small",
|
|
7531
7534
|
[`fontFamily-${COMP$18}-code`]: "$fontFamily-monospace",
|
|
7532
7535
|
[`fontSize-${COMP$18}-code`]: "$fontSize-small",
|
|
7533
7536
|
[`borderWidth-${COMP$18}-code`]: "1px",
|
|
@@ -21040,7 +21043,7 @@ const navGroupComponentRenderer = createComponentRenderer(
|
|
|
21040
21043
|
to: extractValue.asOptionalString(node.props.to),
|
|
21041
21044
|
icon: /* @__PURE__ */ jsx(Icon, { name: extractValue.asString(node.props.icon), className: navLinkStyles.icon }),
|
|
21042
21045
|
node,
|
|
21043
|
-
initiallyExpanded: extractValue.
|
|
21046
|
+
initiallyExpanded: extractValue.asOptionalBoolean(node.props.initiallyExpanded),
|
|
21044
21047
|
renderChild: renderChild2,
|
|
21045
21048
|
iconHorizontalExpanded: extractValue.asOptionalString(node.props.iconHorizontalExpanded),
|
|
21046
21049
|
iconVerticalExpanded: extractValue.asOptionalString(node.props.iconVerticalExpanded),
|
|
@@ -21704,7 +21707,7 @@ function ApiInterceptorProvider({
|
|
|
21704
21707
|
let interceptorWorker;
|
|
21705
21708
|
(async () => {
|
|
21706
21709
|
if (process.env.VITE_MOCK_ENABLED) {
|
|
21707
|
-
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-
|
|
21710
|
+
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-5JLbCSKz.mjs");
|
|
21708
21711
|
if (interceptor) {
|
|
21709
21712
|
interceptorWorker = await createApiInterceptorWorker(interceptor, apiWorker);
|
|
21710
21713
|
if (!apiWorker) {
|
|
@@ -29940,26 +29943,13 @@ const Markdown = memo(function Markdown2({
|
|
|
29940
29943
|
removeIndents = true,
|
|
29941
29944
|
children,
|
|
29942
29945
|
style: style2,
|
|
29943
|
-
codeHighlighter
|
|
29946
|
+
codeHighlighter,
|
|
29947
|
+
showHeadingAnchors = false
|
|
29944
29948
|
}) {
|
|
29945
29949
|
if (typeof children !== "string") {
|
|
29946
29950
|
return null;
|
|
29947
29951
|
}
|
|
29948
29952
|
children = removeIndents ? removeTextIndents(children) : children;
|
|
29949
|
-
const renderHeading2 = (level, children2) => {
|
|
29950
|
-
if (typeof children2 === "string") {
|
|
29951
|
-
const [headingLabel, anchorId] = getCustomAnchor(children2);
|
|
29952
|
-
if (anchorId) {
|
|
29953
|
-
const currentPath = window.location.href.replace(new RegExp("(?<!\\/)#.*$"), "");
|
|
29954
|
-
const href = `${currentPath}#${anchorId}`;
|
|
29955
|
-
return /* @__PURE__ */ jsxs(Heading, { level, id: anchorId, children: [
|
|
29956
|
-
headingLabel,
|
|
29957
|
-
/* @__PURE__ */ jsx("a", { href, id: anchorId, "aria-label": "Permalink for this section", children: "#" })
|
|
29958
|
-
] });
|
|
29959
|
-
}
|
|
29960
|
-
}
|
|
29961
|
-
return /* @__PURE__ */ jsx(Heading, { level, children: children2 });
|
|
29962
|
-
};
|
|
29963
29953
|
return /* @__PURE__ */ jsx("div", { className: styles$l.markdownContent, style: { ...style2 }, children: /* @__PURE__ */ jsx(
|
|
29964
29954
|
MarkdownHooks,
|
|
29965
29955
|
{
|
|
@@ -29982,22 +29972,22 @@ const Markdown = memo(function Markdown2({
|
|
|
29982
29972
|
}
|
|
29983
29973
|
},
|
|
29984
29974
|
h1({ children: children2 }) {
|
|
29985
|
-
return
|
|
29975
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h1", showHeadingAnchors, children: children2 });
|
|
29986
29976
|
},
|
|
29987
29977
|
h2({ children: children2 }) {
|
|
29988
|
-
return
|
|
29978
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h2", showHeadingAnchors, children: children2 });
|
|
29989
29979
|
},
|
|
29990
29980
|
h3({ children: children2 }) {
|
|
29991
|
-
return
|
|
29981
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h3", showHeadingAnchors, children: children2 });
|
|
29992
29982
|
},
|
|
29993
29983
|
h4({ children: children2 }) {
|
|
29994
|
-
return
|
|
29984
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h4", showHeadingAnchors, children: children2 });
|
|
29995
29985
|
},
|
|
29996
29986
|
h5({ children: children2 }) {
|
|
29997
|
-
return
|
|
29987
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h5", showHeadingAnchors, children: children2 });
|
|
29998
29988
|
},
|
|
29999
29989
|
h6({ children: children2 }) {
|
|
30000
|
-
return
|
|
29990
|
+
return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h6", showHeadingAnchors, children: children2 });
|
|
30001
29991
|
},
|
|
30002
29992
|
p({ id, children: children2 }) {
|
|
30003
29993
|
return /* @__PURE__ */ jsx(Text, { uid: id, variant: "markdown", children: children2 });
|
|
@@ -30108,33 +30098,6 @@ const Markdown = memo(function Markdown2({
|
|
|
30108
30098
|
}
|
|
30109
30099
|
) });
|
|
30110
30100
|
});
|
|
30111
|
-
function removeTextIndents(input2) {
|
|
30112
|
-
if (!input2) {
|
|
30113
|
-
return "";
|
|
30114
|
-
}
|
|
30115
|
-
const lines = input2.split("\n");
|
|
30116
|
-
const minIndent = lines.reduce((min, line) => {
|
|
30117
|
-
const match2 = line.match(/^\s*/);
|
|
30118
|
-
const indentLength = match2 ? match2[0].length : 0;
|
|
30119
|
-
return line.trim() ? Math.min(min, indentLength) : min;
|
|
30120
|
-
}, Infinity);
|
|
30121
|
-
const trimmedLines = lines.map(
|
|
30122
|
-
(line) => line.startsWith(" ".repeat(minIndent)) ? line.slice(minIndent) : line
|
|
30123
|
-
);
|
|
30124
|
-
return trimmedLines.join("\n");
|
|
30125
|
-
}
|
|
30126
|
-
function getCustomAnchor(value) {
|
|
30127
|
-
if (!value) {
|
|
30128
|
-
return ["", ""];
|
|
30129
|
-
}
|
|
30130
|
-
const match2 = value.match(/^(.*?)\s*\[#([^\]]+)\]$/);
|
|
30131
|
-
if (match2) {
|
|
30132
|
-
const headingLabel = match2[1].trim();
|
|
30133
|
-
const anchorId = match2[2].trim();
|
|
30134
|
-
return [headingLabel, anchorId];
|
|
30135
|
-
}
|
|
30136
|
-
return [value.trim(), ""];
|
|
30137
|
-
}
|
|
30138
30101
|
const HorizontalRule = () => {
|
|
30139
30102
|
return /* @__PURE__ */ jsx("hr", { className: styles$l.horizontalRule });
|
|
30140
30103
|
};
|
|
@@ -30202,6 +30165,83 @@ const Blockquote = ({ children, style: style2 }) => {
|
|
|
30202
30165
|
}
|
|
30203
30166
|
return /* @__PURE__ */ jsx("blockquote", { className: styles$l.blockquote, style: style2, children: /* @__PURE__ */ jsx("div", { className: styles$l.blockquoteContainer, children }) });
|
|
30204
30167
|
};
|
|
30168
|
+
function LinkAwareHeading({ children, level, showHeadingAnchors }) {
|
|
30169
|
+
let headingLabel = "";
|
|
30170
|
+
let anchorId = "";
|
|
30171
|
+
if (!children) return /* @__PURE__ */ jsx(Fragment, {});
|
|
30172
|
+
if (typeof children === "string") {
|
|
30173
|
+
[headingLabel, anchorId] = getCustomAnchor(children);
|
|
30174
|
+
} else if (Array.isArray(children)) {
|
|
30175
|
+
if (children.length === 0) return /* @__PURE__ */ jsx(Fragment, {});
|
|
30176
|
+
if (children.length === 1) {
|
|
30177
|
+
headingLabel = children[0];
|
|
30178
|
+
} else {
|
|
30179
|
+
headingLabel = children.slice(0, -1);
|
|
30180
|
+
const last = children[children.length - 1];
|
|
30181
|
+
if (typeof last === "string") {
|
|
30182
|
+
const match2 = last.trim().match(/^\[#([^\]]+)\]$/);
|
|
30183
|
+
if (match2 && match2.length > 0) {
|
|
30184
|
+
anchorId = match2[1];
|
|
30185
|
+
}
|
|
30186
|
+
}
|
|
30187
|
+
}
|
|
30188
|
+
} else {
|
|
30189
|
+
const headingContent = extractTextNodes(children);
|
|
30190
|
+
if (!headingContent) return /* @__PURE__ */ jsx(Fragment, {});
|
|
30191
|
+
headingLabel = children;
|
|
30192
|
+
}
|
|
30193
|
+
if (!anchorId) {
|
|
30194
|
+
anchorId = headingToAnchorLink(extractTextNodes(headingLabel));
|
|
30195
|
+
}
|
|
30196
|
+
const currentPath = window.location.href.replace(new RegExp("(?<!\\/)#.*$"), "");
|
|
30197
|
+
const href = `${currentPath}#${anchorId}`;
|
|
30198
|
+
return /* @__PURE__ */ jsxs(Heading, { level, id: anchorId, children: [
|
|
30199
|
+
headingLabel,
|
|
30200
|
+
showHeadingAnchors && anchorId && // NOTE: Anchor is hidden from screen readers
|
|
30201
|
+
// TODO: make sure this is a good idea
|
|
30202
|
+
/* @__PURE__ */ jsx("a", { href, id: anchorId, "aria-hidden": "true", children: "#" })
|
|
30203
|
+
] });
|
|
30204
|
+
}
|
|
30205
|
+
function removeTextIndents(input2) {
|
|
30206
|
+
if (!input2) {
|
|
30207
|
+
return "";
|
|
30208
|
+
}
|
|
30209
|
+
const lines = input2.split("\n");
|
|
30210
|
+
const minIndent = lines.reduce((min, line) => {
|
|
30211
|
+
const match2 = line.match(/^\s*/);
|
|
30212
|
+
const indentLength = match2 ? match2[0].length : 0;
|
|
30213
|
+
return line.trim() ? Math.min(min, indentLength) : min;
|
|
30214
|
+
}, Infinity);
|
|
30215
|
+
const trimmedLines = lines.map(
|
|
30216
|
+
(line) => line.startsWith(" ".repeat(minIndent)) ? line.slice(minIndent) : line
|
|
30217
|
+
);
|
|
30218
|
+
return trimmedLines.join("\n");
|
|
30219
|
+
}
|
|
30220
|
+
function getCustomAnchor(value) {
|
|
30221
|
+
if (!value) {
|
|
30222
|
+
return ["", ""];
|
|
30223
|
+
}
|
|
30224
|
+
const match2 = value.match(/^(.*?)\s*\[#([^\]]+)\]$/);
|
|
30225
|
+
if (match2) {
|
|
30226
|
+
const headingLabel = match2[1].trim();
|
|
30227
|
+
const anchorId = match2[2].trim();
|
|
30228
|
+
return [headingLabel, anchorId];
|
|
30229
|
+
}
|
|
30230
|
+
return [value.trim(), ""];
|
|
30231
|
+
}
|
|
30232
|
+
function headingToAnchorLink(rawStr) {
|
|
30233
|
+
return rawStr.trim().toLocaleLowerCase().replaceAll(/[^A-Za-z0-9-]/g, "-").replaceAll(/--+/g, "-").replace(/^-|-$/, "").replace(/`/g, "").replace(/"|'/g, "");
|
|
30234
|
+
}
|
|
30235
|
+
function extractTextNodes(node) {
|
|
30236
|
+
if (typeof node === "string" || typeof node === "number") return node.toString();
|
|
30237
|
+
if (React__default.isValidElement(node) && node.props && node.props.children) {
|
|
30238
|
+
if (Array.isArray(node.props.children)) {
|
|
30239
|
+
return node.props.children.map(extractTextNodes).join("");
|
|
30240
|
+
}
|
|
30241
|
+
return extractTextNodes(node.props.children);
|
|
30242
|
+
}
|
|
30243
|
+
return "";
|
|
30244
|
+
}
|
|
30205
30245
|
function parseBindingExpression(text2, extractValue) {
|
|
30206
30246
|
text2 = text2.replaceAll(new RegExp("(?<!\\\\)\\@\\{\\s*\\}", "g"), "");
|
|
30207
30247
|
const regex = new RegExp("(?<!\\\\)\\@\\{((?:[^{}]|\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\})*)\\}", "g");
|
|
@@ -30502,6 +30542,11 @@ const MarkdownMd = createMetadata({
|
|
|
30502
30542
|
description: "This boolean property specifies whether leading indents should be removed from the markdown content. If set to `true`, the shortest indent found at the start of the content lines is removed from the beginning of every line.",
|
|
30503
30543
|
valueType: "boolean",
|
|
30504
30544
|
defaultValue: true
|
|
30545
|
+
},
|
|
30546
|
+
showHeadingAnchors: {
|
|
30547
|
+
description: "This boolean property specifies whether heading anchors should be displayed. If set to `true`, heading anchors will be displayed on hover next to headings.",
|
|
30548
|
+
valueType: "boolean",
|
|
30549
|
+
defaultValue: false
|
|
30505
30550
|
}
|
|
30506
30551
|
},
|
|
30507
30552
|
defaultThemeVars: {
|
|
@@ -30565,6 +30610,7 @@ const markdownComponentRenderer = createComponentRenderer(
|
|
|
30565
30610
|
removeIndents: extractValue.asOptionalBoolean(node.props.removeIndents, true),
|
|
30566
30611
|
codeHighlighter: extractValue(node.props.codeHighlighter),
|
|
30567
30612
|
extractValue,
|
|
30613
|
+
showHeadingAnchors: extractValue.asOptionalBoolean(node.props.showHeadingAnchors, false),
|
|
30568
30614
|
children: renderedChildren
|
|
30569
30615
|
}
|
|
30570
30616
|
);
|
|
@@ -30575,7 +30621,8 @@ const TransformedMarkdown = ({
|
|
|
30575
30621
|
removeIndents,
|
|
30576
30622
|
style: style2,
|
|
30577
30623
|
extractValue,
|
|
30578
|
-
codeHighlighter
|
|
30624
|
+
codeHighlighter,
|
|
30625
|
+
showHeadingAnchors
|
|
30579
30626
|
}) => {
|
|
30580
30627
|
const markdownContent2 = useMemo(() => {
|
|
30581
30628
|
if (typeof children !== "string") {
|
|
@@ -30590,7 +30637,16 @@ const TransformedMarkdown = ({
|
|
|
30590
30637
|
resolvedMd = parseBindingExpression(resolvedMd, extractValue);
|
|
30591
30638
|
return resolvedMd;
|
|
30592
30639
|
}, [children, extractValue]);
|
|
30593
|
-
return /* @__PURE__ */ jsx(
|
|
30640
|
+
return /* @__PURE__ */ jsx(
|
|
30641
|
+
Markdown,
|
|
30642
|
+
{
|
|
30643
|
+
removeIndents,
|
|
30644
|
+
codeHighlighter,
|
|
30645
|
+
style: style2,
|
|
30646
|
+
showHeadingAnchors,
|
|
30647
|
+
children: markdownContent2
|
|
30648
|
+
}
|
|
30649
|
+
);
|
|
30594
30650
|
};
|
|
30595
30651
|
const COMP$u = "Select";
|
|
30596
30652
|
const SelectMd = createMetadata({
|
|
@@ -40345,7 +40401,7 @@ function IconProvider({ children }) {
|
|
|
40345
40401
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
40346
40402
|
] });
|
|
40347
40403
|
}
|
|
40348
|
-
const version = "0.9.
|
|
40404
|
+
const version = "0.9.37";
|
|
40349
40405
|
const miscellaneousUtils = {
|
|
40350
40406
|
capitalize,
|
|
40351
40407
|
pluralize: pluralize$1,
|