@oxyhq/bloom 0.71.0 → 0.72.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/lib/commonjs/fonts/FontLoader.node.js +34 -0
  2. package/lib/commonjs/fonts/FontLoader.node.js.map +1 -0
  3. package/lib/commonjs/fonts/apply-font-faces.js +5 -4
  4. package/lib/commonjs/fonts/apply-font-faces.js.map +1 -1
  5. package/lib/commonjs/fonts/apply-font-faces.web.js +14 -16
  6. package/lib/commonjs/fonts/apply-font-faces.web.js.map +1 -1
  7. package/lib/commonjs/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  8. package/lib/commonjs/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  9. package/lib/commonjs/fonts/assets/GeistMono-Variable.woff2 +0 -0
  10. package/lib/commonjs/fonts/assets/InterVariable.woff2 +0 -0
  11. package/lib/commonjs/fonts/font-assets.web.js +3 -2
  12. package/lib/commonjs/fonts/font-assets.web.js.map +1 -1
  13. package/lib/commonjs/fonts/font-urls.web.js +35 -0
  14. package/lib/commonjs/fonts/font-urls.web.js.map +1 -0
  15. package/lib/commonjs/fonts/index.node.js +40 -0
  16. package/lib/commonjs/fonts/index.node.js.map +1 -0
  17. package/lib/module/fonts/FontLoader.node.js +29 -0
  18. package/lib/module/fonts/FontLoader.node.js.map +1 -0
  19. package/lib/module/fonts/apply-font-faces.js +5 -4
  20. package/lib/module/fonts/apply-font-faces.js.map +1 -1
  21. package/lib/module/fonts/apply-font-faces.web.js +14 -16
  22. package/lib/module/fonts/apply-font-faces.web.js.map +1 -1
  23. package/lib/module/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  24. package/lib/module/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  25. package/lib/module/fonts/assets/GeistMono-Variable.woff2 +0 -0
  26. package/lib/module/fonts/assets/InterVariable.woff2 +0 -0
  27. package/lib/module/fonts/font-assets.web.js +3 -2
  28. package/lib/module/fonts/font-assets.web.js.map +1 -1
  29. package/lib/module/fonts/font-urls.web.js +32 -0
  30. package/lib/module/fonts/font-urls.web.js.map +1 -0
  31. package/lib/module/fonts/index.node.js +22 -0
  32. package/lib/module/fonts/index.node.js.map +1 -0
  33. package/lib/module/fonts/index.web.js +3 -3
  34. package/lib/typescript/commonjs/fonts/FontLoader.node.d.ts +27 -0
  35. package/lib/typescript/commonjs/fonts/FontLoader.node.d.ts.map +1 -0
  36. package/lib/typescript/commonjs/fonts/apply-font-faces.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts +9 -11
  38. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/fonts/font-assets.web.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/fonts/font-urls.web.d.ts +6 -0
  41. package/lib/typescript/commonjs/fonts/font-urls.web.d.ts.map +1 -0
  42. package/lib/typescript/commonjs/fonts/index.node.d.ts +7 -0
  43. package/lib/typescript/commonjs/fonts/index.node.d.ts.map +1 -0
  44. package/lib/typescript/module/fonts/FontLoader.node.d.ts +27 -0
  45. package/lib/typescript/module/fonts/FontLoader.node.d.ts.map +1 -0
  46. package/lib/typescript/module/fonts/apply-font-faces.d.ts.map +1 -1
  47. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts +9 -11
  48. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts.map +1 -1
  49. package/lib/typescript/module/fonts/font-assets.web.d.ts.map +1 -1
  50. package/lib/typescript/module/fonts/font-urls.web.d.ts +6 -0
  51. package/lib/typescript/module/fonts/font-urls.web.d.ts.map +1 -0
  52. package/lib/typescript/module/fonts/index.node.d.ts +7 -0
  53. package/lib/typescript/module/fonts/index.node.d.ts.map +1 -0
  54. package/package.json +9 -7
  55. package/src/__tests__/apply-font-faces.test.ts +32 -0
  56. package/src/fonts/FontLoader.node.tsx +30 -0
  57. package/src/fonts/apply-font-faces.ts +5 -4
  58. package/src/fonts/apply-font-faces.web.ts +14 -16
  59. package/src/fonts/font-assets.web.ts +3 -2
  60. package/src/fonts/font-urls.web.ts +30 -0
  61. package/src/fonts/index.node.ts +21 -0
  62. package/src/fonts/index.web.ts +3 -3
  63. package/lib/commonjs/fonts/font-data.web.js +0 -22
  64. package/lib/commonjs/fonts/font-data.web.js.map +0 -1
  65. package/lib/module/fonts/font-data.web.js +0 -18
  66. package/lib/module/fonts/font-data.web.js.map +0 -1
  67. package/lib/typescript/commonjs/fonts/font-data.web.d.ts +0 -5
  68. package/lib/typescript/commonjs/fonts/font-data.web.d.ts.map +0 -1
  69. package/lib/typescript/module/fonts/font-data.web.d.ts +0 -5
  70. package/lib/typescript/module/fonts/font-data.web.d.ts.map +0 -1
  71. package/src/fonts/font-data.web.ts +0 -15
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FontLoader = FontLoader;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ /**
11
+ * Node font loader: a pass-through.
12
+ *
13
+ * There is no font registry to load into and no document to inject
14
+ * `@font-face` rules on, so the correct behaviour is to render children and
15
+ * stay out of the way — the same thing `FontLoader.tsx` ends up doing under
16
+ * Node once `applyFontFaces()` hits its `typeof document === 'undefined'`
17
+ * guard.
18
+ *
19
+ * It exists as a separate file rather than reusing that one because
20
+ * `FontLoader.tsx` imports `./apply-font-faces.web` outright, which reaches
21
+ * `font-urls.web`'s `.woff2` imports. Node hands a `.woff2` to the JS parser,
22
+ * so merely LOADING that module is fatal — the guard inside the function never
23
+ * gets a chance to run. Reached only through the `node` export condition on
24
+ * `./fonts`; see `scripts/generate-platform-exports.mjs` for why conditions
25
+ * are the only lever available here.
26
+ */
27
+ function FontLoader({
28
+ children
29
+ }) {
30
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
31
+ children: children
32
+ });
33
+ }
34
+ //# sourceMappingURL=FontLoader.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","FontLoader","children","jsx","Fragment"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.node.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,UAAUA,CAAC;EAAEC;AAA0B,CAAC,EAAE;EACxD,oBAAO,IAAAL,WAAA,CAAAM,GAAA,EAAAN,WAAA,CAAAO,QAAA;IAAAF,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB","ignoreList":[]}
@@ -8,10 +8,11 @@ exports.applyFontFaces = applyFontFaces;
8
8
  // is selected by bundlers via the package.json conditions. RN consumers
