@agg-build/ui 4.13.2 → 4.14.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.
@@ -2489,12 +2489,16 @@ var PaperTradingBadge = ({
2489
2489
  placement = "chip",
2490
2490
  isAuthenticated = false,
2491
2491
  forceVisible = false,
2492
+ label,
2493
+ showWhenAuthenticated = false,
2492
2494
  classNames
2493
2495
  }) => {
2494
2496
  const labels = useLabels15();
2495
2497
  const { isPaperMode, isResolving } = useResolvedExecutionMode();
2496
2498
  if (!forceVisible && (isResolving || !isPaperMode)) return null;
2497
- if (placement === "brand" && isAuthenticated && !forceVisible) return null;
2499
+ if (placement === "brand" && isAuthenticated && !forceVisible && !showWhenAuthenticated) {
2500
+ return null;
2501
+ }
2498
2502
  const placementClassName = {
2499
2503
  brand: "inline-flex md:hidden",
2500
2504
  chip: "inline-flex",
@@ -2538,7 +2542,7 @@ var PaperTradingBadge = ({
2538
2542
  "text-[10px] leading-[14px] font-agg-bold uppercase whitespace-nowrap",
2539
2543
  classNames == null ? void 0 : classNames.pill
2540
2544
  ),
2541
- children: labels.paperTrading.badge
2545
+ children: label != null ? label : labels.paperTrading.badge
2542
2546
  }
2543
2547
  )
2544
2548
  }
package/dist/index.js CHANGED
@@ -11133,12 +11133,16 @@ var PaperTradingBadge = ({
11133
11133
  placement = "chip",
11134
11134
  isAuthenticated = false,
11135
11135
  forceVisible = false,
11136
+ label: label2,
11137
+ showWhenAuthenticated = false,
11136
11138
  classNames
11137
11139
  }) => {
11138
11140
  const labels = (0, import_hooks41.useLabels)();
11139
11141
  const { isPaperMode, isResolving } = (0, import_hooks41.useResolvedExecutionMode)();
11140
11142
  if (!forceVisible && (isResolving || !isPaperMode)) return null;
11141
- if (placement === "brand" && isAuthenticated && !forceVisible) return null;
11143
+ if (placement === "brand" && isAuthenticated && !forceVisible && !showWhenAuthenticated) {
11144
+ return null;
11145
+ }
11142
11146
  const placementClassName = {
11143
11147
  brand: "inline-flex md:hidden",
11144
11148
  chip: "inline-flex",
@@ -11182,7 +11186,7 @@ var PaperTradingBadge = ({
11182
11186
  "text-[10px] leading-[14px] font-agg-bold uppercase whitespace-nowrap",
11183
11187
  classNames == null ? void 0 : classNames.pill
11184
11188
  ),
11185
- children: labels.paperTrading.badge
11189
+ children: label2 != null ? label2 : labels.paperTrading.badge
11186
11190
  }
11187
11191
  )
11188
11192
  }
package/dist/index.mjs CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  buildTerminalSummary,
46
46
  clearPendingCardSession,
47
47
  getPendingCardSession
