@liberfi.io/ui-predict 0.1.139 → 0.1.141

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
@@ -13,7 +13,7 @@ declare global {
13
13
  };
14
14
  }
15
15
  }
16
- declare const _default: "0.1.139";
16
+ declare const _default: "0.1.141";
17
17
 
18
18
  /**
19
19
  * A single category entry in the static navigation model.
@@ -250,8 +250,16 @@ interface EventDetailPageProps {
250
250
  onSimilarEventHover?: (event: PredictEvent) => void;
251
251
  /** Navigation callback — if provided, a "Back" button is shown at the top. */
252
252
  onBack?: () => void;
253
+ /**
254
+ * Custom render for the user activity section (positions / orders / history).
255
+ * When provided, replaces the built-in `UserActivitySection`.
256
+ */
257
+ renderActivitySection?: (props: {
258
+ event: PredictEvent;
259
+ walletAddress?: string;
260
+ }) => React.ReactNode;
253
261
  }
254
- declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
262
+ declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, renderActivitySection, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
255
263
 
256
264
  type TradeOutcome = "yes" | "no";
257
265
  type TradeSide = "buy" | "sell";
@@ -278,7 +286,13 @@ declare function floorToDecimals(value: number, decimals: number): number;
278
286
  declare function parsePolymarketError(raw: string, t: (...args: any[]) => string, side?: "buy" | "sell"): string;
279
287
  /**
280
288
  * Format a share count for display: floor-truncate to the given number of
281
- * decimal places (default 4) and strip trailing zeros.
289
+ * decimal places and strip trailing zeros.
290
+ *
291
+ * Default is 2, matching the official Polymarket CLOB client where
292
+ * `ROUNDING_CONFIG[tickSize].size` is always 2 for all tick sizes.
293
+ * DFlow/Kalshi uses 0 decimals, so 2 is a safe upper bound for both.
294
+ *
295
+ * @see https://github.com/Polymarket/clob-client/blob/main/src/order-builder/helpers.ts
282
296
  */
283
297
  declare function formatShares(size: number, maxDecimals?: number): string;
284
298
  declare function fireCelebration(): void;
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ declare global {
13
13
  };
14
14
  }
15
15
  }
16
- declare const _default: "0.1.139";
16
+ declare const _default: "0.1.141";
17
17
 
18
18
  /**
19
19
  * A single category entry in the static navigation model.
@@ -250,8 +250,16 @@ interface EventDetailPageProps {
250
250
  onSimilarEventHover?: (event: PredictEvent) => void;
251
251
  /** Navigation callback — if provided, a "Back" button is shown at the top. */
252
252
  onBack?: () => void;
253
+ /**
254
+ * Custom render for the user activity section (positions / orders / history).
255
+ * When provided, replaces the built-in `UserActivitySection`.
256
+ */
257
+ renderActivitySection?: (props: {
258
+ event: PredictEvent;
259
+ walletAddress?: string;
260
+ }) => React.ReactNode;
253
261
  }
254
- declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
262
+ declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, renderActivitySection, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
255
263
 
256
264
  type TradeOutcome = "yes" | "no";
257
265
  type TradeSide = "buy" | "sell";
@@ -278,7 +286,13 @@ declare function floorToDecimals(value: number, decimals: number): number;
278
286
  declare function parsePolymarketError(raw: string, t: (...args: any[]) => string, side?: "buy" | "sell"): string;
279
287
  /**
280
288
  * Format a share count for display: floor-truncate to the given number of
281
- * decimal places (default 4) and strip trailing zeros.
289
+ * decimal places and strip trailing zeros.
290
+ *
291
+ * Default is 2, matching the official Polymarket CLOB client where
292
+ * `ROUNDING_CONFIG[tickSize].size` is always 2 for all tick sizes.
293
+ * DFlow/Kalshi uses 0 decimals, so 2 is a safe upper bound for both.
294
+ *
295
+ * @see https://github.com/Polymarket/clob-client/blob/main/src/order-builder/helpers.ts
282
296
  */
283
297
  declare function formatShares(size: number, maxDecimals?: number): string;
284
298
  declare function fireCelebration(): void;