@oxyhq/bloom 0.3.1 → 0.3.3

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 (79) hide show
  1. package/lib/commonjs/fonts/FontLoader.js +9 -2
  2. package/lib/commonjs/fonts/FontLoader.js.map +1 -1
  3. package/lib/commonjs/fonts/apply-font-faces.js +9 -40
  4. package/lib/commonjs/fonts/apply-font-faces.js.map +1 -1
  5. package/lib/commonjs/fonts/apply-font-faces.web.js +45 -0
  6. package/lib/commonjs/fonts/apply-font-faces.web.js.map +1 -0
  7. package/lib/commonjs/fonts/font-assets.js +6 -6
  8. package/lib/commonjs/fonts/font-assets.js.map +1 -1
  9. package/lib/commonjs/fonts/index.js +1 -1
  10. package/lib/commonjs/fonts/index.web.js +40 -0
  11. package/lib/commonjs/fonts/index.web.js.map +1 -0
  12. package/lib/commonjs/index.js +1 -1
  13. package/lib/commonjs/index.web.js +1 -1
  14. package/lib/module/fonts/FontLoader.js +7 -1
  15. package/lib/module/fonts/FontLoader.js.map +1 -1
  16. package/lib/module/fonts/apply-font-faces.js +9 -38
  17. package/lib/module/fonts/apply-font-faces.js.map +1 -1
  18. package/lib/module/fonts/apply-font-faces.web.js +39 -0
  19. package/lib/module/fonts/apply-font-faces.web.js.map +1 -0
  20. package/lib/module/fonts/assets/BlomusModernus-Bold.ttf +0 -0
  21. package/lib/module/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  22. package/lib/module/fonts/assets/BlomusModernus-Regular.ttf +0 -0
  23. package/lib/module/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  24. package/lib/module/fonts/assets/GeistMono-Variable.ttf +0 -0
  25. package/lib/module/fonts/assets/GeistMono-Variable.woff2 +0 -0
  26. package/lib/module/fonts/assets/InterVariable.ttf +0 -0
  27. package/lib/module/fonts/assets/InterVariable.woff2 +0 -0
  28. package/lib/module/fonts/font-assets.js +6 -6
  29. package/lib/module/fonts/font-assets.js.map +1 -1
  30. package/lib/module/fonts/index.js +1 -1
  31. package/lib/module/fonts/index.js.map +1 -1
  32. package/lib/module/fonts/index.web.js +18 -0
  33. package/lib/module/fonts/index.web.js.map +1 -0
  34. package/lib/module/index.js +1 -1
  35. package/lib/module/index.js.map +1 -1
  36. package/lib/module/index.web.js +1 -1
  37. package/lib/module/index.web.js.map +1 -1
  38. package/lib/typescript/commonjs/fonts/FontLoader.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/fonts/apply-font-faces.d.ts +0 -13
  40. package/lib/typescript/commonjs/fonts/apply-font-faces.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts +12 -0
  42. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/fonts/index.web.d.ts +7 -0
  44. package/lib/typescript/commonjs/fonts/index.web.d.ts.map +1 -0
  45. package/lib/typescript/commonjs/index.web.d.ts +1 -1
  46. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  47. package/lib/typescript/module/fonts/FontLoader.d.ts.map +1 -1
  48. package/lib/typescript/module/fonts/apply-font-faces.d.ts +0 -13
  49. package/lib/typescript/module/fonts/apply-font-faces.d.ts.map +1 -1
  50. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts +12 -0
  51. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts.map +1 -0
  52. package/lib/typescript/module/fonts/index.web.d.ts +7 -0
  53. package/lib/typescript/module/fonts/index.web.d.ts.map +1 -0
  54. package/lib/typescript/module/index.web.d.ts +1 -1
  55. package/lib/typescript/module/index.web.d.ts.map +1 -1
  56. package/package.json +7 -3
  57. package/src/__tests__/apply-font-faces.test.ts +9 -11
  58. package/src/fonts/FontLoader.tsx +7 -1
  59. package/src/fonts/apply-font-faces.ts +9 -40
  60. package/src/fonts/apply-font-faces.web.ts +38 -0
  61. package/src/fonts/assets/BlomusModernus-Bold.ttf +0 -0
  62. package/src/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  63. package/src/fonts/assets/BlomusModernus-Regular.ttf +0 -0
  64. package/src/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  65. package/src/fonts/assets/GeistMono-Variable.ttf +0 -0
  66. package/src/fonts/assets/GeistMono-Variable.woff2 +0 -0
  67. package/src/fonts/assets/InterVariable.ttf +0 -0
  68. package/src/fonts/assets/InterVariable.woff2 +0 -0
  69. package/src/fonts/font-assets.ts +6 -6
  70. package/src/fonts/index.web.ts +17 -0
  71. package/src/index.web.ts +1 -1
  72. /package/{assets/fonts → lib/commonjs/fonts/assets}/BlomusModernus-Bold.ttf +0 -0
  73. /package/{assets/fonts → lib/commonjs/fonts/assets}/BlomusModernus-Bold.woff2 +0 -0
  74. /package/{assets/fonts → lib/commonjs/fonts/assets}/BlomusModernus-Regular.ttf +0 -0
  75. /package/{assets/fonts → lib/commonjs/fonts/assets}/BlomusModernus-Regular.woff2 +0 -0
  76. /package/{assets/fonts → lib/commonjs/fonts/assets}/GeistMono-Variable.ttf +0 -0
  77. /package/{assets/fonts → lib/commonjs/fonts/assets}/GeistMono-Variable.woff2 +0 -0
  78. /package/{assets/fonts → lib/commonjs/fonts/assets}/InterVariable.ttf +0 -0
  79. /package/{assets/fonts → lib/commonjs/fonts/assets}/InterVariable.woff2 +0 -0
