@particle-academy/react-fancy 5.1.0 → 5.2.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.cts CHANGED
@@ -843,8 +843,18 @@ declare function Portal({ children, container }: PortalProps): react.ReactPortal
843
843
  interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
844
844
  /** Which heading element to render */
845
845
  as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
846
- /** Text size */
847
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
846
+ /**
847
+ * Text size, on a SEMANTIC ramp the names are steps on this scale, not
848
+ * Tailwind class names. `xl` is `text-2xl` and `2xl` is `text-4xl`, and that
849
+ * offset has been true since the component shipped, so the display steps
850
+ * below continue the same ramp rather than re-basing it and silently
851
+ * resizing every existing heading.
852
+ *
853
+ * `3xl`–`7xl` are DISPLAY sizes: hero type, "typography at maximum volume".
854
+ * They carry tighter tracking, because letter-spacing tuned for body-adjacent
855
+ * headings reads loose and unset once type gets big.
856
+ */
857
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
848
858
  /** Font weight */
849
859
  weight?: "normal" | "medium" | "semibold" | "bold";
850
860
  }
package/dist/index.d.ts CHANGED
@@ -843,8 +843,18 @@ declare function Portal({ children, container }: PortalProps): react.ReactPortal
843
843
  interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
844
844
  /** Which heading element to render */
845
845
  as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
846
- /** Text size */
847
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
846
+ /**
847
+ * Text size, on a SEMANTIC ramp the names are steps on this scale, not
848
+ * Tailwind class names. `xl` is `text-2xl` and `2xl` is `text-4xl`, and that
849
+ * offset has been true since the component shipped, so the display steps
850
+ * below continue the same ramp rather than re-basing it and silently
851
+ * resizing every existing heading.
852
+ *
853
+ * `3xl`–`7xl` are DISPLAY sizes: hero type, "typography at maximum volume".
854
+ * They carry tighter tracking, because letter-spacing tuned for body-adjacent
855
+ * headings reads loose and unset once type gets big.
856
+ */
857
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
848
858
  /** Font weight */
849
859
  weight?: "normal" | "medium" | "semibold" | "bold";
850
860
  }
package/dist/index.js CHANGED
@@ -6222,7 +6222,20 @@ var sizeClasses3 = {
6222
6222
  md: "text-base",
6223
6223
  lg: "text-lg",
6224
6224
  xl: "text-2xl",
6225
- "2xl": "text-4xl"
6225
+ "2xl": "text-4xl",
6226
+ // Display steps. Each is the next Tailwind size up, continuing the ramp.
6227
+ "3xl": "text-5xl",
6228
+ "4xl": "text-6xl",
6229
+ "5xl": "text-7xl",
6230
+ "6xl": "text-8xl",
6231
+ "7xl": "text-9xl"
6232
+ };
6233
+ var trackingClasses = {
6234
+ "3xl": "tracking-tight",
6235
+ "4xl": "tracking-tight",
6236
+ "5xl": "tracking-tighter",
6237
+ "6xl": "tracking-tighter",
6238
+ "7xl": "tracking-tighter"
6226
6239
  };
6227
6240
  var weightClasses = {
6228
6241
  normal: "font-normal",
@@ -6247,6 +6260,7 @@ var Heading = forwardRef(
6247
6260
  className: cn(
6248
6261
  "text-zinc-900 dark:text-zinc-100",
6249
6262
  sizeClasses3[size],
6263
+ trackingClasses[size],
6250
6264
  weightClasses[weight],
6251
6265
  className
6252
6266
  ),