48
- } from "./chunk-UVJ5FBZF.mjs";
48
+ } from "./chunk-Z4WWOHDT.mjs";
49
49
  import {
50
50
  AggNotificationEventsProvider,
51
51
  DEPOSIT_MODAL_OPEN_EVENT,
package/dist/modals.js CHANGED
@@ -9331,12 +9331,16 @@ var PaperTradingBadge = ({
9331
9331
  placement = "chip",
9332
9332
  isAuthenticated = false,
9333
9333
  forceVisible = false,
9334
+ label: label2,
9335
+ showWhenAuthenticated = false,
9334
9336
  classNames
9335
9337
  }) => {
9336
9338
  const labels = (0, import_hooks41.useLabels)();
9337
9339
  const { isPaperMode, isResolving } = (0, import_hooks41.useResolvedExecutionMode)();
9338
9340
  if (!forceVisible && (isResolving || !isPaperMode)) return null;
9339
- if (placement === "brand" && isAuthenticated && !forceVisible) return null;
9341
+ if (placement === "brand" && isAuthenticated && !forceVisible && !showWhenAuthenticated) {
9342
+ return null;
9343
+ }
9340
9344
  const placementClassName = {
9341
9345
  brand: "inline-flex md:hidden",
9342
9346
  chip: "inline-flex",
@@ -9380,7 +9384,7 @@ var PaperTradingBadge = ({
9380
9384
  "text-[10px] leading-[14px] font-agg-bold uppercase whitespace-nowrap",
9381
9385
  classNames == null ? void 0 : classNames.pill
9382
9386
  ),
9383
- children: labels.paperTrading.badge
9387
+ children: label2 != null ? label2 : labels.paperTrading.badge
9384
9388
  }
9385
9389
  )
9386
9390
  }
package/dist/modals.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  buildTerminalSummary,
12
12
  clearPendingCardSession,
13
13
  getPendingCardSession
14
- } from "./chunk-UVJ5FBZF.mjs";
14
+ } from "./chunk-Z4WWOHDT.mjs";
15
15
  import {
16
16
  ConnectAccountsStep,
17
17
  ConnectKalshiModal,
@@ -30,6 +30,18 @@ export type PaperTradingBadgeProps = {
30
30
  * disappears in a live app. Used by Storybook.
31
31
  */
32
32
  forceVisible?: boolean;
33
+ /**
34
+ * Pill text. Defaults to `labels.paperTrading.badge`. Lets a host shorten
35
+ * one placement — e.g. the mobile `brand` pill, where header width is tight —
36
+ * without changing the copy everywhere else.
37
+ */
38
+ label?: string;
39
+ /**
40
+ * Keep the `brand` pill on a signed-in phone. Off by default — see the
41
+ * TEMPORARY note in the component. A host that shortens the pill (via
42
+ * `label`) so it fits beside the wallet chip can opt back in.
43
+ */
44
+ showWhenAuthenticated?: boolean;
33
45
  classNames?: PaperTradingBadgeClassNames;
34
46
  };
35
47
  /**
@@ -45,6 +57,6 @@ export type PaperTradingBadgeProps = {
45
57
  * mistake here that would genuinely mislead someone about their funds.
46
58
  */
47
59
  export declare const PaperTradingBadge: {
48
- ({ placement, isAuthenticated, forceVisible, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
60
+ ({ placement, isAuthenticated, forceVisible, label, showWhenAuthenticated, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
49
61
  displayName: string;
50
62
  };
@@ -30,6 +30,18 @@ export type PaperTradingBadgeProps = {
30
30
  * disappears in a live app. Used by Storybook.
31
31
  */
32
32
  forceVisible?: boolean;
33
+ /**
34
+ * Pill text. Defaults to `labels.paperTrading.badge`. Lets a host shorten
35
+ * one placement — e.g. the mobile `brand` pill, where header width is tight —
36
+ * without changing the copy everywhere else.
37
+ */
38
+ label?: string;
39
+ /**
40
+ * Keep the `brand` pill on a signed-in phone. Off by default — see the
41
+ * TEMPORARY note in the component. A host that shortens the pill (via
42
+ * `label`) so it fits beside the wallet chip can opt back in.
43
+ */
44
+ showWhenAuthenticated?: boolean;
33
45
  classNames?: PaperTradingBadgeClassNames;
34
46
  };
35
47
  /**
@@ -45,6 +57,6 @@ export type PaperTradingBadgeProps = {
45
57
  * mistake here that would genuinely mislead someone about their funds.
46
58
  */
47
59
  export declare const PaperTradingBadge: {
48
- ({ placement, isAuthenticated, forceVisible, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
60
+ ({ placement, isAuthenticated, forceVisible, label, showWhenAuthenticated, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
49
61
  displayName: string;
50
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "4.13.2",
3
+ "version": "4.14.0",
4
4
  "description": "Pre-built React component library for the AGG prediction market aggregator. Tailwind-based, themeable, with primitives, event surfaces, trading flows, full pages, and modals.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -100,8 +100,8 @@
100
100
  "liveline": "^0.0.7",
101
101
  "react": "^18.0.0 || ^19.0.0",
102
102
  "react-dom": "^18.0.0 || ^19.0.0",
103
- "@agg-build/hooks": "^4.11.0",
104
- "@agg-build/sdk": "^4.13.1"
103
+ "@agg-build/sdk": "^4.13.1",
104
+ "@agg-build/hooks": "^4.11.0"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",