@landtrustinc/design-system 1.2.27-beta.6 → 1.2.27

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/index.d.ts CHANGED
@@ -589,13 +589,9 @@ declare const AIResponse: ({ title, showTitle, showDisclaimer, showHelpfulQuesti
589
589
 
590
590
  type ContactLandownerButtonProps = {
591
591
  /**
592
- * Listing ID for the property
592
+ * URL to navigate to when the button is clicked
593
593
  */
594
- listingId: string;
595
- /**
596
- * Slug for the property (e.g., "delore-place")
597
- */
598
- slug: string;
594
+ url: string;
599
595
  /**
600
596
  * Custom button text
601
597
  * @default "Contact Landowner"
package/dist/index.js CHANGED
@@ -4319,6 +4319,7 @@ var markdownContentStyles = import_react10.css`
4319
4319
  font-size: 0.75rem;
4320
4320
  border-radius: var(--radius-md);
4321
4321
  min-width: 100%;
4322
+ margin: var(--spacing-2) 0;
4322
4323
  }
4323
4324
  }
4324
4325
 
@@ -4328,6 +4329,7 @@ var markdownContentStyles = import_react10.css`
4328
4329
  border-bottom: 1px solid var(--border-primary);
4329
4330
  padding: var(--spacing-3);
4330
4331
  text-align: left;
4332
+ min-width: var(--spacing-24);
4331
4333
 
4332
4334
  &:last-child {
4333
4335
  border-right: none;
@@ -4335,7 +4337,6 @@ var markdownContentStyles = import_react10.css`
4335
4337
 
4336
4338
  @media (max-width: 768px) {
4337
4339
  padding: var(--spacing-2);
4338
- min-width: 120px;
4339
4340
  }
4340
4341
  }
4341
4342
 
@@ -4380,7 +4381,12 @@ var markdownContentStyles = import_react10.css`
4380
4381
  font-weight: 600;
4381
4382
  }
4382
4383
 
4383
- a {
4384
+ /* Scope link styles to prose content only, excluding component-based links */
4385
+ p a,
4386
+ li a,
4387
+ blockquote a,
4388
+ td a,
4389
+ th a {
4384
4390
  color: var(--color-primary-500);
4385
4391
  text-decoration: none;
4386
4392
 
@@ -4462,9 +4468,10 @@ var inlineCodeStyles = import_react10.css`
4462
4468
  font-size: 0.9em;
4463
4469
  `;
4464
4470
  var tableWrapperStyles = import_react10.css`
4471
+ overflow-x: auto;
4472
+ -webkit-overflow-scrolling: touch;
4473
+
4465
4474
  @media (max-width: 768px) {
4466
- overflow-x: auto;
4467
- -webkit-overflow-scrolling: touch;
4468
4475
  margin: var(--spacing-4) calc(-1 * var(--spacing-3));
4469
4476
  padding: 0 var(--spacing-3);
4470
4477
  }
@@ -4538,8 +4545,9 @@ var MarkdownContent = ({
4538
4545
  component: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
4539
4546
  Heading_default,
4540
4547
  {
4541
- size: "lg",
4548
+ size: "sm",
4542
4549
  as: "h1",
4550
+ fontWeight: "bold",
4543
4551
  css: {
4544
4552
  "&:not(:first-child)": { marginTop: "var(--spacing-6)" },
4545
4553
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4552,8 +4560,9 @@ var MarkdownContent = ({
4552
4560
  component: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
4553
4561
  Heading_default,
4554
4562
  {
4555
- size: "md",
4563
+ size: "xs",
4556
4564
  as: "h2",
4565
+ fontWeight: "bold",
4557
4566
  css: {
4558
4567
  "&:not(:first-child)": { marginTop: "var(--spacing-6)" },
4559
4568
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4566,8 +4575,9 @@ var MarkdownContent = ({
4566
4575
  component: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
4567
4576
  Heading_default,
4568
4577
  {
4569
- size: "sm",
4578
+ size: "2xs",
4570
4579
  as: "h3",
4580
+ fontWeight: "bold",
4571
4581
  css: {
4572
4582
  "&:not(:first-child)": { marginTop: "var(--spacing-5)" },
4573
4583
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4580,8 +4590,9 @@ var MarkdownContent = ({
4580
4590
  component: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
4581
4591
  Heading_default,
4582
4592
  {
4583
- size: "xs",
4593
+ size: "2xs",
4584
4594
  as: "h4",
4595
+ fontWeight: "bold",
4585
4596
  css: {
4586
4597
  "&:not(:first-child)": { marginTop: "var(--spacing-5)" },
4587
4598
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4596,6 +4607,7 @@ var MarkdownContent = ({
4596
4607
  {
4597
4608
  size: "2xs",
4598
4609
  as: "h5",
4610
+ fontWeight: "bold",
4599
4611
  css: {
4600
4612
  "&:not(:first-child)": { marginTop: "var(--spacing-5)" },
4601
4613
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4610,6 +4622,7 @@ var MarkdownContent = ({
4610
4622
  {
4611
4623
  size: "2xs",
4612
4624
  as: "h6",
4625
+ fontWeight: "bold",
4613
4626
  css: {
4614
4627
  "&:not(:first-child)": { marginTop: "var(--spacing-5)" },
4615
4628
  "& + *": { marginTop: "var(--spacing-3)" }
@@ -4704,13 +4717,11 @@ var errorRetryStyles = import_react12.css`
4704
4717
  // src/AIResponse/components/ContactLandownerButton/ContactLandownerButton.tsx
4705
4718
  var import_jsx_runtime214 = require("@emotion/react/jsx-runtime");
4706
4719
  var ContactLandownerButton = ({
4707
- listingId,
4708
- slug,
4720
+ url,
4709
4721
  buttonText = "Contact Landowner",
4710
4722
  className
4711
4723
  }) => {
4712
- const url = `/l/${slug}/${listingId}/inquiry/activity`;
4713
- return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
4724
+ return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Box_default, { marginTop: "var(--spacing-4)", children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
4714
4725
  Button_default,
4715
4726
  {
4716
4727
  variant: "primary",
@@ -4718,15 +4729,9 @@ var ContactLandownerButton = ({
4718
4729
  as: "a",
4719
4730
  href: url,
4720
4731
  className,
4721
- style: {
4722
- alignSelf: "flex-start",
4723
- marginTop: "var(--spacing-4)",
4724
- textDecoration: "none",
4725
- color: "var(--text-on-action)"
4726
- },
4727
4732
  children: buttonText
4728
4733
  }
4729
- );
4734
+ ) });
4730
4735
  };
4731
4736
 
4732
4737
  // src/AIResponse/components/TopMatchingFieldNote/TopMatchingFieldNote.styles.ts
@@ -5937,7 +5942,6 @@ var ChatWidget = ({
5937
5942
  const scrollRef = (0, import_react30.useRef)(null);
5938
5943
  const savedScrollPosition = (0, import_react30.useRef)(0);
5939
5944
  const previousMessagesLength = (0, import_react30.useRef)(messages.length);
5940
- const lastUserMessageRef = (0, import_react30.useRef)(null);
5941
5945
  const isControlled = typeof expanded === "boolean";
5942
5946
  const [internalExpanded, setInternalExpanded] = (0, import_react30.useState)(defaultExpanded);
5943
5947
  const isExpanded = isControlled ? expanded : internalExpanded;
@@ -5963,61 +5967,32 @@ var ChatWidget = ({
5963
5967
  });
5964
5968
  }, [isExpanded]);
5965
5969
  (0, import_react30.useEffect)(() => {
5966
- if (!isExpanded)
5970
+ const el = scrollRef.current;
5971
+ if (!el || !isExpanded)
5967
5972
  return;
5968
5973
  const messagesChanged = messages.length !== previousMessagesLength.current;
5969
5974
  previousMessagesLength.current = messages.length;
5970
- if (messagesChanged && messages.length > 0) {
5971
- const lastMessage = messages[messages.length - 1];
5972
- const lastMessageElement = lastMessage;
5973
- const isUserMessage = lastMessageElement.type === MessageBubble_default;
5974
- if (isUserMessage && lastUserMessageRef.current) {
5975
- requestAnimationFrame(() => {
5976
- var _a;
5977
- (_a = lastUserMessageRef.current) == null ? void 0 : _a.scrollIntoView({
5978
- behavior: "smooth",
5979
- block: "start"
5980
- });
5981
- });
5982
- }
5975
+ if (messagesChanged || isThinking) {
5976
+ requestAnimationFrame(() => {
5977
+ el.scrollTo({ top: el.scrollHeight, behavior: "smooth" });
5978
+ savedScrollPosition.current = el.scrollHeight;
5979
+ });
5983
5980
  }
5984
- }, [messages, isExpanded]);
5981
+ }, [messages, isThinking, isExpanded]);
5985
5982
  const messagesToRender = messages.length === 0 ? emptyState : messages;
5986
- const lastUserMessageIndex = (0, import_react30.useMemo)(() => {
5987
- for (let i = messagesToRender.length - 1; i >= 0; i--) {
5988
- const message = messagesToRender[i];
5989
- if (message && message.type === MessageBubble_default) {
5990
- return i;
5991
- }
5992
- }
5993
- return -1;
5994
- }, [messagesToRender]);
5995
5983
  const renderedMessages = (0, import_react30.useMemo)(
5996
5984
  () => messagesToRender.map((element, index) => {
5997
5985
  var _a;
5998
5986
  const key = (_a = element.key) != null ? _a : index;
5999
- const isLastUserMessage = index === lastUserMessageIndex;
6000
5987
  if (element.type === AIResponse_default) {
6001
5988
  return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: element }, key);
6002
5989
  }
6003
5990
  if (element.type === MessageBubble_default) {
6004
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6005
- Box_default,
6006
- {
6007
- css: sentWrapperStyles,
6008
- ref: isLastUserMessage ? lastUserMessageRef : null,
6009
- style: {
6010
- scrollMarginTop: "16px"
6011
- // Add padding above when scrolled to
6012
- },
6013
- children: element
6014
- },
6015
- key
6016
- );
5991
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: sentWrapperStyles, children: element }, key);
6017
5992
  }
6018
5993
  return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_react30.default.Fragment, { children: element }, key);
6019
5994
  }),
6020
- [messagesToRender, lastUserMessageIndex]
5995
+ [messagesToRender]
6021
5996
  );
6022
5997
  const handleSubmit = () => {
6023
5998
  const trimmed = value.trim();