@seed-ship/mcp-ui-solid 6.22.0 → 6.23.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/CHANGELOG.md +94 -0
- package/README.md +102 -0
- package/dist/components/UIResourceRenderer.cjs +15 -5
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts +2 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +15 -5
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/context/MCPUIConfigContext.cjs.map +1 -1
- package/dist/context/MCPUIConfigContext.d.ts +57 -28
- package/dist/context/MCPUIConfigContext.d.ts.map +1 -1
- package/dist/context/MCPUIConfigContext.js.map +1 -1
- package/dist/context/MCPUIMathContext.cjs +19 -0
- package/dist/context/MCPUIMathContext.cjs.map +1 -0
- package/dist/context/MCPUIMathContext.d.ts +18 -0
- package/dist/context/MCPUIMathContext.d.ts.map +1 -0
- package/dist/context/MCPUIMathContext.js +19 -0
- package/dist/context/MCPUIMathContext.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/plugins/katex.cjs +23 -0
- package/dist/plugins/katex.cjs.map +1 -0
- package/dist/plugins/katex.d.cts +7 -0
- package/dist/plugins/katex.d.ts +7 -0
- package/dist/plugins/katex.d.ts.map +1 -0
- package/dist/plugins/katex.js +23 -0
- package/dist/plugins/katex.js.map +1 -0
- package/dist/utils/iframe-coep.cjs.map +1 -1
- package/dist/utils/iframe-coep.d.ts +7 -6
- package/dist/utils/iframe-coep.d.ts.map +1 -1
- package/dist/utils/iframe-coep.js.map +1 -1
- package/dist/utils/math-markdown.cjs +240 -0
- package/dist/utils/math-markdown.cjs.map +1 -0
- package/dist/utils/math-markdown.d.ts +16 -0
- package/dist/utils/math-markdown.d.ts.map +1 -0
- package/dist/utils/math-markdown.js +240 -0
- package/dist/utils/math-markdown.js.map +1 -0
- package/package.json +22 -3
- package/src/components/UIResourceRenderer.tsx +24 -3
- package/src/context/MCPUIConfigContext.tsx +57 -28
- package/src/context/MCPUIMathContext.tsx +32 -0
- package/src/index.ts +4 -0
- package/src/plugins/katex.ts +25 -0
- package/src/utils/iframe-coep.ts +7 -6
- package/src/utils/math-markdown.ts +222 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MCPUIConfigContext.cjs","sources":["../../src/context/MCPUIConfigContext.tsx"],"sourcesContent":["/**\n * MCPUIConfigContext — host-level rendering policy: the library's iframes\n * (v6.21.0) and, since v6.22.0, where a chart may capture the wheel.\n *\n * @since v6.21.0\n *\n * ## Why\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse every cross-origin iframe whose own document does not send a\n * COEP header — which is YouTube, Vimeo, Google Docs, Notion and nearly all of\n * `DEFAULT_IFRAME_DOMAINS`. The escape hatch is the boolean HTML attribute\n * `credentialless` on the `<iframe>` itself: the document then loads, but\n * without access to the cookies and storage of its own origin.\n *\n * That trade-off is free for a public video or chart and fatal for an\n * authenticated embed, so the library keys it on the distinction it already\n * makes: `TRUSTED_IFRAME_DOMAINS` (the hosts that receive `allow-same-origin`\n * because they need their own cookies) do NOT get the attribute; everything\n * else does. This context lets a host override that, add its own trusted\n * hosts, and control the \"open in a new tab\" fallback link.\n *\n * ## Scope — policy only, NOT strings\n *\n * Text lives in `MCPUIStrings` (`MCPUIStringsContext`). This context carries\n * only behavioural switches, and like the strings context every renderer works\n * standalone: with no provider mounted, `DEFAULT_MCPUI_CONFIG` applies.\n *\n * @example\n * ```tsx\n * import { MCPUIConfigProvider } from '@seed-ship/mcp-ui-solid'\n *\n * <MCPUIConfigProvider config={{ customTrustedIframeDomains: ['embed.acme.com'] }}>\n * <App />\n * </MCPUIConfigProvider>\n * ```\n */\n\nimport { createContext, mergeProps, useContext, type JSX } from 'solid-js'\nimport type { IframePolicy } from '../types'\n\n/**\n * Host-level rendering policy. Every field has a default — a provider passes\n * a partial override.\n *\n * ## Why every field is optional\n *\n * This interface grows a key every time the library gains a policy switch,\n * and those releases are MINOR. Were the fields required, adding one would\n * break the build of any consumer holding a COMPLETE `MCPUIConfig` value —\n * a typed constant, a helper that returns one, or a direct\n * `<MCPUIConfigContext.Provider value={…}>` — because their object would\n * suddenly miss a key. Nothing about their behaviour changed; only `tsc`\n * would fail. Optional fields make each new key additive.\n *\n * The completeness guarantee moves from the type to the two values that\n * actually need it, exactly as `MCPUIStrings` does it:\n * `DEFAULT_MCPUI_CONFIG` is `Required<MCPUIConfig>`, so forgetting a default\n * is a compile error HERE, and {@link useMCPUIConfig} returns\n * `Required<MCPUIConfig>`, so every renderer still reads a fully resolved\n * value and never has to null-check a policy.\n */\nexport interface MCPUIConfig {\n /**\n * When the library puts the boolean `credentialless` attribute on an\n * `<iframe>` it renders.\n *\n * - `'auto'` (default) — on every iframe whose host is NOT in\n * `TRUSTED_IFRAME_DOMAINS` (plus `customTrustedIframeDomains`). Those\n * hosts already ran without cookies, since their sandbox has no\n * `allow-same-origin`; the attribute is what unblocks them under COEP.\n * - `'always'` — on every iframe, trusted hosts included. An authenticated\n * embed will then render its login screen.\n * - `'never'` — never. The right value for a host that sends no COEP header\n * and does not want its embeds to lose their cookies.\n *\n * Chrome/Edge 110+ honour the attribute; Firefox ignores it (iframes stay\n * blocked while the host sends COEP); Safari ignores the COEP value itself,\n * so nothing is blocked there in the first place.\n */\n iframeCredentialless?: 'auto' | 'always' | 'never'\n\n /**\n * Extra hosts treated as trusted, on top of `TRUSTED_IFRAME_DOMAINS`:\n * no `credentialless` attribute, and `allow-same-origin` in the sandbox.\n * A subdomain of a listed host matches too.\n *\n * This only RECLASSIFIES a host the allow-list already accepts. To render an\n * iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to\n * {@link MCPUIConfig.customIframeDomains} with `iframePolicy: 'extend'`.\n */\n customTrustedIframeDomains?: string[]\n\n /**\n * How `UIResourceRenderer` validates an `iframe` component's host:\n * `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`\n * also accepts {@link MCPUIConfig.customIframeDomains}.\n */\n iframePolicy?: IframePolicy\n\n /**\n * Extra hosts the allow-list accepts when `iframePolicy` is `'extend'`.\n * Without this, a component pointing at an unlisted host is replaced by the\n * validation card before any renderer runs.\n */\n customIframeDomains?: string[]\n\n /**\n * When the library renders an \"open in a new tab\" link under an embed\n * (`strings.iframeOpenInNewTab`).\n *\n * A COEP-blocked iframe fires no event the parent page can observe, so\n * without this the user sees an unexplained blank frame.\n *\n * - `'auto'` (default) — only when the page is cross-origin isolated\n * (`window.crossOriginIsolated`). That flag needs COOP `same-origin` AND\n * COEP, so a host that sends COEP alone still blocks embeds while the\n * flag is false: set `'always'` there. Read after mount, never during\n * render, so SSR markup and hydration agree.\n * - `'always'` / `'never'` — unconditional.\n */\n iframeFallbackLink?: 'auto' | 'always' | 'never'\n\n /**\n * Where `ChartJSRenderer` enables wheel-zoom / drag-pan / pinch on a chart\n * (through the optional `chartjs-plugin-zoom` peer dependency — absent, the\n * chart renders exactly as it does without this setting).\n *\n * Hijacking the mouse wheel on a component sitting inline in a scrolling\n * chat feed is hostile: the user scrolls the conversation and the chart eats\n * the gesture. So zoom belongs to a surface that OWNS its viewport, which\n * here is `ExpandableWrapper`'s fullscreen modal.\n *\n * - `'expanded'` (default) — only inside the fullscreen modal.\n * - `'always'` — inline as well. For a host that lays charts out in a\n * dashboard rather than in a feed, where the wheel has nothing to steal.\n * - `'never'` — off everywhere; the plugin is never registered.\n *\n * @since 6.22.0\n */\n chartZoom?: 'expanded' | 'always' | 'never'\n}\n\n/**\n * Defaults. Chosen so a host that sends no COEP header sees no change from\n * 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —\n * and, since 6.22.0, so no inline component ever captures the wheel\n * (`chartZoom: 'expanded'`).\n *\n * Typed `Required<MCPUIConfig>`: the interface's fields are optional so that\n * adding one stays backward compatible, and this annotation is what keeps a\n * new key from shipping without a default.\n */\nexport const DEFAULT_MCPUI_CONFIG: Required<MCPUIConfig> = {\n iframeCredentialless: 'auto',\n customTrustedIframeDomains: [],\n iframePolicy: 'strict',\n customIframeDomains: [],\n iframeFallbackLink: 'auto',\n chartZoom: 'expanded',\n}\n\n/**\n * Deliberately typed with the PARTIAL `MCPUIConfig`, not `Required<…>`: a\n * host that bypasses `MCPUIConfigProvider` and feeds this provider directly\n * may pass whichever keys it cares about, and `useMCPUIConfig` fills the\n * rest. Widening it this way only ever accepts more than before.\n */\nexport const MCPUIConfigContext = createContext<MCPUIConfig>(DEFAULT_MCPUI_CONFIG)\n\n/**\n * Reads the active host config, resolved: every key is present, whether it\n * came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults\n * outright when no `<MCPUIConfigProvider>` is mounted above.\n */\nexport function useMCPUIConfig(): Required<MCPUIConfig> {\n return mergeProps(DEFAULT_MCPUI_CONFIG, useContext(MCPUIConfigContext))\n}\n\nexport interface MCPUIConfigProviderProps {\n /**\n * Partial override of the host config. Any key left unset falls back to\n * `DEFAULT_MCPUI_CONFIG`.\n */\n config?: Partial<MCPUIConfig>\n children: JSX.Element\n}\n\n/**\n * Provides the host config to every MCP-UI renderer below it.\n * Merges the partial `config` override over the defaults.\n */\nexport function MCPUIConfigProvider(props: MCPUIConfigProviderProps): JSX.Element {\n // The function source keeps replacement `config` objects reactive while\n // mergeProps fills any omitted key without taking a one-time snapshot.\n const value = mergeProps(DEFAULT_MCPUI_CONFIG, () => props.config)\n return (\n <MCPUIConfigContext.Provider value={value}>\n {props.children}\n </MCPUIConfigContext.Provider>\n )\n}\n"],"names":["DEFAULT_MCPUI_CONFIG","iframeCredentialless","customTrustedIframeDomains","iframePolicy","customIframeDomains","iframeFallbackLink","chartZoom","MCPUIConfigContext","createContext","useMCPUIConfig","mergeProps","useContext","MCPUIConfigProvider","props","value","config","_$createComponent","Provider","children"],"mappings":";;;;AAyJO,MAAMA,uBAA8C;AAAA,EACzDC,sBAAsB;AAAA,EACtBC,4BAA4B,CAAA;AAAA,EAC5BC,cAAc;AAAA,EACdC,qBAAqB,CAAA;AAAA,EACrBC,oBAAoB;AAAA,EACpBC,WAAW;AACb;AAQO,MAAMC,qBAAqBC,QAAAA,cAA2BR,oBAAoB;AAO1E,SAASS,iBAAwC;AACtD,SAAOC,mBAAWV,sBAAsBW,QAAAA,WAAWJ,kBAAkB,CAAC;AACxE;AAeO,SAASK,oBAAoBC,OAA8C;AAGhF,QAAMC,QAAQJ,QAAAA,WAAWV,sBAAsB,MAAMa,MAAME,MAAM;AACjE,SAAAC,IAAAA,gBACGT,mBAAmBU,UAAQ;AAAA,IAACH;AAAAA,IAAY,IAAAI,WAAA;AAAA,aACtCL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;;;;;"}
|
|
1
|
+
{"version":3,"file":"MCPUIConfigContext.cjs","sources":["../../src/context/MCPUIConfigContext.tsx"],"sourcesContent":["/**\n * MCPUIConfigContext — host-level rendering policy: the library's iframes\n * (v6.21.0) and, since v6.22.0, where a chart may capture the wheel.\n *\n * @since v6.21.0\n *\n * ## Why\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse every cross-origin iframe whose own document does not send a\n * COEP header — which is YouTube, Vimeo, Google Docs, Notion and nearly all of\n * `DEFAULT_IFRAME_DOMAINS`. The escape hatch is the boolean HTML attribute\n * `credentialless` on the `<iframe>` itself: the document then loads, but\n * without access to the cookies and storage of its own origin.\n *\n * That trade-off is free for a public video or chart and fatal for an\n * authenticated embed, so the library keys it on the distinction it already\n * makes: `TRUSTED_IFRAME_DOMAINS` (the hosts that receive `allow-same-origin`\n * because they need their own cookies) do NOT get the attribute; everything\n * else does. This context lets a host override that, add its own trusted\n * hosts, and control the \"open in a new tab\" fallback link.\n *\n * ## Scope — policy only, NOT strings\n *\n * Text lives in `MCPUIStrings` (`MCPUIStringsContext`). This context carries\n * only behavioural switches, and like the strings context every renderer works\n * standalone: with no provider mounted, `DEFAULT_MCPUI_CONFIG` applies.\n *\n * @example\n * ```tsx\n * import { MCPUIConfigProvider } from '@seed-ship/mcp-ui-solid'\n *\n * <MCPUIConfigProvider config={{ customTrustedIframeDomains: ['embed.acme.com'] }}>\n * <App />\n * </MCPUIConfigProvider>\n * ```\n */\n\nimport { createContext, mergeProps, useContext, type JSX } from 'solid-js'\nimport type { IframePolicy } from '../types'\n\n/**\n * Host-level rendering policy. Every field has a default — a provider passes\n * a partial override.\n *\n * ## Two names, because there are two jobs\n *\n * This type grows a key every time the library gains a policy switch, and\n * those releases are MINOR — so neither AUTHORING a config nor READING one\n * may break when a key appears. Those two demands pull in opposite\n * directions, and one name cannot serve both:\n *\n * - an author must be allowed to omit the new key, so the fields they write\n * have to be OPTIONAL;\n * - a reader assigning `const p: IframePolicy = config.iframePolicy` must not\n * suddenly face `undefined`, so the fields they read have to be REQUIRED.\n *\n * Hence {@link MCPUIConfigInput} (what a host writes — every field optional)\n * and {@link MCPUIConfig} (what the library hands back — every field\n * resolved). `MCPUIConfig` is derived from the input type, so the two can\n * never drift and a key is declared exactly once.\n *\n * Which one you name depends on the surface:\n *\n * - `<MCPUIConfigProvider config={…}>` takes `MCPUIConfigInput` — name that\n * type for a partial you build, and it merges the rest;\n * - `<MCPUIConfigContext.Provider value={…}>` takes the RESOLVED\n * `MCPUIConfig`, because that context is read as well as written, so a\n * direct provider hands over `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`;\n * - anything you RECEIVE is `MCPUIConfig`, which is what\n * {@link useMCPUIConfig} returns.\n */\nexport interface MCPUIConfigInput {\n /**\n * When the library puts the boolean `credentialless` attribute on an\n * `<iframe>` it renders.\n *\n * - `'auto'` (default) — on every iframe whose host is NOT in\n * `TRUSTED_IFRAME_DOMAINS` (plus `customTrustedIframeDomains`). Those\n * hosts already ran without cookies, since their sandbox has no\n * `allow-same-origin`; the attribute is what unblocks them under COEP.\n * - `'always'` — on every iframe, trusted hosts included. An authenticated\n * embed will then render its login screen.\n * - `'never'` — never. The right value for a host that sends no COEP header\n * and does not want its embeds to lose their cookies.\n *\n * Chrome/Edge 110+ honour the attribute; Firefox ignores it (iframes stay\n * blocked while the host sends COEP); Safari ignores the COEP value itself,\n * so nothing is blocked there in the first place.\n */\n iframeCredentialless?: 'auto' | 'always' | 'never'\n\n /**\n * Extra hosts treated as trusted, on top of `TRUSTED_IFRAME_DOMAINS`:\n * no `credentialless` attribute, and `allow-same-origin` in the sandbox.\n * A subdomain of a listed host matches too.\n *\n * This only RECLASSIFIES a host the allow-list already accepts. To render an\n * iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to\n * {@link MCPUIConfigInput.customIframeDomains} with `iframePolicy: 'extend'`.\n */\n customTrustedIframeDomains?: string[]\n\n /**\n * How `UIResourceRenderer` validates an `iframe` component's host:\n * `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`\n * also accepts {@link MCPUIConfigInput.customIframeDomains}.\n */\n iframePolicy?: IframePolicy\n\n /**\n * Extra hosts the allow-list accepts when `iframePolicy` is `'extend'`.\n * Without this, a component pointing at an unlisted host is replaced by the\n * validation card before any renderer runs.\n */\n customIframeDomains?: string[]\n\n /**\n * When the library renders an \"open in a new tab\" link under an embed\n * (`strings.iframeOpenInNewTab`).\n *\n * A COEP-blocked iframe fires no event the parent page can observe, so\n * without this the user sees an unexplained blank frame.\n *\n * - `'auto'` (default) — only when the page is cross-origin isolated\n * (`window.crossOriginIsolated`). That flag needs COOP `same-origin` AND\n * COEP, so a host that sends COEP alone still blocks embeds while the\n * flag is false: set `'always'` there. Read after mount, never during\n * render, so SSR markup and hydration agree.\n * - `'always'` / `'never'` — unconditional.\n */\n iframeFallbackLink?: 'auto' | 'always' | 'never'\n\n /**\n * Where `ChartJSRenderer` enables wheel-zoom / drag-pan / pinch on a chart\n * (through the optional `chartjs-plugin-zoom` peer dependency — absent, the\n * chart renders exactly as it does without this setting).\n *\n * Hijacking the mouse wheel on a component sitting inline in a scrolling\n * chat feed is hostile: the user scrolls the conversation and the chart eats\n * the gesture. So zoom belongs to a surface that OWNS its viewport, which\n * here is `ExpandableWrapper`'s fullscreen modal.\n *\n * - `'expanded'` (default) — only inside the fullscreen modal.\n * - `'always'` — inline as well. For a host that lays charts out in a\n * dashboard rather than in a feed, where the wheel has nothing to steal.\n * - `'never'` — off everywhere; the plugin is never registered.\n *\n * @since 6.22.0\n */\n chartZoom?: 'expanded' | 'always' | 'never'\n}\n\n/**\n * The resolved host policy: every key present. This is what the library hands\n * back, so a reader never null-checks a policy.\n *\n * Extends `Required<`{@link MCPUIConfigInput}`>` rather than declaring the\n * fields again, so a key exists in exactly one place and the two views cannot\n * drift. It remains an interface so existing consumers can extend or augment\n * the public contract as they could before 6.22.0.\n */\nexport interface MCPUIConfig extends Required<MCPUIConfigInput> {}\n\n/**\n * Defaults. Chosen so a host that sends no COEP header sees no change from\n * 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —\n * and, since 6.22.0, so no inline component ever captures the wheel\n * (`chartZoom: 'expanded'`).\n *\n * Typed `MCPUIConfig` (i.e. resolved): that annotation is what stops a new\n * key from shipping without a default.\n */\nexport const DEFAULT_MCPUI_CONFIG: MCPUIConfig = {\n iframeCredentialless: 'auto',\n customTrustedIframeDomains: [],\n iframePolicy: 'strict',\n customIframeDomains: [],\n iframeFallbackLink: 'auto',\n chartZoom: 'expanded',\n}\n\n/**\n * Typed with the RESOLVED view, because this context is read as well as\n * written: it is exported, so a consumer may call\n * `useContext(MCPUIConfigContext)` directly, and typing it as the input view\n * would hand them `IframePolicy | undefined` — exactly the regression this\n * whole split exists to undo.\n *\n * The cost lands on the rarer side: a host feeding this context directly\n * passes a COMPLETE value, `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`. Anyone who\n * wants to pass only the keys they care about uses `MCPUIConfigProvider`,\n * whose `config` prop takes `Partial<`{@link MCPUIConfig}`>` and does that\n * merge. That preserves optional properties added through declaration\n * merging; {@link MCPUIConfigInput} remains the unaugmented built-in input\n * shape a host can name for ordinary authored configs.\n */\nexport const MCPUIConfigContext = createContext<MCPUIConfig>(DEFAULT_MCPUI_CONFIG)\n\n/**\n * Reads the active host config, resolved: every key is present, whether it\n * came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults\n * outright when no `<MCPUIConfigProvider>` is mounted above.\n */\nexport function useMCPUIConfig(): MCPUIConfig {\n return mergeProps(DEFAULT_MCPUI_CONFIG, useContext(MCPUIConfigContext))\n}\n\nexport interface MCPUIConfigProviderProps {\n /**\n * Partial override of the host config. Any key left unset falls back to\n * `DEFAULT_MCPUI_CONFIG`.\n */\n config?: Partial<MCPUIConfig>\n children: JSX.Element\n}\n\n/**\n * Provides the host config to every MCP-UI renderer below it.\n * Merges the partial `config` override over the defaults.\n */\nexport function MCPUIConfigProvider(props: MCPUIConfigProviderProps): JSX.Element {\n // The function source keeps replacement `config` objects reactive while\n // mergeProps fills any omitted key without taking a one-time snapshot.\n const value = mergeProps(DEFAULT_MCPUI_CONFIG, () => props.config)\n return (\n <MCPUIConfigContext.Provider value={value}>\n {props.children}\n </MCPUIConfigContext.Provider>\n )\n}\n"],"names":["DEFAULT_MCPUI_CONFIG","iframeCredentialless","customTrustedIframeDomains","iframePolicy","customIframeDomains","iframeFallbackLink","chartZoom","MCPUIConfigContext","createContext","useMCPUIConfig","mergeProps","useContext","MCPUIConfigProvider","props","value","config","_$createComponent","Provider","children"],"mappings":";;;;AA6KO,MAAMA,uBAAoC;AAAA,EAC/CC,sBAAsB;AAAA,EACtBC,4BAA4B,CAAA;AAAA,EAC5BC,cAAc;AAAA,EACdC,qBAAqB,CAAA;AAAA,EACrBC,oBAAoB;AAAA,EACpBC,WAAW;AACb;AAiBO,MAAMC,qBAAqBC,QAAAA,cAA2BR,oBAAoB;AAO1E,SAASS,iBAA8B;AAC5C,SAAOC,mBAAWV,sBAAsBW,QAAAA,WAAWJ,kBAAkB,CAAC;AACxE;AAeO,SAASK,oBAAoBC,OAA8C;AAGhF,QAAMC,QAAQJ,QAAAA,WAAWV,sBAAsB,MAAMa,MAAME,MAAM;AACjE,SAAAC,IAAAA,gBACGT,mBAAmBU,UAAQ;AAAA,IAACH;AAAAA,IAAY,IAAAI,WAAA;AAAA,aACtCL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;;;;;"}
|
|
@@ -41,24 +41,34 @@ import type { IframePolicy } from '../types';
|
|
|
41
41
|
* Host-level rendering policy. Every field has a default — a provider passes
|
|
42
42
|
* a partial override.
|
|
43
43
|
*
|
|
44
|
-
* ##
|
|
45
|
-
*
|
|
46
|
-
* This
|
|
47
|
-
*
|
|
48
|
-
* break
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* `
|
|
59
|
-
*
|
|
44
|
+
* ## Two names, because there are two jobs
|
|
45
|
+
*
|
|
46
|
+
* This type grows a key every time the library gains a policy switch, and
|
|
47
|
+
* those releases are MINOR — so neither AUTHORING a config nor READING one
|
|
48
|
+
* may break when a key appears. Those two demands pull in opposite
|
|
49
|
+
* directions, and one name cannot serve both:
|
|
50
|
+
*
|
|
51
|
+
* - an author must be allowed to omit the new key, so the fields they write
|
|
52
|
+
* have to be OPTIONAL;
|
|
53
|
+
* - a reader assigning `const p: IframePolicy = config.iframePolicy` must not
|
|
54
|
+
* suddenly face `undefined`, so the fields they read have to be REQUIRED.
|
|
55
|
+
*
|
|
56
|
+
* Hence {@link MCPUIConfigInput} (what a host writes — every field optional)
|
|
57
|
+
* and {@link MCPUIConfig} (what the library hands back — every field
|
|
58
|
+
* resolved). `MCPUIConfig` is derived from the input type, so the two can
|
|
59
|
+
* never drift and a key is declared exactly once.
|
|
60
|
+
*
|
|
61
|
+
* Which one you name depends on the surface:
|
|
62
|
+
*
|
|
63
|
+
* - `<MCPUIConfigProvider config={…}>` takes `MCPUIConfigInput` — name that
|
|
64
|
+
* type for a partial you build, and it merges the rest;
|
|
65
|
+
* - `<MCPUIConfigContext.Provider value={…}>` takes the RESOLVED
|
|
66
|
+
* `MCPUIConfig`, because that context is read as well as written, so a
|
|
67
|
+
* direct provider hands over `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`;
|
|
68
|
+
* - anything you RECEIVE is `MCPUIConfig`, which is what
|
|
69
|
+
* {@link useMCPUIConfig} returns.
|
|
60
70
|
*/
|
|
61
|
-
export interface
|
|
71
|
+
export interface MCPUIConfigInput {
|
|
62
72
|
/**
|
|
63
73
|
* When the library puts the boolean `credentialless` attribute on an
|
|
64
74
|
* `<iframe>` it renders.
|
|
@@ -84,13 +94,13 @@ export interface MCPUIConfig {
|
|
|
84
94
|
*
|
|
85
95
|
* This only RECLASSIFIES a host the allow-list already accepts. To render an
|
|
86
96
|
* iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to
|
|
87
|
-
* {@link
|
|
97
|
+
* {@link MCPUIConfigInput.customIframeDomains} with `iframePolicy: 'extend'`.
|
|
88
98
|
*/
|
|
89
99
|
customTrustedIframeDomains?: string[];
|
|
90
100
|
/**
|
|
91
101
|
* How `UIResourceRenderer` validates an `iframe` component's host:
|
|
92
102
|
* `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`
|
|
93
|
-
* also accepts {@link
|
|
103
|
+
* also accepts {@link MCPUIConfigInput.customIframeDomains}.
|
|
94
104
|
*/
|
|
95
105
|
iframePolicy?: IframePolicy;
|
|
96
106
|
/**
|
|
@@ -133,22 +143,41 @@ export interface MCPUIConfig {
|
|
|
133
143
|
*/
|
|
134
144
|
chartZoom?: 'expanded' | 'always' | 'never';
|
|
135
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* The resolved host policy: every key present. This is what the library hands
|
|
148
|
+
* back, so a reader never null-checks a policy.
|
|
149
|
+
*
|
|
150
|
+
* Extends `Required<`{@link MCPUIConfigInput}`>` rather than declaring the
|
|
151
|
+
* fields again, so a key exists in exactly one place and the two views cannot
|
|
152
|
+
* drift. It remains an interface so existing consumers can extend or augment
|
|
153
|
+
* the public contract as they could before 6.22.0.
|
|
154
|
+
*/
|
|
155
|
+
export interface MCPUIConfig extends Required<MCPUIConfigInput> {
|
|
156
|
+
}
|
|
136
157
|
/**
|
|
137
158
|
* Defaults. Chosen so a host that sends no COEP header sees no change from
|
|
138
159
|
* 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —
|
|
139
160
|
* and, since 6.22.0, so no inline component ever captures the wheel
|
|
140
161
|
* (`chartZoom: 'expanded'`).
|
|
141
162
|
*
|
|
142
|
-
* Typed `
|
|
143
|
-
*
|
|
144
|
-
* new key from shipping without a default.
|
|
163
|
+
* Typed `MCPUIConfig` (i.e. resolved): that annotation is what stops a new
|
|
164
|
+
* key from shipping without a default.
|
|
145
165
|
*/
|
|
146
|
-
export declare const DEFAULT_MCPUI_CONFIG:
|
|
166
|
+
export declare const DEFAULT_MCPUI_CONFIG: MCPUIConfig;
|
|
147
167
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
168
|
+
* Typed with the RESOLVED view, because this context is read as well as
|
|
169
|
+
* written: it is exported, so a consumer may call
|
|
170
|
+
* `useContext(MCPUIConfigContext)` directly, and typing it as the input view
|
|
171
|
+
* would hand them `IframePolicy | undefined` — exactly the regression this
|
|
172
|
+
* whole split exists to undo.
|
|
173
|
+
*
|
|
174
|
+
* The cost lands on the rarer side: a host feeding this context directly
|
|
175
|
+
* passes a COMPLETE value, `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`. Anyone who
|
|
176
|
+
* wants to pass only the keys they care about uses `MCPUIConfigProvider`,
|
|
177
|
+
* whose `config` prop takes `Partial<`{@link MCPUIConfig}`>` and does that
|
|
178
|
+
* merge. That preserves optional properties added through declaration
|
|
179
|
+
* merging; {@link MCPUIConfigInput} remains the unaugmented built-in input
|
|
180
|
+
* shape a host can name for ordinary authored configs.
|
|
152
181
|
*/
|
|
153
182
|
export declare const MCPUIConfigContext: import("solid-js").Context<MCPUIConfig>;
|
|
154
183
|
/**
|
|
@@ -156,7 +185,7 @@ export declare const MCPUIConfigContext: import("solid-js").Context<MCPUIConfig>
|
|
|
156
185
|
* came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults
|
|
157
186
|
* outright when no `<MCPUIConfigProvider>` is mounted above.
|
|
158
187
|
*/
|
|
159
|
-
export declare function useMCPUIConfig():
|
|
188
|
+
export declare function useMCPUIConfig(): MCPUIConfig;
|
|
160
189
|
export interface MCPUIConfigProviderProps {
|
|
161
190
|
/**
|
|
162
191
|
* Partial override of the host config. Any key left unset falls back to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MCPUIConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/MCPUIConfigContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C
|
|
1
|
+
{"version":3,"file":"MCPUIConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/MCPUIConfigContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;;OAgBG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAElD;;;;;;;;OAQG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;IAErC;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAA;IAE3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAEhD;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;CAC5C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAY,SAAQ,QAAQ,CAAC,gBAAgB,CAAC;CAAG;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAOlC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,yCAAmD,CAAA;AAElF;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC7B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAShF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MCPUIConfigContext.js","sources":["../../src/context/MCPUIConfigContext.tsx"],"sourcesContent":["/**\n * MCPUIConfigContext — host-level rendering policy: the library's iframes\n * (v6.21.0) and, since v6.22.0, where a chart may capture the wheel.\n *\n * @since v6.21.0\n *\n * ## Why\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse every cross-origin iframe whose own document does not send a\n * COEP header — which is YouTube, Vimeo, Google Docs, Notion and nearly all of\n * `DEFAULT_IFRAME_DOMAINS`. The escape hatch is the boolean HTML attribute\n * `credentialless` on the `<iframe>` itself: the document then loads, but\n * without access to the cookies and storage of its own origin.\n *\n * That trade-off is free for a public video or chart and fatal for an\n * authenticated embed, so the library keys it on the distinction it already\n * makes: `TRUSTED_IFRAME_DOMAINS` (the hosts that receive `allow-same-origin`\n * because they need their own cookies) do NOT get the attribute; everything\n * else does. This context lets a host override that, add its own trusted\n * hosts, and control the \"open in a new tab\" fallback link.\n *\n * ## Scope — policy only, NOT strings\n *\n * Text lives in `MCPUIStrings` (`MCPUIStringsContext`). This context carries\n * only behavioural switches, and like the strings context every renderer works\n * standalone: with no provider mounted, `DEFAULT_MCPUI_CONFIG` applies.\n *\n * @example\n * ```tsx\n * import { MCPUIConfigProvider } from '@seed-ship/mcp-ui-solid'\n *\n * <MCPUIConfigProvider config={{ customTrustedIframeDomains: ['embed.acme.com'] }}>\n * <App />\n * </MCPUIConfigProvider>\n * ```\n */\n\nimport { createContext, mergeProps, useContext, type JSX } from 'solid-js'\nimport type { IframePolicy } from '../types'\n\n/**\n * Host-level rendering policy. Every field has a default — a provider passes\n * a partial override.\n *\n * ## Why every field is optional\n *\n * This interface grows a key every time the library gains a policy switch,\n * and those releases are MINOR. Were the fields required, adding one would\n * break the build of any consumer holding a COMPLETE `MCPUIConfig` value —\n * a typed constant, a helper that returns one, or a direct\n * `<MCPUIConfigContext.Provider value={…}>` — because their object would\n * suddenly miss a key. Nothing about their behaviour changed; only `tsc`\n * would fail. Optional fields make each new key additive.\n *\n * The completeness guarantee moves from the type to the two values that\n * actually need it, exactly as `MCPUIStrings` does it:\n * `DEFAULT_MCPUI_CONFIG` is `Required<MCPUIConfig>`, so forgetting a default\n * is a compile error HERE, and {@link useMCPUIConfig} returns\n * `Required<MCPUIConfig>`, so every renderer still reads a fully resolved\n * value and never has to null-check a policy.\n */\nexport interface MCPUIConfig {\n /**\n * When the library puts the boolean `credentialless` attribute on an\n * `<iframe>` it renders.\n *\n * - `'auto'` (default) — on every iframe whose host is NOT in\n * `TRUSTED_IFRAME_DOMAINS` (plus `customTrustedIframeDomains`). Those\n * hosts already ran without cookies, since their sandbox has no\n * `allow-same-origin`; the attribute is what unblocks them under COEP.\n * - `'always'` — on every iframe, trusted hosts included. An authenticated\n * embed will then render its login screen.\n * - `'never'` — never. The right value for a host that sends no COEP header\n * and does not want its embeds to lose their cookies.\n *\n * Chrome/Edge 110+ honour the attribute; Firefox ignores it (iframes stay\n * blocked while the host sends COEP); Safari ignores the COEP value itself,\n * so nothing is blocked there in the first place.\n */\n iframeCredentialless?: 'auto' | 'always' | 'never'\n\n /**\n * Extra hosts treated as trusted, on top of `TRUSTED_IFRAME_DOMAINS`:\n * no `credentialless` attribute, and `allow-same-origin` in the sandbox.\n * A subdomain of a listed host matches too.\n *\n * This only RECLASSIFIES a host the allow-list already accepts. To render an\n * iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to\n * {@link MCPUIConfig.customIframeDomains} with `iframePolicy: 'extend'`.\n */\n customTrustedIframeDomains?: string[]\n\n /**\n * How `UIResourceRenderer` validates an `iframe` component's host:\n * `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`\n * also accepts {@link MCPUIConfig.customIframeDomains}.\n */\n iframePolicy?: IframePolicy\n\n /**\n * Extra hosts the allow-list accepts when `iframePolicy` is `'extend'`.\n * Without this, a component pointing at an unlisted host is replaced by the\n * validation card before any renderer runs.\n */\n customIframeDomains?: string[]\n\n /**\n * When the library renders an \"open in a new tab\" link under an embed\n * (`strings.iframeOpenInNewTab`).\n *\n * A COEP-blocked iframe fires no event the parent page can observe, so\n * without this the user sees an unexplained blank frame.\n *\n * - `'auto'` (default) — only when the page is cross-origin isolated\n * (`window.crossOriginIsolated`). That flag needs COOP `same-origin` AND\n * COEP, so a host that sends COEP alone still blocks embeds while the\n * flag is false: set `'always'` there. Read after mount, never during\n * render, so SSR markup and hydration agree.\n * - `'always'` / `'never'` — unconditional.\n */\n iframeFallbackLink?: 'auto' | 'always' | 'never'\n\n /**\n * Where `ChartJSRenderer` enables wheel-zoom / drag-pan / pinch on a chart\n * (through the optional `chartjs-plugin-zoom` peer dependency — absent, the\n * chart renders exactly as it does without this setting).\n *\n * Hijacking the mouse wheel on a component sitting inline in a scrolling\n * chat feed is hostile: the user scrolls the conversation and the chart eats\n * the gesture. So zoom belongs to a surface that OWNS its viewport, which\n * here is `ExpandableWrapper`'s fullscreen modal.\n *\n * - `'expanded'` (default) — only inside the fullscreen modal.\n * - `'always'` — inline as well. For a host that lays charts out in a\n * dashboard rather than in a feed, where the wheel has nothing to steal.\n * - `'never'` — off everywhere; the plugin is never registered.\n *\n * @since 6.22.0\n */\n chartZoom?: 'expanded' | 'always' | 'never'\n}\n\n/**\n * Defaults. Chosen so a host that sends no COEP header sees no change from\n * 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —\n * and, since 6.22.0, so no inline component ever captures the wheel\n * (`chartZoom: 'expanded'`).\n *\n * Typed `Required<MCPUIConfig>`: the interface's fields are optional so that\n * adding one stays backward compatible, and this annotation is what keeps a\n * new key from shipping without a default.\n */\nexport const DEFAULT_MCPUI_CONFIG: Required<MCPUIConfig> = {\n iframeCredentialless: 'auto',\n customTrustedIframeDomains: [],\n iframePolicy: 'strict',\n customIframeDomains: [],\n iframeFallbackLink: 'auto',\n chartZoom: 'expanded',\n}\n\n/**\n * Deliberately typed with the PARTIAL `MCPUIConfig`, not `Required<…>`: a\n * host that bypasses `MCPUIConfigProvider` and feeds this provider directly\n * may pass whichever keys it cares about, and `useMCPUIConfig` fills the\n * rest. Widening it this way only ever accepts more than before.\n */\nexport const MCPUIConfigContext = createContext<MCPUIConfig>(DEFAULT_MCPUI_CONFIG)\n\n/**\n * Reads the active host config, resolved: every key is present, whether it\n * came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults\n * outright when no `<MCPUIConfigProvider>` is mounted above.\n */\nexport function useMCPUIConfig(): Required<MCPUIConfig> {\n return mergeProps(DEFAULT_MCPUI_CONFIG, useContext(MCPUIConfigContext))\n}\n\nexport interface MCPUIConfigProviderProps {\n /**\n * Partial override of the host config. Any key left unset falls back to\n * `DEFAULT_MCPUI_CONFIG`.\n */\n config?: Partial<MCPUIConfig>\n children: JSX.Element\n}\n\n/**\n * Provides the host config to every MCP-UI renderer below it.\n * Merges the partial `config` override over the defaults.\n */\nexport function MCPUIConfigProvider(props: MCPUIConfigProviderProps): JSX.Element {\n // The function source keeps replacement `config` objects reactive while\n // mergeProps fills any omitted key without taking a one-time snapshot.\n const value = mergeProps(DEFAULT_MCPUI_CONFIG, () => props.config)\n return (\n <MCPUIConfigContext.Provider value={value}>\n {props.children}\n </MCPUIConfigContext.Provider>\n )\n}\n"],"names":["DEFAULT_MCPUI_CONFIG","iframeCredentialless","customTrustedIframeDomains","iframePolicy","customIframeDomains","iframeFallbackLink","chartZoom","MCPUIConfigContext","createContext","useMCPUIConfig","mergeProps","useContext","MCPUIConfigProvider","props","value","config","_$createComponent","Provider","children"],"mappings":";;AAyJO,MAAMA,uBAA8C;AAAA,EACzDC,sBAAsB;AAAA,EACtBC,4BAA4B,CAAA;AAAA,EAC5BC,cAAc;AAAA,EACdC,qBAAqB,CAAA;AAAA,EACrBC,oBAAoB;AAAA,EACpBC,WAAW;AACb;AAQO,MAAMC,qBAAqBC,cAA2BR,oBAAoB;AAO1E,SAASS,iBAAwC;AACtD,SAAOC,WAAWV,sBAAsBW,WAAWJ,kBAAkB,CAAC;AACxE;AAeO,SAASK,oBAAoBC,OAA8C;AAGhF,QAAMC,QAAQJ,WAAWV,sBAAsB,MAAMa,MAAME,MAAM;AACjE,SAAAC,gBACGT,mBAAmBU,UAAQ;AAAA,IAACH;AAAAA,IAAY,IAAAI,WAAA;AAAA,aACtCL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;"}
|
|
1
|
+
{"version":3,"file":"MCPUIConfigContext.js","sources":["../../src/context/MCPUIConfigContext.tsx"],"sourcesContent":["/**\n * MCPUIConfigContext — host-level rendering policy: the library's iframes\n * (v6.21.0) and, since v6.22.0, where a chart may capture the wheel.\n *\n * @since v6.21.0\n *\n * ## Why\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse every cross-origin iframe whose own document does not send a\n * COEP header — which is YouTube, Vimeo, Google Docs, Notion and nearly all of\n * `DEFAULT_IFRAME_DOMAINS`. The escape hatch is the boolean HTML attribute\n * `credentialless` on the `<iframe>` itself: the document then loads, but\n * without access to the cookies and storage of its own origin.\n *\n * That trade-off is free for a public video or chart and fatal for an\n * authenticated embed, so the library keys it on the distinction it already\n * makes: `TRUSTED_IFRAME_DOMAINS` (the hosts that receive `allow-same-origin`\n * because they need their own cookies) do NOT get the attribute; everything\n * else does. This context lets a host override that, add its own trusted\n * hosts, and control the \"open in a new tab\" fallback link.\n *\n * ## Scope — policy only, NOT strings\n *\n * Text lives in `MCPUIStrings` (`MCPUIStringsContext`). This context carries\n * only behavioural switches, and like the strings context every renderer works\n * standalone: with no provider mounted, `DEFAULT_MCPUI_CONFIG` applies.\n *\n * @example\n * ```tsx\n * import { MCPUIConfigProvider } from '@seed-ship/mcp-ui-solid'\n *\n * <MCPUIConfigProvider config={{ customTrustedIframeDomains: ['embed.acme.com'] }}>\n * <App />\n * </MCPUIConfigProvider>\n * ```\n */\n\nimport { createContext, mergeProps, useContext, type JSX } from 'solid-js'\nimport type { IframePolicy } from '../types'\n\n/**\n * Host-level rendering policy. Every field has a default — a provider passes\n * a partial override.\n *\n * ## Two names, because there are two jobs\n *\n * This type grows a key every time the library gains a policy switch, and\n * those releases are MINOR — so neither AUTHORING a config nor READING one\n * may break when a key appears. Those two demands pull in opposite\n * directions, and one name cannot serve both:\n *\n * - an author must be allowed to omit the new key, so the fields they write\n * have to be OPTIONAL;\n * - a reader assigning `const p: IframePolicy = config.iframePolicy` must not\n * suddenly face `undefined`, so the fields they read have to be REQUIRED.\n *\n * Hence {@link MCPUIConfigInput} (what a host writes — every field optional)\n * and {@link MCPUIConfig} (what the library hands back — every field\n * resolved). `MCPUIConfig` is derived from the input type, so the two can\n * never drift and a key is declared exactly once.\n *\n * Which one you name depends on the surface:\n *\n * - `<MCPUIConfigProvider config={…}>` takes `MCPUIConfigInput` — name that\n * type for a partial you build, and it merges the rest;\n * - `<MCPUIConfigContext.Provider value={…}>` takes the RESOLVED\n * `MCPUIConfig`, because that context is read as well as written, so a\n * direct provider hands over `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`;\n * - anything you RECEIVE is `MCPUIConfig`, which is what\n * {@link useMCPUIConfig} returns.\n */\nexport interface MCPUIConfigInput {\n /**\n * When the library puts the boolean `credentialless` attribute on an\n * `<iframe>` it renders.\n *\n * - `'auto'` (default) — on every iframe whose host is NOT in\n * `TRUSTED_IFRAME_DOMAINS` (plus `customTrustedIframeDomains`). Those\n * hosts already ran without cookies, since their sandbox has no\n * `allow-same-origin`; the attribute is what unblocks them under COEP.\n * - `'always'` — on every iframe, trusted hosts included. An authenticated\n * embed will then render its login screen.\n * - `'never'` — never. The right value for a host that sends no COEP header\n * and does not want its embeds to lose their cookies.\n *\n * Chrome/Edge 110+ honour the attribute; Firefox ignores it (iframes stay\n * blocked while the host sends COEP); Safari ignores the COEP value itself,\n * so nothing is blocked there in the first place.\n */\n iframeCredentialless?: 'auto' | 'always' | 'never'\n\n /**\n * Extra hosts treated as trusted, on top of `TRUSTED_IFRAME_DOMAINS`:\n * no `credentialless` attribute, and `allow-same-origin` in the sandbox.\n * A subdomain of a listed host matches too.\n *\n * This only RECLASSIFIES a host the allow-list already accepts. To render an\n * iframe whose host is outside `DEFAULT_IFRAME_DOMAINS`, add it to\n * {@link MCPUIConfigInput.customIframeDomains} with `iframePolicy: 'extend'`.\n */\n customTrustedIframeDomains?: string[]\n\n /**\n * How `UIResourceRenderer` validates an `iframe` component's host:\n * `'strict'` (default) accepts `DEFAULT_IFRAME_DOMAINS` only, `'extend'`\n * also accepts {@link MCPUIConfigInput.customIframeDomains}.\n */\n iframePolicy?: IframePolicy\n\n /**\n * Extra hosts the allow-list accepts when `iframePolicy` is `'extend'`.\n * Without this, a component pointing at an unlisted host is replaced by the\n * validation card before any renderer runs.\n */\n customIframeDomains?: string[]\n\n /**\n * When the library renders an \"open in a new tab\" link under an embed\n * (`strings.iframeOpenInNewTab`).\n *\n * A COEP-blocked iframe fires no event the parent page can observe, so\n * without this the user sees an unexplained blank frame.\n *\n * - `'auto'` (default) — only when the page is cross-origin isolated\n * (`window.crossOriginIsolated`). That flag needs COOP `same-origin` AND\n * COEP, so a host that sends COEP alone still blocks embeds while the\n * flag is false: set `'always'` there. Read after mount, never during\n * render, so SSR markup and hydration agree.\n * - `'always'` / `'never'` — unconditional.\n */\n iframeFallbackLink?: 'auto' | 'always' | 'never'\n\n /**\n * Where `ChartJSRenderer` enables wheel-zoom / drag-pan / pinch on a chart\n * (through the optional `chartjs-plugin-zoom` peer dependency — absent, the\n * chart renders exactly as it does without this setting).\n *\n * Hijacking the mouse wheel on a component sitting inline in a scrolling\n * chat feed is hostile: the user scrolls the conversation and the chart eats\n * the gesture. So zoom belongs to a surface that OWNS its viewport, which\n * here is `ExpandableWrapper`'s fullscreen modal.\n *\n * - `'expanded'` (default) — only inside the fullscreen modal.\n * - `'always'` — inline as well. For a host that lays charts out in a\n * dashboard rather than in a feed, where the wheel has nothing to steal.\n * - `'never'` — off everywhere; the plugin is never registered.\n *\n * @since 6.22.0\n */\n chartZoom?: 'expanded' | 'always' | 'never'\n}\n\n/**\n * The resolved host policy: every key present. This is what the library hands\n * back, so a reader never null-checks a policy.\n *\n * Extends `Required<`{@link MCPUIConfigInput}`>` rather than declaring the\n * fields again, so a key exists in exactly one place and the two views cannot\n * drift. It remains an interface so existing consumers can extend or augment\n * the public contract as they could before 6.22.0.\n */\nexport interface MCPUIConfig extends Required<MCPUIConfigInput> {}\n\n/**\n * Defaults. Chosen so a host that sends no COEP header sees no change from\n * 6.20.0 apart from the fallback link, which `'auto'` keeps hidden there —\n * and, since 6.22.0, so no inline component ever captures the wheel\n * (`chartZoom: 'expanded'`).\n *\n * Typed `MCPUIConfig` (i.e. resolved): that annotation is what stops a new\n * key from shipping without a default.\n */\nexport const DEFAULT_MCPUI_CONFIG: MCPUIConfig = {\n iframeCredentialless: 'auto',\n customTrustedIframeDomains: [],\n iframePolicy: 'strict',\n customIframeDomains: [],\n iframeFallbackLink: 'auto',\n chartZoom: 'expanded',\n}\n\n/**\n * Typed with the RESOLVED view, because this context is read as well as\n * written: it is exported, so a consumer may call\n * `useContext(MCPUIConfigContext)` directly, and typing it as the input view\n * would hand them `IframePolicy | undefined` — exactly the regression this\n * whole split exists to undo.\n *\n * The cost lands on the rarer side: a host feeding this context directly\n * passes a COMPLETE value, `{ ...DEFAULT_MCPUI_CONFIG, ...mine }`. Anyone who\n * wants to pass only the keys they care about uses `MCPUIConfigProvider`,\n * whose `config` prop takes `Partial<`{@link MCPUIConfig}`>` and does that\n * merge. That preserves optional properties added through declaration\n * merging; {@link MCPUIConfigInput} remains the unaugmented built-in input\n * shape a host can name for ordinary authored configs.\n */\nexport const MCPUIConfigContext = createContext<MCPUIConfig>(DEFAULT_MCPUI_CONFIG)\n\n/**\n * Reads the active host config, resolved: every key is present, whether it\n * came from the provider or from `DEFAULT_MCPUI_CONFIG`. Returns the defaults\n * outright when no `<MCPUIConfigProvider>` is mounted above.\n */\nexport function useMCPUIConfig(): MCPUIConfig {\n return mergeProps(DEFAULT_MCPUI_CONFIG, useContext(MCPUIConfigContext))\n}\n\nexport interface MCPUIConfigProviderProps {\n /**\n * Partial override of the host config. Any key left unset falls back to\n * `DEFAULT_MCPUI_CONFIG`.\n */\n config?: Partial<MCPUIConfig>\n children: JSX.Element\n}\n\n/**\n * Provides the host config to every MCP-UI renderer below it.\n * Merges the partial `config` override over the defaults.\n */\nexport function MCPUIConfigProvider(props: MCPUIConfigProviderProps): JSX.Element {\n // The function source keeps replacement `config` objects reactive while\n // mergeProps fills any omitted key without taking a one-time snapshot.\n const value = mergeProps(DEFAULT_MCPUI_CONFIG, () => props.config)\n return (\n <MCPUIConfigContext.Provider value={value}>\n {props.children}\n </MCPUIConfigContext.Provider>\n )\n}\n"],"names":["DEFAULT_MCPUI_CONFIG","iframeCredentialless","customTrustedIframeDomains","iframePolicy","customIframeDomains","iframeFallbackLink","chartZoom","MCPUIConfigContext","createContext","useMCPUIConfig","mergeProps","useContext","MCPUIConfigProvider","props","value","config","_$createComponent","Provider","children"],"mappings":";;AA6KO,MAAMA,uBAAoC;AAAA,EAC/CC,sBAAsB;AAAA,EACtBC,4BAA4B,CAAA;AAAA,EAC5BC,cAAc;AAAA,EACdC,qBAAqB,CAAA;AAAA,EACrBC,oBAAoB;AAAA,EACpBC,WAAW;AACb;AAiBO,MAAMC,qBAAqBC,cAA2BR,oBAAoB;AAO1E,SAASS,iBAA8B;AAC5C,SAAOC,WAAWV,sBAAsBW,WAAWJ,kBAAkB,CAAC;AACxE;AAeO,SAASK,oBAAoBC,OAA8C;AAGhF,QAAMC,QAAQJ,WAAWV,sBAAsB,MAAMa,MAAME,MAAM;AACjE,SAAAC,gBACGT,mBAAmBU,UAAQ;AAAA,IAACH;AAAAA,IAAY,IAAAI,WAAA;AAAA,aACtCL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const web = require("solid-js/web");
|
|
4
|
+
const solidJs = require("solid-js");
|
|
5
|
+
const MCPUIMathContext = solidJs.createContext(() => void 0);
|
|
6
|
+
function MCPUIMathProvider(props) {
|
|
7
|
+
return web.createComponent(MCPUIMathContext.Provider, {
|
|
8
|
+
value: () => props.renderMath ?? void 0,
|
|
9
|
+
get children() {
|
|
10
|
+
return props.children;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function useMCPUIMath() {
|
|
15
|
+
return solidJs.useContext(MCPUIMathContext);
|
|
16
|
+
}
|
|
17
|
+
exports.MCPUIMathProvider = MCPUIMathProvider;
|
|
18
|
+
exports.useMCPUIMath = useMCPUIMath;
|
|
19
|
+
//# sourceMappingURL=MCPUIMathContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MCPUIMathContext.cjs","sources":["../../src/context/MCPUIMathContext.tsx"],"sourcesContent":["import { createContext, useContext, type Accessor, type JSX } from 'solid-js'\n\nexport interface MathRenderOptions {\n displayMode: boolean\n}\n\n/** A synchronous, host-supplied renderer. Returned markup is always sanitized by MCP-UI. */\nexport type MathRenderer = (tex: string, options: MathRenderOptions) => string | null\n\nconst MCPUIMathContext = createContext<Accessor<MathRenderer | undefined>>(() => undefined)\n\nexport interface MCPUIMathProviderProps {\n /** Omit or pass null to explicitly disable an inherited renderer. */\n renderMath?: MathRenderer | null\n children: JSX.Element\n}\n\nexport function MCPUIMathProvider(props: MCPUIMathProviderProps): JSX.Element {\n return (\n <MCPUIMathContext.Provider value={() => props.renderMath ?? undefined}>\n {props.children}\n </MCPUIMathContext.Provider>\n )\n}\n\n/**\n * Returns a reactive accessor for the nearest math renderer. Call the accessor\n * at use time; its value changes when a provider swaps or disables its renderer.\n */\nexport function useMCPUIMath(): Accessor<MathRenderer | undefined> {\n return useContext(MCPUIMathContext)\n}\n"],"names":["MCPUIMathContext","createContext","undefined","MCPUIMathProvider","props","_$createComponent","Provider","value","renderMath","children","useMCPUIMath","useContext"],"mappings":";;;;AASA,MAAMA,mBAAmBC,QAAAA,cAAkD,MAAMC,MAAS;AAQnF,SAASC,kBAAkBC,OAA4C;AAC5E,SAAAC,IAAAA,gBACGL,iBAAiBM,UAAQ;AAAA,IAACC,OAAOA,MAAMH,MAAMI,cAAcN;AAAAA,IAAS,IAAAO,WAAA;AAAA,aAClEL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;AAMO,SAASC,eAAmD;AACjE,SAAOC,QAAAA,WAAWX,gBAAgB;AACpC;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Accessor, type JSX } from 'solid-js';
|
|
2
|
+
export interface MathRenderOptions {
|
|
3
|
+
displayMode: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** A synchronous, host-supplied renderer. Returned markup is always sanitized by MCP-UI. */
|
|
6
|
+
export type MathRenderer = (tex: string, options: MathRenderOptions) => string | null;
|
|
7
|
+
export interface MCPUIMathProviderProps {
|
|
8
|
+
/** Omit or pass null to explicitly disable an inherited renderer. */
|
|
9
|
+
renderMath?: MathRenderer | null;
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export declare function MCPUIMathProvider(props: MCPUIMathProviderProps): JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a reactive accessor for the nearest math renderer. Call the accessor
|
|
15
|
+
* at use time; its value changes when a provider swaps or disables its renderer.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useMCPUIMath(): Accessor<MathRenderer | undefined>;
|
|
18
|
+
//# sourceMappingURL=MCPUIMathContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MCPUIMathContext.d.ts","sourceRoot":"","sources":["../../src/context/MCPUIMathContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,QAAQ,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAE7E,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,4FAA4F;AAC5F,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,KAAK,MAAM,GAAG,IAAI,CAAA;AAIrF,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAChC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAM5E;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAAC,YAAY,GAAG,SAAS,CAAC,CAEjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createComponent } from "solid-js/web";
|
|
2
|
+
import { createContext, useContext } from "solid-js";
|
|
3
|
+
const MCPUIMathContext = createContext(() => void 0);
|
|
4
|
+
function MCPUIMathProvider(props) {
|
|
5
|
+
return createComponent(MCPUIMathContext.Provider, {
|
|
6
|
+
value: () => props.renderMath ?? void 0,
|
|
7
|
+
get children() {
|
|
8
|
+
return props.children;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function useMCPUIMath() {
|
|
13
|
+
return useContext(MCPUIMathContext);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
MCPUIMathProvider,
|
|
17
|
+
useMCPUIMath
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=MCPUIMathContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MCPUIMathContext.js","sources":["../../src/context/MCPUIMathContext.tsx"],"sourcesContent":["import { createContext, useContext, type Accessor, type JSX } from 'solid-js'\n\nexport interface MathRenderOptions {\n displayMode: boolean\n}\n\n/** A synchronous, host-supplied renderer. Returned markup is always sanitized by MCP-UI. */\nexport type MathRenderer = (tex: string, options: MathRenderOptions) => string | null\n\nconst MCPUIMathContext = createContext<Accessor<MathRenderer | undefined>>(() => undefined)\n\nexport interface MCPUIMathProviderProps {\n /** Omit or pass null to explicitly disable an inherited renderer. */\n renderMath?: MathRenderer | null\n children: JSX.Element\n}\n\nexport function MCPUIMathProvider(props: MCPUIMathProviderProps): JSX.Element {\n return (\n <MCPUIMathContext.Provider value={() => props.renderMath ?? undefined}>\n {props.children}\n </MCPUIMathContext.Provider>\n )\n}\n\n/**\n * Returns a reactive accessor for the nearest math renderer. Call the accessor\n * at use time; its value changes when a provider swaps or disables its renderer.\n */\nexport function useMCPUIMath(): Accessor<MathRenderer | undefined> {\n return useContext(MCPUIMathContext)\n}\n"],"names":["MCPUIMathContext","createContext","undefined","MCPUIMathProvider","props","_$createComponent","Provider","value","renderMath","children","useMCPUIMath","useContext"],"mappings":";;AASA,MAAMA,mBAAmBC,cAAkD,MAAMC,MAAS;AAQnF,SAASC,kBAAkBC,OAA4C;AAC5E,SAAAC,gBACGL,iBAAiBM,UAAQ;AAAA,IAACC,OAAOA,MAAMH,MAAMI,cAAcN;AAAAA,IAAS,IAAAO,WAAA;AAAA,aAClEL,MAAMK;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;AAMO,SAASC,eAAmD;AACjE,SAAOC,WAAWX,gBAAgB;AACpC;"}
|
package/dist/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ const useDataValidator = require("./hooks/useDataValidator.cjs");
|
|
|
48
48
|
const AutocompleteContext = require("./context/AutocompleteContext.cjs");
|
|
49
49
|
const validation = require("./services/validation.cjs");
|
|
50
50
|
const degradedProjections = require("./utils/degraded-projections.cjs");
|
|
51
|
+
const MCPUIMathContext = require("./context/MCPUIMathContext.cjs");
|
|
51
52
|
const chartDataTable = require("./components/chart-data-table.cjs");
|
|
52
53
|
const chatBus = require("./services/chat-bus.cjs");
|
|
53
54
|
const chatPromptController = require("./services/chat-prompt-controller.cjs");
|
|
@@ -159,6 +160,7 @@ exports.DEGRADED_PROJECTION_LABELS = degradedProjections.DEGRADED_PROJECTION_LAB
|
|
|
159
160
|
exports.chartToDegradedTable = degradedProjections.chartToDegradedTable;
|
|
160
161
|
exports.graphToDegradedTable = degradedProjections.graphToDegradedTable;
|
|
161
162
|
exports.mapToDegradedTable = degradedProjections.mapToDegradedTable;
|
|
163
|
+
exports.MCPUIMathProvider = MCPUIMathContext.MCPUIMathProvider;
|
|
162
164
|
exports.CHART_DATA_TABLE_LABELS = chartDataTable.CHART_DATA_TABLE_LABELS;
|
|
163
165
|
exports.chartToDataTable = chartDataTable.chartToDataTable;
|
|
164
166
|
exports.clarificationToPromptConfig = chatBus.clarificationToPromptConfig;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.cts
CHANGED
|
@@ -72,7 +72,7 @@ export type { PanZoomOptions, PanZoomController, PanZoomState, PanZoomPoint, Pan
|
|
|
72
72
|
export { MCPUIStringsProvider, MCPUIStringsContext, useMCPUIStrings, DEFAULT_MCPUI_STRINGS, formatMCPUIString, resolveMCPUILocale, } from './context/MCPUIStringsContext';
|
|
73
73
|
export type { MCPUIStrings, MCPUIStringsProviderProps, } from './context/MCPUIStringsContext';
|
|
74
74
|
export { MCPUIConfigProvider, MCPUIConfigContext, useMCPUIConfig, DEFAULT_MCPUI_CONFIG, } from './context/MCPUIConfigContext';
|
|
75
|
-
export type { MCPUIConfig, MCPUIConfigProviderProps, } from './context/MCPUIConfigContext';
|
|
75
|
+
export type { MCPUIConfig, MCPUIConfigInput, MCPUIConfigProviderProps, } from './context/MCPUIConfigContext';
|
|
76
76
|
export { MCPUITelemetryProvider, MCPUITelemetryContext, useTelemetry, } from './context/MCPUITelemetryContext';
|
|
77
77
|
export type { MCPUITelemetryProviderProps } from './context/MCPUITelemetryContext';
|
|
78
78
|
export { createTelemetryDispatcher } from './services/telemetry';
|
|
@@ -108,6 +108,8 @@ export { validateFieldValue, validateFormData, DEFAULT_VALIDATION_MESSAGES, } fr
|
|
|
108
108
|
export type { FormValidationMessages } from './services/validation';
|
|
109
109
|
export { graphToDegradedTable, mapToDegradedTable, chartToDegradedTable, DEGRADED_PROJECTION_LABELS, } from './utils/degraded-projections';
|
|
110
110
|
export type { DegradedProjectionLabels } from './utils/degraded-projections';
|
|
111
|
+
export { MCPUIMathProvider } from './context/MCPUIMathContext';
|
|
112
|
+
export type { MathRenderer, MathRenderOptions, MCPUIMathProviderProps } from './context/MCPUIMathContext';
|
|
111
113
|
export { chartToDataTable, CHART_DATA_TABLE_LABELS } from './components/chart-data-table';
|
|
112
114
|
export type { ChartDataTableLabels } from './components/chart-data-table';
|
|
113
115
|
export { clarificationToPromptConfig } from './services/chat-bus';
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export type { PanZoomOptions, PanZoomController, PanZoomState, PanZoomPoint, Pan
|
|
|
72
72
|
export { MCPUIStringsProvider, MCPUIStringsContext, useMCPUIStrings, DEFAULT_MCPUI_STRINGS, formatMCPUIString, resolveMCPUILocale, } from './context/MCPUIStringsContext';
|
|
73
73
|
export type { MCPUIStrings, MCPUIStringsProviderProps, } from './context/MCPUIStringsContext';
|
|
74
74
|
export { MCPUIConfigProvider, MCPUIConfigContext, useMCPUIConfig, DEFAULT_MCPUI_CONFIG, } from './context/MCPUIConfigContext';
|
|
75
|
-
export type { MCPUIConfig, MCPUIConfigProviderProps, } from './context/MCPUIConfigContext';
|
|
75
|
+
export type { MCPUIConfig, MCPUIConfigInput, MCPUIConfigProviderProps, } from './context/MCPUIConfigContext';
|
|
76
76
|
export { MCPUITelemetryProvider, MCPUITelemetryContext, useTelemetry, } from './context/MCPUITelemetryContext';
|
|
77
77
|
export type { MCPUITelemetryProviderProps } from './context/MCPUITelemetryContext';
|
|
78
78
|
export { createTelemetryDispatcher } from './services/telemetry';
|
|
@@ -108,6 +108,8 @@ export { validateFieldValue, validateFormData, DEFAULT_VALIDATION_MESSAGES, } fr
|
|
|
108
108
|
export type { FormValidationMessages } from './services/validation';
|
|
109
109
|
export { graphToDegradedTable, mapToDegradedTable, chartToDegradedTable, DEGRADED_PROJECTION_LABELS, } from './utils/degraded-projections';
|
|
110
110
|
export type { DegradedProjectionLabels } from './utils/degraded-projections';
|
|
111
|
+
export { MCPUIMathProvider } from './context/MCPUIMathContext';
|
|
112
|
+
export type { MathRenderer, MathRenderOptions, MCPUIMathProviderProps } from './context/MCPUIMathContext';
|
|
111
113
|
export { chartToDataTable, CHART_DATA_TABLE_LABELS } from './components/chart-data-table';
|
|
112
114
|
export type { ChartDataTableLabels } from './components/chart-data-table';
|
|
113
115
|
export { clarificationToPromptConfig } from './services/chat-bus';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAGjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AACpF,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAG7F,OAAO,EACL,oBAAoB,EACpB,oCAAoC,GACrC,MAAM,mCAAmC,CAAA;AAC1C,YAAY,EACV,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAA;AAC1C,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,wBAAw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ACpB,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ import { useDataValidator } from "./hooks/useDataValidator.js";
|
|
|
46
46
|
import { AutocompleteProvider, useAutocompleteContext, useAutocompleteContextSafe } from "./context/AutocompleteContext.js";
|
|
47
47
|
import { DEFAULT_IFRAME_DOMAINS, DEFAULT_RESOURCE_LIMITS, DEFAULT_VALIDATION_MESSAGES, TRUSTED_IFRAME_DOMAINS, getIframeSandbox, isTrustedIframeDomain, validateComponent, validateFieldValue, validateFormData, validateIframeDomain, validateLayout } from "./services/validation.js";
|
|
48
48
|
import { DEGRADED_PROJECTION_LABELS, chartToDegradedTable, graphToDegradedTable, mapToDegradedTable } from "./utils/degraded-projections.js";
|
|
49
|
+
import { MCPUIMathProvider } from "./context/MCPUIMathContext.js";
|
|
49
50
|
import { CHART_DATA_TABLE_LABELS, chartToDataTable } from "./components/chart-data-table.js";
|
|
50
51
|
import { clarificationToPromptConfig, createChatBus, createCommandHandler, createEventEmitter, elicitationToPromptConfig, mergeScratchpadSections } from "./services/chat-bus.js";
|
|
51
52
|
import { PromptReplacedError, createChatPromptController } from "./services/chat-prompt-controller.js";
|
|
@@ -92,6 +93,7 @@ export {
|
|
|
92
93
|
MCPActionProvider,
|
|
93
94
|
MCPUIConfigContext,
|
|
94
95
|
MCPUIConfigProvider,
|
|
96
|
+
MCPUIMathProvider,
|
|
95
97
|
MCPUIStringsContext,
|
|
96
98
|
MCPUIStringsProvider,
|
|
97
99
|
MCPUITelemetryContext,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const katex = require("katex");
|
|
4
|
+
const renderKatexMath = (tex, { displayMode }) => {
|
|
5
|
+
try {
|
|
6
|
+
return katex.renderToString(tex, {
|
|
7
|
+
displayMode,
|
|
8
|
+
output: "mathml",
|
|
9
|
+
// Invalid TeX must return null so the core can preserve the complete
|
|
10
|
+
// source token, including its delimiters, instead of showing KaTeX's
|
|
11
|
+
// red error MathML and silently consuming the dollars.
|
|
12
|
+
throwOnError: true,
|
|
13
|
+
trust: false,
|
|
14
|
+
maxExpand: 1e3,
|
|
15
|
+
maxSize: 20,
|
|
16
|
+
macros: {}
|
|
17
|
+
});
|
|
18
|
+
} catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.renderKatexMath = renderKatexMath;
|
|
23
|
+
//# sourceMappingURL=katex.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"katex.cjs","sources":["../../src/plugins/katex.ts"],"sourcesContent":["import katex from 'katex'\nimport type { MathRenderer } from '../context/MCPUIMathContext'\n\n/**\n * Optional KaTeX adapter. It emits MathML only: no HTML layout tree, inline\n * styles, fonts, stylesheet, shared macro state, or trusted TeX commands.\n */\nexport const renderKatexMath: MathRenderer = (tex, { displayMode }) => {\n try {\n return katex.renderToString(tex, {\n displayMode,\n output: 'mathml',\n // Invalid TeX must return null so the core can preserve the complete\n // source token, including its delimiters, instead of showing KaTeX's\n // red error MathML and silently consuming the dollars.\n throwOnError: true,\n trust: false,\n maxExpand: 1000,\n maxSize: 20,\n macros: {},\n })\n } catch {\n return null\n }\n}\n"],"names":[],"mappings":";;;AAOO,MAAM,kBAAgC,CAAC,KAAK,EAAE,kBAAkB;AACrE,MAAI;AACF,WAAO,MAAM,eAAe,KAAK;AAAA,MAC/B;AAAA,MACA,QAAQ;AAAA;AAAA;AAAA;AAAA,MAIR,cAAc;AAAA,MACd,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,MACT,QAAQ,CAAA;AAAA,IAAC,CACV;AAAA,EACH,QAAQ;AACN,WAAO;AAAA,EACT;AACF;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MathRenderer } from '../context/MCPUIMathContext';
|
|
2
|
+
/**
|
|
3
|
+
* Optional KaTeX adapter. It emits MathML only: no HTML layout tree, inline
|
|
4
|
+
* styles, fonts, stylesheet, shared macro state, or trusted TeX commands.
|
|
5
|
+
*/
|
|
6
|
+
export declare const renderKatexMath: MathRenderer;
|
|
7
|
+
//# sourceMappingURL=katex.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MathRenderer } from '../context/MCPUIMathContext';
|
|
2
|
+
/**
|
|
3
|
+
* Optional KaTeX adapter. It emits MathML only: no HTML layout tree, inline
|
|
4
|
+
* styles, fonts, stylesheet, shared macro state, or trusted TeX commands.
|
|
5
|
+
*/
|
|
6
|
+
export declare const renderKatexMath: MathRenderer;
|
|
7
|
+
//# sourceMappingURL=katex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"katex.d.ts","sourceRoot":"","sources":["../../src/plugins/katex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,YAiB7B,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import katex from "katex";
|
|
2
|
+
const renderKatexMath = (tex, { displayMode }) => {
|
|
3
|
+
try {
|
|
4
|
+
return katex.renderToString(tex, {
|
|
5
|
+
displayMode,
|
|
6
|
+
output: "mathml",
|
|
7
|
+
// Invalid TeX must return null so the core can preserve the complete
|
|
8
|
+
// source token, including its delimiters, instead of showing KaTeX's
|
|
9
|
+
// red error MathML and silently consuming the dollars.
|
|
10
|
+
throwOnError: true,
|
|
11
|
+
trust: false,
|
|
12
|
+
maxExpand: 1e3,
|
|
13
|
+
maxSize: 20,
|
|
14
|
+
macros: {}
|
|
15
|
+
});
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
renderKatexMath
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=katex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"katex.js","sources":["../../src/plugins/katex.ts"],"sourcesContent":["import katex from 'katex'\nimport type { MathRenderer } from '../context/MCPUIMathContext'\n\n/**\n * Optional KaTeX adapter. It emits MathML only: no HTML layout tree, inline\n * styles, fonts, stylesheet, shared macro state, or trusted TeX commands.\n */\nexport const renderKatexMath: MathRenderer = (tex, { displayMode }) => {\n try {\n return katex.renderToString(tex, {\n displayMode,\n output: 'mathml',\n // Invalid TeX must return null so the core can preserve the complete\n // source token, including its delimiters, instead of showing KaTeX's\n // red error MathML and silently consuming the dollars.\n throwOnError: true,\n trust: false,\n maxExpand: 1000,\n maxSize: 20,\n macros: {},\n })\n } catch {\n return null\n }\n}\n"],"names":[],"mappings":";AAOO,MAAM,kBAAgC,CAAC,KAAK,EAAE,kBAAkB;AACrE,MAAI;AACF,WAAO,MAAM,eAAe,KAAK;AAAA,MAC/B;AAAA,MACA,QAAQ;AAAA;AAAA;AAAA;AAAA,MAIR,cAAc;AAAA,MACd,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,MACT,QAAQ,CAAA;AAAA,IAAC,CACV;AAAA,EACH,QAAQ;AACN,WAAO;AAAA,EACT;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-coep.cjs","sources":["../../src/utils/iframe-coep.ts"],"sourcesContent":["/**\n * COEP helpers for the two iframes the library renders\n * (`IframeRenderer` in `UIResourceRenderer.tsx`, and the YouTube / Vimeo\n * embed in `VideoRenderer.tsx`).\n *\n * @since v6.21.0\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse any cross-origin iframe whose own document sends no COEP\n * header. The HTML attribute `credentialless` on the `<iframe>` lifts that,\n * at the price of the embedded document losing access to the cookies and\n * storage of its own origin — see `MCPUIConfigContext` for the policy.\n */\n\nimport { createSignal, onMount, type Accessor } from 'solid-js'\nimport { isTrustedIframeDomain } from '../services/validation'\nimport type { MCPUIConfig } from '../context/MCPUIConfigContext'\n\n/**\n * Does this iframe get the boolean `credentialless` attribute?\n *\n * `'auto'` (the default) says yes only when the embed has nothing to lose:\n * the host is not trusted AND the iframe already runs without cookies because\n * its `sandbox` has no `allow-same-origin` (`sandboxedWithoutSameOrigin`).\n * The video embed carries no sandbox, so in `'auto'` it keeps its provider\n * cookies and a COEP host must opt in with `'always'`.\n *\n * An unparsable URL is not trusted, so it gets the attribute.\n *\n * Takes a RESOLVED config
|
|
1
|
+
{"version":3,"file":"iframe-coep.cjs","sources":["../../src/utils/iframe-coep.ts"],"sourcesContent":["/**\n * COEP helpers for the two iframes the library renders\n * (`IframeRenderer` in `UIResourceRenderer.tsx`, and the YouTube / Vimeo\n * embed in `VideoRenderer.tsx`).\n *\n * @since v6.21.0\n *\n * A host that serves `Cross-Origin-Embedder-Policy: credentialless` makes the\n * browser refuse any cross-origin iframe whose own document sends no COEP\n * header. The HTML attribute `credentialless` on the `<iframe>` lifts that,\n * at the price of the embedded document losing access to the cookies and\n * storage of its own origin — see `MCPUIConfigContext` for the policy.\n */\n\nimport { createSignal, onMount, type Accessor } from 'solid-js'\nimport { isTrustedIframeDomain } from '../services/validation'\nimport type { MCPUIConfig } from '../context/MCPUIConfigContext'\n\n/**\n * Does this iframe get the boolean `credentialless` attribute?\n *\n * `'auto'` (the default) says yes only when the embed has nothing to lose:\n * the host is not trusted AND the iframe already runs without cookies because\n * its `sandbox` has no `allow-same-origin` (`sandboxedWithoutSameOrigin`).\n * The video embed carries no sandbox, so in `'auto'` it keeps its provider\n * cookies and a COEP host must opt in with `'always'`.\n *\n * An unparsable URL is not trusted, so it gets the attribute.\n *\n * Takes a RESOLVED config — `MCPUIConfig`, which is what `useMCPUIConfig()`\n * and `DEFAULT_MCPUI_CONFIG` hand out, every key present. The authored view is\n * `MCPUIConfigInput`, whose fields are optional so that a new key stays\n * backward compatible; accepting one of those here would mean re-implementing\n * the defaults next to their source, and silently drifting from them.\n */\nexport function shouldSetCredentialless(\n url: string,\n config: MCPUIConfig,\n options: { sandboxedWithoutSameOrigin: boolean }\n): boolean {\n const mode = config.iframeCredentialless\n if (mode === 'always') return true\n if (mode === 'never') return false\n if (!options.sandboxedWithoutSameOrigin) return false\n return !isTrustedIframeDomain(url, {\n customTrustedDomains: config.customTrustedIframeDomains,\n })\n}\n\n/**\n * `window.crossOriginIsolated`, read **after mount** into a signal.\n *\n * Reading it during render would make the server emit markup the client\n * cannot reproduce; the signal starts at `false` (the SSR value) and flips\n * once mounted, so hydration always matches.\n */\nexport function createCrossOriginIsolated(): Accessor<boolean> {\n const [isolated, setIsolated] = createSignal(false)\n onMount(() => {\n setIsolated(typeof window !== 'undefined' && window.crossOriginIsolated === true)\n })\n return isolated\n}\n\n/**\n * Does the \"open in a new tab\" link show under an embed?\n *\n * `'auto'` shows it only on a cross-origin-isolated page — exactly where COEP\n * can block the frame, and where the blocking is silent (a refused\n * cross-origin document fires no `error` event the parent can observe).\n *\n * Takes a resolved config, for the reason given on `shouldSetCredentialless`.\n */\nexport function shouldShowIframeFallbackLink(\n config: MCPUIConfig,\n crossOriginIsolated: boolean\n): boolean {\n const mode = config.iframeFallbackLink\n if (mode === 'always') return true\n if (mode === 'never') return false\n return crossOriginIsolated\n}\n"],"names":["isTrustedIframeDomain","createSignal","onMount"],"mappings":";;;;AAmCO,SAAS,wBACd,KACA,QACA,SACS;AACT,QAAM,OAAO,OAAO;AACpB,MAAI,SAAS,SAAU,QAAO;AAC9B,MAAI,SAAS,QAAS,QAAO;AAC7B,MAAI,CAAC,QAAQ,2BAA4B,QAAO;AAChD,SAAO,CAACA,WAAAA,sBAAsB,KAAK;AAAA,IACjC,sBAAsB,OAAO;AAAA,EAAA,CAC9B;AACH;AASO,SAAS,4BAA+C;AAC7D,QAAM,CAAC,UAAU,WAAW,IAAIC,QAAAA,aAAa,KAAK;AAClDC,UAAAA,QAAQ,MAAM;AACZ,gBAAY,OAAO,WAAW,eAAe,OAAO,wBAAwB,IAAI;AAAA,EAClF,CAAC;AACD,SAAO;AACT;AAWO,SAAS,6BACd,QACA,qBACS;AACT,QAAM,OAAO,OAAO;AACpB,MAAI,SAAS,SAAU,QAAO;AAC9B,MAAI,SAAS,QAAS,QAAO;AAC7B,SAAO;AACT;;;;"}
|
|
@@ -24,12 +24,13 @@ import type { MCPUIConfig } from '../context/MCPUIConfigContext';
|
|
|
24
24
|
*
|
|
25
25
|
* An unparsable URL is not trusted, so it gets the attribute.
|
|
26
26
|
*
|
|
27
|
-
* Takes a RESOLVED config
|
|
28
|
-
* and `DEFAULT_MCPUI_CONFIG` hand out
|
|
29
|
-
*
|
|
30
|
-
* one here would
|
|
27
|
+
* Takes a RESOLVED config — `MCPUIConfig`, which is what `useMCPUIConfig()`
|
|
28
|
+
* and `DEFAULT_MCPUI_CONFIG` hand out, every key present. The authored view is
|
|
29
|
+
* `MCPUIConfigInput`, whose fields are optional so that a new key stays
|
|
30
|
+
* backward compatible; accepting one of those here would mean re-implementing
|
|
31
|
+
* the defaults next to their source, and silently drifting from them.
|
|
31
32
|
*/
|
|
32
|
-
export declare function shouldSetCredentialless(url: string, config:
|
|
33
|
+
export declare function shouldSetCredentialless(url: string, config: MCPUIConfig, options: {
|
|
33
34
|
sandboxedWithoutSameOrigin: boolean;
|
|
34
35
|
}): boolean;
|
|
35
36
|
/**
|
|
@@ -49,5 +50,5 @@ export declare function createCrossOriginIsolated(): Accessor<boolean>;
|
|
|
49
50
|
*
|
|
50
51
|
* Takes a resolved config, for the reason given on `shouldSetCredentialless`.
|
|
51
52
|
*/
|
|
52
|
-
export declare function shouldShowIframeFallbackLink(config:
|
|
53
|
+
export declare function shouldShowIframeFallbackLink(config: MCPUIConfig, crossOriginIsolated: boolean): boolean;
|
|
53
54
|
//# sourceMappingURL=iframe-coep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-coep.d.ts","sourceRoot":"","sources":["../../src/utils/iframe-coep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE
|
|
1
|
+
{"version":3,"file":"iframe-coep.d.ts","sourceRoot":"","sources":["../../src/utils/iframe-coep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE;IAAE,0BAA0B,EAAE,OAAO,CAAA;CAAE,GAC/C,OAAO,CAQT;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,QAAQ,CAAC,OAAO,CAAC,CAM7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,mBAAmB,EAAE,OAAO,GAC3B,OAAO,CAKT"}
|