@landtrustinc/design-system 1.2.29 → 1.2.30-beta.0
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 +15 -0
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1113,6 +1113,21 @@ type TopMatchingFieldNoteProps = {
|
|
|
1113
1113
|
* Children content (used when rendering from markdown)
|
|
1114
1114
|
*/
|
|
1115
1115
|
children?: React__default.ReactNode;
|
|
1116
|
+
/**
|
|
1117
|
+
* Whether to use Bytescale image optimization
|
|
1118
|
+
* @default true
|
|
1119
|
+
*/
|
|
1120
|
+
isBytescaleImage?: boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* Image width for Bytescale optimization
|
|
1123
|
+
* @default 376
|
|
1124
|
+
*/
|
|
1125
|
+
width?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* Image height for Bytescale optimization
|
|
1128
|
+
* @default 275
|
|
1129
|
+
*/
|
|
1130
|
+
height?: number;
|
|
1116
1131
|
};
|
|
1117
1132
|
declare const TopMatchingFieldNote: FC<TopMatchingFieldNoteProps>;
|
|
1118
1133
|
|
package/dist/index.js
CHANGED
|
@@ -5230,6 +5230,13 @@ var imageStyles = import_react17.css`
|
|
|
5230
5230
|
|
|
5231
5231
|
// src/AIResponse/components/TopMatchingFieldNote/TopMatchingFieldNote.tsx
|
|
5232
5232
|
var import_jsx_runtime217 = require("@emotion/react/jsx-runtime");
|
|
5233
|
+
var BYTESCALE_ACCOUNT_ID = "12a1yC2";
|
|
5234
|
+
var getImageUrl = (path, width2, height, useBytescale) => {
|
|
5235
|
+
if (useBytescale) {
|
|
5236
|
+
return `https://upcdn.io/${BYTESCALE_ACCOUNT_ID}/image${path}?w=${width2}&h=${height}&f=auto&cache_perm=auto&cache_ttl=31536000`;
|
|
5237
|
+
}
|
|
5238
|
+
return path;
|
|
5239
|
+
};
|
|
5233
5240
|
var TopMatchingFieldNote = ({
|
|
5234
5241
|
author,
|
|
5235
5242
|
datePosted,
|
|
@@ -5237,7 +5244,10 @@ var TopMatchingFieldNote = ({
|
|
|
5237
5244
|
images,
|
|
5238
5245
|
title = "Top matching field note",
|
|
5239
5246
|
className,
|
|
5240
|
-
children
|
|
5247
|
+
children,
|
|
5248
|
+
isBytescaleImage = true,
|
|
5249
|
+
width: width2 = 376,
|
|
5250
|
+
height = 275
|
|
5241
5251
|
}) => {
|
|
5242
5252
|
let parsedImages = [];
|
|
5243
5253
|
try {
|
|
@@ -5271,12 +5281,12 @@ var TopMatchingFieldNote = ({
|
|
|
5271
5281
|
className,
|
|
5272
5282
|
children: [
|
|
5273
5283
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Text_default, { size: "md", color: "var(--text-primary)", children: displayContent }),
|
|
5274
|
-
parsedImages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
5284
|
+
parsedImages.length > 0 && parsedImages[0] && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
5275
5285
|
"div",
|
|
5276
5286
|
{
|
|
5277
5287
|
css: imageStyles,
|
|
5278
5288
|
style: {
|
|
5279
|
-
backgroundImage: `url('${parsedImages[0]}')`
|
|
5289
|
+
backgroundImage: `url('${getImageUrl(parsedImages[0], width2, height, isBytescaleImage)}')`
|
|
5280
5290
|
}
|
|
5281
5291
|
}
|
|
5282
5292
|
),
|