@ngrok/mantle 0.90.4 → 0.91.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.
Files changed (168) hide show
  1. package/dist/accordion.d.ts +3 -5
  2. package/dist/agent.json +7 -7
  3. package/dist/{alert-CTAmHdLa.d.ts → alert-BV0VWU2o.d.ts} +5 -7
  4. package/dist/{alert-xJELJxL4.js → alert-BVQcPzmf.js} +1 -1
  5. package/dist/alert-center.d.ts +2 -4
  6. package/dist/alert-center.js +1 -1
  7. package/dist/alert-dialog.d.ts +5 -7
  8. package/dist/alert-dialog.js +1 -1
  9. package/dist/alert.d.ts +1 -1
  10. package/dist/alert.js +1 -1
  11. package/dist/anchor.d.ts +2 -6
  12. package/dist/app-layout.d.ts +3 -7
  13. package/dist/app-layout.js +1 -1
  14. package/dist/area-chart.d.ts +2 -4
  15. package/dist/area-chart.js +1 -1
  16. package/dist/{as-child-D23mGo4f.d.ts → as-child-DFxX3U2i.d.ts} +0 -2
  17. package/dist/avatar.d.ts +2 -4
  18. package/dist/badge.d.ts +3 -5
  19. package/dist/bar-chart.d.ts +2 -4
  20. package/dist/bar-chart.js +1 -1
  21. package/dist/breadcrumb.d.ts +2 -6
  22. package/dist/breadcrumb.js +1 -1
  23. package/dist/browser-only.d.ts +0 -2
  24. package/dist/{button-BZT5f79d.d.ts → button-BFAvonp1.d.ts} +3 -7
  25. package/dist/{button-mzUR1U0Y.d.ts → button-BOCRKR5v.d.ts} +3 -7
  26. package/dist/button-CZ-q7fYv.js +1 -0
  27. package/dist/button-Cwrv2Mwv.js +1 -0
  28. package/dist/{button-BRjAW1ec.d.ts → button-Dt9LZMT5.d.ts} +5 -7
  29. package/dist/{button-BCoI4bhP.d.ts → button-L4exxu_L.d.ts} +0 -2
  30. package/dist/button.d.ts +4 -4
  31. package/dist/button.js +1 -1
  32. package/dist/calendar.d.ts +1 -3
  33. package/dist/card.d.ts +3 -5
  34. package/dist/centered-layout.d.ts +9 -32
  35. package/dist/chart-D2LtDZtV.js +2 -0
  36. package/dist/{chart-23KQ1ZNO.d.ts → chart-ynMysD16.d.ts} +40 -15
  37. package/dist/checkbox.d.ts +2 -4
  38. package/dist/{choice-BCiyqLgO.d.ts → choice-BLR0_MeB.d.ts} +3 -5
  39. package/dist/choice.d.ts +1 -1
  40. package/dist/{code-block-D5eDP379.d.ts → code-block-Bqw9VyK_.d.ts} +0 -22
  41. package/dist/code-block.d.ts +4 -12
  42. package/dist/code-block.js +6 -6
  43. package/dist/code-block_highlight-utils.d.ts +1 -1
  44. package/dist/code.d.ts +2 -4
  45. package/dist/color.d.ts +1 -1
  46. package/dist/combobox.d.ts +4 -6
  47. package/dist/combobox.js +1 -1
  48. package/dist/command.d.ts +3 -13
  49. package/dist/command.js +1 -1
  50. package/dist/cx.d.ts +0 -6
  51. package/dist/{data-slot-CChfb_cv.d.ts → data-slot-B-LqAcBB.d.ts} +0 -2
  52. package/dist/data-table.d.ts +5 -9
  53. package/dist/data-table.js +1 -1
  54. package/dist/description-list.d.ts +3 -5
  55. package/dist/{dialog-C9QGvVNG.js → dialog-D333NTyf.js} +1 -1
  56. package/dist/{dialog-CgwSNHs1.d.ts → dialog-DedsCsnk.d.ts} +3 -5
  57. package/dist/{dialog-CZYD3xL-.d.ts → dialog-Dp0QGWwo.d.ts} +0 -2
  58. package/dist/dialog.d.ts +2 -2
  59. package/dist/dialog.js +1 -1
  60. package/dist/{direction-BjU0bPST.d.ts → direction-CpRzTtZh.d.ts} +0 -2
  61. package/dist/{dropdown-menu-Cef0Cz2B.d.ts → dropdown-menu-ByQQIsQE.d.ts} +2 -4
  62. package/dist/dropdown-menu.d.ts +1 -2
  63. package/dist/empty.d.ts +3 -5
  64. package/dist/{field-7QeiTFwl.d.ts → field-V_gnkcmN.d.ts} +0 -2
  65. package/dist/field.d.ts +7 -15
  66. package/dist/field.js +1 -1
  67. package/dist/flag.d.ts +1 -5
  68. package/dist/hooks.d.ts +1 -37
  69. package/dist/hover-card.d.ts +1 -3
  70. package/dist/{icon-ucVgZeXn.d.ts → icon-ByLVhdYq.d.ts} +2 -4
  71. package/dist/{icon-D1RY5Tcj.d.ts → icon-CgNqu-fl.d.ts} +0 -2
  72. package/dist/{icon-r2NvfTWW.d.ts → icon-DXDyhy2N.d.ts} +2 -4
  73. package/dist/icon.d.ts +3 -3
  74. package/dist/icons-DykpsXNX.js +1 -0
  75. package/dist/icons.d.ts +3 -17
  76. package/dist/icons.js +1 -1
  77. package/dist/{in-view-Ch5vJtWo.d.ts → in-view-B3nMAzfE.d.ts} +0 -6
  78. package/dist/{index-DorCusfG.d.ts → index-BZhHLrBi.d.ts} +0 -2
  79. package/dist/{index-DA4ig3gj.d.ts → index-C6s5cGCr.d.ts} +2 -10
  80. package/dist/{input-eEKzP3cE.js → input-CpQ6jlpI.js} +1 -1
  81. package/dist/{input-bbB1tC0h.d.ts → input-Dx5owTCc.d.ts} +2 -6
  82. package/dist/input.d.ts +3 -7
  83. package/dist/input.js +1 -1
  84. package/dist/kbd.d.ts +1 -3
  85. package/dist/{label-C-KbNls8.d.ts → label-Dn5CPJUj.d.ts} +1 -3
  86. package/dist/label.d.ts +1 -1
  87. package/dist/layer-container.d.ts +0 -2
  88. package/dist/line-chart.d.ts +2 -4
  89. package/dist/line-chart.js +1 -1
  90. package/dist/list.d.ts +2 -8
  91. package/dist/live-region.d.ts +2 -4
  92. package/dist/llms.txt +4 -4
  93. package/dist/main.d.ts +1 -3
  94. package/dist/mantle-dark.css +2 -12
  95. package/dist/mantle.css +75 -13
  96. package/dist/media-object.d.ts +2 -4
  97. package/dist/migrations/0011-eliminate-high-contrast.yml +869 -0
  98. package/dist/multi-select.d.ts +4 -6
  99. package/dist/multi-select.js +1 -1
  100. package/dist/otp-input.d.ts +3 -5
  101. package/dist/pagination.d.ts +3 -7
  102. package/dist/pagination.js +1 -1
  103. package/dist/{popover-Dvls7-j4.d.ts → popover-BfB2I9G0.d.ts} +1 -3
  104. package/dist/popover.d.ts +1 -1
  105. package/dist/progress.d.ts +1 -7
  106. package/dist/qr-code.d.ts +2 -4
  107. package/dist/radio-group.d.ts +2 -4
  108. package/dist/radio-group.js +1 -1
  109. package/dist/sandbar.d.ts +5 -8
  110. package/dist/sandbar.js +1 -1
  111. package/dist/sandboxed-on-click.d.ts +1 -3
  112. package/dist/scatter-plot.d.ts +2 -4
  113. package/dist/scatter-plot.js +1 -1
  114. package/dist/{select-DlohFa54.d.ts → select-CRp_ndSJ.d.ts} +3 -5
  115. package/dist/select-iMsy6TFv.js +1 -0
  116. package/dist/select.d.ts +1 -1
  117. package/dist/select.js +1 -1
  118. package/dist/selectable-list.d.ts +3 -5
  119. package/dist/selectable-list.js +1 -1
  120. package/dist/{separator-BWGjCIl7.d.ts → separator-DNovVsrx.d.ts} +3 -5
  121. package/dist/separator.d.ts +1 -1
  122. package/dist/{sheet-CAFS09pT.js → sheet-gMTepUM_.js} +1 -1
  123. package/dist/sheet.d.ts +3 -5
  124. package/dist/sheet.js +1 -1
  125. package/dist/sidebar.d.ts +5 -9
  126. package/dist/sidebar.js +1 -1
  127. package/dist/{skeleton-zfqoDAxT.js → skeleton-DBpI-ko5.js} +1 -1
  128. package/dist/skeleton.d.ts +2 -4
  129. package/dist/skeleton.js +1 -1
  130. package/dist/skip-to-main-link.d.ts +1 -3
  131. package/dist/slider.d.ts +1 -3
  132. package/dist/{slot-Q996Hqk9.d.ts → slot-C0OCJjdJ.d.ts} +2 -4
  133. package/dist/slot.d.ts +1 -1
  134. package/dist/split-button.d.ts +5 -7
  135. package/dist/split-button.js +1 -1
  136. package/dist/strata.d.ts +2 -4
  137. package/dist/switch.d.ts +2 -4
  138. package/dist/{table-BhzITa19.d.ts → table-vT6Okwfa.d.ts} +1 -3
  139. package/dist/table.d.ts +1 -1
  140. package/dist/tabs.d.ts +3 -5
  141. package/dist/text-area.d.ts +2 -4
  142. package/dist/text-area.js +1 -1
  143. package/dist/theme-BD0ly6jo.js +1 -0
  144. package/dist/theme-switcher.d.ts +67 -213
  145. package/dist/theme-switcher.js +1 -1
  146. package/dist/{theme-6OxNhf6l.d.ts → theme-w1CrMM-x.d.ts} +3 -5
  147. package/dist/theme.d.ts +78 -177
  148. package/dist/theme.js +1 -1
  149. package/dist/toast.d.ts +4 -6
  150. package/dist/toast.js +1 -1
  151. package/dist/{tooltip-CngH7Kl6.d.ts → tooltip-NcLIeBy5.d.ts} +1 -3
  152. package/dist/tooltip.d.ts +1 -1
  153. package/dist/truncated-text.d.ts +2 -4
  154. package/dist/types.d.ts +3 -3
  155. package/dist/utils.d.ts +2 -4
  156. package/dist/visually-hidden.d.ts +2 -4
  157. package/dist/well.d.ts +3 -5
  158. package/dist/{with-style-props-Dq5Vntqy.d.ts → with-style-props-CuT30s0W.d.ts} +0 -2
  159. package/package.json +2 -10
  160. package/dist/button-Bkl_QYpp.js +0 -1
  161. package/dist/button-b2HKEIE2.js +0 -1
  162. package/dist/chart-BfJ835dr.js +0 -2
  163. package/dist/dropdown-menu-DMA8dGxZ.d.ts +0 -1
  164. package/dist/icons-CW9lV9E1.js +0 -1
  165. package/dist/mantle-dark-high-contrast.css +0 -354
  166. package/dist/mantle-light-high-contrast.css +0 -353
  167. package/dist/select-Os5GVejP.js +0 -1
  168. package/dist/theme-Dzem-qRB.js +0 -1
