@nimblebrain/synapse 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -2
- package/dist/{chunk-JVKQNMAP.js → chunk-5AR3IROW.js} +11 -6
- package/dist/chunk-5AR3IROW.js.map +1 -0
- package/dist/{chunk-XGJAADVV.js → chunk-AGN3NDOK.js} +25 -36
- package/dist/chunk-AGN3NDOK.js.map +1 -0
- package/dist/chunk-DOKVNVTI.js +162 -0
- package/dist/chunk-DOKVNVTI.js.map +1 -0
- package/dist/chunk-IA2M4GTK.cjs +170 -0
- package/dist/chunk-IA2M4GTK.cjs.map +1 -0
- package/dist/{chunk-A4ENX6XW.cjs → chunk-QHS7BJLI.cjs} +28 -39
- package/dist/chunk-QHS7BJLI.cjs.map +1 -0
- package/dist/{chunk-ANUZ7WFQ.cjs → chunk-VMUZMVKW.cjs} +11 -6
- package/dist/chunk-VMUZMVKW.cjs.map +1 -0
- package/dist/codegen/index.d.cts +1 -1
- package/dist/codegen/index.d.ts +1 -1
- package/dist/connect.iife.global.js +25 -25
- package/dist/{detect-DSnLT-_m.d.ts → detect-C_qmYsh9.d.cts} +6 -0
- package/dist/{detect-DSnLT-_m.d.cts → detect-Dfd0upoz.d.ts} +6 -0
- package/dist/host/index.cjs +14 -14
- package/dist/host/index.d.cts +10 -3
- package/dist/host/index.d.ts +10 -3
- package/dist/host/index.js +2 -2
- package/dist/index.cjs +13 -9
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +3 -3
- package/dist/react/index.cjs +5 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +3 -3
- package/dist/react/index.js.map +1 -1
- package/dist/synapse-runtime.iife.global.js +25 -25
- package/dist/synapse-ui.iife.global.js +1 -1
- package/dist/{types-C9utGXv_.d.cts → types-BSZasM8q.d.cts} +39 -1
- package/dist/{types-C9utGXv_.d.ts → types-BSZasM8q.d.ts} +39 -1
- package/package.json +1 -6
- package/dist/chunk-A4ENX6XW.cjs.map +0 -1
- package/dist/chunk-ANUZ7WFQ.cjs.map +0 -1
- package/dist/chunk-JVKQNMAP.js.map +0 -1
- package/dist/chunk-KTXASIFJ.cjs +0 -75
- package/dist/chunk-KTXASIFJ.cjs.map +0 -1
- package/dist/chunk-VXTMI266.js +0 -73
- package/dist/chunk-VXTMI266.js.map +0 -1
- package/dist/chunk-XGJAADVV.js.map +0 -1
- package/dist/ui/fonts.cjs +0 -19
- package/dist/ui/fonts.cjs.map +0 -1
- package/dist/ui/fonts.d.cts +0 -30
- package/dist/ui/fonts.d.ts +0 -30
- package/dist/ui/fonts.js +0 -17
- package/dist/ui/fonts.js.map +0 -1
package/dist/ui/fonts.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loads the NimbleBrain brand fonts into the current document. Import for the
|
|
3
|
-
* side effect:
|
|
4
|
-
*
|
|
5
|
-
* ```ts
|
|
6
|
-
* import "@nimblebrain/synapse/ui/fonts";
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* The token contract names these fonts (`--font-sans: Satoshi`,
|
|
10
|
-
* `--nb-font-heading: Erode`), but a font *name* only renders if the font
|
|
11
|
-
* *files* are loaded in the iframe document — each app iframe is its own
|
|
12
|
-
* document and does not inherit the host's `@font-face`s. This module injects
|
|
13
|
-
* the Fontshare stylesheet so the named fonts resolve instead of silently
|
|
14
|
-
* falling back.
|
|
15
|
-
*
|
|
16
|
-
* JetBrains Mono (`--font-mono`) is not injected here — apps that render code
|
|
17
|
-
* should add `@fontsource-variable/jetbrains-mono` to their own bundle.
|
|
18
|
-
*
|
|
19
|
-
* CSP note: the host iframe must allow `https://api.fontshare.com` in its
|
|
20
|
-
* `style-src`/`font-src` for this to take effect. If blocked, fonts fall back
|
|
21
|
-
* to the neutral system stack in the token contract.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Inject the Fontshare brand-font stylesheet once. Idempotent and SSR-safe
|
|
25
|
-
* (no-ops when `document` is unavailable). Called automatically on import;
|
|
26
|
-
* exported for explicit invocation.
|
|
27
|
-
*/
|
|
28
|
-
declare function injectFonts(): void;
|
|
29
|
-
|
|
30
|
-
export { injectFonts };
|
package/dist/ui/fonts.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// src/ui/fonts.ts
|
|
2
|
-
var FONTSHARE_HREF = "https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&f[]=erode@400,500&display=swap";
|
|
3
|
-
var LINK_ID = "nb-synapse-fonts";
|
|
4
|
-
function injectFonts() {
|
|
5
|
-
if (typeof document === "undefined") return;
|
|
6
|
-
if (document.getElementById(LINK_ID)) return;
|
|
7
|
-
const link = document.createElement("link");
|
|
8
|
-
link.id = LINK_ID;
|
|
9
|
-
link.rel = "stylesheet";
|
|
10
|
-
link.href = FONTSHARE_HREF;
|
|
11
|
-
document.head.appendChild(link);
|
|
12
|
-
}
|
|
13
|
-
injectFonts();
|
|
14
|
-
|
|
15
|
-
export { injectFonts };
|
|
16
|
-
//# sourceMappingURL=fonts.js.map
|
|
17
|
-
//# sourceMappingURL=fonts.js.map
|
package/dist/ui/fonts.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/fonts.ts"],"names":[],"mappings":";AAuBA,IAAM,cAAA,GACJ,yFAAA;AACF,IAAM,OAAA,GAAU,kBAAA;AAOT,SAAS,WAAA,GAAoB;AAClC,EAAA,IAAI,OAAO,aAAa,WAAA,EAAa;AACrC,EAAA,IAAI,QAAA,CAAS,cAAA,CAAe,OAAO,CAAA,EAAG;AACtC,EAAA,MAAM,IAAA,GAAO,QAAA,CAAS,aAAA,CAAc,MAAM,CAAA;AAC1C,EAAA,IAAA,CAAK,EAAA,GAAK,OAAA;AACV,EAAA,IAAA,CAAK,GAAA,GAAM,YAAA;AACX,EAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AACZ,EAAA,QAAA,CAAS,IAAA,CAAK,YAAY,IAAI,CAAA;AAChC;AAEA,WAAA,EAAY","file":"fonts.js","sourcesContent":["/**\n * Loads the NimbleBrain brand fonts into the current document. Import for the\n * side effect:\n *\n * ```ts\n * import \"@nimblebrain/synapse/ui/fonts\";\n * ```\n *\n * The token contract names these fonts (`--font-sans: Satoshi`,\n * `--nb-font-heading: Erode`), but a font *name* only renders if the font\n * *files* are loaded in the iframe document — each app iframe is its own\n * document and does not inherit the host's `@font-face`s. This module injects\n * the Fontshare stylesheet so the named fonts resolve instead of silently\n * falling back.\n *\n * JetBrains Mono (`--font-mono`) is not injected here — apps that render code\n * should add `@fontsource-variable/jetbrains-mono` to their own bundle.\n *\n * CSP note: the host iframe must allow `https://api.fontshare.com` in its\n * `style-src`/`font-src` for this to take effect. If blocked, fonts fall back\n * to the neutral system stack in the token contract.\n */\n\nconst FONTSHARE_HREF =\n \"https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&f[]=erode@400,500&display=swap\";\nconst LINK_ID = \"nb-synapse-fonts\";\n\n/**\n * Inject the Fontshare brand-font stylesheet once. Idempotent and SSR-safe\n * (no-ops when `document` is unavailable). Called automatically on import;\n * exported for explicit invocation.\n */\nexport function injectFonts(): void {\n if (typeof document === \"undefined\") return;\n if (document.getElementById(LINK_ID)) return;\n const link = document.createElement(\"link\");\n link.id = LINK_ID;\n link.rel = \"stylesheet\";\n link.href = FONTSHARE_HREF;\n document.head.appendChild(link);\n}\n\ninjectFonts();\n"]}
|