@@ -5,9 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.FontLoader = FontLoader;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
- var _applyFontFaces = require("./apply-font-faces.js");
8
+ var _applyFontFacesWeb = require("./apply-font-faces.web.js");
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
+ // Reach for the web variant explicitly. The default `./apply-font-faces`
12
+ // is a no-op stub that exists so Metro never sees the module-level
13
+ // `.woff2` imports on native (Metro's default `assetExts` does not include
14
+ // `.woff2`). This file (`FontLoader.tsx`) is only picked up by web
15
+ // bundlers — Metro selects `FontLoader.native.tsx` on iOS/Android — so it
16
+ // is safe to take a direct dependency on the web implementation here.
17
+
11
18
  /**
12
19
  * Web font loader. Applies the Bloom `@font-face` rules and CSS variables
13
20
  * to `:root` on first render, before the first paint, using the same
@@ -26,7 +33,7 @@ function FontLoader({
26
33
  const applied = (0, _react.useRef)(false);
27
34
  if (enabled && !applied.current) {
28
35
  applied.current = true;
29
- (0, _applyFontFaces.applyFontFaces)();
36
+ (0, _applyFontFacesWeb.applyFontFaces)();
30
37
  }
31
38
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
32
39
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_applyFontFaces","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FontLoader","enabled","children","applied","useRef","current","applyFontFaces","jsx","Fragment"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAAoD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAA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RequireWildcard","require","_applyFontFacesWeb","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FontLoader","enabled","children","applied","useRef","current","applyFontFaces","jsx","Fragment"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,kBAAA,GAAAD,OAAA;AAAwD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AANxD;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASkB,UAAUA,CAAC;EAAEC,OAAO;EAAEC;AAA0B,CAAC,EAAE;EACjE,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAC7B,IAAIH,OAAO,IAAI,CAACE,OAAO,CAACE,OAAO,EAAE;IAC/BF,OAAO,CAACE,OAAO,GAAG,IAAI;IACtB,IAAAC,iCAAc,EAAC,CAAC;EAClB;EACA,oBAAO,IAAA1B,WAAA,CAAA2B,GAAA,EAAA3B,WAAA,CAAA4B,QAAA;IAAAN,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB","ignoreList":[]}
@@ -4,46 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.applyFontFaces = applyFontFaces;
7
- var _reactNative = require("react-native");
8
- var _BlomusModernusRegular = _interopRequireDefault(require("../../assets/fonts/BlomusModernus-Regular.woff2"));
9
- var _BlomusModernusBold = _interopRequireDefault(require("../../assets/fonts/BlomusModernus-Bold.woff2"));
10
- var _InterVariable = _interopRequireDefault(require("../../assets/fonts/InterVariable.woff2"));
11
- var _GeistMonoVariable = _interopRequireDefault(require("../../assets/fonts/GeistMono-Variable.woff2"));
12
- var _tokens = require("./tokens.js");
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- /// <reference path="../assets.d.ts" />
15
-
16
- const STYLE_ID = 'bloom-fonts';
17
-
18
- /**
19
- * Inject @font-face rules and font CSS variables onto :root.
20
- *
21
- * No-op on native and when `document` is unavailable (SSR). Idempotent —
22
- * safe to call multiple times; subsequent calls early-return after the
23
- * `<style id="bloom-fonts">` tag has been mounted.
24
- *
25
- * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
26
- * single file with an internal `Platform.OS` check rather than a `.web.ts` /
27
- * `.native.ts` split. Bundlers strip the unreachable web import code path
28
- * on native because the function body short-circuits before referencing the
29
- * woff2 URLs.
30
- */
7
+ // No-op on native. The web variant lives in apply-font-faces.web.ts and
8
+ // is selected by bundlers via the package.json conditions. RN consumers
9
+ // never need font-face injection — useFonts handles loading on native.
10
+ //
11
+ // This file MUST have zero `.woff2` imports. Metro parses module-level
12
+ // imports at bundle time and would otherwise fail to resolve the `.woff2`
13
+ // assets (not in Metro's default `assetExts`). See
14
+ // `apply-font-faces.web.ts` for the real implementation.
31
15
  function applyFontFaces() {
32
- if (_reactNative.Platform.OS !== 'web' || typeof document === 'undefined') return;
33
- if (document.getElementById(STYLE_ID)) return;
34
- const style = document.createElement('style');
35
- style.id = STYLE_ID;
36
- style.textContent = `
37
- @font-face { font-family: 'BlomusModernus'; src: url(${_BlomusModernusRegular.default}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
38
- @font-face { font-family: 'BlomusModernus'; src: url(${_BlomusModernusBold.default}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
39
- @font-face { font-family: 'Inter'; src: url(${_InterVariable.default}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
40
- @font-face { font-family: 'Geist Mono'; src: url(${_GeistMonoVariable.default}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
41
- :root {
42
- --bloom-font-display: ${_tokens.fontFamilies.display};
43
- --bloom-font-sans: ${_tokens.fontFamilies.sans};
44
- --bloom-font-mono: ${_tokens.fontFamilies.mono};
45
- }
46
- `;
47
- document.head.appendChild(style);
16
+ // intentionally empty
48
17
  }
49
18
  //# sourceMappingURL=apply-font-faces.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_BlomusModernusRegular","_interopRequireDefault","_BlomusModernusBold","_InterVariable","_GeistMonoVariable","_tokens","e","__esModule","default","STYLE_ID","applyFontFaces","Platform","OS","document","getElementById","style","createElement","id","textContent","blomusReg","blomusBold","interVar","geistMono","fontFamilies","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAwC,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AANxC;;AAQA,MAAMG,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAC9D,IAAIA,QAAQ,CAACC,cAAc,CAACL,QAAQ,CAAC,EAAE;EAEvC,MAAMM,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGR,QAAQ;EACnBM,KAAK,CAACG,WAAW,GAAG;AACtB,2DAA2DC,8BAAS;AACpE,2DAA2DC,2BAAU;AACrE,kDAAkDC,sBAAQ;AAC1D,uDAAuDC,0BAAS;AAChE;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":["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":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.applyFontFaces = applyFontFaces;
7
+ var _BlomusModernusRegular = _interopRequireDefault(require("./assets/BlomusModernus-Regular.woff2"));
8
+ var _BlomusModernusBold = _interopRequireDefault(require("./assets/BlomusModernus-Bold.woff2"));
9
+ var _InterVariable = _interopRequireDefault(require("./assets/InterVariable.woff2"));
10
+ var _GeistMonoVariable = _interopRequireDefault(require("./assets/GeistMono-Variable.woff2"));
11
+ var _tokens = require("./tokens.js");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /// <reference path="../assets.d.ts" />
14
+
15
+ const STYLE_ID = 'bloom-fonts';
16
+
17
+ /**
18
+ * Inject @font-face rules and font CSS variables onto :root.
19
+ *
20
+ * Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
21
+ * stub — Metro cannot parse `.woff2` imports, so the file split keeps
22
+ * those imports out of the native bundle entirely. Idempotent: safe to
23
+ * call multiple times; subsequent calls early-return after the
24
+ * `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
25
+ * `typeof document === 'undefined'` guard.
26
+ */
27
+ function applyFontFaces() {
28
+ if (typeof document === 'undefined') return;
29
+ if (document.getElementById(STYLE_ID)) return;
30
+ const style = document.createElement('style');
31
+ style.id = STYLE_ID;
32
+ style.textContent = `
33
+ @font-face { font-family: 'BlomusModernus'; src: url(${_BlomusModernusRegular.default}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
34
+ @font-face { font-family: 'BlomusModernus'; src: url(${_BlomusModernusBold.default}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
35
+ @font-face { font-family: 'Inter'; src: url(${_InterVariable.default}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
36
+ @font-face { font-family: 'Geist Mono'; src: url(${_GeistMonoVariable.default}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
37
+ :root {
38
+ --bloom-font-display: ${_tokens.fontFamilies.display};
39
+ --bloom-font-sans: ${_tokens.fontFamilies.sans};
40
+ --bloom-font-mono: ${_tokens.fontFamilies.mono};
41
+ }
42
+ `;
43
+ document.head.appendChild(style);
44
+ }
45
+ //# sourceMappingURL=apply-font-faces.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_BlomusModernusRegular","_interopRequireDefault","require","_BlomusModernusBold","_InterVariable","_GeistMonoVariable","_tokens","e","__esModule","default","STYLE_ID","applyFontFaces","document","getElementById","style","createElement","id","textContent","blomusReg","blomusBold","interVar","geistMono","fontFamilies","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.web.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAwC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AALxC;;AAOA,MAAMG,QAAQ,GAAG,aAAa;;AAE9B;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,8BAAS;AACpE,2DAA2DC,2BAAU;AACrE,kDAAkDC,sBAAQ;AAC1D,uDAAuDC,0BAAS;AAChE;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":[]}
@@ -11,13 +11,13 @@ exports.FONT_ASSETS = void 0;
11
11
  // covers all weights at runtime. `@fontsource(-variable)?/*` packages only