package/dist/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
- # @ngrok/mantle (0.90.4)
1
+ # @ngrok/mantle (0.91.0)
2
2
 
3
- > Offline index shipped inside the @ngrok/mantle npm package. The full records, with examples and sibling boundaries, are in agent.json beside this file. Live docs: https://mantle.ngrok.com/for-ai-agents.
3
+ > Offline index shipped inside the @ngrok/mantle npm package. The full records, with examples and sibling boundaries, are in agent.json beside this file. Neither file lists props: read the bundled type declarations (`<subpath>.d.ts` beside this file) for every prop and its JSDoc. Live docs: https://mantle.ngrok.com/for-ai-agents.
4
4
 
5
5
  Docs: https://mantle.ngrok.com/
6
6
  Agent guide: https://mantle.ngrok.com/for-ai-agents
@@ -85,8 +85,8 @@ Full text: https://mantle.ngrok.com/llms-full.txt
85
85
  - **Table** (`@ngrok/mantle/table`): A structured way to display data in rows and columns.
86
86
  - **Tabs** (`@ngrok/mantle/tabs`): Layered sections of content, called tab panels, that show one at a time.
87
87
  - **Text Area** (`@ngrok/mantle/text-area`): A multi-line plain-text editing control.
88
- - **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light, dark, and high-contrast modes.
89
- - **Theme Switcher** (`@ngrok/mantle/theme-switcher`): The canonical picker for mantle's five themes (a compact dropdown switcher), plus a radio group that embeds theme selection in any dropdown menu.
88
+ - **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light and dark modes that follow the OS by default.
89
+ - **Theme Switcher** (`@ngrok/mantle/theme-switcher`): The canonical light/dark toggle for headers and toolbars, plus the same toggle as one item for account menus.
90
90
  - **Toast** (`@ngrok/mantle/toast`): A succinct message that appears temporarily. Also called: notification, snackbar.
