@moon-x/core 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,16 @@ declare const getMoonKeyApiUrl: () => string;
8
8
  declare const getIframeUrl: (path?: string) => string;
9
9
  declare const getIframeOrigin: (url: string) => string;
10
10
 
11
- export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl };
11
+ /**
12
+ * Reserved key in the SDK → iframe `theme` query-param map. Its value is a JSON
13
+ * array of font-stylesheet URLs (NOT a CSS custom property); the iframe applier
14
+ * injects them as `<link rel="stylesheet">` rather than calling `setProperty`.
15
+ *
16
+ * Lives in `@moon-x/core` so the producer (react-sdk's `serializeThemeVars`) and
17
+ * the consumer (the iframe's `applyThemeParam`) share one source of truth — a
18
+ * rename is then a compile error on both sides instead of a silent wire-contract
19
+ * drift.
20
+ */
21
+ declare const FONT_URLS_KEY = "__moonxFontUrls";
22
+
23
+ export { FONT_URLS_KEY, getIframeOrigin, getIframeUrl, getMoonKeyApiUrl };
@@ -8,4 +8,16 @@ declare const getMoonKeyApiUrl: () => string;
8
8
  declare const getIframeUrl: (path?: string) => string;
9
9
  declare const getIframeOrigin: (url: string) => string;
10
10
 
11
- export { getIframeOrigin, getIframeUrl, getMoonKeyApiUrl };
11
+ /**
12
+ * Reserved key in the SDK → iframe `theme` query-param map. Its value is a JSON
13
+ * array of font-stylesheet URLs (NOT a CSS custom property); the iframe applier
14
+ * injects them as `<link rel="stylesheet">` rather than calling `setProperty`.
15
+ *
16
+ * Lives in `@moon-x/core` so the producer (react-sdk's `serializeThemeVars`) and
17
+ * the consumer (the iframe's `applyThemeParam`) share one source of truth — a
18
+ * rename is then a compile error on both sides instead of a silent wire-contract
19
+ * drift.
20
+ */
21
+ declare const FONT_URLS_KEY = "__moonxFontUrls";
22
+
23
+ export { FONT_URLS_KEY, getIframeOrigin, getIframeUrl, getMoonKeyApiUrl };
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/utils/index.ts
21
21
  var utils_exports = {};
22
22
  __export(utils_exports, {
23
+ FONT_URLS_KEY: () => FONT_URLS_KEY,
23
24
  FORWARDED_ERROR_FIELDS: () => FORWARDED_ERROR_FIELDS,
24
25
  PostMessageClient: () => PostMessageClient,
25
26
  PostMessageMethod: () => PostMessageMethod,
@@ -428,8 +429,12 @@ var PostMessageServer = class {
428
429
  }
429
430
  }
430
431
  };
432
+
433
+ // src/utils/theme-param.ts
434
+ var FONT_URLS_KEY = "__moonxFontUrls";
431
435
  // Annotate the CommonJS export names for ESM import in node:
432
436
  0 && (module.exports = {
437
+ FONT_URLS_KEY,
433
438
  FORWARDED_ERROR_FIELDS,
434
439
  PostMessageClient,
435
440
  PostMessageMethod,
@@ -1,4 +1,6 @@
1
- import "../chunk-CMYR6AOY.mjs";
1
+ import {
2
+ FONT_URLS_KEY
3
+ } from "../chunk-527SU2F6.mjs";
2
4
  import {
3
5
  getIframeOrigin,
4
6
  getIframeUrl
@@ -14,6 +16,7 @@ import {
14
16
  getMoonKeyApiUrl
15
17
  } from "../chunk-GQKIA37O.mjs";
16
18
  export {
19
+ FONT_URLS_KEY,
17
20
  FORWARDED_ERROR_FIELDS,
18
21
  PostMessageClient,
19
22
  PostMessageMethod,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon-x/core",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "license": "UNLICENSED",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
File without changes