@loafmarkets/ui 0.1.418 → 0.1.420

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.mts CHANGED
@@ -1078,8 +1078,11 @@ type PropertyDocumentsProps = {
1078
1078
  documentsData?: DocumentsResponse | null;
1079
1079
  highlightDocument?: string | null;
1080
1080
  onClearHighlight?: () => void;
1081
+ /** Pre-licence compliance mode: EVERY document (backend + hardcoded) renders
1082
+ as a greyed Coming Soon row — no links, no preview. */
1083
+ forceComingSoon?: boolean;
1081
1084
  };
1082
- declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
1085
+ declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
1083
1086
 
1084
1087
  type InspectionSlot = {
1085
1088
  slotId: string;
package/dist/index.d.ts CHANGED
@@ -1078,8 +1078,11 @@ type PropertyDocumentsProps = {
1078
1078
  documentsData?: DocumentsResponse | null;
1079
1079
  highlightDocument?: string | null;
1080
1080
  onClearHighlight?: () => void;
1081
+ /** Pre-licence compliance mode: EVERY document (backend + hardcoded) renders
1082
+ as a greyed Coming Soon row — no links, no preview. */
1083
+ forceComingSoon?: boolean;
1081
1084
  };
1082
- declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
1085
+ declare function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }: PropertyDocumentsProps): react_jsx_runtime.JSX.Element;
1083
1086
 
1084
1087
  type InspectionSlot = {
1085
1088
  slotId: string;
package/dist/index.js CHANGED
@@ -1844,27 +1844,6 @@ function TradeRow({
1844
1844
  }
1845
1845
  );
1846
1846
  }
1847
- function BreadSliceGlyph() {
1848
- return /* @__PURE__ */ jsxRuntime.jsx(
1849
- "svg",
1850
- {
1851
- width: "10",
1852
- height: "10",
1853
- viewBox: "0 0 10 10",
1854
- "aria-hidden": "true",
1855
- style: { display: "block", filter: "drop-shadow(0 0 4px rgba(201,162,39,0.6))" },
1856
- children: /* @__PURE__ */ jsxRuntime.jsx(
1857
- "path",
1858
- {
1859
- d: "M1 4.2 C1 1.9 2.7 1 5 1 C7.3 1 9 1.9 9 4.2 L9 8.2 C9 8.6 8.6 9 8.2 9 L1.8 9 C1.4 9 1 8.6 1 8.2 Z",
1860
- fill: "none",
1861
- stroke: "#C9A227",
1862
- strokeWidth: "1.3"
1863
- }
1864
- )
1865
- }
1866
- );
1867
- }
1868
1847
  function DepthRow({
1869
1848
  side,
1870
1849
  price,
@@ -1915,8 +1894,7 @@ function DepthRow({
1915
1894
  "span",
1916
1895
  {
1917
1896
  "aria-label": "Your order at this price",
1918
- className: "absolute left-0 top-1/2 -translate-y-1/2 z-[2]",
1919
- children: /* @__PURE__ */ jsxRuntime.jsx(BreadSliceGlyph, {})
1897
+ className: "absolute left-0 top-1/2 -translate-y-1/2 z-[2] h-[6px] w-[6px] rounded-full bg-[#C9A227] shadow-[0_0_6px_rgba(201,162,39,0.7)]"
1920
1898
  }
1921
1899
  ) : null,
1922
1900
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cell": "price", className: cn("relative z-[1] tabular-nums", isAsk ? "text-[#f6465d]" : "text-[#0ecb81]"), children: [
@@ -2862,12 +2840,16 @@ function MobileDepthRow({
2862
2840
  left: "2px",
2863
2841
  top: "50%",
2864
2842
  transform: "translateY(-50%)",
2843
+ width: "6px",
2844
+ height: "6px",
2845
+ borderRadius: "50%",
2846
+ backgroundColor: "#C9A227",
2847
+ boxShadow: "0 0 6px rgba(201,162,39,0.7)",
2865
2848
  zIndex: 2
2866
- },
2867
- children: /* @__PURE__ */ jsxRuntime.jsx(BreadSliceGlyph, {})
2849
+ }
2868
2850
  }
2869
2851
  ) : null,
2870
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", zIndex: 1, color: isAsk ? "#f6465d" : "#0ecb81", paddingLeft: hasUserOrder ? "14px" : void 0 }, children: [
2852
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", zIndex: 1, color: isAsk ? "#f6465d" : "#0ecb81", paddingLeft: hasUserOrder ? "10px" : void 0 }, children: [
2871
2853
  "$",
2872
2854
  formatNumber(price, precision)
2873
2855
  ] }),
@@ -13318,18 +13300,19 @@ var COMING_SOON_TITLES = [
13318
13300
  "Annual Financial Statements",
13319
13301
  "Risk Disclosure Statement"
13320
13302
  ];
13321
- function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight }) {
13303
+ function PropertyDocuments({ documentsData, highlightDocument, onClearHighlight, forceComingSoon }) {
13322
13304
  const highlightRef = React9.useRef(null);
13323
13305
  const [previewUrl, setPreviewUrl] = React9.useState(null);
13324
13306
  const [previewTitle, setPreviewTitle] = React9.useState(null);
13325
13307
  const backendDocuments = Array.isArray(documentsData?.documents) ? documentsData.documents : [];
13326
- const liveDocs = backendDocuments.filter(
13308
+ const liveDocs = forceComingSoon ? [] : backendDocuments.filter(
13327
13309
  (d) => Boolean(d.documentUrl) && isSafeUrl(d.documentUrl) && LIVE_TITLE_PATTERNS.some((rx) => rx.test(d.title))
13328
13310
  );
13311
+ const visibleBackendDocs = forceComingSoon ? backendDocuments.map((d) => ({ title: d.title, documentUrl: "" })) : liveDocs;
13329
13312
  const comingSoonDocs = COMING_SOON_TITLES.filter(
13330
- (title) => !liveDocs.some((d) => d.title.toLowerCase().includes(title.toLowerCase()) || title.toLowerCase().includes(d.title.toLowerCase()))
13313
+ (title) => !visibleBackendDocs.some((d) => d.title.toLowerCase().includes(title.toLowerCase()) || title.toLowerCase().includes(d.title.toLowerCase()))
13331
13314
  ).map((title) => ({ title, documentUrl: "" }));
13332
- const documents = [...liveDocs, ...comingSoonDocs];
13315
+ const documents = [...visibleBackendDocs, ...comingSoonDocs];
13333
13316
  const activeUrl = previewUrl ?? (liveDocs[0]?.documentUrl || null);
13334
13317
  const activeTitle = previewUrl ? previewTitle : liveDocs[0]?.title || null;
13335
13318
  const selectPreview = (doc) => {