91
91
  - **Tooltip** (`@ngrok/mantle/tooltip`): A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
92
92
  - **Truncated Text** (`@ngrok/mantle/truncated-text`): Renders one long opaque value on a single line and keeps its tail visible when it overflows.
package/dist/main.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
2
2
  import { ComponentProps } from "react";
3
- //#region src/components/main/main.d.ts
4
3
  /**
5
4
  * A focusable `<main>` landmark for the page's primary content. Renders with
6
5
  * `id="main"` and `tabIndex={-1}` so a skip link (or any programmatic focus
@@ -52,5 +51,4 @@ import { ComponentProps } from "react";
52
51
  * ```
53
52
  */
54
53
  declare const Main: ({ className, "data-slot": dataSlot, ...props }: Omit<ComponentProps<"main">, "id" | "tabIndex"> & WithDataSlot) => import("react").JSX.Element;
55
- //#endregion
56
54
  export { Main };
@@ -2,24 +2,14 @@
2
2
  MARK: DARK DEFS
3
3
 
4
4
  The last selector applies this entire block to `.invert-theme` subtrees on
5
- light pages (any page with no other theme active): an inverted island is the
5
+ light pages (any page that is not dark): an inverted island is the
6
6
  opposite theme's own definitions re-declared on the island element. See