12
12
  // publish .woff2 for their variable axes — modern react-native font loading
13
13
  // requires .ttf, so we use the upstream variable TTFs instead. On web,
14
- // `apply-font-faces.ts` references the .woff2 variants directly and this file
15
- // is never imported.
14
+ // `apply-font-faces.web.ts` references the .woff2 variants directly and this
15
+ // file is never imported.
16
16
 
17
17
  const FONT_ASSETS = exports.FONT_ASSETS = {
18
- BlomusModernus: require('../../assets/fonts/BlomusModernus-Regular.ttf'),
19
- 'BlomusModernus-Bold': require('../../assets/fonts/BlomusModernus-Bold.ttf'),
20
- Inter: require('../../assets/fonts/InterVariable.ttf'),
21
- 'Geist Mono': require('../../assets/fonts/GeistMono-Variable.ttf')
18
+ BlomusModernus: require('./assets/BlomusModernus-Regular.ttf'),
19
+ 'BlomusModernus-Bold': require('./assets/BlomusModernus-Bold.ttf'),
20
+ Inter: require('./assets/InterVariable.ttf'),
21
+ 'Geist Mono': require('./assets/GeistMono-Variable.ttf')
22
22
  };
23
23
  //# sourceMappingURL=font-assets.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FONT_ASSETS","exports","BlomusModernus","require","Inter"],"sourceRoot":"../../../src","sources":["fonts/font-assets.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,cAAc,EAAEC,OAAO,CAAC,+CAA+C,CAAC;EACxE,qBAAqB,EAAEA,OAAO,CAAC,4CAA4C,CAAC;EAC5EC,KAAK,EAAED,OAAO,CAAC,sCAAsC,CAAC;EACtD,YAAY,EAAEA,OAAO,CAAC,2CAA2C;AACnE,CAAU","ignoreList":[]}
1
+ {"version":3,"names":["FONT_ASSETS","exports","BlomusModernus","require","Inter"],"sourceRoot":"../../../src","sources":["fonts/font-assets.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,cAAc,EAAEC,OAAO,CAAC,qCAAqC,CAAC;EAC9D,qBAAqB,EAAEA,OAAO,CAAC,kCAAkC,CAAC;EAClEC,KAAK,EAAED,OAAO,CAAC,4BAA4B,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,iCAAiC;AACzD,CAAU","ignoreList":[]}
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "fontFamilies", {
34
34
  }
35
35
  });
36
36
  var _tokens = require("./tokens.js");
37
- var _applyFontFaces = require("./apply-font-faces.js");
37
+ var _applyFontFaces = require("./apply-font-faces");
38
38
  var _fontAssets = require("./font-assets.js");
39
39
  var _FontLoader = require("./FontLoader");
40
40
  //# sourceMappingURL=index.js.map
@@ -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 _FontLoader.FontLoader;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "applyFontFaces", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _applyFontFacesWeb.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 _applyFontFacesWeb = require("./apply-font-faces.web.js");
38
+ var _fontAssets = require("./font-assets.js");
39
+ var _FontLoader = require("./FontLoader");
40
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_tokens","require","_applyFontFacesWeb","_fontAssets","_FontLoader"],"sourceRoot":"../../../src","sources":["fonts/index.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA","ignoreList":[]}
@@ -386,7 +386,7 @@ var _ContextMenu = _interopRequireWildcard(require("./context-menu"));
386
386
  exports.ContextMenu = _ContextMenu;
387
387
  var _Code = _interopRequireWildcard(require("./code/index.js"));
388
388
  exports.Code = _Code;
389
- var _Fonts = _interopRequireWildcard(require("./fonts/index.js"));
389
+ var _Fonts = _interopRequireWildcard(require("./fonts"));
390
390
  exports.Fonts = _Fonts;
391
391
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
392
392
  //# sourceMappingURL=index.js.map
