xmlui 0.9.36 → 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.
@@ -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-BmTqBdiA.mjs";
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";
@@ -7390,35 +7390,35 @@ const h6ComponentRenderer = createComponentRenderer(
7390
7390
  }
7391
7391
  );
7392
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)"}'`;
7393
- const text = "_text_1qfdf_13";
7394
- const markdown = "_markdown_1qfdf_75";
7395
- const abbr = "_abbr_1qfdf_132";
7396
- const cite = "_cite_1qfdf_189";
7397
- const em = "_em_1qfdf_246";
7398
- const codefence = "_codefence_1qfdf_303";
7399
- const code = "_code_1qfdf_303";
7400
- const textcode = "_textcode_1qfdf_308";
7401
- const deleted = "_deleted_1qfdf_457";
7402
- const inserted = "_inserted_1qfdf_529";
7403
- const keyboard = "_keyboard_1qfdf_601";
7404
- const marked = "_marked_1qfdf_658";
7405
- const mono = "_mono_1qfdf_730";
7406
- const sample = "_sample_1qfdf_787";
7407
- const sup = "_sup_1qfdf_844";
7408
- const sub = "_sub_1qfdf_901";
7409
- const title$3 = "_title_1qfdf_1015";
7410
- const subtitle = "_subtitle_1qfdf_1072";
7411
- const small = "_small_1qfdf_1129";
7412
- const caption$1 = "_caption_1qfdf_1186";
7413
- const placeholder$2 = "_placeholder_1qfdf_1243";
7414
- const paragraph = "_paragraph_1qfdf_1300";
7415
- const subheading = "_subheading_1qfdf_1357";
7416
- const tableheading = "_tableheading_1qfdf_1414";
7417
- const secondary = "_secondary_1qfdf_1471";
7418
- const strong = "_strong_1qfdf_1528";
7419
- const truncateOverflow = "_truncateOverflow_1qfdf_1536";
7420
- const preserveLinebreaks = "_preserveLinebreaks_1qfdf_1543";
7421
- const noEllipsis = "_noEllipsis_1qfdf_1547";
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";
7422
7422
  const styles$R = {
7423
7423
  themeVars: themeVars$B,
7424
7424
  text,
@@ -7437,7 +7437,7 @@ const styles$R = {
7437
7437
  sample,
7438
7438
  sup,
7439
7439
  sub,
7440
- "var": "_var_1qfdf_958",
7440
+ "var": "_var_a71fu_957",
7441
7441
  title: title$3,
7442
7442
  subtitle,
7443
7443
  small,
@@ -7530,6 +7530,7 @@ const TextMd = createMetadata({
7530
7530
  [`textColor-${COMP$18}`]: "$textColor-primary",
7531
7531
  [`fontFamily-${COMP$18}`]: "$fontFamily",
7532
7532
  [`fontWeight-${COMP$18}`]: "$fontWeight-normal",
7533
+ [`fontSize-${COMP$18}-codefence`]: "$fontSize-small",
7533
7534
  [`fontFamily-${COMP$18}-code`]: "$fontFamily-monospace",
7534
7535
  [`fontSize-${COMP$18}-code`]: "$fontSize-small",
7535
7536
  [`borderWidth-${COMP$18}-code`]: "1px",
@@ -21042,7 +21043,7 @@ const navGroupComponentRenderer = createComponentRenderer(
21042
21043
  to: extractValue.asOptionalString(node.props.to),
21043
21044
  icon: /* @__PURE__ */ jsx(Icon, { name: extractValue.asString(node.props.icon), className: navLinkStyles.icon }),
21044
21045
  node,
21045
- initiallyExpanded: extractValue.asBoolean(node.props.initiallyExpanded),
21046
+ initiallyExpanded: extractValue.asOptionalBoolean(node.props.initiallyExpanded),
21046
21047
  renderChild: renderChild2,
21047
21048
  iconHorizontalExpanded: extractValue.asOptionalString(node.props.iconHorizontalExpanded),
21048
21049
  iconVerticalExpanded: extractValue.asOptionalString(node.props.iconVerticalExpanded),
@@ -21706,7 +21707,7 @@ function ApiInterceptorProvider({
21706
21707
  let interceptorWorker;
21707
21708
  (async () => {
21708
21709
  if (process.env.VITE_MOCK_ENABLED) {
21709
- const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-CWN1iwsH.mjs");
21710
+ const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-5JLbCSKz.mjs");
21710
21711
  if (interceptor) {
21711
21712
  interceptorWorker = await createApiInterceptorWorker(interceptor, apiWorker);
21712
21713
  if (!apiWorker) {
@@ -29942,26 +29943,13 @@ const Markdown = memo(function Markdown2({
29942
29943
  removeIndents = true,
29943
29944
  children,
29944
29945
  style: style2,
29945
- codeHighlighter
29946
+ codeHighlighter,
29947
+ showHeadingAnchors = false
29946
29948
  }) {
29947
29949
  if (typeof children !== "string") {
29948
29950
  return null;
29949
29951
  }
29950
29952
  children = removeIndents ? removeTextIndents(children) : children;
29951
- const renderHeading2 = (level, children2) => {
29952
- if (typeof children2 === "string") {
29953
- const [headingLabel, anchorId] = getCustomAnchor(children2);
29954
- if (anchorId) {
29955
- const currentPath = window.location.href.replace(new RegExp("(?<!\\/)#.*$"), "");
29956
- const href = `${currentPath}#${anchorId}`;
29957
- return /* @__PURE__ */ jsxs(Heading, { level, id: anchorId, children: [
29958
- headingLabel,
29959
- /* @__PURE__ */ jsx("a", { href, id: anchorId, "aria-label": "Permalink for this section", children: "#" })
29960
- ] });
29961
- }
29962
- }
29963
- return /* @__PURE__ */ jsx(Heading, { level, children: children2 });
29964
- };
29965
29953
  return /* @__PURE__ */ jsx("div", { className: styles$l.markdownContent, style: { ...style2 }, children: /* @__PURE__ */ jsx(
29966
29954
  MarkdownHooks,
29967
29955
  {
@@ -29984,22 +29972,22 @@ const Markdown = memo(function Markdown2({
29984
29972
  }
29985
29973
  },
29986
29974
  h1({ children: children2 }) {
29987
- return renderHeading2("h1", children2);
29975
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h1", showHeadingAnchors, children: children2 });
29988
29976
  },
29989
29977
  h2({ children: children2 }) {
29990
- return renderHeading2("h2", children2);
29978
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h2", showHeadingAnchors, children: children2 });
29991
29979
  },
29992
29980
  h3({ children: children2 }) {
29993
- return renderHeading2("h3", children2);
29981
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h3", showHeadingAnchors, children: children2 });
29994
29982
  },
29995
29983
  h4({ children: children2 }) {
29996
- return renderHeading2("h4", children2);
29984
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h4", showHeadingAnchors, children: children2 });
29997
29985
  },
29998
29986
  h5({ children: children2 }) {
29999
- return renderHeading2("h5", children2);
29987
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h5", showHeadingAnchors, children: children2 });
30000
29988
  },
30001
29989
  h6({ children: children2 }) {
30002
- return renderHeading2("h6", children2);
29990
+ return /* @__PURE__ */ jsx(LinkAwareHeading, { level: "h6", showHeadingAnchors, children: children2 });
30003
29991
  },
30004
29992
  p({ id, children: children2 }) {
30005
29993
  return /* @__PURE__ */ jsx(Text, { uid: id, variant: "markdown", children: children2 });
@@ -30110,33 +30098,6 @@ const Markdown = memo(function Markdown2({
30110
30098
  }
30111
30099
  ) });
30112
30100
  });
30113
- function removeTextIndents(input2) {
30114
- if (!input2) {
30115
- return "";
30116
- }
30117
- const lines = input2.split("\n");
30118
- const minIndent = lines.reduce((min, line) => {
30119
- const match2 = line.match(/^\s*/);
30120
- const indentLength = match2 ? match2[0].length : 0;
30121
- return line.trim() ? Math.min(min, indentLength) : min;
30122
- }, Infinity);
30123
- const trimmedLines = lines.map(
30124
- (line) => line.startsWith(" ".repeat(minIndent)) ? line.slice(minIndent) : line
30125
- );
30126
- return trimmedLines.join("\n");
30127
- }
30128
- function getCustomAnchor(value) {
30129
- if (!value) {
30130
- return ["", ""];
30131
- }
30132
- const match2 = value.match(/^(.*?)\s*\[#([^\]]+)\]$/);
30133
- if (match2) {
30134
- const headingLabel = match2[1].trim();
30135
- const anchorId = match2[2].trim();
30136
- return [headingLabel, anchorId];
30137
- }
30138
- return [value.trim(), ""];
30139
- }
30140
30101
  const HorizontalRule = () => {
30141
30102
  return /* @__PURE__ */ jsx("hr", { className: styles$l.horizontalRule });
30142
30103
  };
@@ -30204,6 +30165,83 @@ const Blockquote = ({ children, style: style2 }) => {
30204
30165
  }
30205
30166
  return /* @__PURE__ */ jsx("blockquote", { className: styles$l.blockquote, style: style2, children: /* @__PURE__ */ jsx("div", { className: styles$l.blockquoteContainer, children }) });
30206
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
+ }
30207
30245
  function parseBindingExpression(text2, extractValue) {
30208
30246
  text2 = text2.replaceAll(new RegExp("(?<!\\\\)\\@\\{\\s*\\}", "g"), "");
30209
30247
  const regex = new RegExp("(?<!\\\\)\\@\\{((?:[^{}]|\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\})*)\\}", "g");
@@ -30504,6 +30542,11 @@ const MarkdownMd = createMetadata({
30504
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.",
30505
30543
  valueType: "boolean",
30506
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
30507
30550
  }
30508
30551
  },
30509
30552
  defaultThemeVars: {
@@ -30567,6 +30610,7 @@ const markdownComponentRenderer = createComponentRenderer(
30567
30610
  removeIndents: extractValue.asOptionalBoolean(node.props.removeIndents, true),
30568
30611
  codeHighlighter: extractValue(node.props.codeHighlighter),
30569
30612
  extractValue,
30613
+ showHeadingAnchors: extractValue.asOptionalBoolean(node.props.showHeadingAnchors, false),
30570
30614
  children: renderedChildren
30571
30615
  }
30572
30616
  );
@@ -30577,7 +30621,8 @@ const TransformedMarkdown = ({
30577
30621
  removeIndents,
30578
30622
  style: style2,
30579
30623
  extractValue,
30580
- codeHighlighter
30624
+ codeHighlighter,
30625
+ showHeadingAnchors
30581
30626
  }) => {
30582
30627
  const markdownContent2 = useMemo(() => {
30583
30628
  if (typeof children !== "string") {
@@ -30592,7 +30637,16 @@ const TransformedMarkdown = ({
30592
30637
  resolvedMd = parseBindingExpression(resolvedMd, extractValue);
30593
30638
  return resolvedMd;
30594
30639
  }, [children, extractValue]);
30595
- return /* @__PURE__ */ jsx(Markdown, { removeIndents, codeHighlighter, style: style2, children: markdownContent2 });
30640
+ return /* @__PURE__ */ jsx(
30641
+ Markdown,
30642
+ {
30643
+ removeIndents,
30644
+ codeHighlighter,
30645
+ style: style2,
30646
+ showHeadingAnchors,
30647
+ children: markdownContent2
30648
+ }
30649
+ );
30596
30650
  };
30597
30651
  const COMP$u = "Select";
30598
30652
  const SelectMd = createMetadata({
@@ -40347,7 +40401,7 @@ function IconProvider({ children }) {
40347
40401
  /* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
40348
40402
  ] });
40349
40403
  }
40350
- const version = "0.9.36";
40404
+ const version = "0.9.37";
40351
40405
  const miscellaneousUtils = {
40352
40406
  capitalize,
40353
40407
  pluralize: pluralize$1,