7
7
  MARK: INVERT THEME in mantle.css for the full strategy.
8
8
  */
9
9
  :root.dark,
10
10
  :root[data-theme="dark"]:not([data-applied-theme]),
11
11
  :root[data-applied-theme="dark"],
12
- :root:not(
13
- .dark,
14
- [data-theme="dark"]:not([data-applied-theme]),
15
- [data-applied-theme="dark"],
16
- .light-high-contrast,
17
- [data-theme="light-high-contrast"]:not([data-applied-theme]),
18
- [data-applied-theme="light-high-contrast"],
19
- .dark-high-contrast,
20
- [data-theme="dark-high-contrast"]:not([data-applied-theme]),
21
- [data-applied-theme="dark-high-contrast"]
22
- )
12
+ :root:not(.dark, [data-theme="dark"]:not([data-applied-theme]), [data-applied-theme="dark"])
23
13
  .invert-theme {
24
14
  color-scheme: dark;
25
15
 
package/dist/mantle.css CHANGED
@@ -174,6 +174,31 @@ MARK: THEME
174
174
  /* A strong ease-out for UI that enters, exits, or changes shape in under 300ms.
175
175
  Tailwind's `--ease-out` is too shallow to read as a settle at 200ms. */
176
176
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
177
+ /* One damped shake when a form control enters the error state.
178
+ The first swing eases out, so the control answers at once. The other swings
179
+ ease in and out, so the control settles like a spring and not in steps. */
180
+ --animate-shake: shake 300ms ease-in-out;
181
+ @keyframes shake {
182
+ 0% {
183
+ translate: 0;
184
+ animation-timing-function: ease-out;
185
+ }
186
+ 20% {
187
+ translate: -4px;
188
+ }
189
+ 40% {
190
+ translate: 3px;
191
+ }
192
+ 60% {
193
+ translate: -2px;
194
+ }
195
+ 80% {
196
+ translate: 1px;
197
+ }
198
+ 100% {
199
+ translate: 0;
200
+ }
201
+ }
177
202
  /* The narrowest workspace row that holds the expanded rail (13rem), the content card at
178
203
  the side panel's floor (21rem), the panel itself (21rem), and the three gutters (1.5rem).
179
204
  Below it `AppLayout.SidePanel` floats over the card, so the page is never narrower than
@@ -736,26 +761,26 @@ MARK: COMPONENT GEOMETRY
736
761
  MARK: INVERT THEME
737
762
 
738
763
  The `invert-theme` class renders a DOM subtree in the opposite theme of the
739
- page: light ⇄ dark and light-high-contrast ⇄ dark-high-contrast.
764
+ page: light ⇄ dark.
740
765
 
741
766
  Mechanism: every mantle color utility resolves a CSS custom property at the
742
767
  element that uses it, and custom properties inherit — so re-declaring the
743
768
  theme variables on one element re-themes its entire subtree. Each theme
744
- block's selector list therefore also matches `.invert-theme` subtrees on its
745
- pair partner's pages (see the LIGHT DEFS selector above and the equivalent
746
- extensions in the three theme stylesheets); the island is styled by the
747
- opposite theme's own single-source-of-truth declarations, never by a copy.
769
+ block's selector list therefore also matches `.invert-theme` subtrees on the
770
+ opposite theme's pages (see the LIGHT DEFS selector above and the equivalent
771
+ extension in mantle-dark.css); the island is styled by the opposite theme's
772
+ own single-source-of-truth declarations, never by a copy.
748
773
 
749
774
  Requirements and limitations:
750
- - The opposite theme's stylesheet must be applied. `MantleStyleSheets` loads
751
- theme pairs together (the active theme's partner also gets `media="all"`),
752
- so this holds automatically for apps using mantle's theme infrastructure.
775
+ - The opposite theme's stylesheet must be applied. `MantleStyleSheets` applies
776
+ the dark stylesheet on every page, so this holds automatically for apps using
777
+ mantle's theme infrastructure.
753
778
  - Portaled floating content (dropdown menus, tooltips, dialogs, …) escapes
754
779
  the island's DOM subtree and renders in the page theme. Pass `invert-theme`
755
780
  in the floating part's `className` to invert it too.
756
- - Theme variant utilities (`dark:*`, `light:*`, `high-contrast:*`,
757
- `dark-high-contrast:*`) key off the page theme classes on `:root`, not the
758
- inversion scope, so they do not flip inside an island. This includes the six
781
+ - Theme variant utilities (`dark:*`, `light:*`) key off the page theme
782
+ classes on `:root`, not the inversion scope, so they do not flip inside an
783
+ island. This includes the six
759
784
  mantle internals that still carry variant-gated tweaks — Progress Bar,
760
785
  Progress Donut, RadioGroup, Skeleton, Table, and Toast — so composing those
761
786
  inside an island mixes page-variant selection with island-resolved variables
@@ -862,8 +887,6 @@ MARK: CUSTOM VARIANTS
862
887
  */
863
888
  @custom-variant light (&:where(.light, .light *, [data-theme="light"]:not([data-applied-theme]), [data-applied-theme="light"]));
864
889
  @custom-variant dark (&:where(.dark, .dark *, [data-theme="dark"]:not([data-applied-theme]), [data-applied-theme="dark"]));
865
- @custom-variant high-contrast (&:where(.light-high-contrast, .light-high-contrast *, [data-theme="light-high-contrast"]:not([data-applied-theme]), [data-applied-theme="light-high-contrast"]));
866
- @custom-variant dark-high-contrast (&:where(.dark-high-contrast, .dark-high-contrast *, [data-theme="dark-high-contrast"]:not([data-applied-theme]), [data-applied-theme="dark-high-contrast"]));
867
890
 
868
891
  @custom-variant aria-collapsed (&[aria-expanded="false"]);
869
892
  @custom-variant aria-invalid (&[aria-invalid="true"]);
@@ -1435,3 +1458,42 @@ pre[data-slot="code-block-code"]:has(.mantle-code-fold-toggle)
1435
1458
  min-width: 0;
1436
1459
  flex: 1 1 auto;
1437
1460
  }