9
9
  // never need font-face injection — useFonts handles loading on native.
10
10
  //
11
- // The web variant does NOT pull in any `.woff2` files via asset imports —
12
- // it imports base64 data URLs from `font-data.web.ts`. This stub stays
13
- // here so the file split (`*.ts` vs `*.web.ts`) makes the platform
14
- // intent explicit and so the runtime API surface matches across platforms.
11
+ // The split is load-bearing, not decorative: the web variant reaches
12
+ // `font-urls.web.ts`, whose module-level `.woff2` imports would otherwise
13
+ // drag a second, unusable copy of every font into the native bundle
14
+ // (Metro resolves an asset import on native to a registry id, not a URL).
15
+ // Keeping this stub empty is what guarantees native pays nothing for them.
15
16
  function applyFontFaces() {
16
17
  // intentionally empty
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"names":["applyFontFaces"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAAA,EAAS;EACrC;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["applyFontFaces"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAAA,EAAS;EACrC;AAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.applyFontFaces = applyFontFaces;
7
- var _fontDataWeb = require("./font-data.web.js");
7
+ var _fontUrlsWeb = require("./font-urls.web.js");
8
8
  var _tokens = require("./tokens.js");
9
9
  const STYLE_ID = 'bloom-fonts';
10
10
 
@@ -12,18 +12,16 @@ const STYLE_ID = 'bloom-fonts';
12
12
  * Inject @font-face rules and font CSS variables onto :root.
13
13
  *
14
14
  * Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
15
- * stub — Metro cannot parse `.woff2` imports, so the file split keeps
16
- * the font payload out of the native bundle entirely. Idempotent: safe to
17
- * call multiple times; subsequent calls early-return after the
18
- * `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
19
- * `typeof document === 'undefined'` guard.
15
+ * stub — native loads its fonts through `useFonts(FONT_ASSETS)`, so the file
16
+ * split keeps the web font payload out of the native bundle entirely.
17
+ * Idempotent: safe to call multiple times; subsequent calls early-return
18
+ * after the `<style id="bloom-fonts">` tag has been mounted. SSR-safe via
19
+ * the `typeof document === 'undefined'` guard.
20
20
  *
21
- * The font URLs come from `./font-data.web`, a generated module that
22
- * embeds the woff2 bytes as base64 data URLs. Inlining (rather than
23
- * relying on bundler asset loaders for `.woff2`) means consumers do not
24
- * have to extend Metro's `assetExts` or add a webpack/Vite asset rule —
25
- * the published JS is self-contained. See `scripts/generate-font-data.mjs`
26
- * for the rationale and trade-offs.
21
+ * The URLs come from `./font-urls.web`, which imports the `.woff2` files so
22
+ * the consuming bundler emits them as separate, cacheable assets. See that
23
+ * module for the per-bundler details and for the one thing a consumer has to
24
+ * provide (Metro needs `woff2` in `assetExts`).
27
25
  */
28
26
  function applyFontFaces() {
29
27
  if (typeof document === 'undefined') return;
@@ -31,10 +29,10 @@ function applyFontFaces() {
31
29
  const style = document.createElement('style');
32
30
  style.id = STYLE_ID;
33
31
  style.textContent = `
34
- @font-face { font-family: 'BlomusModernus'; src: url(${_fontDataWeb.blomusModernusRegular}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
35
- @font-face { font-family: 'BlomusModernus'; src: url(${_fontDataWeb.blomusModernusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
36
- @font-face { font-family: 'Inter'; src: url(${_fontDataWeb.interVariable}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
37
- @font-face { font-family: 'Geist Mono'; src: url(${_fontDataWeb.geistMonoVariable}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
32
+ @font-face { font-family: 'BlomusModernus'; src: url("${_fontUrlsWeb.blomusModernusRegular}") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
33
+ @font-face { font-family: 'BlomusModernus'; src: url("${_fontUrlsWeb.blomusModernusBold}") format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
34
+ @font-face { font-family: 'Inter'; src: url("${_fontUrlsWeb.interVariable}") format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
35
+ @font-face { font-family: 'Geist Mono'; src: url("${_fontUrlsWeb.geistMonoVariable}") format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
38
36
  :root {
39
37
  --bloom-font-display: ${_tokens.fontFamilies.display};
40
38
  --bloom-font-sans: ${_tokens.fontFamilies.sans};
@@ -1 +1 @@
1
- {"version":3,"names":["_fontDataWeb","require","_tokens","STYLE_ID","applyFontFaces","document","getElementById","style","createElement","id","textContent","blomusModernusRegular","blomusModernusBold","interVariable","geistMonoVariable","fontFamilies","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.web.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAEA,MAAME,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAIA,QAAQ,CAACC,cAAc,CAACH,QAAQ,CAAC,EAAE;EAEvC,MAAMI,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGN,QAAQ;EACnBI,KAAK,CAACG,WAAW,GAAG;AACtB,2DAA2DC,kCAAqB;AAChF,2DAA2DC,+BAAkB;AAC7E,kDAAkDC,0BAAa;AAC/D,uDAAuDC,8BAAiB;AACxE;AACA,8BAA8BC,oBAAY,CAACC,OAAO;AAClD,2BAA2BD,oBAAY,CAACE,IAAI;AAC5C,2BAA2BF,oBAAY,CAACG,IAAI;AAC5C;AACA,GAAG;EACDb,QAAQ,CAACc,IAAI,CAACC,WAAW,CAACb,KAAK,CAAC;AAClC","ignoreList":[]}
1
+ {"version":3,"names":["_fontUrlsWeb","require","_tokens","STYLE_ID","applyFontFaces","document","getElementById","style","createElement","id","textContent","blomusModernusRegular","blomusModernusBold","interVariable","geistMonoVariable","fontFamilies","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.web.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAEA,MAAME,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAIA,QAAQ,CAACC,cAAc,CAACH,QAAQ,CAAC,EAAE;EAEvC,MAAMI,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGN,QAAQ;EACnBI,KAAK,CAACG,WAAW,GAAG;AACtB,4DAA4DC,kCAAqB;AACjF,4DAA4DC,+BAAkB;AAC9E,mDAAmDC,0BAAa;AAChE,wDAAwDC,8BAAiB;AACzE;AACA,8BAA8BC,oBAAY,CAACC,OAAO;AAClD,2BAA2BD,oBAAY,CAACE,IAAI;AAC5C,2BAA2BF,oBAAY,CAACG,IAAI;AAC5C;AACA,GAAG;EACDb,QAAQ,CAACc,IAAI,CAACC,WAAW,CAACb,KAAK,CAAC;AAClC","ignoreList":[]}
@@ -8,8 +8,9 @@ exports.FONT_ASSETS = void 0;
8
8
  //
9
9
  // `useFonts()` is native-only — the web `FontLoader` (`FontLoader.tsx`) calls
10
10
  // `applyFontFaces()` instead, which injects the same four families as
11
- // `@font-face` rules from base64 data URLs (`apply-font-faces.web.ts` /
12
- // `font-data.web.ts`). So the map is empty by design, not by omission.
11
+ // `@font-face` rules pointing at bundler-emitted `.woff2` URLs
12
+ // (`apply-font-faces.web.ts` / `font-urls.web.ts`). So the map is empty by
13
+ // design, not by omission.
13
14
  //
14
15
  // This file exists so `index.web.ts` can name its font-asset source
15
16
  // explicitly, exactly as it already does for `./apply-font-faces.web`. The
@@ -1 +1 @@
1
- {"version":3,"names":["FONT_ASSETS","exports"],"sourceRoot":"../../../src","sources":["fonts/font-assets.web.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGO,MAAMA,WAAyB,GAAAC,OAAA,CAAAD,WAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["FONT_ASSETS","exports"],"sourceRoot":"../../../src","sources":["fonts/font-assets.web.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGO,MAAMA,WAAyB,GAAAC,OAAA,CAAAD,WAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "blomusModernusBold", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _BlomusModernusBold.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "blomusModernusRegular", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _BlomusModernusRegular.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "geistMonoVariable", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _GeistMonoVariable.default;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "interVariable", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _InterVariable.default;
28
+ }
29
+ });
30
+ var _BlomusModernusBold = _interopRequireDefault(require("./assets/BlomusModernus-Bold.woff2"));
31
+ var _BlomusModernusRegular = _interopRequireDefault(require("./assets/BlomusModernus-Regular.woff2"));
32
+ var _GeistMonoVariable = _interopRequireDefault(require("./assets/GeistMono-Variable.woff2"));
33
+ var _InterVariable = _interopRequireDefault(require("./assets/InterVariable.woff2"));
34
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
35
+ //# sourceMappingURL=font-urls.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_BlomusModernusBold","_interopRequireDefault","require","_BlomusModernusRegular","_GeistMonoVariable","_InterVariable","e","__esModule","default"],"sourceRoot":"../../../src","sources":["fonts/font-urls.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "FONT_ASSETS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _fontAssets.FONT_ASSETS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "FontLoader", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _FontLoaderNode.FontLoader;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "applyFontFaces", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _applyFontFaces.applyFontFaces;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "fontCssVars", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _tokens.fontCssVars;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "fontFamilies", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _tokens.fontFamilies;
34
+ }
35
+ });
36
+ var _tokens = require("./tokens.js");
37
+ var _applyFontFaces = require("./apply-font-faces");
38
+ var _fontAssets = require("./font-assets");
39
+ var _FontLoaderNode = require("./FontLoader.node.js");
40
+ //# sourceMappingURL=index.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_tokens","require","_applyFontFaces","_fontAssets","_FontLoaderNode"],"sourceRoot":"../../../src","sources":["fonts/index.node.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
5
+ /**
6
+ * Node font loader: a pass-through.
7
+ *
8
+ * There is no font registry to load into and no document to inject
9
+ * `@font-face` rules on, so the correct behaviour is to render children and
10
+ * stay out of the way — the same thing `FontLoader.tsx` ends up doing under
11
+ * Node once `applyFontFaces()` hits its `typeof document === 'undefined'`
12
+ * guard.
13
+ *
14
+ * It exists as a separate file rather than reusing that one because
15
+ * `FontLoader.tsx` imports `./apply-font-faces.web` outright, which reaches
16
+ * `font-urls.web`'s `.woff2` imports. Node hands a `.woff2` to the JS parser,
17
+ * so merely LOADING that module is fatal — the guard inside the function never
18
+ * gets a chance to run. Reached only through the `node` export condition on
19
+ * `./fonts`; see `scripts/generate-platform-exports.mjs` for why conditions
20
+ * are the only lever available here.
21
+ */
22
+ export function FontLoader({
23
+ children
24
+ }) {
25
+ return /*#__PURE__*/_jsx(_Fragment, {
26
+ children: children
27
+ });
28
+ }
29
+ //# sourceMappingURL=FontLoader.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Fragment","_Fragment","jsx","_jsx","FontLoader","children"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.node.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAU1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAC;EAAEC;AAA0B,CAAC,EAAE;EACxD,oBAAOF,IAAA,CAAAF,SAAA;IAAAI,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB","ignoreList":[]}
@@ -4,10 +4,11 @@
4
4
  // is selected by bundlers via the package.json conditions. RN consumers
5
5
  // never need font-face injection — useFonts handles loading on native.
6
6
  //
7
- // The web variant does NOT pull in any `.woff2` files via asset imports —
8
- // it imports base64 data URLs from `font-data.web.ts`. This stub stays
9
- // here so the file split (`*.ts` vs `*.web.ts`) makes the platform
10
- // intent explicit and so the runtime API surface matches across platforms.
7
+ // The split is load-bearing, not decorative: the web variant reaches
8
+ // `font-urls.web.ts`, whose module-level `.woff2` imports would otherwise
9
+ // drag a second, unusable copy of every font into the native bundle
10
+ // (Metro resolves an asset import on native to a registry id, not a URL).
11
+ // Keeping this stub empty is what guarantees native pays nothing for them.
11
12
  export function applyFontFaces() {
12
13
  // intentionally empty
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"names":["applyFontFaces"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAAA,EAAS;EACrC;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["applyFontFaces"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAAA,EAAS;EACrC;AAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { blomusModernusRegular, blomusModernusBold, interVariable, geistMonoVariable } from "./font-data.web.js";
3
+ import { blomusModernusRegular, blomusModernusBold, interVariable, geistMonoVariable } from "./font-urls.web.js";
4
4
  import { fontFamilies } from "./tokens.js";
5
5
  const STYLE_ID = 'bloom-fonts';
6
6
 
@@ -8,18 +8,16 @@ const STYLE_ID = 'bloom-fonts';
8
8
  * Inject @font-face rules and font CSS variables onto :root.
9
9
  *
10
10
  * Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
11
- * stub — Metro cannot parse `.woff2` imports, so the file split keeps
12
- * the font payload out of the native bundle entirely. Idempotent: safe to
13
- * call multiple times; subsequent calls early-return after the
14
- * `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
15
- * `typeof document === 'undefined'` guard.
11
+ * stub — native loads its fonts through `useFonts(FONT_ASSETS)`, so the file
12
+ * split keeps the web font payload out of the native bundle entirely.
13
+ * Idempotent: safe to call multiple times; subsequent calls early-return
14
+ * after the `<style id="bloom-fonts">` tag has been mounted. SSR-safe via
15
+ * the `typeof document === 'undefined'` guard.
16
16
  *
17
- * The font URLs come from `./font-data.web`, a generated module that
18
- * embeds the woff2 bytes as base64 data URLs. Inlining (rather than
19
- * relying on bundler asset loaders for `.woff2`) means consumers do not
20
- * have to extend Metro's `assetExts` or add a webpack/Vite asset rule —
21
- * the published JS is self-contained. See `scripts/generate-font-data.mjs`
22
- * for the rationale and trade-offs.
17
+ * The URLs come from `./font-urls.web`, which imports the `.woff2` files so
18
+ * the consuming bundler emits them as separate, cacheable assets. See that
19
+ * module for the per-bundler details and for the one thing a consumer has to
20
+ * provide (Metro needs `woff2` in `assetExts`).
23
21
  */
24
22
  export function applyFontFaces() {
25
23
  if (typeof document === 'undefined') return;
@@ -27,10 +25,10 @@ export function applyFontFaces() {
27
25
  const style = document.createElement('style');
28
26
  style.id = STYLE_ID;
29
27
  style.textContent = `
30
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusModernusRegular}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
31
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusModernusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
32
- @font-face { font-family: 'Inter'; src: url(${interVariable}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
33
- @font-face { font-family: 'Geist Mono'; src: url(${geistMonoVariable}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
28
+ @font-face { font-family: 'BlomusModernus'; src: url("${blomusModernusRegular}") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
29
+ @font-face { font-family: 'BlomusModernus'; src: url("${blomusModernusBold}") format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
30
+ @font-face { font-family: 'Inter'; src: url("${interVariable}") format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
31
+ @font-face { font-family: 'Geist Mono'; src: url("${geistMonoVariable}") format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
34
32
  :root {
35
33
  --bloom-font-display: ${fontFamilies.display};
36
34
  --bloom-font-sans: ${fontFamilies.sans};
@@ -1 +1 @@
1
- {"version":3,"names":["blomusModernusRegular","blomusModernusBold","interVariable","geistMonoVariable","fontFamilies","STYLE_ID","applyFontFaces","document","getElementById","style","createElement","id","textContent","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.web.ts"],"mappings":";;AAAA,SACEA,qBAAqB,EACrBC,kBAAkB,EAClBC,aAAa,EACbC,iBAAiB,QACZ,oBAAiB;AACxB,SAASC,YAAY,QAAQ,aAAU;AAEvC,MAAMC,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAIA,QAAQ,CAACC,cAAc,CAACH,QAAQ,CAAC,EAAE;EAEvC,MAAMI,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGN,QAAQ;EACnBI,KAAK,CAACG,WAAW,GAAG;AACtB,2DAA2DZ,qBAAqB;AAChF,2DAA2DC,kBAAkB;AAC7E,kDAAkDC,aAAa;AAC/D,uDAAuDC,iBAAiB;AACxE;AACA,8BAA8BC,YAAY,CAACS,OAAO;AAClD,2BAA2BT,YAAY,CAACU,IAAI;AAC5C,2BAA2BV,YAAY,CAACW,IAAI;AAC5C;AACA,GAAG;EACDR,QAAQ,CAACS,IAAI,CAACC,WAAW,CAACR,KAAK,CAAC;AAClC","ignoreList":[]}
1
+ {"version":3,"names":["blomusModernusRegular","blomusModernusBold","interVariable","geistMonoVariable","fontFamilies","STYLE_ID","applyFontFaces","document","getElementById","style","createElement","id","textContent","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.web.ts"],"mappings":";;AAAA,SACEA,qBAAqB,EACrBC,kBAAkB,EAClBC,aAAa,EACbC,iBAAiB,QACZ,oBAAiB;AACxB,SAASC,YAAY,QAAQ,aAAU;AAEvC,MAAMC,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAIA,QAAQ,CAACC,cAAc,CAACH,QAAQ,CAAC,EAAE;EAEvC,MAAMI,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGN,QAAQ;EACnBI,KAAK,CAACG,WAAW,GAAG;AACtB,4DAA4DZ,qBAAqB;AACjF,4DAA4DC,kBAAkB;AAC9E,mDAAmDC,aAAa;AAChE,wDAAwDC,iBAAiB;AACzE;AACA,8BAA8BC,YAAY,CAACS,OAAO;AAClD,2BAA2BT,YAAY,CAACU,IAAI;AAC5C,2BAA2BV,YAAY,CAACW,IAAI;AAC5C;AACA,GAAG;EACDR,QAAQ,CAACS,IAAI,CAACC,WAAW,CAACR,KAAK,CAAC;AAClC","ignoreList":[]}
@@ -4,8 +4,9 @@
4
4
  //
5
5
  // `useFonts()` is native-only — the web `FontLoader` (`FontLoader.tsx`) calls
6
6
  // `applyFontFaces()` instead, which injects the same four families as
7
- // `@font-face` rules from base64 data URLs (`apply-font-faces.web.ts` /
8
- // `font-data.web.ts`). So the map is empty by design, not by omission.
7
+ // `@font-face` rules pointing at bundler-emitted `.woff2` URLs
8
+ // (`apply-font-faces.web.ts` / `font-urls.web.ts`). So the map is empty by
9
+ // design, not by omission.
9
10
  //
10
11
  // This file exists so `index.web.ts` can name its font-asset source
11
12
  // explicitly, exactly as it already does for `./apply-font-faces.web`. The
@@ -1 +1 @@
1
- {"version":3,"names":["FONT_ASSETS"],"sourceRoot":"../../../src","sources":["fonts/font-assets.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAO,MAAMA,WAAyB,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["FONT_ASSETS"],"sourceRoot":"../../../src","sources":["fonts/font-assets.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAO,MAAMA,WAAyB,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ // Web font URLs, resolved by whatever bundler is building the consuming app.
4
+ //
5
+ // WEB-ONLY. Each import below hands the `.woff2` to the app's asset pipeline,
6
+ // which emits it as a standalone file and gives us back its URL:
7
+ //
8
+ // - Metro (Expo web) rewrites the import to the exported asset path — its
9
+ // asset transformer emits a bare string module whenever the platform is
10
+ // `web`, so the imported value is the URL itself, not an asset id.
11
+ // - Vite, Rollup and webpack 5 resolve it through their own asset handling
12
+ // and return a content-hashed URL.
13
+ //
14
+ // Either way the browser fetches the four families alongside the JS and caches
15
+ // them under their own URLs, instead of re-parsing ~310 KB of base64 out of the
16
+ // entry bundle on every cold load. No consumer ever writes an asset filename
17
+ // down, so a font swap here cannot leave a downstream app pointing at a file
18
+ // that no longer exists.
19
+ //
20
+ // Metro does not carry `woff2` in its default `assetExts`, so a consumer
21
+ // bundling for web with Metro has to register it; `@oxyhq/app-preset`'s Metro
22
+ // base already does that for every Oxy app.
23
+ //
24
+ // Native never reaches this module. The default `apply-font-faces.ts` is a
25
+ // no-op stub and `FontLoader.native.tsx` loads the `.ttf` variants through
26
+ // `useFonts` instead, so no web font bytes enter a native bundle.
27
+ import blomusModernusBold from './assets/BlomusModernus-Bold.woff2';
28
+ import blomusModernusRegular from './assets/BlomusModernus-Regular.woff2';
29
+ import geistMonoVariable from './assets/GeistMono-Variable.woff2';
30
+ import interVariable from './assets/InterVariable.woff2';
31
+ export { blomusModernusRegular, blomusModernusBold, interVariable, geistMonoVariable };
32
+ //# sourceMappingURL=font-urls.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["blomusModernusBold","blomusModernusRegular","geistMonoVariable","interVariable"],"sourceRoot":"../../../src","sources":["fonts/font-urls.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,kBAAkB,MAAM,oCAAoC;AACnE,OAAOC,qBAAqB,MAAM,uCAAuC;AACzE,OAAOC,iBAAiB,MAAM,mCAAmC;AACjE,OAAOC,aAAa,MAAM,8BAA8B;AAExD,SAASF,qBAAqB,EAAED,kBAAkB,EAAEG,aAAa,EAAED,iBAAiB","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ // Node variant of the `./fonts` barrel, selected by the `node` export
4
+ // condition. Same surface as `./index.ts`, with every member resolved to the
5
+ // inert implementation:
6
+ //
7
+ // - `./apply-font-faces` is the no-op stub. The web one is unreachable here on
8
+ // purpose: it imports `font-urls.web`, whose `.woff2` imports Node feeds to
9
+ // the JS parser, so loading it throws `SyntaxError` before any runtime guard
10
+ // can help.
11
+ // - `./font-assets` is the empty map — there is no native font registry.
12
+ // - `./FontLoader.node` renders children and nothing else.
13
+ //
14
+ // Both platform-forked members are named OUTRIGHT rather than left
15
+ // extensionless, for the same reason `index.web.ts` does it: Node performs no
16
+ // platform-extension resolution, so a bare specifier would fall through to
17
+ // whichever file happens to sit at that path.
18
+ export { fontFamilies, fontCssVars } from "./tokens.js";
19
+ export { applyFontFaces } from './apply-font-faces';
20
+ export { FONT_ASSETS } from './font-assets';
21
+ export { FontLoader } from "./FontLoader.node.js";
22
+ //# sourceMappingURL=index.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["fontFamilies","fontCssVars","applyFontFaces","FONT_ASSETS","FontLoader"],"sourceRoot":"../../../src","sources":["fonts/index.node.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,WAAW,QAAQ,aAAU;AAEpD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,sBAAmB","ignoreList":[]}
@@ -8,9 +8,9 @@
8
8
  // of the box), so an extensionless specifier here would quietly fall through
9
9
  // to the default file.
10
10
  //
11
- // - `./apply-font-faces.web` performs the real `@font-face` injection using
12
- // inlined base64 data URLs (see `font-data.web.ts`); the default
13
- // `./apply-font-faces` is a no-op stub for native.
11
+ // - `./apply-font-faces.web` performs the real `@font-face` injection against
12
+ // the `.woff2` URLs the consuming bundler emits (see `font-urls.web.ts`);
13
+ // the default `./apply-font-faces` is a no-op stub for native.
14
14
  // - `./font-assets.web` is an empty map. The native map is built from Metro
15
15
  // asset `require()` calls, and importing it from an ES module throws
16
16
  // `ReferenceError: require is not defined` during module evaluation — which
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export interface FontLoaderProps {
3
+ /** Ignored — there is nothing to load. Kept so the API matches every platform. */
4
+ enabled: boolean;
5
+ /** Ignored — nothing is ever pending, so children render immediately. */
6
+ fallback?: React.ReactNode;
7
+ children: React.ReactNode;
8
+ }
9
+ /**
10
+ * Node font loader: a pass-through.
11
+ *
12
+ * There is no font registry to load into and no document to inject
13
+ * `@font-face` rules on, so the correct behaviour is to render children and
14
+ * stay out of the way — the same thing `FontLoader.tsx` ends up doing under
15
+ * Node once `applyFontFaces()` hits its `typeof document === 'undefined'`
16
+ * guard.
17
+ *
18
+ * It exists as a separate file rather than reusing that one because
19
+ * `FontLoader.tsx` imports `./apply-font-faces.web` outright, which reaches
20
+ * `font-urls.web`'s `.woff2` imports. Node hands a `.woff2` to the JS parser,
21
+ * so merely LOADING that module is fatal — the guard inside the function never
22
+ * gets a chance to run. Reached only through the `node` export condition on
23
+ * `./fonts`; see `scripts/generate-platform-exports.mjs` for why conditions
24
+ * are the only lever available here.
25
+ */
26
+ export declare function FontLoader({ children }: FontLoaderProps): import("react/jsx-runtime").JSX.Element;
27
+ //# sourceMappingURL=FontLoader.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontLoader.node.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
1
+ {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AASA,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
@@ -2,18 +2,16 @@
2
2
  * Inject @font-face rules and font CSS variables onto :root.
3
3
  *
4
4
  * Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
5
- * stub — Metro cannot parse `.woff2` imports, so the file split keeps
6
- * the font payload out of the native bundle entirely. Idempotent: safe to
7
- * call multiple times; subsequent calls early-return after the
8
- * `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
9
- * `typeof document === 'undefined'` guard.
5
+ * stub — native loads its fonts through `useFonts(FONT_ASSETS)`, so the file
6
+ * split keeps the web font payload out of the native bundle entirely.
7
+ * Idempotent: safe to call multiple times; subsequent calls early-return
8
+ * after the `<style id="bloom-fonts">` tag has been mounted. SSR-safe via
9
+ * the `typeof document === 'undefined'` guard.
10
10
  *
11
- * The font URLs come from `./font-data.web`, a generated module that
12
- * embeds the woff2 bytes as base64 data URLs. Inlining (rather than
13
- * relying on bundler asset loaders for `.woff2`) means consumers do not
14
- * have to extend Metro's `assetExts` or add a webpack/Vite asset rule —
15
- * the published JS is self-contained. See `scripts/generate-font-data.mjs`
16
- * for the rationale and trade-offs.
11
+ * The URLs come from `./font-urls.web`, which imports the `.woff2` files so
12
+ * the consuming bundler emits them as separate, cacheable assets. See that
13
+ * module for the per-bundler details and for the one thing a consumer has to
14
+ * provide (Metro needs `woff2` in `assetExts`).
17
15
  */
18
16
  export declare function applyFontFaces(): void;
19
17
  //# sourceMappingURL=apply-font-faces.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
1
+ {"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"font-assets.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.web.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
1
+ {"version":3,"file":"font-assets.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.web.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import blomusModernusBold from './assets/BlomusModernus-Bold.woff2';
2
+ import blomusModernusRegular from './assets/BlomusModernus-Regular.woff2';
3
+ import geistMonoVariable from './assets/GeistMono-Variable.woff2';
4
+ import interVariable from './assets/InterVariable.woff2';
5
+ export { blomusModernusRegular, blomusModernusBold, interVariable, geistMonoVariable };
6
+ //# sourceMappingURL=font-urls.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-urls.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-urls.web.ts"],"names":[],"mappings":"AAwBA,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { fontFamilies, fontCssVars } from './tokens';
2
+ export type { FontFamilyName } from './tokens';
3
+ export { applyFontFaces } from './apply-font-faces';
4
+ export { FONT_ASSETS } from './font-assets';
5
+ export { FontLoader } from './FontLoader.node';
6
+ export type { FontLoaderProps } from './FontLoader.node';
7
+ //# sourceMappingURL=index.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.node.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export interface FontLoaderProps {
3
+ /** Ignored — there is nothing to load. Kept so the API matches every platform. */
4
+ enabled: boolean;
5
+ /** Ignored — nothing is ever pending, so children render immediately. */
6
+ fallback?: React.ReactNode;
7
+ children: React.ReactNode;
8
+ }
9
+ /**
10
+ * Node font loader: a pass-through.
11
+ *
12
+ * There is no font registry to load into and no document to inject
13
+ * `@font-face` rules on, so the correct behaviour is to render children and
14
+ * stay out of the way — the same thing `FontLoader.tsx` ends up doing under
15
+ * Node once `applyFontFaces()` hits its `typeof document === 'undefined'`
16
+ * guard.
17
+ *
18
+ * It exists as a separate file rather than reusing that one because
19
+ * `FontLoader.tsx` imports `./apply-font-faces.web` outright, which reaches
20
+ * `font-urls.web`'s `.woff2` imports. Node hands a `.woff2` to the JS parser,
21
+ * so merely LOADING that module is fatal — the guard inside the function never
22
+ * gets a chance to run. Reached only through the `node` export condition on
23
+ * `./fonts`; see `scripts/generate-platform-exports.mjs` for why conditions
24
+ * are the only lever available here.
25
+ */
26
+ export declare function FontLoader({ children }: FontLoaderProps): import("react/jsx-runtime").JSX.Element;
27
+ //# sourceMappingURL=FontLoader.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontLoader.node.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
1
+ {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AASA,wBAAgB,cAAc,IAAI,IAAI,CAErC"}