@edwinvakayil/calligraphy 1.2.5 → 1.2.6
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/README.md +76 -0
- package/dist/Context.d.ts +24 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.esm.js +62 -42
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +61 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -222,6 +222,82 @@ preloadFonts(["Bricolage Grotesque", "Instrument Serif", "DM Sans"]);
|
|
|
222
222
|
|
|
223
223
|
All are on Google Fonts and auto-injected when passed to the `font` prop.
|
|
224
224
|
|
|
225
|
+
## TypographyProvider
|
|
226
|
+
|
|
227
|
+
Wrap your app (or a section of it) with `TypographyProvider` to set defaults once. Any prop passed directly to `<Typography>` still wins — the provider is just the fallback.
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
import { TypographyProvider, Typography } from "react-type-scale";
|
|
231
|
+
|
|
232
|
+
export default function App() {
|
|
233
|
+
return (
|
|
234
|
+
<TypographyProvider
|
|
235
|
+
theme={{
|
|
236
|
+
font: "Bricolage Grotesque",
|
|
237
|
+
accentColor: "#6366f1",
|
|
238
|
+
italic: true,
|
|
239
|
+
animation: "rise",
|
|
240
|
+
color: "#1a1a1a",
|
|
241
|
+
}}
|
|
242
|
+
>
|
|
243
|
+
{/* Inherits font, accentColor, italic, animation from theme */}
|
|
244
|
+
<Typography variant="Display">
|
|
245
|
+
Build with <em>intention</em>
|
|
246
|
+
</Typography>
|
|
247
|
+
|
|
248
|
+
{/* Overrides just the animation — everything else from theme */}
|
|
249
|
+
<Typography variant="H1" animation="clip">
|
|
250
|
+
Another hero heading
|
|
251
|
+
</Typography>
|
|
252
|
+
|
|
253
|
+
{/* Overrides font only */}
|
|
254
|
+
<Typography variant="Body" font="Lora">
|
|
255
|
+
Body copy in a different font.
|
|
256
|
+
</Typography>
|
|
257
|
+
|
|
258
|
+
{/* italic=false wins over theme's italic=true */}
|
|
259
|
+
<Typography variant="Display" italic={false}>
|
|
260
|
+
No serif accent here
|
|
261
|
+
</Typography>
|
|
262
|
+
</TypographyProvider>
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Theme shape
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
interface TypographyTheme {
|
|
271
|
+
font?: string // Google Font name applied to all variants
|
|
272
|
+
accentColor?: string // <em> accent color for Display / H1
|
|
273
|
+
italic?: boolean // italic accent on/off for Display / H1
|
|
274
|
+
animation?: HeroAnimation // entrance animation for Display / H1
|
|
275
|
+
color?: string // default text color for all variants
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Priority order
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Explicit prop > TypographyProvider theme > built-in default
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Nesting providers
|
|
286
|
+
|
|
287
|
+
Providers can be nested. The nearest one wins:
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
<TypographyProvider theme={{ font: "Bricolage Grotesque", color: "#111" }}>
|
|
291
|
+
<Typography variant="H1">Uses Bricolage Grotesque</Typography>
|
|
292
|
+
|
|
293
|
+
<TypographyProvider theme={{ font: "Playfair Display", accentColor: "#e11d48" }}>
|
|
294
|
+
<Typography variant="Display">
|
|
295
|
+
Uses Playfair Display with red accent
|
|
296
|
+
</Typography>
|
|
297
|
+
</TypographyProvider>
|
|
298
|
+
</TypographyProvider>
|
|
299
|
+
```
|
|
300
|
+
|
|
225
301
|
## License
|
|
226
302
|
|
|
227
303
|
Copyright (c) 2025 Edwin Vakayil. All rights reserved.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HeroAnimation } from "./types";
|
|
3
|
+
export interface TypographyTheme {
|
|
4
|
+
/** Default Google Font for all Typography components */
|
|
5
|
+
font?: string;
|
|
6
|
+
/** Default accent color for <em> italic spans in Display / H1 */
|
|
7
|
+
accentColor?: string;
|
|
8
|
+
/** Default italic setting for Display / H1 heroes */
|
|
9
|
+
italic?: boolean;
|
|
10
|
+
/** Default entrance animation for Display / H1 heroes */
|
|
11
|
+
animation?: HeroAnimation;
|
|
12
|
+
/** Default text color applied to all variants */
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TypographyProviderProps {
|
|
16
|
+
theme: TypographyTheme;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const TypographyProvider: React.FC<TypographyProviderProps>;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the resolved theme from the nearest TypographyProvider.
|
|
22
|
+
* Falls back to DEFAULT_THEME if used outside a provider.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useTypographyTheme(): Required<TypographyTheme>;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,24 @@ interface TypographyProps extends HTMLAttributes<HTMLElement> {
|
|
|
58
58
|
|
|
59
59
|
declare const Typography: React.FC<TypographyProps>;
|
|
60
60
|
|
|
61
|
+
interface TypographyTheme {
|
|
62
|
+
/** Default Google Font for all Typography components */
|
|
63
|
+
font?: string;
|
|
64
|
+
/** Default accent color for <em> italic spans in Display / H1 */
|
|
65
|
+
accentColor?: string;
|
|
66
|
+
/** Default italic setting for Display / H1 heroes */
|
|
67
|
+
italic?: boolean;
|
|
68
|
+
/** Default entrance animation for Display / H1 heroes */
|
|
69
|
+
animation?: HeroAnimation;
|
|
70
|
+
/** Default text color applied to all variants */
|
|
71
|
+
color?: string;
|
|
72
|
+
}
|
|
73
|
+
interface TypographyProviderProps {
|
|
74
|
+
theme: TypographyTheme;
|
|
75
|
+
children: React.ReactNode;
|
|
76
|
+
}
|
|
77
|
+
declare const TypographyProvider: React.FC<TypographyProviderProps>;
|
|
78
|
+
|
|
61
79
|
/**
|
|
62
80
|
* A curated list of popular Google Fonts.
|
|
63
81
|
* Pass any valid Google Font name to the `font` prop — if it's in this list,
|
|
@@ -81,4 +99,4 @@ declare function injectFont(url: string): void;
|
|
|
81
99
|
*/
|
|
82
100
|
declare function preloadFonts(families: string[]): void;
|
|
83
101
|
|
|
84
|
-
export { GOOGLE_FONTS, HeroAnimation, TextAlign, Typography, TypographyProps, TypographyVariant, buildFontUrl, Typography as default, injectFont, preloadFonts };
|
|
102
|
+
export { GOOGLE_FONTS, HeroAnimation, TextAlign, Typography, TypographyProps, TypographyProvider, TypographyProviderProps, TypographyTheme, TypographyVariant, buildFontUrl, Typography as default, injectFont, preloadFonts };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef, useEffect, Children, isValidElement } from 'react';
|
|
2
|
+
import { createContext, useMemo, useContext, useRef, useEffect, Children, isValidElement } from 'react';
|
|
3
3
|
|
|
4
4
|
/******************************************************************************
|
|
5
5
|
Copyright (c) Microsoft Corporation.
|
|
@@ -233,6 +233,42 @@ function buildLettersHTML(html) {
|
|
|
233
233
|
return result.join("");
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
+
// ─── Defaults ─────────────────────────────────────────────────────────────────
|
|
237
|
+
const DEFAULT_THEME = {
|
|
238
|
+
font: "",
|
|
239
|
+
accentColor: "#c8b89a",
|
|
240
|
+
italic: false,
|
|
241
|
+
animation: "rise",
|
|
242
|
+
color: "",
|
|
243
|
+
};
|
|
244
|
+
// ─── Context ──────────────────────────────────────────────────────────────────
|
|
245
|
+
const TypographyContext = createContext(DEFAULT_THEME);
|
|
246
|
+
const TypographyProvider = ({ theme, children, }) => {
|
|
247
|
+
const resolved = useMemo(() => {
|
|
248
|
+
var _a, _b, _c, _d, _e;
|
|
249
|
+
return ({
|
|
250
|
+
font: (_a = theme.font) !== null && _a !== void 0 ? _a : DEFAULT_THEME.font,
|
|
251
|
+
accentColor: (_b = theme.accentColor) !== null && _b !== void 0 ? _b : DEFAULT_THEME.accentColor,
|
|
252
|
+
italic: (_c = theme.italic) !== null && _c !== void 0 ? _c : DEFAULT_THEME.italic,
|
|
253
|
+
animation: (_d = theme.animation) !== null && _d !== void 0 ? _d : DEFAULT_THEME.animation,
|
|
254
|
+
color: (_e = theme.color) !== null && _e !== void 0 ? _e : DEFAULT_THEME.color,
|
|
255
|
+
});
|
|
256
|
+
}, [theme.font, theme.accentColor, theme.italic, theme.animation, theme.color]);
|
|
257
|
+
// Pre-load the theme font as soon as the provider mounts
|
|
258
|
+
if (resolved.font && GOOGLE_FONTS.includes(resolved.font)) {
|
|
259
|
+
injectFont(buildFontUrl(resolved.font));
|
|
260
|
+
}
|
|
261
|
+
return (jsx(TypographyContext.Provider, { value: resolved, children: children }));
|
|
262
|
+
};
|
|
263
|
+
// ─── Hook ─────────────────────────────────────────────────────────────────────
|
|
264
|
+
/**
|
|
265
|
+
* Returns the resolved theme from the nearest TypographyProvider.
|
|
266
|
+
* Falls back to DEFAULT_THEME if used outside a provider.
|
|
267
|
+
*/
|
|
268
|
+
function useTypographyTheme() {
|
|
269
|
+
return useContext(TypographyContext);
|
|
270
|
+
}
|
|
271
|
+
|
|
236
272
|
// ─── Static maps ─────────────────────────────────────────────────────────────
|
|
237
273
|
const variantTagMap = {
|
|
238
274
|
Display: "h1",
|
|
@@ -326,10 +362,6 @@ const variantStyleMap = {
|
|
|
326
362
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
327
363
|
const INSTRUMENT_SERIF_URL = "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap";
|
|
328
364
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
329
|
-
/**
|
|
330
|
-
* Serialise React children → raw HTML string.
|
|
331
|
-
* Preserves <em>text</em> nodes for animation builders.
|
|
332
|
-
*/
|
|
333
365
|
function childrenToHTML(children) {
|
|
334
366
|
var _a, _b;
|
|
335
367
|
return ((_b = (_a = Children.map(children, (child) => {
|
|
@@ -343,11 +375,6 @@ function childrenToHTML(children) {
|
|
|
343
375
|
return "";
|
|
344
376
|
})) === null || _a === void 0 ? void 0 : _a.join("")) !== null && _b !== void 0 ? _b : "");
|
|
345
377
|
}
|
|
346
|
-
/**
|
|
347
|
-
* Re-map React children so that <em> elements get explicit inline styles.
|
|
348
|
-
* This is used for the no-animation render path where we keep real React nodes.
|
|
349
|
-
* Inline styles on the <em> itself beat any inherited font-family from the parent.
|
|
350
|
-
*/
|
|
351
378
|
function renderChildrenWithEmStyles(children, italic, accentColor, headingFont) {
|
|
352
379
|
const italicStyle = {
|
|
353
380
|
fontFamily: "'Instrument Serif', serif",
|
|
@@ -368,28 +395,8 @@ function renderChildrenWithEmStyles(children, italic, accentColor, headingFont)
|
|
|
368
395
|
return child;
|
|
369
396
|
});
|
|
370
397
|
}
|
|
371
|
-
/**
|
|
372
|
-
* After dangerouslySetInnerHTML renders, walk the DOM and apply inline styles
|
|
373
|
-
* to every <em> and <em> > span so the font switch is guaranteed.
|
|
374
|
-
*/
|
|
375
398
|
function applyEmStylesDOM(container, italic, accentColor, headingFont) {
|
|
376
|
-
|
|
377
|
-
container.querySelectorAll("em").forEach((el) => {
|
|
378
|
-
if (italic) {
|
|
379
|
-
el.style.fontFamily = "'Instrument Serif', serif";
|
|
380
|
-
el.style.fontStyle = "italic";
|
|
381
|
-
el.style.fontWeight = "400";
|
|
382
|
-
el.style.color = accentColor;
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : "inherit";
|
|
386
|
-
el.style.fontStyle = "normal";
|
|
387
|
-
el.style.fontWeight = "inherit";
|
|
388
|
-
el.style.color = "inherit";
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
|
-
// Also style the animated letter spans inside <em> (used by "letters" animation)
|
|
392
|
-
container.querySelectorAll("em > span").forEach((el) => {
|
|
399
|
+
const applyTo = (el) => {
|
|
393
400
|
if (italic) {
|
|
394
401
|
el.style.fontFamily = "'Instrument Serif', serif";
|
|
395
402
|
el.style.fontStyle = "italic";
|
|
@@ -402,15 +409,29 @@ function applyEmStylesDOM(container, italic, accentColor, headingFont) {
|
|
|
402
409
|
el.style.fontWeight = "inherit";
|
|
403
410
|
el.style.color = "inherit";
|
|
404
411
|
}
|
|
405
|
-
}
|
|
412
|
+
};
|
|
413
|
+
container.querySelectorAll("em").forEach(applyTo);
|
|
414
|
+
container.querySelectorAll("em > span").forEach(applyTo);
|
|
406
415
|
}
|
|
407
416
|
// ─── Component ───────────────────────────────────────────────────────────────
|
|
408
417
|
const Typography = (_a) => {
|
|
409
|
-
var
|
|
418
|
+
var _b;
|
|
419
|
+
var { variant = "Body",
|
|
420
|
+
// Explicit undefined = "not set by caller" → fall through to context
|
|
421
|
+
font: fontProp, color: colorProp, animation: animationProp, italic: italicProp, accentColor: accentColorProp, align, className, style, children, as, truncate, maxLines } = _a, rest = __rest(_a, ["variant", "font", "color", "animation", "italic", "accentColor", "align", "className", "style", "children", "as", "truncate", "maxLines"]);
|
|
422
|
+
const theme = useTypographyTheme();
|
|
410
423
|
const isHero = variant === "Display" || variant === "H1";
|
|
411
424
|
const ref = useRef(null);
|
|
412
|
-
//
|
|
413
|
-
//
|
|
425
|
+
// Prop wins if explicitly provided; otherwise fall back to theme value.
|
|
426
|
+
// We use `?? ` (nullish coalescing) so that false / 0 / "" from props still win.
|
|
427
|
+
const font = fontProp !== null && fontProp !== void 0 ? fontProp : (theme.font || undefined);
|
|
428
|
+
const color = colorProp !== null && colorProp !== void 0 ? colorProp : (theme.color || undefined);
|
|
429
|
+
const animation = isHero
|
|
430
|
+
? ((_b = animationProp !== null && animationProp !== void 0 ? animationProp : theme.animation) !== null && _b !== void 0 ? _b : undefined)
|
|
431
|
+
: undefined;
|
|
432
|
+
const italic = italicProp !== null && italicProp !== void 0 ? italicProp : theme.italic;
|
|
433
|
+
const accentColor = accentColorProp !== null && accentColorProp !== void 0 ? accentColorProp : theme.accentColor;
|
|
434
|
+
// Always pre-load Instrument Serif for hero elements
|
|
414
435
|
if (isHero) {
|
|
415
436
|
injectFont(INSTRUMENT_SERIF_URL);
|
|
416
437
|
}
|
|
@@ -418,19 +439,18 @@ const Typography = (_a) => {
|
|
|
418
439
|
if (font && GOOGLE_FONTS.includes(font)) {
|
|
419
440
|
injectFont(buildFontUrl(font));
|
|
420
441
|
}
|
|
421
|
-
// Inject animation keyframes
|
|
442
|
+
// Inject animation keyframes once
|
|
422
443
|
if (animation && isHero) {
|
|
423
444
|
injectAnimationStyles();
|
|
424
445
|
}
|
|
425
|
-
//
|
|
426
|
-
// and stamp inline styles onto every <em> — guaranteed to beat inheritance.
|
|
446
|
+
// Re-stamp em styles after DOM updates (animation / dangerouslySetInnerHTML path)
|
|
427
447
|
useEffect(() => {
|
|
428
448
|
if (!isHero || !animation || !ref.current)
|
|
429
449
|
return;
|
|
430
450
|
applyEmStylesDOM(ref.current, italic, accentColor, font);
|
|
431
451
|
}, [italic, accentColor, font, animation, isHero]);
|
|
432
452
|
const Tag = (as !== null && as !== void 0 ? as : variantTagMap[variant]);
|
|
433
|
-
// ──
|
|
453
|
+
// ── Animation path ────────────────────────────────────────────────────────
|
|
434
454
|
let animClass = "";
|
|
435
455
|
let heroHTML = null;
|
|
436
456
|
if (animation && isHero) {
|
|
@@ -446,7 +466,7 @@ const Typography = (_a) => {
|
|
|
446
466
|
animClass = getAnimationClass(animation);
|
|
447
467
|
}
|
|
448
468
|
}
|
|
449
|
-
// ── Computed
|
|
469
|
+
// ── Computed styles ───────────────────────────────────────────────────────
|
|
450
470
|
const computedStyle = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, variantStyleMap[variant]), (font ? { fontFamily: `'${font}', sans-serif` } : {})), (color ? { color } : {})), (align ? { textAlign: align } : {})), (truncate
|
|
451
471
|
? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
452
472
|
: {})), (maxLines && !truncate
|
|
@@ -461,12 +481,12 @@ const Typography = (_a) => {
|
|
|
461
481
|
if (heroHTML !== null) {
|
|
462
482
|
return (jsx(Tag, Object.assign({ ref: ref, className: [animClass, className].filter(Boolean).join(" "), style: computedStyle, dangerouslySetInnerHTML: { __html: heroHTML } }, rest), animation));
|
|
463
483
|
}
|
|
464
|
-
// ── Render: standard path (real React children
|
|
484
|
+
// ── Render: standard path (real React children) ───────────────────────────
|
|
465
485
|
const processedChildren = isHero
|
|
466
486
|
? renderChildrenWithEmStyles(children, italic, accentColor, font)
|
|
467
487
|
: children;
|
|
468
488
|
return (jsx(Tag, Object.assign({ ref: ref, className: className, style: computedStyle }, rest, { children: processedChildren })));
|
|
469
489
|
};
|
|
470
490
|
|
|
471
|
-
export { GOOGLE_FONTS, Typography, buildFontUrl, Typography as default, injectFont, preloadFonts };
|
|
491
|
+
export { GOOGLE_FONTS, Typography, TypographyProvider, buildFontUrl, Typography as default, injectFont, preloadFonts };
|
|
472
492
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../../fonts.ts","../../animation.ts","../../Typography.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * A curated list of popular Google Fonts.\n * Pass any valid Google Font name to the `font` prop — if it's in this list,\n * it will be auto-injected via a <link> tag. For unlisted fonts, add them here\n * or import them manually in your project.\n */\nexport const GOOGLE_FONTS: string[] = [\n // Serif\n \"Playfair Display\",\n \"Merriweather\",\n \"Lora\",\n \"EB Garamond\",\n \"Libre Baskerville\",\n \"Cormorant Garamond\",\n \"DM Serif Display\",\n \"Crimson Text\",\n \"Source Serif 4\",\n \"Fraunces\",\n\n // Sans-serif\n \"Inter\",\n \"Roboto\",\n \"Open Sans\",\n \"Nunito\",\n \"Poppins\",\n \"Raleway\",\n \"Outfit\",\n \"DM Sans\",\n \"Manrope\",\n \"Plus Jakarta Sans\",\n \"Figtree\",\n \"Syne\",\n \"Albert Sans\",\n\n // Display / Expressive\n \"Bebas Neue\",\n \"Oswald\",\n \"Anton\",\n \"Barlow Condensed\",\n \"Righteous\",\n \"Abril Fatface\",\n \"Dela Gothic One\",\n \"Space Grotesk\",\n \"Unbounded\",\n \"Big Shoulders Display\",\n\n // Mono\n \"JetBrains Mono\",\n \"Fira Code\",\n \"Source Code Pro\",\n \"Space Mono\",\n \"IBM Plex Mono\",\n];\n\nconst injectedFonts = new Set<string>();\n\n/**\n * Builds a Google Fonts URL for a given font family.\n * Requests weights 300, 400, 500, 600, 700, 800 — italic variants included.\n */\nexport function buildFontUrl(fontFamily: string): string {\n const encoded = fontFamily.replace(/ /g, \"+\");\n return `https://fonts.googleapis.com/css2?family=${encoded}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap`;\n}\n\n/**\n * Injects a Google Fonts <link> into <head> once per unique URL.\n * Safe to call multiple times — deduped via a Set.\n */\nexport function injectFont(url: string): void {\n if (typeof document === \"undefined\") return; // SSR guard\n if (injectedFonts.has(url)) return;\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n injectedFonts.add(url);\n}\n\n/**\n * Pre-load a set of fonts eagerly (e.g. at app root).\n * Usage: preloadFonts([\"Playfair Display\", \"Inter\"])\n */\nexport function preloadFonts(families: string[]): void {\n families.forEach((f) => {\n if (GOOGLE_FONTS.includes(f)) {\n injectFont(buildFontUrl(f));\n } else {\n console.warn(\n `[@edwinvakayil/calligraphy] \"${f}\" is not in the bundled GOOGLE_FONTS list. ` +\n `Add it to the list or import it manually.`\n );\n }\n });\n}","import { HeroAnimation } from \"./types\";\n\nconst STYLE_ID = \"rts-hero-animations\";\n\nconst CSS = `\n@keyframes rts-rise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-clip{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0% 0 0)}}\n@keyframes rts-pop{0%{opacity:0;transform:scale(0.75)}60%{opacity:1;transform:scale(1.04)}100%{transform:scale(1)}}\n@keyframes rts-blur{from{opacity:0;filter:blur(14px);transform:scale(1.04)}to{opacity:1;filter:blur(0);transform:scale(1)}}\n@keyframes rts-flip{from{opacity:0;transform:perspective(600px) rotateX(30deg) translateY(20px)}to{opacity:1;transform:perspective(600px) rotateX(0) translateY(0)}}\n@keyframes rts-swipe{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}\n@keyframes rts-bounce{0%{opacity:0;transform:translateY(-60px)}60%{opacity:1;transform:translateY(10px)}80%{transform:translateY(-5px)}100%{transform:translateY(0)}}\n@keyframes rts-type{from{width:0}to{width:100%}}\n@keyframes rts-blink{50%{border-color:transparent}}\n@keyframes rts-word-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-letter-in{from{opacity:0;transform:translateX(-16px) rotate(-4deg)}to{opacity:1;transform:none}}\n\n.rts-rise { animation: rts-rise 0.9s cubic-bezier(0.16,1,0.3,1) both }\n.rts-clip { animation: rts-clip 1.1s cubic-bezier(0.77,0,0.18,1) both }\n.rts-pop { animation: rts-pop 0.7s cubic-bezier(0.34,1.56,0.64,1) both }\n.rts-blur { animation: rts-blur 1s cubic-bezier(0.16,1,0.3,1) both }\n.rts-flip { animation: rts-flip 0.9s cubic-bezier(0.16,1,0.3,1) both; transform-origin: center bottom }\n.rts-swipe { animation: rts-swipe 0.8s cubic-bezier(0.16,1,0.3,1) both }\n.rts-bounce { animation: rts-bounce 0.9s cubic-bezier(0.36,0.07,0.19,0.97) both }\n.rts-typewriter{ overflow: hidden; white-space: nowrap; border-right: 2px solid currentColor; width: 0; animation: rts-type 1.6s steps(22,end) both, rts-blink 0.7s step-end 1.6s 3 }\n.rts-word { display: inline-block; opacity: 0; transform: translateY(24px); animation: rts-word-rise 0.7s cubic-bezier(0.16,1,0.3,1) both }\n.rts-letter { display: inline-block; opacity: 0; transform: translateX(-16px) rotate(-4deg); animation: rts-letter-in 0.5s cubic-bezier(0.16,1,0.3,1) both }\n`;\n\nexport function injectAnimationStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(STYLE_ID)) return;\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = CSS;\n document.head.appendChild(style);\n}\n\nexport function getAnimationClass(animation: HeroAnimation): string {\n const map: Record<HeroAnimation, string> = {\n rise: \"rts-rise\",\n clip: \"rts-clip\",\n pop: \"rts-pop\",\n blur: \"rts-blur\",\n flip: \"rts-flip\",\n swipe: \"rts-swipe\",\n bounce: \"rts-bounce\",\n typewriter: \"rts-typewriter\",\n stagger: \"\",\n letters: \"\",\n };\n return map[animation] ?? \"\";\n}\n\n/**\n * Wraps each word in an animated span.\n * <em> tokens are preserved as-is in the HTML — Typography's useEffect\n * will apply inline styles to them after mount.\n */\nexport function buildStaggerHTML(html: string): string {\n const tokens = html.match(/(<em>[\\s\\S]*?<\\/em>|[^\\s]+)/g) ?? [];\n return tokens\n .map((tok, i) => {\n const delay = (i * 0.07).toFixed(2);\n if (tok.startsWith(\"<em>\")) {\n // Wrap the inner text in the animated span, keep <em> outside\n const inner = tok.slice(4, -5);\n return `<em><span class=\"rts-word\" style=\"animation-delay:${delay}s\">${inner}</span></em>`;\n }\n return `<span class=\"rts-word\" style=\"animation-delay:${delay}s\">${tok}</span>`;\n })\n .join(\" \");\n}\n\n/**\n * Wraps each character in an animated span.\n * <em> tags are preserved in the output — Typography's useEffect applies\n * the actual italic/non-italic inline styles after the DOM is ready.\n */\nexport function buildLettersHTML(html: string): string {\n const result: string[] = [];\n let inEm = false;\n let delay = 0;\n const step = 0.04;\n let i = 0;\n\n while (i < html.length) {\n if (html.startsWith(\"<em>\", i)) { inEm = true; i += 4; continue; }\n if (html.startsWith(\"</em>\", i)) { inEm = false; i += 5; continue; }\n\n const ch = html[i];\n if (ch === \" \") { result.push(\" \"); i++; continue; }\n\n const span = `<span class=\"rts-letter\" style=\"animation-delay:${delay.toFixed(2)}s\">${ch}</span>`;\n // Preserve <em> wrapper in DOM — styles applied by useEffect\n result.push(inEm ? `<em>${span}</em>` : span);\n delay += step;\n i++;\n }\n\n return result.join(\"\");\n}","import React, { CSSProperties, Children, isValidElement, useRef, useEffect } from \"react\";\nimport { TypographyProps, VariantTagMap, VariantStyleMap } from \"./types\";\nimport { GOOGLE_FONTS, buildFontUrl, injectFont } from \"./fonts\";\nimport {\n injectAnimationStyles,\n getAnimationClass,\n buildStaggerHTML,\n buildLettersHTML,\n} from \"./animation\";\n\n// ─── Static maps ─────────────────────────────────────────────────────────────\n\nconst variantTagMap: VariantTagMap = {\n Display: \"h1\",\n H1: \"h1\",\n H2: \"h2\",\n H3: \"h3\",\n H4: \"h4\",\n H5: \"h5\",\n H6: \"h6\",\n Subheading: \"h6\",\n Overline: \"span\",\n Body: \"p\",\n Label: \"label\",\n Caption: \"span\",\n};\n\nconst variantStyleMap: VariantStyleMap = {\n Display: {\n fontSize: \"clamp(2.5rem, 6vw, 5rem)\",\n fontWeight: 800,\n lineHeight: 1.05,\n letterSpacing: \"-0.03em\",\n },\n H1: {\n fontSize: \"clamp(2rem, 4vw, 3rem)\",\n fontWeight: 700,\n lineHeight: 1.1,\n letterSpacing: \"-0.02em\",\n },\n H2: {\n fontSize: \"clamp(1.5rem, 3vw, 2.25rem)\",\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: \"-0.015em\",\n },\n H3: {\n fontSize: \"clamp(1.25rem, 2.5vw, 1.75rem)\",\n fontWeight: 600,\n lineHeight: 1.25,\n letterSpacing: \"-0.01em\",\n },\n H4: {\n fontSize: \"clamp(1.1rem, 2vw, 1.375rem)\",\n fontWeight: 600,\n lineHeight: 1.3,\n letterSpacing: \"-0.005em\",\n },\n H5: {\n fontSize: \"clamp(1rem, 1.5vw, 1.125rem)\",\n fontWeight: 600,\n lineHeight: 1.35,\n letterSpacing: \"0em\",\n },\n H6: {\n fontSize: \"1rem\",\n fontWeight: 600,\n lineHeight: 1.4,\n letterSpacing: \"0em\",\n },\n Subheading: {\n fontSize: \"1.125rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.005em\",\n },\n Overline: {\n fontSize: \"0.6875rem\",\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: \"0.12em\",\n textTransform: \"uppercase\" as CSSProperties[\"textTransform\"],\n },\n Body: {\n fontSize: \"1rem\",\n fontWeight: 400,\n lineHeight: 1.7,\n letterSpacing: \"0.01em\",\n },\n Label: {\n fontSize: \"0.875rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.02em\",\n },\n Caption: {\n fontSize: \"0.75rem\",\n fontWeight: 400,\n lineHeight: 1.6,\n letterSpacing: \"0.03em\",\n },\n};\n\n// ─── Constants ───────────────────────────────────────────────────────────────\n\nconst INSTRUMENT_SERIF_URL =\n \"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap\";\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/**\n * Serialise React children → raw HTML string.\n * Preserves <em>text</em> nodes for animation builders.\n */\nfunction childrenToHTML(children: React.ReactNode): string {\n return (\n Children.map(children, (child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return String(child);\n }\n if (isValidElement(child) && child.type === \"em\") {\n const inner =\n typeof child.props.children === \"string\" ? child.props.children : \"\";\n return `<em>${inner}</em>`;\n }\n return \"\";\n })?.join(\"\") ?? \"\"\n );\n}\n\n/**\n * Re-map React children so that <em> elements get explicit inline styles.\n * This is used for the no-animation render path where we keep real React nodes.\n * Inline styles on the <em> itself beat any inherited font-family from the parent.\n */\nfunction renderChildrenWithEmStyles(\n children: React.ReactNode,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): React.ReactNode {\n const italicStyle: CSSProperties = {\n fontFamily: \"'Instrument Serif', serif\",\n fontStyle: \"italic\",\n fontWeight: 400,\n color: accentColor,\n };\n\n const noItalicStyle: CSSProperties = {\n fontFamily: headingFont ? `'${headingFont}', sans-serif` : \"inherit\",\n fontStyle: \"normal\",\n fontWeight: \"inherit\" as any,\n color: \"inherit\",\n };\n\n return Children.map(children, (child, i) => {\n if (isValidElement(child) && child.type === \"em\") {\n return (\n <em key={i} style={italic ? italicStyle : noItalicStyle}>\n {child.props.children}\n </em>\n );\n }\n return child;\n });\n}\n\n/**\n * After dangerouslySetInnerHTML renders, walk the DOM and apply inline styles\n * to every <em> and <em> > span so the font switch is guaranteed.\n */\nfunction applyEmStylesDOM(\n container: HTMLElement,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): void {\n // Select both <em> and any animated letter spans nested inside <em>\n container.querySelectorAll<HTMLElement>(\"em\").forEach((el) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n });\n\n // Also style the animated letter spans inside <em> (used by \"letters\" animation)\n container.querySelectorAll<HTMLElement>(\"em > span\").forEach((el) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n });\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Typography: React.FC<TypographyProps> = ({\n variant = \"Body\",\n font,\n color,\n align,\n className,\n style,\n children,\n as,\n truncate,\n maxLines,\n animation,\n italic = false,\n accentColor = \"#c8b89a\",\n ...rest\n}) => {\n const isHero = variant === \"Display\" || variant === \"H1\";\n const ref = useRef<HTMLElement>(null);\n\n // Always inject Instrument Serif for hero variants so it's pre-loaded\n // and ready the moment italic is toggled on — no flash of wrong font.\n if (isHero) {\n injectFont(INSTRUMENT_SERIF_URL);\n }\n\n // Inject heading Google Font\n if (font && GOOGLE_FONTS.includes(font)) {\n injectFont(buildFontUrl(font));\n }\n\n // Inject animation keyframes (once, global)\n if (animation && isHero) {\n injectAnimationStyles();\n }\n\n // For animation paths (dangerouslySetInnerHTML), walk the DOM after render\n // and stamp inline styles onto every <em> — guaranteed to beat inheritance.\n useEffect(() => {\n if (!isHero || !animation || !ref.current) return;\n applyEmStylesDOM(ref.current, italic, accentColor, font);\n }, [italic, accentColor, font, animation, isHero]);\n\n const Tag = (as ?? variantTagMap[variant]) as React.ElementType;\n\n // ── Compute animation class + inner HTML ──────────────────────────────────\n\n let animClass = \"\";\n let heroHTML: string | null = null;\n\n if (animation && isHero) {\n const rawHTML = childrenToHTML(children);\n\n if (animation === \"stagger\") {\n heroHTML = buildStaggerHTML(rawHTML);\n } else if (animation === \"letters\") {\n heroHTML = buildLettersHTML(rawHTML);\n } else {\n heroHTML = rawHTML;\n animClass = getAnimationClass(animation);\n }\n }\n\n // ── Computed container styles ─────────────────────────────────────────────\n\n const computedStyle: CSSProperties = {\n ...variantStyleMap[variant],\n ...(font ? { fontFamily: `'${font}', sans-serif` } : {}),\n ...(color ? { color } : {}),\n ...(align ? { textAlign: align } : {}),\n ...(truncate\n ? { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }\n : {}),\n ...(maxLines && !truncate\n ? {\n display: \"-webkit-box\",\n WebkitLineClamp: maxLines,\n WebkitBoxOrient: \"vertical\" as CSSProperties[\"WebkitBoxOrient\"],\n overflow: \"hidden\",\n }\n : {}),\n margin: 0,\n padding: 0,\n ...style,\n };\n\n // ── Render: animation path (dangerouslySetInnerHTML) ──────────────────────\n\n if (heroHTML !== null) {\n return (\n <Tag\n key={animation}\n ref={ref}\n className={[animClass, className].filter(Boolean).join(\" \")}\n style={computedStyle}\n dangerouslySetInnerHTML={{ __html: heroHTML }}\n {...rest}\n />\n );\n }\n\n // ── Render: standard path (real React children with em styles) ────────────\n\n const processedChildren = isHero\n ? renderChildrenWithEmStyles(children, italic, accentColor, font)\n : children;\n\n return (\n <Tag\n ref={ref}\n className={className}\n style={computedStyle}\n {...rest}\n >\n {processedChildren}\n </Tag>\n );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AK,EAAE,GAAqB,EAAE,EACpD,GAAC,QAAQ;AACV,UAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE;UACtE,EAAE,EAAC,GACH,QAAQ,IAAI,CAAC,QAAQ;AACvB,UAAE;AACE,YAAA,OAAO,EAAU,aAAa;AAC9B,YAAA,eAAe,EAAE,QAAQ;AACzB,YAAA,eAAe,EAAE,UAA8C;AAC/D,YAAA,QAAQ,EAAS,QAAQ;AAC1B,SAAA;AACH,UAAE,EAAE,EAAC,EAAA,EACP,MAAM,EAAG,CAAC,EACV,OAAO,EAAE,CAAC,EACP,CAAA,EAAA,KAAK,CACT,CAAC;;AAIF,IAAA,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,QAAA,QACEA,GAAC,CAAA,GAAG,kBAEF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3D,KAAK,EAAE,aAAa,EACpB,uBAAuB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EACzC,EAAA,IAAI,GALH,SAAS,CAMd,EACF;KACH;;IAID,MAAM,iBAAiB,GAAG,MAAM;UAC5B,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC;UAC/D,QAAQ,CAAC;IAEb,QACEA,IAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,aAAa,EAAA,EAChB,IAAI,EAEP,EAAA,QAAA,EAAA,iBAAiB,EACd,CAAA,CAAA,EACN;AACJ;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../../fonts.ts","../../animation.ts","../../Context.tsx","../../Typography.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * A curated list of popular Google Fonts.\n * Pass any valid Google Font name to the `font` prop — if it's in this list,\n * it will be auto-injected via a <link> tag. For unlisted fonts, add them here\n * or import them manually in your project.\n */\nexport const GOOGLE_FONTS: string[] = [\n // Serif\n \"Playfair Display\",\n \"Merriweather\",\n \"Lora\",\n \"EB Garamond\",\n \"Libre Baskerville\",\n \"Cormorant Garamond\",\n \"DM Serif Display\",\n \"Crimson Text\",\n \"Source Serif 4\",\n \"Fraunces\",\n\n // Sans-serif\n \"Inter\",\n \"Roboto\",\n \"Open Sans\",\n \"Nunito\",\n \"Poppins\",\n \"Raleway\",\n \"Outfit\",\n \"DM Sans\",\n \"Manrope\",\n \"Plus Jakarta Sans\",\n \"Figtree\",\n \"Syne\",\n \"Albert Sans\",\n\n // Display / Expressive\n \"Bebas Neue\",\n \"Oswald\",\n \"Anton\",\n \"Barlow Condensed\",\n \"Righteous\",\n \"Abril Fatface\",\n \"Dela Gothic One\",\n \"Space Grotesk\",\n \"Unbounded\",\n \"Big Shoulders Display\",\n\n // Mono\n \"JetBrains Mono\",\n \"Fira Code\",\n \"Source Code Pro\",\n \"Space Mono\",\n \"IBM Plex Mono\",\n];\n\nconst injectedFonts = new Set<string>();\n\n/**\n * Builds a Google Fonts URL for a given font family.\n * Requests weights 300, 400, 500, 600, 700, 800 — italic variants included.\n */\nexport function buildFontUrl(fontFamily: string): string {\n const encoded = fontFamily.replace(/ /g, \"+\");\n return `https://fonts.googleapis.com/css2?family=${encoded}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap`;\n}\n\n/**\n * Injects a Google Fonts <link> into <head> once per unique URL.\n * Safe to call multiple times — deduped via a Set.\n */\nexport function injectFont(url: string): void {\n if (typeof document === \"undefined\") return; // SSR guard\n if (injectedFonts.has(url)) return;\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n injectedFonts.add(url);\n}\n\n/**\n * Pre-load a set of fonts eagerly (e.g. at app root).\n * Usage: preloadFonts([\"Playfair Display\", \"Inter\"])\n */\nexport function preloadFonts(families: string[]): void {\n families.forEach((f) => {\n if (GOOGLE_FONTS.includes(f)) {\n injectFont(buildFontUrl(f));\n } else {\n console.warn(\n `[@edwinvakayil/calligraphy] \"${f}\" is not in the bundled GOOGLE_FONTS list. ` +\n `Add it to the list or import it manually.`\n );\n }\n });\n}","import { HeroAnimation } from \"./types\";\n\nconst STYLE_ID = \"rts-hero-animations\";\n\nconst CSS = `\n@keyframes rts-rise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-clip{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0% 0 0)}}\n@keyframes rts-pop{0%{opacity:0;transform:scale(0.75)}60%{opacity:1;transform:scale(1.04)}100%{transform:scale(1)}}\n@keyframes rts-blur{from{opacity:0;filter:blur(14px);transform:scale(1.04)}to{opacity:1;filter:blur(0);transform:scale(1)}}\n@keyframes rts-flip{from{opacity:0;transform:perspective(600px) rotateX(30deg) translateY(20px)}to{opacity:1;transform:perspective(600px) rotateX(0) translateY(0)}}\n@keyframes rts-swipe{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}\n@keyframes rts-bounce{0%{opacity:0;transform:translateY(-60px)}60%{opacity:1;transform:translateY(10px)}80%{transform:translateY(-5px)}100%{transform:translateY(0)}}\n@keyframes rts-type{from{width:0}to{width:100%}}\n@keyframes rts-blink{50%{border-color:transparent}}\n@keyframes rts-word-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-letter-in{from{opacity:0;transform:translateX(-16px) rotate(-4deg)}to{opacity:1;transform:none}}\n\n.rts-rise { animation: rts-rise 0.9s cubic-bezier(0.16,1,0.3,1) both }\n.rts-clip { animation: rts-clip 1.1s cubic-bezier(0.77,0,0.18,1) both }\n.rts-pop { animation: rts-pop 0.7s cubic-bezier(0.34,1.56,0.64,1) both }\n.rts-blur { animation: rts-blur 1s cubic-bezier(0.16,1,0.3,1) both }\n.rts-flip { animation: rts-flip 0.9s cubic-bezier(0.16,1,0.3,1) both; transform-origin: center bottom }\n.rts-swipe { animation: rts-swipe 0.8s cubic-bezier(0.16,1,0.3,1) both }\n.rts-bounce { animation: rts-bounce 0.9s cubic-bezier(0.36,0.07,0.19,0.97) both }\n.rts-typewriter{ overflow: hidden; white-space: nowrap; border-right: 2px solid currentColor; width: 0; animation: rts-type 1.6s steps(22,end) both, rts-blink 0.7s step-end 1.6s 3 }\n.rts-word { display: inline-block; opacity: 0; transform: translateY(24px); animation: rts-word-rise 0.7s cubic-bezier(0.16,1,0.3,1) both }\n.rts-letter { display: inline-block; opacity: 0; transform: translateX(-16px) rotate(-4deg); animation: rts-letter-in 0.5s cubic-bezier(0.16,1,0.3,1) both }\n`;\n\nexport function injectAnimationStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(STYLE_ID)) return;\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = CSS;\n document.head.appendChild(style);\n}\n\nexport function getAnimationClass(animation: HeroAnimation): string {\n const map: Record<HeroAnimation, string> = {\n rise: \"rts-rise\",\n clip: \"rts-clip\",\n pop: \"rts-pop\",\n blur: \"rts-blur\",\n flip: \"rts-flip\",\n swipe: \"rts-swipe\",\n bounce: \"rts-bounce\",\n typewriter: \"rts-typewriter\",\n stagger: \"\",\n letters: \"\",\n };\n return map[animation] ?? \"\";\n}\n\n/**\n * Wraps each word in an animated span.\n * <em> tokens are preserved as-is in the HTML — Typography's useEffect\n * will apply inline styles to them after mount.\n */\nexport function buildStaggerHTML(html: string): string {\n const tokens = html.match(/(<em>[\\s\\S]*?<\\/em>|[^\\s]+)/g) ?? [];\n return tokens\n .map((tok, i) => {\n const delay = (i * 0.07).toFixed(2);\n if (tok.startsWith(\"<em>\")) {\n // Wrap the inner text in the animated span, keep <em> outside\n const inner = tok.slice(4, -5);\n return `<em><span class=\"rts-word\" style=\"animation-delay:${delay}s\">${inner}</span></em>`;\n }\n return `<span class=\"rts-word\" style=\"animation-delay:${delay}s\">${tok}</span>`;\n })\n .join(\" \");\n}\n\n/**\n * Wraps each character in an animated span.\n * <em> tags are preserved in the output — Typography's useEffect applies\n * the actual italic/non-italic inline styles after the DOM is ready.\n */\nexport function buildLettersHTML(html: string): string {\n const result: string[] = [];\n let inEm = false;\n let delay = 0;\n const step = 0.04;\n let i = 0;\n\n while (i < html.length) {\n if (html.startsWith(\"<em>\", i)) { inEm = true; i += 4; continue; }\n if (html.startsWith(\"</em>\", i)) { inEm = false; i += 5; continue; }\n\n const ch = html[i];\n if (ch === \" \") { result.push(\" \"); i++; continue; }\n\n const span = `<span class=\"rts-letter\" style=\"animation-delay:${delay.toFixed(2)}s\">${ch}</span>`;\n // Preserve <em> wrapper in DOM — styles applied by useEffect\n result.push(inEm ? `<em>${span}</em>` : span);\n delay += step;\n i++;\n }\n\n return result.join(\"\");\n}","import React, { createContext, useContext, useMemo } from \"react\";\nimport { HeroAnimation } from \"./types\";\nimport { injectFont, buildFontUrl, GOOGLE_FONTS } from \"./fonts\";\n\n// ─── Theme shape ──────────────────────────────────────────────────────────────\n\nexport interface TypographyTheme {\n /** Default Google Font for all Typography components */\n font?: string;\n\n /** Default accent color for <em> italic spans in Display / H1 */\n accentColor?: string;\n\n /** Default italic setting for Display / H1 heroes */\n italic?: boolean;\n\n /** Default entrance animation for Display / H1 heroes */\n animation?: HeroAnimation;\n\n /** Default text color applied to all variants */\n color?: string;\n}\n\n// ─── Defaults ─────────────────────────────────────────────────────────────────\n\nconst DEFAULT_THEME: Required<TypographyTheme> = {\n font: \"\",\n accentColor: \"#c8b89a\",\n italic: false,\n animation: \"rise\",\n color: \"\",\n};\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\nconst TypographyContext = createContext<Required<TypographyTheme>>(DEFAULT_THEME);\n\n// ─── Provider ─────────────────────────────────────────────────────────────────\n\nexport interface TypographyProviderProps {\n theme: TypographyTheme;\n children: React.ReactNode;\n}\n\nexport const TypographyProvider: React.FC<TypographyProviderProps> = ({\n theme,\n children,\n}) => {\n const resolved = useMemo<Required<TypographyTheme>>(\n () => ({\n font: theme.font ?? DEFAULT_THEME.font,\n accentColor: theme.accentColor ?? DEFAULT_THEME.accentColor,\n italic: theme.italic ?? DEFAULT_THEME.italic,\n animation: theme.animation ?? DEFAULT_THEME.animation,\n color: theme.color ?? DEFAULT_THEME.color,\n }),\n [theme.font, theme.accentColor, theme.italic, theme.animation, theme.color]\n );\n\n // Pre-load the theme font as soon as the provider mounts\n if (resolved.font && GOOGLE_FONTS.includes(resolved.font)) {\n injectFont(buildFontUrl(resolved.font));\n }\n\n return (\n <TypographyContext.Provider value={resolved}>\n {children}\n </TypographyContext.Provider>\n );\n};\n\n// ─── Hook ─────────────────────────────────────────────────────────────────────\n\n/**\n * Returns the resolved theme from the nearest TypographyProvider.\n * Falls back to DEFAULT_THEME if used outside a provider.\n */\nexport function useTypographyTheme(): Required<TypographyTheme> {\n return useContext(TypographyContext);\n}","import React, { CSSProperties, Children, isValidElement, useRef, useEffect } from \"react\";\nimport { TypographyProps, VariantTagMap, VariantStyleMap } from \"./types\";\nimport { GOOGLE_FONTS, buildFontUrl, injectFont } from \"./fonts\";\nimport {\n injectAnimationStyles,\n getAnimationClass,\n buildStaggerHTML,\n buildLettersHTML,\n} from \"./animation\";\nimport { useTypographyTheme } from \"./Context\";\n\n// ─── Static maps ─────────────────────────────────────────────────────────────\n\nconst variantTagMap: VariantTagMap = {\n Display: \"h1\",\n H1: \"h1\",\n H2: \"h2\",\n H3: \"h3\",\n H4: \"h4\",\n H5: \"h5\",\n H6: \"h6\",\n Subheading: \"h6\",\n Overline: \"span\",\n Body: \"p\",\n Label: \"label\",\n Caption: \"span\",\n};\n\nconst variantStyleMap: VariantStyleMap = {\n Display: {\n fontSize: \"clamp(2.5rem, 6vw, 5rem)\",\n fontWeight: 800,\n lineHeight: 1.05,\n letterSpacing: \"-0.03em\",\n },\n H1: {\n fontSize: \"clamp(2rem, 4vw, 3rem)\",\n fontWeight: 700,\n lineHeight: 1.1,\n letterSpacing: \"-0.02em\",\n },\n H2: {\n fontSize: \"clamp(1.5rem, 3vw, 2.25rem)\",\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: \"-0.015em\",\n },\n H3: {\n fontSize: \"clamp(1.25rem, 2.5vw, 1.75rem)\",\n fontWeight: 600,\n lineHeight: 1.25,\n letterSpacing: \"-0.01em\",\n },\n H4: {\n fontSize: \"clamp(1.1rem, 2vw, 1.375rem)\",\n fontWeight: 600,\n lineHeight: 1.3,\n letterSpacing: \"-0.005em\",\n },\n H5: {\n fontSize: \"clamp(1rem, 1.5vw, 1.125rem)\",\n fontWeight: 600,\n lineHeight: 1.35,\n letterSpacing: \"0em\",\n },\n H6: {\n fontSize: \"1rem\",\n fontWeight: 600,\n lineHeight: 1.4,\n letterSpacing: \"0em\",\n },\n Subheading: {\n fontSize: \"1.125rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.005em\",\n },\n Overline: {\n fontSize: \"0.6875rem\",\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: \"0.12em\",\n textTransform: \"uppercase\" as CSSProperties[\"textTransform\"],\n },\n Body: {\n fontSize: \"1rem\",\n fontWeight: 400,\n lineHeight: 1.7,\n letterSpacing: \"0.01em\",\n },\n Label: {\n fontSize: \"0.875rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.02em\",\n },\n Caption: {\n fontSize: \"0.75rem\",\n fontWeight: 400,\n lineHeight: 1.6,\n letterSpacing: \"0.03em\",\n },\n};\n\n// ─── Constants ───────────────────────────────────────────────────────────────\n\nconst INSTRUMENT_SERIF_URL =\n \"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap\";\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\nfunction childrenToHTML(children: React.ReactNode): string {\n return (\n Children.map(children, (child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return String(child);\n }\n if (isValidElement(child) && child.type === \"em\") {\n const inner =\n typeof child.props.children === \"string\" ? child.props.children : \"\";\n return `<em>${inner}</em>`;\n }\n return \"\";\n })?.join(\"\") ?? \"\"\n );\n}\n\nfunction renderChildrenWithEmStyles(\n children: React.ReactNode,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): React.ReactNode {\n const italicStyle: CSSProperties = {\n fontFamily: \"'Instrument Serif', serif\",\n fontStyle: \"italic\",\n fontWeight: 400,\n color: accentColor,\n };\n\n const noItalicStyle: CSSProperties = {\n fontFamily: headingFont ? `'${headingFont}', sans-serif` : \"inherit\",\n fontStyle: \"normal\",\n fontWeight: \"inherit\" as any,\n color: \"inherit\",\n };\n\n return Children.map(children, (child, i) => {\n if (isValidElement(child) && child.type === \"em\") {\n return (\n <em key={i} style={italic ? italicStyle : noItalicStyle}>\n {child.props.children}\n </em>\n );\n }\n return child;\n });\n}\n\nfunction applyEmStylesDOM(\n container: HTMLElement,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): void {\n const applyTo = (el: HTMLElement) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n };\n\n container.querySelectorAll<HTMLElement>(\"em\").forEach(applyTo);\n container.querySelectorAll<HTMLElement>(\"em > span\").forEach(applyTo);\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Typography: React.FC<TypographyProps> = ({\n variant = \"Body\",\n // Explicit undefined = \"not set by caller\" → fall through to context\n font: fontProp,\n color: colorProp,\n animation: animationProp,\n italic: italicProp,\n accentColor: accentColorProp,\n align,\n className,\n style,\n children,\n as,\n truncate,\n maxLines,\n ...rest\n}) => {\n const theme = useTypographyTheme();\n const isHero = variant === \"Display\" || variant === \"H1\";\n const ref = useRef<HTMLElement>(null);\n\n // Prop wins if explicitly provided; otherwise fall back to theme value.\n // We use `?? ` (nullish coalescing) so that false / 0 / \"\" from props still win.\n const font = fontProp ?? (theme.font || undefined);\n const color = colorProp ?? (theme.color || undefined);\n const animation = isHero\n ? (animationProp ?? theme.animation ?? undefined)\n : undefined;\n const italic = italicProp ?? theme.italic;\n const accentColor = accentColorProp ?? theme.accentColor;\n\n // Always pre-load Instrument Serif for hero elements\n if (isHero) {\n injectFont(INSTRUMENT_SERIF_URL);\n }\n\n // Inject heading Google Font\n if (font && GOOGLE_FONTS.includes(font)) {\n injectFont(buildFontUrl(font));\n }\n\n // Inject animation keyframes once\n if (animation && isHero) {\n injectAnimationStyles();\n }\n\n // Re-stamp em styles after DOM updates (animation / dangerouslySetInnerHTML path)\n useEffect(() => {\n if (!isHero || !animation || !ref.current) return;\n applyEmStylesDOM(ref.current, italic, accentColor, font);\n }, [italic, accentColor, font, animation, isHero]);\n\n const Tag = (as ?? variantTagMap[variant]) as React.ElementType;\n\n // ── Animation path ────────────────────────────────────────────────────────\n\n let animClass = \"\";\n let heroHTML: string | null = null;\n\n if (animation && isHero) {\n const rawHTML = childrenToHTML(children);\n\n if (animation === \"stagger\") {\n heroHTML = buildStaggerHTML(rawHTML);\n } else if (animation === \"letters\") {\n heroHTML = buildLettersHTML(rawHTML);\n } else {\n heroHTML = rawHTML;\n animClass = getAnimationClass(animation);\n }\n }\n\n // ── Computed styles ───────────────────────────────────────────────────────\n\n const computedStyle: CSSProperties = {\n ...variantStyleMap[variant],\n ...(font ? { fontFamily: `'${font}', sans-serif` } : {}),\n ...(color ? { color } : {}),\n ...(align ? { textAlign: align } : {}),\n ...(truncate\n ? { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }\n : {}),\n ...(maxLines && !truncate\n ? {\n display: \"-webkit-box\",\n WebkitLineClamp: maxLines,\n WebkitBoxOrient: \"vertical\" as CSSProperties[\"WebkitBoxOrient\"],\n overflow: \"hidden\",\n }\n : {}),\n margin: 0,\n padding: 0,\n ...style,\n };\n\n // ── Render: animation path (dangerouslySetInnerHTML) ──────────────────────\n\n if (heroHTML !== null) {\n return (\n <Tag\n key={animation}\n ref={ref}\n className={[animClass, className].filter(Boolean).join(\" \")}\n style={computedStyle}\n dangerouslySetInnerHTML={{ __html: heroHTML }}\n {...rest}\n />\n );\n }\n\n // ── Render: standard path (real React children) ───────────────────────────\n\n const processedChildren = isHero\n ? renderChildrenWithEmStyles(children, italic, accentColor, font)\n : children;\n\n return (\n <Tag\n ref={ref}\n className={className}\n style={computedStyle}\n {...rest}\n >\n {processedChildren}\n </Tag>\n );\n};\n\nexport default Typography;"],"names":["_jsx"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChF,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,C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V,OAAO,EAAE,CAAC,EACP,CAAA,EAAA,KAAK,CACT,CAAC;;AAIF,IAAA,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,QAAA,QACEA,GAAC,CAAA,GAAG,kBAEF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3D,KAAK,EAAE,aAAa,EACpB,uBAAuB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EACzC,EAAA,IAAI,GALH,SAAS,CAMd,EACF;KACH;;IAID,MAAM,iBAAiB,GAAG,MAAM;UAC5B,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC;UAC/D,QAAQ,CAAC;IAEb,QACEA,IAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,aAAa,EAAA,EAChB,IAAI,EAEP,EAAA,QAAA,EAAA,iBAAiB,EACd,CAAA,CAAA,EACN;AACJ;;;;","x_google_ignoreList":[0]}
|
package/dist/index.js
CHANGED
|
@@ -237,6 +237,42 @@ function buildLettersHTML(html) {
|
|
|
237
237
|
return result.join("");
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
// ─── Defaults ─────────────────────────────────────────────────────────────────
|
|
241
|
+
const DEFAULT_THEME = {
|
|
242
|
+
font: "",
|
|
243
|
+
accentColor: "#c8b89a",
|
|
244
|
+
italic: false,
|
|
245
|
+
animation: "rise",
|
|
246
|
+
color: "",
|
|
247
|
+
};
|
|
248
|
+
// ─── Context ──────────────────────────────────────────────────────────────────
|
|
249
|
+
const TypographyContext = react.createContext(DEFAULT_THEME);
|
|
250
|
+
const TypographyProvider = ({ theme, children, }) => {
|
|
251
|
+
const resolved = react.useMemo(() => {
|
|
252
|
+
var _a, _b, _c, _d, _e;
|
|
253
|
+
return ({
|
|
254
|
+
font: (_a = theme.font) !== null && _a !== void 0 ? _a : DEFAULT_THEME.font,
|
|
255
|
+
accentColor: (_b = theme.accentColor) !== null && _b !== void 0 ? _b : DEFAULT_THEME.accentColor,
|
|
256
|
+
italic: (_c = theme.italic) !== null && _c !== void 0 ? _c : DEFAULT_THEME.italic,
|
|
257
|
+
animation: (_d = theme.animation) !== null && _d !== void 0 ? _d : DEFAULT_THEME.animation,
|
|
258
|
+
color: (_e = theme.color) !== null && _e !== void 0 ? _e : DEFAULT_THEME.color,
|
|
259
|
+
});
|
|
260
|
+
}, [theme.font, theme.accentColor, theme.italic, theme.animation, theme.color]);
|
|
261
|
+
// Pre-load the theme font as soon as the provider mounts
|
|
262
|
+
if (resolved.font && GOOGLE_FONTS.includes(resolved.font)) {
|
|
263
|
+
injectFont(buildFontUrl(resolved.font));
|
|
264
|
+
}
|
|
265
|
+
return (jsxRuntime.jsx(TypographyContext.Provider, { value: resolved, children: children }));
|
|
266
|
+
};
|
|
267
|
+
// ─── Hook ─────────────────────────────────────────────────────────────────────
|
|
268
|
+
/**
|
|
269
|
+
* Returns the resolved theme from the nearest TypographyProvider.
|
|
270
|
+
* Falls back to DEFAULT_THEME if used outside a provider.
|
|
271
|
+
*/
|
|
272
|
+
function useTypographyTheme() {
|
|
273
|
+
return react.useContext(TypographyContext);
|
|
274
|
+
}
|
|
275
|
+
|
|
240
276
|
// ─── Static maps ─────────────────────────────────────────────────────────────
|
|
241
277
|
const variantTagMap = {
|
|
242
278
|
Display: "h1",
|
|
@@ -330,10 +366,6 @@ const variantStyleMap = {
|
|
|
330
366
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
331
367
|
const INSTRUMENT_SERIF_URL = "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap";
|
|
332
368
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
333
|
-
/**
|
|
334
|
-
* Serialise React children → raw HTML string.
|
|
335
|
-
* Preserves <em>text</em> nodes for animation builders.
|
|
336
|
-
*/
|
|
337
369
|
function childrenToHTML(children) {
|
|
338
370
|
var _a, _b;
|
|
339
371
|
return ((_b = (_a = react.Children.map(children, (child) => {
|
|
@@ -347,11 +379,6 @@ function childrenToHTML(children) {
|
|
|
347
379
|
return "";
|
|
348
380
|
})) === null || _a === void 0 ? void 0 : _a.join("")) !== null && _b !== void 0 ? _b : "");
|
|
349
381
|
}
|
|
350
|
-
/**
|
|
351
|
-
* Re-map React children so that <em> elements get explicit inline styles.
|
|
352
|
-
* This is used for the no-animation render path where we keep real React nodes.
|
|
353
|
-
* Inline styles on the <em> itself beat any inherited font-family from the parent.
|
|
354
|
-
*/
|
|
355
382
|
function renderChildrenWithEmStyles(children, italic, accentColor, headingFont) {
|
|
356
383
|
const italicStyle = {
|
|
357
384
|
fontFamily: "'Instrument Serif', serif",
|
|
@@ -372,28 +399,8 @@ function renderChildrenWithEmStyles(children, italic, accentColor, headingFont)
|
|
|
372
399
|
return child;
|
|
373
400
|
});
|
|
374
401
|
}
|
|
375
|
-
/**
|
|
376
|
-
* After dangerouslySetInnerHTML renders, walk the DOM and apply inline styles
|
|
377
|
-
* to every <em> and <em> > span so the font switch is guaranteed.
|
|
378
|
-
*/
|
|
379
402
|
function applyEmStylesDOM(container, italic, accentColor, headingFont) {
|
|
380
|
-
|
|
381
|
-
container.querySelectorAll("em").forEach((el) => {
|
|
382
|
-
if (italic) {
|
|
383
|
-
el.style.fontFamily = "'Instrument Serif', serif";
|
|
384
|
-
el.style.fontStyle = "italic";
|
|
385
|
-
el.style.fontWeight = "400";
|
|
386
|
-
el.style.color = accentColor;
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : "inherit";
|
|
390
|
-
el.style.fontStyle = "normal";
|
|
391
|
-
el.style.fontWeight = "inherit";
|
|
392
|
-
el.style.color = "inherit";
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
// Also style the animated letter spans inside <em> (used by "letters" animation)
|
|
396
|
-
container.querySelectorAll("em > span").forEach((el) => {
|
|
403
|
+
const applyTo = (el) => {
|
|
397
404
|
if (italic) {
|
|
398
405
|
el.style.fontFamily = "'Instrument Serif', serif";
|
|
399
406
|
el.style.fontStyle = "italic";
|
|
@@ -406,15 +413,29 @@ function applyEmStylesDOM(container, italic, accentColor, headingFont) {
|
|
|
406
413
|
el.style.fontWeight = "inherit";
|
|
407
414
|
el.style.color = "inherit";
|
|
408
415
|
}
|
|
409
|
-
}
|
|
416
|
+
};
|
|
417
|
+
container.querySelectorAll("em").forEach(applyTo);
|
|
418
|
+
container.querySelectorAll("em > span").forEach(applyTo);
|
|
410
419
|
}
|
|
411
420
|
// ─── Component ───────────────────────────────────────────────────────────────
|
|
412
421
|
const Typography = (_a) => {
|
|
413
|
-
var
|
|
422
|
+
var _b;
|
|
423
|
+
var { variant = "Body",
|
|
424
|
+
// Explicit undefined = "not set by caller" → fall through to context
|
|
425
|
+
font: fontProp, color: colorProp, animation: animationProp, italic: italicProp, accentColor: accentColorProp, align, className, style, children, as, truncate, maxLines } = _a, rest = __rest(_a, ["variant", "font", "color", "animation", "italic", "accentColor", "align", "className", "style", "children", "as", "truncate", "maxLines"]);
|
|
426
|
+
const theme = useTypographyTheme();
|
|
414
427
|
const isHero = variant === "Display" || variant === "H1";
|
|
415
428
|
const ref = react.useRef(null);
|
|
416
|
-
//
|
|
417
|
-
//
|
|
429
|
+
// Prop wins if explicitly provided; otherwise fall back to theme value.
|
|
430
|
+
// We use `?? ` (nullish coalescing) so that false / 0 / "" from props still win.
|
|
431
|
+
const font = fontProp !== null && fontProp !== void 0 ? fontProp : (theme.font || undefined);
|
|
432
|
+
const color = colorProp !== null && colorProp !== void 0 ? colorProp : (theme.color || undefined);
|
|
433
|
+
const animation = isHero
|
|
434
|
+
? ((_b = animationProp !== null && animationProp !== void 0 ? animationProp : theme.animation) !== null && _b !== void 0 ? _b : undefined)
|
|
435
|
+
: undefined;
|
|
436
|
+
const italic = italicProp !== null && italicProp !== void 0 ? italicProp : theme.italic;
|
|
437
|
+
const accentColor = accentColorProp !== null && accentColorProp !== void 0 ? accentColorProp : theme.accentColor;
|
|
438
|
+
// Always pre-load Instrument Serif for hero elements
|
|
418
439
|
if (isHero) {
|
|
419
440
|
injectFont(INSTRUMENT_SERIF_URL);
|
|
420
441
|
}
|
|
@@ -422,19 +443,18 @@ const Typography = (_a) => {
|
|
|
422
443
|
if (font && GOOGLE_FONTS.includes(font)) {
|
|
423
444
|
injectFont(buildFontUrl(font));
|
|
424
445
|
}
|
|
425
|
-
// Inject animation keyframes
|
|
446
|
+
// Inject animation keyframes once
|
|
426
447
|
if (animation && isHero) {
|
|
427
448
|
injectAnimationStyles();
|
|
428
449
|
}
|
|
429
|
-
//
|
|
430
|
-
// and stamp inline styles onto every <em> — guaranteed to beat inheritance.
|
|
450
|
+
// Re-stamp em styles after DOM updates (animation / dangerouslySetInnerHTML path)
|
|
431
451
|
react.useEffect(() => {
|
|
432
452
|
if (!isHero || !animation || !ref.current)
|
|
433
453
|
return;
|
|
434
454
|
applyEmStylesDOM(ref.current, italic, accentColor, font);
|
|
435
455
|
}, [italic, accentColor, font, animation, isHero]);
|
|
436
456
|
const Tag = (as !== null && as !== void 0 ? as : variantTagMap[variant]);
|
|
437
|
-
// ──
|
|
457
|
+
// ── Animation path ────────────────────────────────────────────────────────
|
|
438
458
|
let animClass = "";
|
|
439
459
|
let heroHTML = null;
|
|
440
460
|
if (animation && isHero) {
|
|
@@ -450,7 +470,7 @@ const Typography = (_a) => {
|
|
|
450
470
|
animClass = getAnimationClass(animation);
|
|
451
471
|
}
|
|
452
472
|
}
|
|
453
|
-
// ── Computed
|
|
473
|
+
// ── Computed styles ───────────────────────────────────────────────────────
|
|
454
474
|
const computedStyle = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, variantStyleMap[variant]), (font ? { fontFamily: `'${font}', sans-serif` } : {})), (color ? { color } : {})), (align ? { textAlign: align } : {})), (truncate
|
|
455
475
|
? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
456
476
|
: {})), (maxLines && !truncate
|
|
@@ -465,7 +485,7 @@ const Typography = (_a) => {
|
|
|
465
485
|
if (heroHTML !== null) {
|
|
466
486
|
return (jsxRuntime.jsx(Tag, Object.assign({ ref: ref, className: [animClass, className].filter(Boolean).join(" "), style: computedStyle, dangerouslySetInnerHTML: { __html: heroHTML } }, rest), animation));
|
|
467
487
|
}
|
|
468
|
-
// ── Render: standard path (real React children
|
|
488
|
+
// ── Render: standard path (real React children) ───────────────────────────
|
|
469
489
|
const processedChildren = isHero
|
|
470
490
|
? renderChildrenWithEmStyles(children, italic, accentColor, font)
|
|
471
491
|
: children;
|
|
@@ -474,6 +494,7 @@ const Typography = (_a) => {
|
|
|
474
494
|
|
|
475
495
|
exports.GOOGLE_FONTS = GOOGLE_FONTS;
|
|
476
496
|
exports.Typography = Typography;
|
|
497
|
+
exports.TypographyProvider = TypographyProvider;
|
|
477
498
|
exports.buildFontUrl = buildFontUrl;
|
|
478
499
|
exports.default = Typography;
|
|
479
500
|
exports.injectFont = injectFont;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../../fonts.ts","../../animation.ts","../../Typography.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * A curated list of popular Google Fonts.\n * Pass any valid Google Font name to the `font` prop — if it's in this list,\n * it will be auto-injected via a <link> tag. For unlisted fonts, add them here\n * or import them manually in your project.\n */\nexport const GOOGLE_FONTS: string[] = [\n // Serif\n \"Playfair Display\",\n \"Merriweather\",\n \"Lora\",\n \"EB Garamond\",\n \"Libre Baskerville\",\n \"Cormorant Garamond\",\n \"DM Serif Display\",\n \"Crimson Text\",\n \"Source Serif 4\",\n \"Fraunces\",\n\n // Sans-serif\n \"Inter\",\n \"Roboto\",\n \"Open Sans\",\n \"Nunito\",\n \"Poppins\",\n \"Raleway\",\n \"Outfit\",\n \"DM Sans\",\n \"Manrope\",\n \"Plus Jakarta Sans\",\n \"Figtree\",\n \"Syne\",\n \"Albert Sans\",\n\n // Display / Expressive\n \"Bebas Neue\",\n \"Oswald\",\n \"Anton\",\n \"Barlow Condensed\",\n \"Righteous\",\n \"Abril Fatface\",\n \"Dela Gothic One\",\n \"Space Grotesk\",\n \"Unbounded\",\n \"Big Shoulders Display\",\n\n // Mono\n \"JetBrains Mono\",\n \"Fira Code\",\n \"Source Code Pro\",\n \"Space Mono\",\n \"IBM Plex Mono\",\n];\n\nconst injectedFonts = new Set<string>();\n\n/**\n * Builds a Google Fonts URL for a given font family.\n * Requests weights 300, 400, 500, 600, 700, 800 — italic variants included.\n */\nexport function buildFontUrl(fontFamily: string): string {\n const encoded = fontFamily.replace(/ /g, \"+\");\n return `https://fonts.googleapis.com/css2?family=${encoded}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap`;\n}\n\n/**\n * Injects a Google Fonts <link> into <head> once per unique URL.\n * Safe to call multiple times — deduped via a Set.\n */\nexport function injectFont(url: string): void {\n if (typeof document === \"undefined\") return; // SSR guard\n if (injectedFonts.has(url)) return;\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n injectedFonts.add(url);\n}\n\n/**\n * Pre-load a set of fonts eagerly (e.g. at app root).\n * Usage: preloadFonts([\"Playfair Display\", \"Inter\"])\n */\nexport function preloadFonts(families: string[]): void {\n families.forEach((f) => {\n if (GOOGLE_FONTS.includes(f)) {\n injectFont(buildFontUrl(f));\n } else {\n console.warn(\n `[@edwinvakayil/calligraphy] \"${f}\" is not in the bundled GOOGLE_FONTS list. ` +\n `Add it to the list or import it manually.`\n );\n }\n });\n}","import { HeroAnimation } from \"./types\";\n\nconst STYLE_ID = \"rts-hero-animations\";\n\nconst CSS = `\n@keyframes rts-rise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-clip{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0% 0 0)}}\n@keyframes rts-pop{0%{opacity:0;transform:scale(0.75)}60%{opacity:1;transform:scale(1.04)}100%{transform:scale(1)}}\n@keyframes rts-blur{from{opacity:0;filter:blur(14px);transform:scale(1.04)}to{opacity:1;filter:blur(0);transform:scale(1)}}\n@keyframes rts-flip{from{opacity:0;transform:perspective(600px) rotateX(30deg) translateY(20px)}to{opacity:1;transform:perspective(600px) rotateX(0) translateY(0)}}\n@keyframes rts-swipe{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}\n@keyframes rts-bounce{0%{opacity:0;transform:translateY(-60px)}60%{opacity:1;transform:translateY(10px)}80%{transform:translateY(-5px)}100%{transform:translateY(0)}}\n@keyframes rts-type{from{width:0}to{width:100%}}\n@keyframes rts-blink{50%{border-color:transparent}}\n@keyframes rts-word-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-letter-in{from{opacity:0;transform:translateX(-16px) rotate(-4deg)}to{opacity:1;transform:none}}\n\n.rts-rise { animation: rts-rise 0.9s cubic-bezier(0.16,1,0.3,1) both }\n.rts-clip { animation: rts-clip 1.1s cubic-bezier(0.77,0,0.18,1) both }\n.rts-pop { animation: rts-pop 0.7s cubic-bezier(0.34,1.56,0.64,1) both }\n.rts-blur { animation: rts-blur 1s cubic-bezier(0.16,1,0.3,1) both }\n.rts-flip { animation: rts-flip 0.9s cubic-bezier(0.16,1,0.3,1) both; transform-origin: center bottom }\n.rts-swipe { animation: rts-swipe 0.8s cubic-bezier(0.16,1,0.3,1) both }\n.rts-bounce { animation: rts-bounce 0.9s cubic-bezier(0.36,0.07,0.19,0.97) both }\n.rts-typewriter{ overflow: hidden; white-space: nowrap; border-right: 2px solid currentColor; width: 0; animation: rts-type 1.6s steps(22,end) both, rts-blink 0.7s step-end 1.6s 3 }\n.rts-word { display: inline-block; opacity: 0; transform: translateY(24px); animation: rts-word-rise 0.7s cubic-bezier(0.16,1,0.3,1) both }\n.rts-letter { display: inline-block; opacity: 0; transform: translateX(-16px) rotate(-4deg); animation: rts-letter-in 0.5s cubic-bezier(0.16,1,0.3,1) both }\n`;\n\nexport function injectAnimationStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(STYLE_ID)) return;\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = CSS;\n document.head.appendChild(style);\n}\n\nexport function getAnimationClass(animation: HeroAnimation): string {\n const map: Record<HeroAnimation, string> = {\n rise: \"rts-rise\",\n clip: \"rts-clip\",\n pop: \"rts-pop\",\n blur: \"rts-blur\",\n flip: \"rts-flip\",\n swipe: \"rts-swipe\",\n bounce: \"rts-bounce\",\n typewriter: \"rts-typewriter\",\n stagger: \"\",\n letters: \"\",\n };\n return map[animation] ?? \"\";\n}\n\n/**\n * Wraps each word in an animated span.\n * <em> tokens are preserved as-is in the HTML — Typography's useEffect\n * will apply inline styles to them after mount.\n */\nexport function buildStaggerHTML(html: string): string {\n const tokens = html.match(/(<em>[\\s\\S]*?<\\/em>|[^\\s]+)/g) ?? [];\n return tokens\n .map((tok, i) => {\n const delay = (i * 0.07).toFixed(2);\n if (tok.startsWith(\"<em>\")) {\n // Wrap the inner text in the animated span, keep <em> outside\n const inner = tok.slice(4, -5);\n return `<em><span class=\"rts-word\" style=\"animation-delay:${delay}s\">${inner}</span></em>`;\n }\n return `<span class=\"rts-word\" style=\"animation-delay:${delay}s\">${tok}</span>`;\n })\n .join(\" \");\n}\n\n/**\n * Wraps each character in an animated span.\n * <em> tags are preserved in the output — Typography's useEffect applies\n * the actual italic/non-italic inline styles after the DOM is ready.\n */\nexport function buildLettersHTML(html: string): string {\n const result: string[] = [];\n let inEm = false;\n let delay = 0;\n const step = 0.04;\n let i = 0;\n\n while (i < html.length) {\n if (html.startsWith(\"<em>\", i)) { inEm = true; i += 4; continue; }\n if (html.startsWith(\"</em>\", i)) { inEm = false; i += 5; continue; }\n\n const ch = html[i];\n if (ch === \" \") { result.push(\" \"); i++; continue; }\n\n const span = `<span class=\"rts-letter\" style=\"animation-delay:${delay.toFixed(2)}s\">${ch}</span>`;\n // Preserve <em> wrapper in DOM — styles applied by useEffect\n result.push(inEm ? `<em>${span}</em>` : span);\n delay += step;\n i++;\n }\n\n return result.join(\"\");\n}","import React, { CSSProperties, Children, isValidElement, useRef, useEffect } from \"react\";\nimport { TypographyProps, VariantTagMap, VariantStyleMap } from \"./types\";\nimport { GOOGLE_FONTS, buildFontUrl, injectFont } from \"./fonts\";\nimport {\n injectAnimationStyles,\n getAnimationClass,\n buildStaggerHTML,\n buildLettersHTML,\n} from \"./animation\";\n\n// ─── Static maps ─────────────────────────────────────────────────────────────\n\nconst variantTagMap: VariantTagMap = {\n Display: \"h1\",\n H1: \"h1\",\n H2: \"h2\",\n H3: \"h3\",\n H4: \"h4\",\n H5: \"h5\",\n H6: \"h6\",\n Subheading: \"h6\",\n Overline: \"span\",\n Body: \"p\",\n Label: \"label\",\n Caption: \"span\",\n};\n\nconst variantStyleMap: VariantStyleMap = {\n Display: {\n fontSize: \"clamp(2.5rem, 6vw, 5rem)\",\n fontWeight: 800,\n lineHeight: 1.05,\n letterSpacing: \"-0.03em\",\n },\n H1: {\n fontSize: \"clamp(2rem, 4vw, 3rem)\",\n fontWeight: 700,\n lineHeight: 1.1,\n letterSpacing: \"-0.02em\",\n },\n H2: {\n fontSize: \"clamp(1.5rem, 3vw, 2.25rem)\",\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: \"-0.015em\",\n },\n H3: {\n fontSize: \"clamp(1.25rem, 2.5vw, 1.75rem)\",\n fontWeight: 600,\n lineHeight: 1.25,\n letterSpacing: \"-0.01em\",\n },\n H4: {\n fontSize: \"clamp(1.1rem, 2vw, 1.375rem)\",\n fontWeight: 600,\n lineHeight: 1.3,\n letterSpacing: \"-0.005em\",\n },\n H5: {\n fontSize: \"clamp(1rem, 1.5vw, 1.125rem)\",\n fontWeight: 600,\n lineHeight: 1.35,\n letterSpacing: \"0em\",\n },\n H6: {\n fontSize: \"1rem\",\n fontWeight: 600,\n lineHeight: 1.4,\n letterSpacing: \"0em\",\n },\n Subheading: {\n fontSize: \"1.125rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.005em\",\n },\n Overline: {\n fontSize: \"0.6875rem\",\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: \"0.12em\",\n textTransform: \"uppercase\" as CSSProperties[\"textTransform\"],\n },\n Body: {\n fontSize: \"1rem\",\n fontWeight: 400,\n lineHeight: 1.7,\n letterSpacing: \"0.01em\",\n },\n Label: {\n fontSize: \"0.875rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.02em\",\n },\n Caption: {\n fontSize: \"0.75rem\",\n fontWeight: 400,\n lineHeight: 1.6,\n letterSpacing: \"0.03em\",\n },\n};\n\n// ─── Constants ───────────────────────────────────────────────────────────────\n\nconst INSTRUMENT_SERIF_URL =\n \"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap\";\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/**\n * Serialise React children → raw HTML string.\n * Preserves <em>text</em> nodes for animation builders.\n */\nfunction childrenToHTML(children: React.ReactNode): string {\n return (\n Children.map(children, (child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return String(child);\n }\n if (isValidElement(child) && child.type === \"em\") {\n const inner =\n typeof child.props.children === \"string\" ? child.props.children : \"\";\n return `<em>${inner}</em>`;\n }\n return \"\";\n })?.join(\"\") ?? \"\"\n );\n}\n\n/**\n * Re-map React children so that <em> elements get explicit inline styles.\n * This is used for the no-animation render path where we keep real React nodes.\n * Inline styles on the <em> itself beat any inherited font-family from the parent.\n */\nfunction renderChildrenWithEmStyles(\n children: React.ReactNode,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): React.ReactNode {\n const italicStyle: CSSProperties = {\n fontFamily: \"'Instrument Serif', serif\",\n fontStyle: \"italic\",\n fontWeight: 400,\n color: accentColor,\n };\n\n const noItalicStyle: CSSProperties = {\n fontFamily: headingFont ? `'${headingFont}', sans-serif` : \"inherit\",\n fontStyle: \"normal\",\n fontWeight: \"inherit\" as any,\n color: \"inherit\",\n };\n\n return Children.map(children, (child, i) => {\n if (isValidElement(child) && child.type === \"em\") {\n return (\n <em key={i} style={italic ? italicStyle : noItalicStyle}>\n {child.props.children}\n </em>\n );\n }\n return child;\n });\n}\n\n/**\n * After dangerouslySetInnerHTML renders, walk the DOM and apply inline styles\n * to every <em> and <em> > span so the font switch is guaranteed.\n */\nfunction applyEmStylesDOM(\n container: HTMLElement,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): void {\n // Select both <em> and any animated letter spans nested inside <em>\n container.querySelectorAll<HTMLElement>(\"em\").forEach((el) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n });\n\n // Also style the animated letter spans inside <em> (used by \"letters\" animation)\n container.querySelectorAll<HTMLElement>(\"em > span\").forEach((el) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n });\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Typography: React.FC<TypographyProps> = ({\n variant = \"Body\",\n font,\n color,\n align,\n className,\n style,\n children,\n as,\n truncate,\n maxLines,\n animation,\n italic = false,\n accentColor = \"#c8b89a\",\n ...rest\n}) => {\n const isHero = variant === \"Display\" || variant === \"H1\";\n const ref = useRef<HTMLElement>(null);\n\n // Always inject Instrument Serif for hero variants so it's pre-loaded\n // and ready the moment italic is toggled on — no flash of wrong font.\n if (isHero) {\n injectFont(INSTRUMENT_SERIF_URL);\n }\n\n // Inject heading Google Font\n if (font && GOOGLE_FONTS.includes(font)) {\n injectFont(buildFontUrl(font));\n }\n\n // Inject animation keyframes (once, global)\n if (animation && isHero) {\n injectAnimationStyles();\n }\n\n // For animation paths (dangerouslySetInnerHTML), walk the DOM after render\n // and stamp inline styles onto every <em> — guaranteed to beat inheritance.\n useEffect(() => {\n if (!isHero || !animation || !ref.current) return;\n applyEmStylesDOM(ref.current, italic, accentColor, font);\n }, [italic, accentColor, font, animation, isHero]);\n\n const Tag = (as ?? variantTagMap[variant]) as React.ElementType;\n\n // ── Compute animation class + inner HTML ──────────────────────────────────\n\n let animClass = \"\";\n let heroHTML: string | null = null;\n\n if (animation && isHero) {\n const rawHTML = childrenToHTML(children);\n\n if (animation === \"stagger\") {\n heroHTML = buildStaggerHTML(rawHTML);\n } else if (animation === \"letters\") {\n heroHTML = buildLettersHTML(rawHTML);\n } else {\n heroHTML = rawHTML;\n animClass = getAnimationClass(animation);\n }\n }\n\n // ── Computed container styles ─────────────────────────────────────────────\n\n const computedStyle: CSSProperties = {\n ...variantStyleMap[variant],\n ...(font ? { fontFamily: `'${font}', sans-serif` } : {}),\n ...(color ? { color } : {}),\n ...(align ? { textAlign: align } : {}),\n ...(truncate\n ? { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }\n : {}),\n ...(maxLines && !truncate\n ? {\n display: \"-webkit-box\",\n WebkitLineClamp: maxLines,\n WebkitBoxOrient: \"vertical\" as CSSProperties[\"WebkitBoxOrient\"],\n overflow: \"hidden\",\n }\n : {}),\n margin: 0,\n padding: 0,\n ...style,\n };\n\n // ── Render: animation path (dangerouslySetInnerHTML) ──────────────────────\n\n if (heroHTML !== null) {\n return (\n <Tag\n key={animation}\n ref={ref}\n className={[animClass, className].filter(Boolean).join(\" \")}\n style={computedStyle}\n dangerouslySetInnerHTML={{ __html: heroHTML }}\n {...rest}\n />\n );\n }\n\n // ── Render: standard path (real React children with em styles) ────────────\n\n const processedChildren = isHero\n ? renderChildrenWithEmStyles(children, italic, accentColor, font)\n : children;\n\n return (\n <Tag\n ref={ref}\n className={className}\n style={computedStyle}\n {...rest}\n >\n {processedChildren}\n </Tag>\n );\n};\n\nexport default Typography;"],"names":["Children","isValidElement","_jsx","useRef","useEffect"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChF,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,SAAS;AACT,IAAI,OAAO,CAAC,CAAC;AACb,CAAC;AAmRD;AACuB,OAAO,eA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A,iBAAiB,EACd,CAAA,CAAA,EACN;AACJ;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../../fonts.ts","../../animation.ts","../../Context.tsx","../../Typography.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * A curated list of popular Google Fonts.\n * Pass any valid Google Font name to the `font` prop — if it's in this list,\n * it will be auto-injected via a <link> tag. For unlisted fonts, add them here\n * or import them manually in your project.\n */\nexport const GOOGLE_FONTS: string[] = [\n // Serif\n \"Playfair Display\",\n \"Merriweather\",\n \"Lora\",\n \"EB Garamond\",\n \"Libre Baskerville\",\n \"Cormorant Garamond\",\n \"DM Serif Display\",\n \"Crimson Text\",\n \"Source Serif 4\",\n \"Fraunces\",\n\n // Sans-serif\n \"Inter\",\n \"Roboto\",\n \"Open Sans\",\n \"Nunito\",\n \"Poppins\",\n \"Raleway\",\n \"Outfit\",\n \"DM Sans\",\n \"Manrope\",\n \"Plus Jakarta Sans\",\n \"Figtree\",\n \"Syne\",\n \"Albert Sans\",\n\n // Display / Expressive\n \"Bebas Neue\",\n \"Oswald\",\n \"Anton\",\n \"Barlow Condensed\",\n \"Righteous\",\n \"Abril Fatface\",\n \"Dela Gothic One\",\n \"Space Grotesk\",\n \"Unbounded\",\n \"Big Shoulders Display\",\n\n // Mono\n \"JetBrains Mono\",\n \"Fira Code\",\n \"Source Code Pro\",\n \"Space Mono\",\n \"IBM Plex Mono\",\n];\n\nconst injectedFonts = new Set<string>();\n\n/**\n * Builds a Google Fonts URL for a given font family.\n * Requests weights 300, 400, 500, 600, 700, 800 — italic variants included.\n */\nexport function buildFontUrl(fontFamily: string): string {\n const encoded = fontFamily.replace(/ /g, \"+\");\n return `https://fonts.googleapis.com/css2?family=${encoded}:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap`;\n}\n\n/**\n * Injects a Google Fonts <link> into <head> once per unique URL.\n * Safe to call multiple times — deduped via a Set.\n */\nexport function injectFont(url: string): void {\n if (typeof document === \"undefined\") return; // SSR guard\n if (injectedFonts.has(url)) return;\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = url;\n document.head.appendChild(link);\n injectedFonts.add(url);\n}\n\n/**\n * Pre-load a set of fonts eagerly (e.g. at app root).\n * Usage: preloadFonts([\"Playfair Display\", \"Inter\"])\n */\nexport function preloadFonts(families: string[]): void {\n families.forEach((f) => {\n if (GOOGLE_FONTS.includes(f)) {\n injectFont(buildFontUrl(f));\n } else {\n console.warn(\n `[@edwinvakayil/calligraphy] \"${f}\" is not in the bundled GOOGLE_FONTS list. ` +\n `Add it to the list or import it manually.`\n );\n }\n });\n}","import { HeroAnimation } from \"./types\";\n\nconst STYLE_ID = \"rts-hero-animations\";\n\nconst CSS = `\n@keyframes rts-rise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-clip{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0% 0 0)}}\n@keyframes rts-pop{0%{opacity:0;transform:scale(0.75)}60%{opacity:1;transform:scale(1.04)}100%{transform:scale(1)}}\n@keyframes rts-blur{from{opacity:0;filter:blur(14px);transform:scale(1.04)}to{opacity:1;filter:blur(0);transform:scale(1)}}\n@keyframes rts-flip{from{opacity:0;transform:perspective(600px) rotateX(30deg) translateY(20px)}to{opacity:1;transform:perspective(600px) rotateX(0) translateY(0)}}\n@keyframes rts-swipe{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}\n@keyframes rts-bounce{0%{opacity:0;transform:translateY(-60px)}60%{opacity:1;transform:translateY(10px)}80%{transform:translateY(-5px)}100%{transform:translateY(0)}}\n@keyframes rts-type{from{width:0}to{width:100%}}\n@keyframes rts-blink{50%{border-color:transparent}}\n@keyframes rts-word-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}\n@keyframes rts-letter-in{from{opacity:0;transform:translateX(-16px) rotate(-4deg)}to{opacity:1;transform:none}}\n\n.rts-rise { animation: rts-rise 0.9s cubic-bezier(0.16,1,0.3,1) both }\n.rts-clip { animation: rts-clip 1.1s cubic-bezier(0.77,0,0.18,1) both }\n.rts-pop { animation: rts-pop 0.7s cubic-bezier(0.34,1.56,0.64,1) both }\n.rts-blur { animation: rts-blur 1s cubic-bezier(0.16,1,0.3,1) both }\n.rts-flip { animation: rts-flip 0.9s cubic-bezier(0.16,1,0.3,1) both; transform-origin: center bottom }\n.rts-swipe { animation: rts-swipe 0.8s cubic-bezier(0.16,1,0.3,1) both }\n.rts-bounce { animation: rts-bounce 0.9s cubic-bezier(0.36,0.07,0.19,0.97) both }\n.rts-typewriter{ overflow: hidden; white-space: nowrap; border-right: 2px solid currentColor; width: 0; animation: rts-type 1.6s steps(22,end) both, rts-blink 0.7s step-end 1.6s 3 }\n.rts-word { display: inline-block; opacity: 0; transform: translateY(24px); animation: rts-word-rise 0.7s cubic-bezier(0.16,1,0.3,1) both }\n.rts-letter { display: inline-block; opacity: 0; transform: translateX(-16px) rotate(-4deg); animation: rts-letter-in 0.5s cubic-bezier(0.16,1,0.3,1) both }\n`;\n\nexport function injectAnimationStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(STYLE_ID)) return;\n const style = document.createElement(\"style\");\n style.id = STYLE_ID;\n style.textContent = CSS;\n document.head.appendChild(style);\n}\n\nexport function getAnimationClass(animation: HeroAnimation): string {\n const map: Record<HeroAnimation, string> = {\n rise: \"rts-rise\",\n clip: \"rts-clip\",\n pop: \"rts-pop\",\n blur: \"rts-blur\",\n flip: \"rts-flip\",\n swipe: \"rts-swipe\",\n bounce: \"rts-bounce\",\n typewriter: \"rts-typewriter\",\n stagger: \"\",\n letters: \"\",\n };\n return map[animation] ?? \"\";\n}\n\n/**\n * Wraps each word in an animated span.\n * <em> tokens are preserved as-is in the HTML — Typography's useEffect\n * will apply inline styles to them after mount.\n */\nexport function buildStaggerHTML(html: string): string {\n const tokens = html.match(/(<em>[\\s\\S]*?<\\/em>|[^\\s]+)/g) ?? [];\n return tokens\n .map((tok, i) => {\n const delay = (i * 0.07).toFixed(2);\n if (tok.startsWith(\"<em>\")) {\n // Wrap the inner text in the animated span, keep <em> outside\n const inner = tok.slice(4, -5);\n return `<em><span class=\"rts-word\" style=\"animation-delay:${delay}s\">${inner}</span></em>`;\n }\n return `<span class=\"rts-word\" style=\"animation-delay:${delay}s\">${tok}</span>`;\n })\n .join(\" \");\n}\n\n/**\n * Wraps each character in an animated span.\n * <em> tags are preserved in the output — Typography's useEffect applies\n * the actual italic/non-italic inline styles after the DOM is ready.\n */\nexport function buildLettersHTML(html: string): string {\n const result: string[] = [];\n let inEm = false;\n let delay = 0;\n const step = 0.04;\n let i = 0;\n\n while (i < html.length) {\n if (html.startsWith(\"<em>\", i)) { inEm = true; i += 4; continue; }\n if (html.startsWith(\"</em>\", i)) { inEm = false; i += 5; continue; }\n\n const ch = html[i];\n if (ch === \" \") { result.push(\" \"); i++; continue; }\n\n const span = `<span class=\"rts-letter\" style=\"animation-delay:${delay.toFixed(2)}s\">${ch}</span>`;\n // Preserve <em> wrapper in DOM — styles applied by useEffect\n result.push(inEm ? `<em>${span}</em>` : span);\n delay += step;\n i++;\n }\n\n return result.join(\"\");\n}","import React, { createContext, useContext, useMemo } from \"react\";\nimport { HeroAnimation } from \"./types\";\nimport { injectFont, buildFontUrl, GOOGLE_FONTS } from \"./fonts\";\n\n// ─── Theme shape ──────────────────────────────────────────────────────────────\n\nexport interface TypographyTheme {\n /** Default Google Font for all Typography components */\n font?: string;\n\n /** Default accent color for <em> italic spans in Display / H1 */\n accentColor?: string;\n\n /** Default italic setting for Display / H1 heroes */\n italic?: boolean;\n\n /** Default entrance animation for Display / H1 heroes */\n animation?: HeroAnimation;\n\n /** Default text color applied to all variants */\n color?: string;\n}\n\n// ─── Defaults ─────────────────────────────────────────────────────────────────\n\nconst DEFAULT_THEME: Required<TypographyTheme> = {\n font: \"\",\n accentColor: \"#c8b89a\",\n italic: false,\n animation: \"rise\",\n color: \"\",\n};\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\nconst TypographyContext = createContext<Required<TypographyTheme>>(DEFAULT_THEME);\n\n// ─── Provider ─────────────────────────────────────────────────────────────────\n\nexport interface TypographyProviderProps {\n theme: TypographyTheme;\n children: React.ReactNode;\n}\n\nexport const TypographyProvider: React.FC<TypographyProviderProps> = ({\n theme,\n children,\n}) => {\n const resolved = useMemo<Required<TypographyTheme>>(\n () => ({\n font: theme.font ?? DEFAULT_THEME.font,\n accentColor: theme.accentColor ?? DEFAULT_THEME.accentColor,\n italic: theme.italic ?? DEFAULT_THEME.italic,\n animation: theme.animation ?? DEFAULT_THEME.animation,\n color: theme.color ?? DEFAULT_THEME.color,\n }),\n [theme.font, theme.accentColor, theme.italic, theme.animation, theme.color]\n );\n\n // Pre-load the theme font as soon as the provider mounts\n if (resolved.font && GOOGLE_FONTS.includes(resolved.font)) {\n injectFont(buildFontUrl(resolved.font));\n }\n\n return (\n <TypographyContext.Provider value={resolved}>\n {children}\n </TypographyContext.Provider>\n );\n};\n\n// ─── Hook ─────────────────────────────────────────────────────────────────────\n\n/**\n * Returns the resolved theme from the nearest TypographyProvider.\n * Falls back to DEFAULT_THEME if used outside a provider.\n */\nexport function useTypographyTheme(): Required<TypographyTheme> {\n return useContext(TypographyContext);\n}","import React, { CSSProperties, Children, isValidElement, useRef, useEffect } from \"react\";\nimport { TypographyProps, VariantTagMap, VariantStyleMap } from \"./types\";\nimport { GOOGLE_FONTS, buildFontUrl, injectFont } from \"./fonts\";\nimport {\n injectAnimationStyles,\n getAnimationClass,\n buildStaggerHTML,\n buildLettersHTML,\n} from \"./animation\";\nimport { useTypographyTheme } from \"./Context\";\n\n// ─── Static maps ─────────────────────────────────────────────────────────────\n\nconst variantTagMap: VariantTagMap = {\n Display: \"h1\",\n H1: \"h1\",\n H2: \"h2\",\n H3: \"h3\",\n H4: \"h4\",\n H5: \"h5\",\n H6: \"h6\",\n Subheading: \"h6\",\n Overline: \"span\",\n Body: \"p\",\n Label: \"label\",\n Caption: \"span\",\n};\n\nconst variantStyleMap: VariantStyleMap = {\n Display: {\n fontSize: \"clamp(2.5rem, 6vw, 5rem)\",\n fontWeight: 800,\n lineHeight: 1.05,\n letterSpacing: \"-0.03em\",\n },\n H1: {\n fontSize: \"clamp(2rem, 4vw, 3rem)\",\n fontWeight: 700,\n lineHeight: 1.1,\n letterSpacing: \"-0.02em\",\n },\n H2: {\n fontSize: \"clamp(1.5rem, 3vw, 2.25rem)\",\n fontWeight: 700,\n lineHeight: 1.2,\n letterSpacing: \"-0.015em\",\n },\n H3: {\n fontSize: \"clamp(1.25rem, 2.5vw, 1.75rem)\",\n fontWeight: 600,\n lineHeight: 1.25,\n letterSpacing: \"-0.01em\",\n },\n H4: {\n fontSize: \"clamp(1.1rem, 2vw, 1.375rem)\",\n fontWeight: 600,\n lineHeight: 1.3,\n letterSpacing: \"-0.005em\",\n },\n H5: {\n fontSize: \"clamp(1rem, 1.5vw, 1.125rem)\",\n fontWeight: 600,\n lineHeight: 1.35,\n letterSpacing: \"0em\",\n },\n H6: {\n fontSize: \"1rem\",\n fontWeight: 600,\n lineHeight: 1.4,\n letterSpacing: \"0em\",\n },\n Subheading: {\n fontSize: \"1.125rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.005em\",\n },\n Overline: {\n fontSize: \"0.6875rem\",\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: \"0.12em\",\n textTransform: \"uppercase\" as CSSProperties[\"textTransform\"],\n },\n Body: {\n fontSize: \"1rem\",\n fontWeight: 400,\n lineHeight: 1.7,\n letterSpacing: \"0.01em\",\n },\n Label: {\n fontSize: \"0.875rem\",\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: \"0.02em\",\n },\n Caption: {\n fontSize: \"0.75rem\",\n fontWeight: 400,\n lineHeight: 1.6,\n letterSpacing: \"0.03em\",\n },\n};\n\n// ─── Constants ───────────────────────────────────────────────────────────────\n\nconst INSTRUMENT_SERIF_URL =\n \"https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap\";\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\nfunction childrenToHTML(children: React.ReactNode): string {\n return (\n Children.map(children, (child) => {\n if (typeof child === \"string\" || typeof child === \"number\") {\n return String(child);\n }\n if (isValidElement(child) && child.type === \"em\") {\n const inner =\n typeof child.props.children === \"string\" ? child.props.children : \"\";\n return `<em>${inner}</em>`;\n }\n return \"\";\n })?.join(\"\") ?? \"\"\n );\n}\n\nfunction renderChildrenWithEmStyles(\n children: React.ReactNode,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): React.ReactNode {\n const italicStyle: CSSProperties = {\n fontFamily: \"'Instrument Serif', serif\",\n fontStyle: \"italic\",\n fontWeight: 400,\n color: accentColor,\n };\n\n const noItalicStyle: CSSProperties = {\n fontFamily: headingFont ? `'${headingFont}', sans-serif` : \"inherit\",\n fontStyle: \"normal\",\n fontWeight: \"inherit\" as any,\n color: \"inherit\",\n };\n\n return Children.map(children, (child, i) => {\n if (isValidElement(child) && child.type === \"em\") {\n return (\n <em key={i} style={italic ? italicStyle : noItalicStyle}>\n {child.props.children}\n </em>\n );\n }\n return child;\n });\n}\n\nfunction applyEmStylesDOM(\n container: HTMLElement,\n italic: boolean,\n accentColor: string,\n headingFont?: string\n): void {\n const applyTo = (el: HTMLElement) => {\n if (italic) {\n el.style.fontFamily = \"'Instrument Serif', serif\";\n el.style.fontStyle = \"italic\";\n el.style.fontWeight = \"400\";\n el.style.color = accentColor;\n } else {\n el.style.fontFamily = headingFont ? `'${headingFont}', sans-serif` : \"inherit\";\n el.style.fontStyle = \"normal\";\n el.style.fontWeight = \"inherit\";\n el.style.color = \"inherit\";\n }\n };\n\n container.querySelectorAll<HTMLElement>(\"em\").forEach(applyTo);\n container.querySelectorAll<HTMLElement>(\"em > span\").forEach(applyTo);\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport const Typography: React.FC<TypographyProps> = ({\n variant = \"Body\",\n // Explicit undefined = \"not set by caller\" → fall through to context\n font: fontProp,\n color: colorProp,\n animation: animationProp,\n italic: italicProp,\n accentColor: accentColorProp,\n align,\n className,\n style,\n children,\n as,\n truncate,\n maxLines,\n ...rest\n}) => {\n const theme = useTypographyTheme();\n const isHero = variant === \"Display\" || variant === \"H1\";\n const ref = useRef<HTMLElement>(null);\n\n // Prop wins if explicitly provided; otherwise fall back to theme value.\n // We use `?? ` (nullish coalescing) so that false / 0 / \"\" from props still win.\n const font = fontProp ?? (theme.font || undefined);\n const color = colorProp ?? (theme.color || undefined);\n const animation = isHero\n ? (animationProp ?? theme.animation ?? undefined)\n : undefined;\n const italic = italicProp ?? theme.italic;\n const accentColor = accentColorProp ?? theme.accentColor;\n\n // Always pre-load Instrument Serif for hero elements\n if (isHero) {\n injectFont(INSTRUMENT_SERIF_URL);\n }\n\n // Inject heading Google Font\n if (font && GOOGLE_FONTS.includes(font)) {\n injectFont(buildFontUrl(font));\n }\n\n // Inject animation keyframes once\n if (animation && isHero) {\n injectAnimationStyles();\n }\n\n // Re-stamp em styles after DOM updates (animation / dangerouslySetInnerHTML path)\n useEffect(() => {\n if (!isHero || !animation || !ref.current) return;\n applyEmStylesDOM(ref.current, italic, accentColor, font);\n }, [italic, accentColor, font, animation, isHero]);\n\n const Tag = (as ?? variantTagMap[variant]) as React.ElementType;\n\n // ── Animation path ────────────────────────────────────────────────────────\n\n let animClass = \"\";\n let heroHTML: string | null = null;\n\n if (animation && isHero) {\n const rawHTML = childrenToHTML(children);\n\n if (animation === \"stagger\") {\n heroHTML = buildStaggerHTML(rawHTML);\n } else if (animation === \"letters\") {\n heroHTML = buildLettersHTML(rawHTML);\n } else {\n heroHTML = rawHTML;\n animClass = getAnimationClass(animation);\n }\n }\n\n // ── Computed styles ───────────────────────────────────────────────────────\n\n const computedStyle: CSSProperties = {\n ...variantStyleMap[variant],\n ...(font ? { fontFamily: `'${font}', sans-serif` } : {}),\n ...(color ? { color } : {}),\n ...(align ? { textAlign: align } : {}),\n ...(truncate\n ? { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }\n : {}),\n ...(maxLines && !truncate\n ? {\n display: \"-webkit-box\",\n WebkitLineClamp: maxLines,\n WebkitBoxOrient: \"vertical\" as CSSProperties[\"WebkitBoxOrient\"],\n overflow: \"hidden\",\n }\n : {}),\n margin: 0,\n padding: 0,\n ...style,\n };\n\n // ── Render: animation path (dangerouslySetInnerHTML) ──────────────────────\n\n if (heroHTML !== null) {\n return (\n <Tag\n key={animation}\n ref={ref}\n className={[animClass, className].filter(Boolean).join(\" \")}\n style={computedStyle}\n dangerouslySetInnerHTML={{ __html: heroHTML }}\n {...rest}\n />\n );\n }\n\n // ── Render: standard path (real React children) ───────────────────────────\n\n const processedChildren = isHero\n ? renderChildrenWithEmStyles(children, italic, accentColor, font)\n : children;\n\n return (\n <Tag\n ref={ref}\n className={className}\n style={computedStyle}\n {...rest}\n >\n {processedChildren}\n </Tag>\n );\n};\n\nexport default Typography;"],"names":["createContext","useMemo","_jsx","useContext","Children","isValidElement","useRef","useEffect"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChF,YAAY,IAAI,C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,IAAI,CAAC,QAAQ;AACvB,UAAE;AACE,YAAA,OAAO,EAAU,aAAa;AAC9B,YAAA,eAAe,EAAE,QAAQ;AACzB,YAAA,eAAe,EAAE,UAA8C;AAC/D,YAAA,QAAQ,EAAS,QAAQ;AAC1B,SAAA;AACH,UAAE,EAAE,EAAC,EAAA,EACP,MAAM,EAAG,CAAC,EACV,OAAO,EAAE,CAAC,EACP,CAAA,EAAA,KAAK,CACT,CAAC;;AAIF,IAAA,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,QAAA,QACEL,cAAC,CAAA,GAAG,kBAEF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3D,KAAK,EAAE,aAAa,EACpB,uBAAuB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EACzC,EAAA,IAAI,GALH,SAAS,CAMd,EACF;KACH;;IAID,MAAM,iBAAiB,GAAG,MAAM;UAC5B,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC;UAC/D,QAAQ,CAAC;IAEb,QACEA,eAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,aAAa,EAAA,EAChB,IAAI,EAEP,EAAA,QAAA,EAAA,iBAAiB,EACd,CAAA,CAAA,EACN;AACJ;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edwinvakayil/calligraphy",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "A lightweight React + TypeScript typography component with Google Fonts support. Scale from Display to Caption with a single prop.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|