@@ -386,7 +386,7 @@ var _ContextMenu = _interopRequireWildcard(require("./context-menu/index.web.js"
386
386
  exports.ContextMenu = _ContextMenu;
387
387
  var _Code = _interopRequireWildcard(require("./code/index.js"));
388
388
  exports.Code = _Code;
389
- var _Fonts = _interopRequireWildcard(require("./fonts/index.js"));
389
+ var _Fonts = _interopRequireWildcard(require("./fonts/index.web.js"));
390
390
  exports.Fonts = _Fonts;
391
391
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
392
392
  //# sourceMappingURL=index.web.js.map
@@ -1,7 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useRef } from 'react';
4
- import { applyFontFaces } from "./apply-font-faces.js";
4
+ // Reach for the web variant explicitly. The default `./apply-font-faces`
5
+ // is a no-op stub that exists so Metro never sees the module-level
6
+ // `.woff2` imports on native (Metro's default `assetExts` does not include
7
+ // `.woff2`). This file (`FontLoader.tsx`) is only picked up by web
8
+ // bundlers — Metro selects `FontLoader.native.tsx` on iOS/Android — so it
9
+ // is safe to take a direct dependency on the web implementation here.
10
+ import { applyFontFaces } from "./apply-font-faces.web.js";
5
11
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
6
12
  /**
7
13
  * Web font loader. Applies the Bloom `@font-face` rules and CSS variables
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","applyFontFaces","Fragment","_Fragment","jsx","_jsx","FontLoader","enabled","children","applied","current"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SAASC,cAAc,QAAQ,uBAAoB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAiBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAC;EAAEC,OAAO;EAAEC;AAA0B,CAAC,EAAE;EACjE,MAAMC,OAAO,GAAGT,MAAM,CAAC,KAAK,CAAC;EAC7B,IAAIO,OAAO,IAAI,CAACE,OAAO,CAACC,OAAO,EAAE;IAC/BD,OAAO,CAACC,OAAO,GAAG,IAAI;IACtBT,cAAc,CAAC,CAAC;EAClB;EACA,oBAAOI,IAAA,CAAAF,SAAA;IAAAK,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB","ignoreList":[]}
1
+ {"version":3,"names":["React","useRef","applyFontFaces","Fragment","_Fragment","jsx","_jsx","FontLoader","enabled","children","applied","current"],"sourceRoot":"../../../src","sources":["fonts/FontLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAc,QAAQ,2BAAwB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAiBxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAC;EAAEC,OAAO;EAAEC;AAA0B,CAAC,EAAE;EACjE,MAAMC,OAAO,GAAGT,MAAM,CAAC,KAAK,CAAC;EAC7B,IAAIO,OAAO,IAAI,CAACE,OAAO,CAACC,OAAO,EAAE;IAC/BD,OAAO,CAACC,OAAO,GAAG,IAAI;IACtBT,cAAc,CAAC,CAAC;EAClB;EACA,oBAAOI,IAAA,CAAAF,SAAA;IAAAK,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB","ignoreList":[]}
@@ -1,43 +1,14 @@
1
1
  "use strict";
2
2
 
3
- /// <reference path="../assets.d.ts" />
4
- import { Platform } from 'react-native';
5
- import blomusReg from '../../assets/fonts/BlomusModernus-Regular.woff2';
6
- import blomusBold from '../../assets/fonts/BlomusModernus-Bold.woff2';
7
- import interVar from '../../assets/fonts/InterVariable.woff2';
8
- import geistMono from '../../assets/fonts/GeistMono-Variable.woff2';
9
- import { fontFamilies } from "./tokens.js";
10
- const STYLE_ID = 'bloom-fonts';
11
-
12
- /**
13
- * Inject @font-face rules and font CSS variables onto :root.
14
- *
15
- * No-op on native and when `document` is unavailable (SSR). Idempotent —
16
- * safe to call multiple times; subsequent calls early-return after the
17
- * `<style id="bloom-fonts">` tag has been mounted.
18
- *
19
- * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
20
- * single file with an internal `Platform.OS` check rather than a `.web.ts` /
21
- * `.native.ts` split. Bundlers strip the unreachable web import code path
22
- * on native because the function body short-circuits before referencing the
23
- * woff2 URLs.
24
- */
3
+ // No-op on native. The web variant lives in apply-font-faces.web.ts and
4
+ // is selected by bundlers via the package.json conditions. RN consumers
5
+ // never need font-face injection — useFonts handles loading on native.
6
+ //
7
+ // This file MUST have zero `.woff2` imports. Metro parses module-level
8
+ // imports at bundle time and would otherwise fail to resolve the `.woff2`
9
+ // assets (not in Metro's default `assetExts`). See
10
+ // `apply-font-faces.web.ts` for the real implementation.
25
11
  export function applyFontFaces() {
26
- if (Platform.OS !== 'web' || typeof document === 'undefined') return;
27
- if (document.getElementById(STYLE_ID)) return;
28
- const style = document.createElement('style');
29
- style.id = STYLE_ID;
30
- style.textContent = `
31
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusReg}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
32
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
33
- @font-face { font-family: 'Inter'; src: url(${interVar}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
34
- @font-face { font-family: 'Geist Mono'; src: url(${geistMono}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
35
- :root {
36
- --bloom-font-display: ${fontFamilies.display};
37
- --bloom-font-sans: ${fontFamilies.sans};
38
- --bloom-font-mono: ${fontFamilies.mono};
39
- }
40
- `;
41
- document.head.appendChild(style);
12
+ // intentionally empty
42
13
  }
43
14
  //# sourceMappingURL=apply-font-faces.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","blomusReg","blomusBold","interVar","geistMono","fontFamilies","STYLE_ID","applyFontFaces","OS","document","getElementById","style","createElement","id","textContent","display","sans","mono","head","appendChild"],"sourceRoot":"../../../src","sources":["fonts/apply-font-faces.ts"],"mappings":";;AAAA;AACA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,SAAS,MAAM,iDAAiD;AACvE,OAAOC,UAAU,MAAM,8CAA8C;AACrE,OAAOC,QAAQ,MAAM,wCAAwC;AAC7D,OAAOC,SAAS,MAAM,6CAA6C;AACnE,SAASC,YAAY,QAAQ,aAAU;AAEvC,MAAMC,QAAQ,GAAG,aAAa;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAS;EACrC,IAAIP,QAAQ,CAACQ,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAC9D,IAAIA,QAAQ,CAACC,cAAc,CAACJ,QAAQ,CAAC,EAAE;EAEvC,MAAMK,KAAK,GAAGF,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACE,EAAE,GAAGP,QAAQ;EACnBK,KAAK,CAACG,WAAW,GAAG;AACtB,2DAA2Db,SAAS;AACpE,2DAA2DC,UAAU;AACrE,kDAAkDC,QAAQ;AAC1D,uDAAuDC,SAAS;AAChE;AACA,8BAA8BC,YAAY,CAACU,OAAO;AAClD,2BAA2BV,YAAY,CAACW,IAAI;AAC5C,2BAA2BX,YAAY,CAACY,IAAI;AAC5C;AACA,GAAG;EACDR,QAAQ,CAACS,IAAI,CAACC,WAAW,CAACR,KAAK,CAAC;AAClC","ignoreList":[]}
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":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ /// <reference path="../assets.d.ts" />
4
+ import blomusReg from './assets/BlomusModernus-Regular.woff2';
5
+ import blomusBold from './assets/BlomusModernus-Bold.woff2';
6
+ import interVar from './assets/InterVariable.woff2';
7
+ import geistMono from './assets/GeistMono-Variable.woff2';
8
+ import { fontFamilies } from "./tokens.js";
9
+ const STYLE_ID = 'bloom-fonts';
10
+
11
+ /**
12
+ * Inject @font-face rules and font CSS variables onto :root.
13
+ *
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
+ * those imports 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.
20
+ */
21
+ export function applyFontFaces() {
22
+ if (typeof document === 'undefined') return;
23
+ if (document.getElementById(STYLE_ID)) return;
24
+ const style = document.createElement('style');
25
+ style.id = STYLE_ID;
26
+ style.textContent = `
27
+ @font-face { font-family: 'BlomusModernus'; src: url(${blomusReg}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
28
+ @font-face { font-family: 'BlomusModernus'; src: url(${blomusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
29
+ @font-face { font-family: 'Inter'; src: url(${interVar}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
30
+ @font-face { font-family: 'Geist Mono'; src: url(${geistMono}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
31
+ :root {
32
+ --bloom-font-display: ${fontFamilies.display};
33
+ --bloom-font-sans: ${fontFamilies.sans};
34
+ --bloom-font-mono: ${fontFamilies.mono};
35
+ }
36
+ `;
37
+ document.head.appendChild(style);
38
+ }
39
+ //# sourceMappingURL=apply-font-faces.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["blomusReg","blomusBold","interVar","geistMono","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;AACA,OAAOA,SAAS,MAAM,uCAAuC;AAC7D,OAAOC,UAAU,MAAM,oCAAoC;AAC3D,OAAOC,QAAQ,MAAM,8BAA8B;AACnD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,YAAY,QAAQ,aAAU;AAEvC,MAAMC,QAAQ,GAAG,aAAa;;AAE9B;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,SAAS;AACpE,2DAA2DC,UAAU;AACrE,kDAAkDC,QAAQ;AAC1D,uDAAuDC,SAAS;AAChE;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":[]}
@@ -7,13 +7,13 @@
7
7
  // covers all weights at runtime. `@fontsource(-variable)?/*` packages only
8
8
  // publish .woff2 for their variable axes — modern react-native font loading
9
9
  // requires .ttf, so we use the upstream variable TTFs instead. On web,
10
- // `apply-font-faces.ts` references the .woff2 variants directly and this file
11
- // is never imported.
10
+ // `apply-font-faces.web.ts` references the .woff2 variants directly and this
11
+ // file is never imported.
12
12
 
13
13
  export const FONT_ASSETS = {
14
- BlomusModernus: require('../../assets/fonts/BlomusModernus-Regular.ttf'),
15
- 'BlomusModernus-Bold': require('../../assets/fonts/BlomusModernus-Bold.ttf'),
16
- Inter: require('../../assets/fonts/InterVariable.ttf'),
17
- 'Geist Mono': require('../../assets/fonts/GeistMono-Variable.ttf')
14
+ BlomusModernus: require('./assets/BlomusModernus-Regular.ttf'),
15
+ 'BlomusModernus-Bold': require('./assets/BlomusModernus-Bold.ttf'),
16
+ Inter: require('./assets/InterVariable.ttf'),
17
+ 'Geist Mono': require('./assets/GeistMono-Variable.ttf')
18
18
  };
19
19
  //# sourceMappingURL=font-assets.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FONT_ASSETS","BlomusModernus","require","Inter"],"sourceRoot":"../../../src","sources":["fonts/font-assets.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,WAAW,GAAG;EACzBC,cAAc,EAAEC,OAAO,CAAC,+CAA+C,CAAC;EACxE,qBAAqB,EAAEA,OAAO,CAAC,4CAA4C,CAAC;EAC5EC,KAAK,EAAED,OAAO,CAAC,sCAAsC,CAAC;EACtD,YAAY,EAAEA,OAAO,CAAC,2CAA2C;AACnE,CAAU","ignoreList":[]}
1
+ {"version":3,"names":["FONT_ASSETS","BlomusModernus","require","Inter"],"sourceRoot":"../../../src","sources":["fonts/font-assets.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,WAAW,GAAG;EACzBC,cAAc,EAAEC,OAAO,CAAC,qCAAqC,CAAC;EAC9D,qBAAqB,EAAEA,OAAO,CAAC,kCAAkC,CAAC;EAClEC,KAAK,EAAED,OAAO,CAAC,4BAA4B,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,iCAAiC;AACzD,CAAU","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  export { fontFamilies, fontCssVars } from "./tokens.js";
4
- export { applyFontFaces } from "./apply-font-faces.js";
4
+ export { applyFontFaces } from './apply-font-faces';
5
5
  export { FONT_ASSETS } from "./font-assets.js";
6
6
  export { FontLoader } from './FontLoader';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fontFamilies","fontCssVars","applyFontFaces","FONT_ASSETS","FontLoader"],"sourceRoot":"../../../src","sources":["fonts/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,aAAU;AAEpD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["fontFamilies","fontCssVars","applyFontFaces","FONT_ASSETS","FontLoader"],"sourceRoot":"../../../src","sources":["fonts/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,aAAU;AAEpD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ // Web variant of the `./fonts` barrel.
4
+ //
5
+ // The default barrel (`./index.ts`) re-exports `applyFontFaces` from
6
+ // `./apply-font-faces`, which on native resolves to a no-op stub — Metro
7
+ // cannot parse `.woff2` module-level imports. The web fork explicitly
8
+ // reaches for `./apply-font-faces.web`, which performs the real `@font-face`
9
+ // injection.
10
+ //
11
+ // Web bundlers select this file via the `"browser"` condition in
12
+ // `package.json`'s `exports['./fonts']`; native bundlers fall through to
13
+ // `./index.ts` via the `"react-native"` condition.
14
+ export { fontFamilies, fontCssVars } from "./tokens.js";
15
+ export { applyFontFaces } from "./apply-font-faces.web.js";
16
+ export { FONT_ASSETS } from "./font-assets.js";
17
+ export { FontLoader } from './FontLoader';
18
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["fontFamilies","fontCssVars","applyFontFaces","FONT_ASSETS","FontLoader"],"sourceRoot":"../../../src","sources":["fonts/index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,WAAW,QAAQ,aAAU;AAEpD,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc","ignoreList":[]}
@@ -71,5 +71,5 @@ export * as ContextMenu from './context-menu';
71
71
  export * as Code from "./code/index.js";
72
72
 
73
73
  // Fonts
74
- export * as Fonts from "./fonts/index.js";
74
+ export * as Fonts from './fonts';
75
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["atoms","flatten","tokens","web","native","ios","android","platform","select","useInteractionState","useDelayedLoading","useThrottledValue","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","Prompt","ErrorBoundary","PromptInput","Toast","Typography","Skeleton","Grid","Fill","IconCircle","TextField","SegmentedControl","SearchInput","BottomSheet","Tabs","Accordion","Admonition","Menu","Tooltip","Select","ContextMenu","Code","Fonts"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,QAAQ,mBAAU;AAEzC,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,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AAKC,UAAU,MAAM,uBAAc;AAC1C,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,WAAW,MAAM,gBAAgB;;AAE7C;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS","ignoreList":[]}
1
+ {"version":3,"names":["atoms","flatten","tokens","web","native","ios","android","platform","select","useInteractionState","useDelayedLoading","useThrottledValue","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","Prompt","ErrorBoundary","PromptInput","Toast","Typography","Skeleton","Grid","Fill","IconCircle","TextField","SegmentedControl","SearchInput","BottomSheet","Tabs","Accordion","Admonition","Menu","Tooltip","Select","ContextMenu","Code","Fonts"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,QAAQ,mBAAU;AAEzC,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8BAA2B;;AAE7D;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS;AAChC,SAAkCC,KAAK,IAAIC,SAAS,EAAEC,iBAAiB,QAAQ,mBAAgB;;AAE/F;AACA,cAAc,UAAU;AACxB,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,MAAM,MAAM,mBAAU;AAClC,cAAc,mBAAU;AACxB,cAAc,4BAAmB;AACjC,cAAc,oBAAW;AACzB,cAAc,4BAAmB;AACjC,cAAc,wBAAe;AAC7B,SAASC,aAAa,QAAQ,2BAAkB;AAEhD,cAAc,mBAAU;AACxB,cAAc,oBAAW;AACzB,OAAO,KAAKC,WAAW,MAAM,yBAAgB;AAC7C,cAAc,mBAAU;AACxB,OAAO,KAAKC,KAAK,MAAM,SAAS;;AAEhC;AACA,OAAO,KAAKC,UAAU,MAAM,uBAAc;;AAE1C;AACA,OAAO,KAAKC,QAAQ,MAAM,qBAAY;AACtC,OAAO,KAAKC,IAAI,MAAM,iBAAQ;AAC9B,SAASC,IAAI,QAAQ,iBAAQ;AAC7B,SAASC,UAAU,QAAQ,wBAAe;;AAE1C;AACA,OAAO,KAAKC,SAAS,MAAM,uBAAc;AACzC,OAAO,KAAKC,gBAAgB,MAAM,8BAAqB;AACvD,SAASC,WAAW,QAAQ,yBAAgB;;AAE5C;AACA,SAASC,WAAW,QAAQ,yBAAgB;AAG5C;AACA,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,OAAO,KAAKC,IAAI,MAAM,iBAAQ;AAC9B,cAAc,qBAAY;AAC1B,OAAO,KAAKC,SAAS,MAAM,sBAAa;;AAExC;AACA,cAAc,0BAAiB;;AAE/B;AACA,OAAO,KAAKC,UAAU,MAAM,uBAAc;AAC1C,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,WAAW,MAAM,gBAAgB;;AAE7C;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,SAAS","ignoreList":[]}
@@ -76,5 +76,5 @@ export * as ContextMenu from "./context-menu/index.web.js";
76
76
  export * as Code from "./code/index.js";
77
77
 
78
78
  // Fonts
79
- export * as Fonts from "./fonts/index.js";
79
+ export * as Fonts from "./fonts/index.web.js";
80
80
  //# sourceMappingURL=index.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["atoms","flatten","tokens","web","native","ios","android","platform","select","useInteractionState","useDelayedLoading","useThrottledValue","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","Prompt","ErrorBoundary","PromptInput","Toast","Typography","Skeleton","Grid","Fill","IconCircle","TextField","SegmentedControl","SearchInput","BottomSheet","Tabs","Accordion","Admonition","Menu","Tooltip","Select","ContextMenu","Code","Fonts"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,QAAQ,mBAAU;AAEzC,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8BAA2B;;AAE7D;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS;AAChC,SAAkCC,KAAK,IAAIC,SAAS,EAAEC,iBAAiB,QAAQ,mBAAgB;;AAE/F;AACA,cAAc,uBAAoB;AAClC,OAAO,KAAKC,MAAM,MAAM,uBAAoB;AAC5C,OAAO,KAAKC,MAAM,MAAM,mBAAU;AAClC,cAAc,mBAAU;AACxB,cAAc,4BAAmB;AACjC,cAAc,oBAAW;AACzB,cAAc,4BAAmB;AACjC,cAAc,wBAAe;AAC7B,SAASC,aAAa,QAAQ,2BAAkB;AAEhD,cAAc,mBAAU;AACxB,cAAc,oBAAW;AACzB,OAAO,KAAKC,WAAW,MAAM,yBAAgB;AAC7C,cAAc,mBAAU;AACxB,OAAO,KAAKC,KAAK,MAAM,sBAAmB;;AAE1C;AACA,OAAO,KAAKC,UAAU,MAAM,uBAAc;;AAE1C;AACA,OAAO,KAAKC,QAAQ,MAAM,qBAAY;AACtC,OAAO,KAAKC,IAAI,MAAM,iBAAQ;AAC9B,SAASC,IAAI,QAAQ,iBAAQ;AAC7B,SAASC,UAAU,QAAQ,wBAAe;;AAE1C;AACA,OAAO,KAAKC,SAAS,MAAM,uBAAc;AACzC,OAAO,KAAKC,gBAAgB,MAAM,8BAAqB;AACvD,SAASC,WAAW,QAAQ,yBAAgB;;AAE5C;AACA,SAASC,WAAW,QAAQ,yBAAgB;AAG5C;AACA,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,OAAO,KAAKC,IAAI,MAAM,iBAAQ;AAC9B,cAAc,qBAAY;AAC1B,OAAO,KAAKC,SAAS,MAAM,sBAAa;;AAExC;AACA,cAAc,0BAAiB;;AAE/B;AACA,OAAO,KAAKC,UAAU,MAAM,uBAAc;AAC1C,OAAO,KAAKC,IAAI,MAAM,qBAAkB;AACxC,OAAO,KAAKC,OAAO,MAAM,wBAAqB;AAC9C,OAAO,KAAKC,MAAM,MAAM,uBAAoB;AAC5C,OAAO,KAAKC,WAAW,MAAM,6BAA0B;;AAEvD;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS","ignoreList":[]}
1
+ {"version":3,"names":["atoms","flatten","tokens","web","native","ios","android","platform","select","useInteractionState","useDelayedLoading","useThrottledValue","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","Prompt","ErrorBoundary","PromptInput","Toast","Typography","Skeleton","Grid","Fill","IconCircle","TextField","SegmentedControl","SearchInput","BottomSheet","Tabs","Accordion","Admonition","Menu","Tooltip","Select","ContextMenu","Code","Fonts"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,QAAQ,mBAAU;AAEzC,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,E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OAAO,KAAKC,UAAU,MAAM,uBAAc;AAC1C,OAAO,KAAKC,IAAI,MAAM,qBAAkB;AACxC,OAAO,KAAKC,OAAO,MAAM,wBAAqB;AAC9C,OAAO,KAAKC,MAAM,MAAM,uBAAoB;AAC5C,OAAO,KAAKC,WAAW,MAAM,6BAA0B;;AAEvD;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,sBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
1
+ {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
@@ -1,15 +1,2 @@
1
- /**
2
- * Inject @font-face rules and font CSS variables onto :root.
3
- *
4
- * No-op on native and when `document` is unavailable (SSR). Idempotent —
5
- * safe to call multiple times; subsequent calls early-return after the
6
- * `<style id="bloom-fonts">` tag has been mounted.
7
- *
8
- * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
9
- * single file with an internal `Platform.OS` check rather than a `.web.ts` /
10
- * `.native.ts` split. Bundlers strip the unreachable web import code path
11
- * on native because the function body short-circuits before referencing the
12
- * woff2 URLs.
13
- */
14
1
  export declare function applyFontFaces(): void;
15
2
  //# sourceMappingURL=apply-font-faces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
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"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Inject @font-face rules and font CSS variables onto :root.
3
+ *
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
+ * those imports 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.
10
+ */
11
+ export declare function applyFontFaces(): void;
12
+ //# sourceMappingURL=apply-font-faces.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
@@ -0,0 +1,7 @@
1
+ export { fontFamilies, fontCssVars } from './tokens';
2
+ export type { FontFamilyName } from './tokens';
3
+ export { applyFontFaces } from './apply-font-faces.web';
4
+ export { FONT_ASSETS } from './font-assets';
5
+ export { FontLoader } from './FontLoader';
6
+ export type { FontLoaderProps } from './FontLoader';
7
+ //# sourceMappingURL=index.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -46,5 +46,5 @@ export * as Tooltip from './tooltip/index.web';
46
46
  export * as Select from './select/index.web';
47
47
  export * as ContextMenu from './context-menu/index.web';
48
48
  export * as Code from './code';
49
- export * as Fonts from './fonts';
49
+ export * as Fonts from './fonts/index.web';
50
50
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,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kB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
1
+ {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
@@ -1,15 +1,2 @@
1
- /**
2
- * Inject @font-face rules and font CSS variables onto :root.
3
- *
4
- * No-op on native and when `document` is unavailable (SSR). Idempotent —
5
- * safe to call multiple times; subsequent calls early-return after the
6
- * `<style id="bloom-fonts">` tag has been mounted.
7
- *
8
- * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
9
- * single file with an internal `Platform.OS` check rather than a `.web.ts` /
10
- * `.native.ts` split. Bundlers strip the unreachable web import code path
11
- * on native because the function body short-circuits before referencing the
12
- * woff2 URLs.
13
- */
14
1
  export declare function applyFontFaces(): void;
15
2
  //# sourceMappingURL=apply-font-faces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
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"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Inject @font-face rules and font CSS variables onto :root.
3
+ *
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
+ * those imports 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.
10
+ */
11
+ export declare function applyFontFaces(): void;
12
+ //# sourceMappingURL=apply-font-faces.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-font-faces.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.web.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
@@ -0,0 +1,7 @@
1
+ export { fontFamilies, fontCssVars } from './tokens';
2
+ export type { FontFamilyName } from './tokens';
3
+ export { applyFontFaces } from './apply-font-faces.web';
4
+ export { FONT_ASSETS } from './font-assets';
5
+ export { FontLoader } from './FontLoader';
6
+ export type { FontLoaderProps } from './FontLoader';
7
+ //# sourceMappingURL=index.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -46,5 +46,5 @@ export * as Tooltip from './tooltip/index.web';
46
46
  export * as Select from './select/index.web';
47
47
  export * as ContextMenu from './context-menu/index.web';
48
48
  export * as Code from './code';
49
- export * as Fonts from './fonts';
49
+ export * as Fonts from './fonts/index.web';
50
50
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,KAAK,KAAK,MAAM,SAAS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AAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/bloom",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -527,6 +527,11 @@
527
527
  },
528
528
  "./fonts": {
529
529
  "react-native": "./src/fonts/index.ts",
530
+ "browser": {
531
+ "types": "./lib/typescript/module/fonts/index.web.d.ts",
532
+ "import": "./lib/module/fonts/index.web.js",
533
+ "require": "./lib/commonjs/fonts/index.web.js"
534
+ },
530
535
  "import": {
531
536
  "types": "./lib/typescript/module/fonts/index.d.ts",
532
537
  "default": "./lib/module/fonts/index.js"
@@ -540,8 +545,7 @@
540
545
  },
541
546
  "files": [
542
547
  "src",
543
- "lib",
544
- "assets"
548
+ "lib"
545
549
  ],
546
550
  "keywords": [
547
551
  "react-native",
@@ -2,20 +2,18 @@
2
2
  * @jest-environment jsdom
3
3
  */
4
4
 
5
- import { Platform } from 'react-native';
6
- import { applyFontFaces } from '../fonts/apply-font-faces';
7
-
8
- describe('applyFontFaces', () => {
9
- const originalOS = Platform.OS;
10
-
5
+ // Import the web variant directly. The default `apply-font-faces.ts` is a
6
+ // no-op stub that exists only so Metro never sees a module-level `.woff2`
7
+ // import on native — the real font-face injection lives in
8
+ // `apply-font-faces.web.ts`. Web bundlers select that file via extension
9
+ // resolution; here we reach for it explicitly so the test exercises the
10
+ // actual implementation under jsdom.
11
+ import { applyFontFaces } from '../fonts/apply-font-faces.web';
12
+
13
+ describe('applyFontFaces (web)', () => {
11
14
  beforeEach(() => {
12
15
  document.head.innerHTML = '';
13
16
  document.body.innerHTML = '';
14
- Platform.OS = 'web';
15
- });
16
-
17
- afterAll(() => {
18
- Platform.OS = originalOS;
19
17
  });
20
18
 
21
19
  it('injects a <style id="bloom-fonts"> element on first call', () => {
@@ -1,5 +1,11 @@
1
1
  import React, { useRef } from 'react';
2
- import { applyFontFaces } from './apply-font-faces';
2
+ // Reach for the web variant explicitly. The default `./apply-font-faces`
3
+ // is a no-op stub that exists so Metro never sees the module-level
4
+ // `.woff2` imports on native (Metro's default `assetExts` does not include
5
+ // `.woff2`). This file (`FontLoader.tsx`) is only picked up by web
6
+ // bundlers — Metro selects `FontLoader.native.tsx` on iOS/Android — so it
7
+ // is safe to take a direct dependency on the web implementation here.
8
+ import { applyFontFaces } from './apply-font-faces.web';
3
9
 
4
10
  export interface FontLoaderProps {
5
11
  /**
@@ -1,42 +1,11 @@
1
- /// <reference path="../assets.d.ts" />
2
- import { Platform } from 'react-native';
3
- import blomusReg from '../../assets/fonts/BlomusModernus-Regular.woff2';
4
- import blomusBold from '../../assets/fonts/BlomusModernus-Bold.woff2';
5
- import interVar from '../../assets/fonts/InterVariable.woff2';
6
- import geistMono from '../../assets/fonts/GeistMono-Variable.woff2';
7
- import { fontFamilies } from './tokens';
8
-
9
- const STYLE_ID = 'bloom-fonts';
10
-
11
- /**
12
- * Inject @font-face rules and font CSS variables onto :root.
13
- *
14
- * No-op on native and when `document` is unavailable (SSR). Idempotent —
15
- * safe to call multiple times; subsequent calls early-return after the
16
- * `<style id="bloom-fonts">` tag has been mounted.
17
- *
18
- * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
19
- * single file with an internal `Platform.OS` check rather than a `.web.ts` /
20
- * `.native.ts` split. Bundlers strip the unreachable web import code path
21
- * on native because the function body short-circuits before referencing the
22
- * woff2 URLs.
23
- */
1
+ // No-op on native. The web variant lives in apply-font-faces.web.ts and
2
+ // is selected by bundlers via the package.json conditions. RN consumers
3
+ // never need font-face injection — useFonts handles loading on native.
4
+ //
5
+ // This file MUST have zero `.woff2` imports. Metro parses module-level
6
+ // imports at bundle time and would otherwise fail to resolve the `.woff2`
7
+ // assets (not in Metro's default `assetExts`). See
8
+ // `apply-font-faces.web.ts` for the real implementation.
24
9
  export function applyFontFaces(): void {
25
- if (Platform.OS !== 'web' || typeof document === 'undefined') return;
26
- if (document.getElementById(STYLE_ID)) return;
27
-
28
- const style = document.createElement('style');
29
- style.id = STYLE_ID;
30
- style.textContent = `
31
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusReg}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
32
- @font-face { font-family: 'BlomusModernus'; src: url(${blomusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
33
- @font-face { font-family: 'Inter'; src: url(${interVar}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
34
- @font-face { font-family: 'Geist Mono'; src: url(${geistMono}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
35
- :root {
36
- --bloom-font-display: ${fontFamilies.display};
37
- --bloom-font-sans: ${fontFamilies.sans};
38
- --bloom-font-mono: ${fontFamilies.mono};
39
- }
40
- `;
41
- document.head.appendChild(style);
10
+ // intentionally empty
42
11
  }
@@ -0,0 +1,38 @@
1
+ /// <reference path="../assets.d.ts" />
2
+ import blomusReg from './assets/BlomusModernus-Regular.woff2';
3
+ import blomusBold from './assets/BlomusModernus-Bold.woff2';
4
+ import interVar from './assets/InterVariable.woff2';
5
+ import geistMono from './assets/GeistMono-Variable.woff2';
6
+ import { fontFamilies } from './tokens';
7
+
8
+ const STYLE_ID = 'bloom-fonts';
9
+
10
+ /**
11
+ * Inject @font-face rules and font CSS variables onto :root.
12
+ *
13
+ * Web-only. The native counterpart in `apply-font-faces.ts` is a no-op
14
+ * stub — Metro cannot parse `.woff2` imports, so the file split keeps
15
+ * those imports out of the native bundle entirely. Idempotent: safe to
16
+ * call multiple times; subsequent calls early-return after the
17
+ * `<style id="bloom-fonts">` tag has been mounted. SSR-safe via the
18
+ * `typeof document === 'undefined'` guard.
19
+ */
20
+ export function applyFontFaces(): void {
21
+ if (typeof document === 'undefined') return;
22
+ if (document.getElementById(STYLE_ID)) return;
23
+
24
+ const style = document.createElement('style');
25
+ style.id = STYLE_ID;
26
+ style.textContent = `
27
+ @font-face { font-family: 'BlomusModernus'; src: url(${blomusReg}) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
28
+ @font-face { font-family: 'BlomusModernus'; src: url(${blomusBold}) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
29
+ @font-face { font-family: 'Inter'; src: url(${interVar}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
30
+ @font-face { font-family: 'Geist Mono'; src: url(${geistMono}) format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
31
+ :root {
32
+ --bloom-font-display: ${fontFamilies.display};
33
+ --bloom-font-sans: ${fontFamilies.sans};
34
+ --bloom-font-mono: ${fontFamilies.mono};
35
+ }
36
+ `;
37
+ document.head.appendChild(style);
38
+ }
@@ -5,12 +5,12 @@
5
5
  // covers all weights at runtime. `@fontsource(-variable)?/*` packages only
6
6
  // publish .woff2 for their variable axes — modern react-native font loading
7
7
  // requires .ttf, so we use the upstream variable TTFs instead. On web,
8
- // `apply-font-faces.ts` references the .woff2 variants directly and this file
9
- // is never imported.
8
+ // `apply-font-faces.web.ts` references the .woff2 variants directly and this
9
+ // file is never imported.
10
10
 
11
11
  export const FONT_ASSETS = {
12
- BlomusModernus: require('../../assets/fonts/BlomusModernus-Regular.ttf'),
13
- 'BlomusModernus-Bold': require('../../assets/fonts/BlomusModernus-Bold.ttf'),
14
- Inter: require('../../assets/fonts/InterVariable.ttf'),
15
- 'Geist Mono': require('../../assets/fonts/GeistMono-Variable.ttf'),
12
+ BlomusModernus: require('./assets/BlomusModernus-Regular.ttf'),
13
+ 'BlomusModernus-Bold': require('./assets/BlomusModernus-Bold.ttf'),
14
+ Inter: require('./assets/InterVariable.ttf'),
15
+ 'Geist Mono': require('./assets/GeistMono-Variable.ttf'),
16
16
  } as const;
@@ -0,0 +1,17 @@
1
+ // Web variant of the `./fonts` barrel.
2
+ //
3
+ // The default barrel (`./index.ts`) re-exports `applyFontFaces` from
4
+ // `./apply-font-faces`, which on native resolves to a no-op stub — Metro
5
+ // cannot parse `.woff2` module-level imports. The web fork explicitly
6
+ // reaches for `./apply-font-faces.web`, which performs the real `@font-face`
7
+ // injection.
8
+ //
9
+ // Web bundlers select this file via the `"browser"` condition in
10
+ // `package.json`'s `exports['./fonts']`; native bundlers fall through to
11
+ // `./index.ts` via the `"react-native"` condition.
12
+ export { fontFamilies, fontCssVars } from './tokens';
13
+ export type { FontFamilyName } from './tokens';
14
+ export { applyFontFaces } from './apply-font-faces.web';
15
+ export { FONT_ASSETS } from './font-assets';
16
+ export { FontLoader } from './FontLoader';
17
+ export type { FontLoaderProps } from './FontLoader';
package/src/index.web.ts CHANGED
@@ -78,4 +78,4 @@ export * as ContextMenu from './context-menu/index.web';
78
78
  export * as Code from './code';
79
79
 
80
80
  // Fonts
81
- export * as Fonts from './fonts';
81
+ export * as Fonts from './fonts/index.web';