1461
+
1462
+ /*
1463
+ * The theme swap that `ThemeSwitcher` starts. The new theme grows in a circle
1464
+ * from the button over the old one, so neither snapshot fades or blends: the
1465
+ * default crossfade adds the two images together inside the circle.
1466
+ */
1467
+ :root[data-theme-transition]::view-transition-old(root),
1468
+ :root[data-theme-transition]::view-transition-new(root) {
1469
+ animation: none;
1470
+ mix-blend-mode: normal;
1471
+ }
1472
+
1473
+ /*
1474
+ * The new snapshot is live, so a color transition would fade inside the circle
1475
+ * while the rest of the page shows the new theme. Stop transitions during the
1476
+ * swap. The icon of the switcher and of the menu item keeps its own swap.
1477
+ */
1478
+ :root[data-theme-transition]
1479
+ :not([data-slot~="theme-switcher"] *, [data-slot~="theme-dropdown-menu-item"] *),
1480
+ :root[data-theme-transition]
1481
+ :not([data-slot~="theme-switcher"] *, [data-slot~="theme-dropdown-menu-item"] *)::before,
1482
+ :root[data-theme-transition]
1483
+ :not([data-slot~="theme-switcher"] *, [data-slot~="theme-dropdown-menu-item"] *)::after {
1484
+ transition: none !important;
1485
+ }
1486
+
1487
+ /*
1488
+ * A dialog overlay or a menu that closes as the swap starts, such as the
1489
+ * backdrop of a command palette, would freeze in the old snapshot outside the
1490
+ * circle. Without an exit animation it unmounts before the snapshot.
1491
+ */
1492
+ :root[data-theme-transition]
1493
+ :is(
1494
+ [data-slot~="dialog-overlay"],
1495
+ [data-slot~="dropdown-menu-content"],
1496
+ [data-slot~="dropdown-menu-sub-content"]
1497
+ )[data-state="closed"] {
1498
+ animation: none !important;
1499
+ }
@@ -1,7 +1,6 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
3
  import { ComponentProps } from "react";
4
- //#region src/components/media-object/media-object.d.ts
5
4
  type Props = ComponentProps<"div"> & WithAsChild & WithDataSlot;
6
5
  /**
7
6
  * The media object is an image/icon (media) to the left, with descriptive
@@ -172,5 +171,4 @@ declare const MediaObject: {
172
171
  */
173
172
  readonly Content: typeof Content;
174
173
  };
175
- //#endregion
176
174
  export { MediaObject };