showai-reader 0.10.0-reader.3k2otsbo → 0.10.0-reader.4466p53i

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  The [ShowAI](https://showai.renaissancemind.ai) page reader, built from ShowAI 0.10.0 as code-split ES modules. Inline conversation pages written by `render-artifact --cdn` import it and load each component's code only when the page uses it.
4
4
 
5
5
  ```js
6
- const { mount } = await import("https://cdn.jsdelivr.net/npm/showai-reader@0.10.0-reader.3k2otsbo/index.js");
6
+ const { mount } = await import("https://cdn.jsdelivr.net/npm/showai-reader@0.10.0-reader.4466p53i/index.js");
7
7
  mount(document.getElementById("page"), { artifact });
8
8
  ```
9
9
 
package/index.js CHANGED
@@ -1 +1 @@
1
- export * from "./reader-3K2OTSBO.js";
1
+ export * from "./reader-4466P53I.js";
package/manifest.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "format": "showai-cdn-reader",
3
3
  "name": "showai-reader",
4
- "version": "0.10.0-reader.3k2otsbo",
5
- "entry": "reader-3K2OTSBO.js",
6
- "integrity": "sha256-X9HoA78dIhRvbGxAYlG8L5SI1HeBq+0hqJKHW7+Hxl0=",
4
+ "version": "0.10.0-reader.4466p53i",
5
+ "entry": "reader-4466P53I.js",
6
+ "integrity": "sha256-HrZStGBP1nMPa5Cpnop8SxqGtnfj3V1gHDsBu8pXMu0=",
7
7
  "files": 49,
8
8
  "bytes": 13329490
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "showai-reader",
3
- "version": "0.10.0-reader.3k2otsbo",
3
+ "version": "0.10.0-reader.4466p53i",
4
4
  "description": "ShowAI page reader as code-split ES modules, for inline pages loaded from a CDN.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -48,4 +48,4 @@ ${JSON.stringify(e)}`}var Qs=tt("reader",{"zh-CN":{draftNote:"\u4EA4\u4E92\u9884
48
48
  `);lt(`:root,.studio,.studio.settings-view,.studio-modal-shade,.studio-context-menu,[data-showai-inline-root]{--font-sans: "Airbnb Cereal VF", "Circular", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;--brand: #120a8f;--action: #120a8f;--action-hover: #0d076b;--text: #222222;--muted: #6a6a6a;--subtle: #929292;--paper: #ffffff;--surface: #fafafa;--line: #dddddd;--hover: #f7f7f7;--accent: var(--action);--accent-soft: #eeedf9;--brand-accent: var(--brand);--danger: #c13515;--selected: #f2f2f2;--bg: var(--paper);--border: var(--line);--text-secondary: var(--muted);--editor-bg: var(--paper);--radius-control: 8px;--radius-card: 16px;--radius-panel: 20px;--radius-pill: 999px;--space-unit: 8px;--shadow: 0 0 0 1px #00000005, 0 2px 6px #0000000a, 0 4px 8px #00000014;--shadow-dialog: 0 16px 64px #00000024;--studio-topbar-height: 56px;font-family:var(--font-sans);font-weight:500;font-synthesis:none;color-scheme:light;color:var(--text);letter-spacing:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}:root[data-theme=dark],:root[data-theme=dark] .studio,:root[data-theme=dark] .studio.settings-view,:root[data-theme=dark] .studio-modal-shade,:root[data-theme=dark] .studio-context-menu,[data-showai-inline-root][data-theme=dark]{--text: #f7f7f7;--muted: #b0b0b0;--subtle: #929292;--paper: #181818;--surface: #222222;--line: #414141;--hover: #2c2c2c;--accent: #aaa4ff;--brand-accent: #aaa4ff;--accent-soft: #25233f;--selected: #2c2c2c;--danger: #ff9c86;--shadow: 0 0 0 1px #ffffff08, 0 2px 6px #00000030, 0 4px 8px #00000040;--shadow-dialog: 0 16px 64px #00000066;color-scheme:dark}:root,[data-showai-inline-root]{--ease-out: cubic-bezier(.23, 1, .32, 1);--ease-in-out: cubic-bezier(.77, 0, .175, 1);--duration-fast: .14s;--duration-base: .2s;--duration-slow: .32s}@keyframes showai-fade-in{0%{opacity:0}}@keyframes showai-pop-in{0%{opacity:0;scale:.96}}@keyframes showai-rise-in{0%{opacity:0;translate:0 8px}}@keyframes showai-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.showai-text-shimmer{color:transparent;background:linear-gradient(90deg,var(--muted) 0%,var(--muted) 35%,var(--text) 50%,var(--muted) 65%,var(--muted) 100%) 0 0 / 200% 100%;-webkit-background-clip:text;background-clip:text;animation:showai-shimmer 2s linear infinite}button,input,textarea,select{font-family:inherit}button{transition:background-color .15s ease,color .15s ease,border-color .15s ease,transform .15s ease}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--text);outline-offset:3px}input:is([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset]):focus-visible,select:focus-visible{outline:2px solid var(--text);outline-offset:2px}input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=reset]):focus,textarea:focus{outline:none}input::placeholder,textarea::placeholder{color:var(--subtle)}::selection{background:var(--accent-soft);color:var(--text)}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
49
49
  `);lt(`:root{--reading-text: #494650;--reading-heading: #383042;--reading-accent: #120a8f;--reading-highlight: #e6e1fc;--reading-code: #f0eef9}:root[data-theme=dark]{--reading-text: #d4d1dd;--reading-heading: #e4dfec;--reading-accent: #bbb3ff;--reading-highlight: #37304f;--reading-code: #29243a}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-text){font-family:var(--font-sans);font-size:16px;font-weight:400;line-height:1.8;letter-spacing:0;color:var(--reading-text)}.sb-text>.sb-rich-text{font:inherit;line-height:inherit}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(h1,h2,h3,h4,h5,h6){color:var(--reading-heading);font-weight:600;letter-spacing:-.3px;scroll-margin-top:80px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) h1{font-size:28px;line-height:1.35;margin:40px 0 14px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) h2{font-size:22px;line-height:1.4;margin:34px 0 12px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) h3{font-size:18px;line-height:1.45;margin:26px 0 8px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(h4,h5,h6){font-size:16px;line-height:1.5;margin:20px 0 6px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(h1,h2,h3,h4,h5,h6)+:is(h2,h3,h4,h5,h6){margin-top:14px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) p{margin:0 0 14px}:is(.document-content,.portable-editor .tiptap,.portable-content) mark:not(:where(.sb-block *,.showai-custom-block *)),.sb-text .sb-rich-text mark{--showai-highlight-start: 43%;color:inherit;background:linear-gradient(transparent var(--showai-highlight-start),var(--showai-highlight-color, var(--reading-highlight)) var(--showai-highlight-start));box-decoration-break:clone;-webkit-box-decoration-break:clone;padding:0 1px;border-radius:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) mark[data-highlight-mode=full]{--showai-highlight-start: 0%}:is(.document-content,.portable-editor .tiptap,.portable-content) strong:not(:where(.sb-block *,.showai-custom-block *)),.sb-text .sb-rich-text strong{font-weight:600}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) mark{background-color:transparent!important}:root[data-theme=dark] :is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) mark{background-image:linear-gradient(transparent var(--showai-highlight-start, 43%),color-mix(in srgb,var(--showai-highlight-color, var(--reading-highlight)) 22%,transparent) var(--showai-highlight-start, 43%))}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) em{color:var(--reading-accent);font-style:normal;font-weight:550}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) a{color:var(--reading-accent);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) blockquote{border-left:3px solid color-mix(in srgb,var(--reading-accent) 45%,transparent);background:none;color:var(--reading-text);padding:2px 0 2px 16px;margin:18px 0;border-radius:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) blockquote p{margin:0 0 8px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul,ol){padding-left:1.5em;margin:0 0 14px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) li{margin:4px 0;padding-left:.2em}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) li>p{margin:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) li>:is(ul,ol){margin:4px 0 0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) ol{font-variant-numeric:tabular-nums}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list){list-style:none;padding-left:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list)>li{display:flex;align-items:flex-start;gap:10px;padding-left:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list)>li>label{flex:0 0 auto;display:inline-flex;align-items:center;height:1.8em}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:0 0 auto;width:15px;height:15px;margin:0;border:1.5px solid color-mix(in srgb,var(--reading-text) 40%,transparent);border-radius:4px;background:transparent;cursor:pointer;--task-tick: #ffffff}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]:checked{border-color:var(--reading-accent);background-color:var(--reading-accent)}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]:checked:before{content:"";display:block;width:4px;height:8px;margin:1px 0 0 4px;border:solid var(--task-tick);border-width:0 2px 2px 0;transform:rotate(45deg)}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]:disabled{cursor:default}:root[data-theme=dark] :is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]:checked{--task-tick: #201c2e}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list) input[type=checkbox]:focus-visible{outline:2px solid var(--reading-accent);outline-offset:2px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) .portable-task-list>li>input[type=checkbox]{margin-top:calc(.9em - 7.5px)}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list)>li>div{flex:1;min-width:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list)>li>div>p{margin:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(ul[data-type=taskList],.portable-task-list)>li[data-checked=true]>div>p{color:var(--muted);text-decoration:line-through}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) li::marker{color:var(--reading-accent)}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) code{font-family:var(--font-mono);font-size:.875em;color:var(--reading-accent);background:var(--reading-code);border-radius:4px;padding:.1em .35em}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) pre,.sb-code pre{border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--reading-text);padding:16px 20px;margin:18px 0;font:13.5px/1.7 var(--font-mono);white-space:pre;tab-size:2;overflow-x:auto}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) pre code{font:inherit;color:inherit;background:transparent;padding:0;border-radius:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) hr{border:0;border-top:1px solid var(--line);margin:28px 0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text)>:first-child{margin-top:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text)>:last-child{margin-bottom:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(blockquote,li,th,td,.callout-content>div,.toggle-body>div>div,.portable-callout>div,.portable-toggle-body)>:last-child{margin-bottom:0}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) :is(blockquote,li,th,td,.callout-content>div,.toggle-body>div>div,.portable-callout>div,.portable-toggle-body)>:first-child{margin-top:0}.document-content .document-image,.portable-editor .document-image,.portable-image,.sb-rich-text img,.sb-image img{border-radius:14px}:is(.document-content,.portable-editor .tiptap,.portable-content) :is(.tableWrapper,.portable-table-scroll):not(.sb-block *){overflow-x:auto;margin:18px 0}:is(.document-content,.portable-editor .tiptap,.portable-content) table:not(.sb-block table),.sb-rich-text table{border-collapse:collapse;width:100%;font-size:15px;line-height:1.6}:is(.document-content,.portable-editor .tiptap,.portable-content) :is(th,td):not(.sb-block :is(th,td)),.sb-rich-text :is(th,td){padding:8px 12px;border:1px solid var(--line);vertical-align:top;text-align:start}:is(.document-content,.portable-editor .tiptap,.portable-content) th:not(.sb-block th),.sb-rich-text th{background:var(--surface);color:var(--reading-heading);font-weight:600}:is(.document-content,.portable-editor .tiptap,.portable-content) :is(th,td):not(.sb-block :is(th,td))>p,.sb-rich-text :is(th,td)>p{margin:0}:is(.document-content,.portable-editor .tiptap,.portable-content) :is(th,td):not(.sb-block :is(th,td))>p+p,.sb-rich-text :is(th,td)>p+p{margin-top:6px}.sb-table table{font-size:inherit;line-height:inherit}.sb-table :is(th,td){padding:12px 16px;border-color:var(--line)}.sb-table th{background:var(--surface);font-weight:600}.sb-primitive{font-family:var(--font-sans)}.sb-image figcaption,.sb-primitive-editor{color:var(--muted);font-size:13px;line-height:1.5}.sb-image-empty{border-radius:14px;background:var(--surface);color:var(--muted)}.sb-primitive-editor :is(input,textarea){border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--paper);color:var(--text)}.sb-code textarea{font-family:var(--font-mono);background:var(--paper);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:12px}.sb-block{font-family:var(--font-sans);font-size:14px;font-weight:500;line-height:1.6;border-radius:16px}.sb-header{padding:20px 24px 16px}.sb-title{font-size:16px;font-weight:600}.sb-description{font-size:14px;line-height:1.6}.sb-block :is(.sb-button,.sb-icon-button){border-radius:8px}.sb-block .sb-button{min-height:36px;font-size:14px}.sb-metric-value{font-weight:700;letter-spacing:-.02em}.sb-bookmark-copy>strong{font-size:16px;line-height:1.4;font-weight:600}.sb-bookmark-copy>p{font-size:14px;line-height:1.6}.portable-document{max-width:1000px;padding:80px 64px 96px}.portable-title{font-size:32px;font-weight:700;letter-spacing:-.02em;line-height:1.25;margin-bottom:32px}.portable-options-trigger{border-radius:50%;width:40px;height:40px}.portable-options-menu{border-radius:16px;box-shadow:var(--shadow);padding:8px}.portable-options-menu button{border-radius:8px;min-height:40px;font-size:14px}.portable-toggle summary{font-weight:600}@media(max-width:700px){.portable-document{padding:76px 24px 64px}.portable-title{font-size:28px}.sb-header{padding:16px}:is(.document-content,.portable-editor .tiptap,.portable-content,.sb-rich-text) pre,.sb-code pre{padding:16px}}@media print{.portable-document{max-width:none;padding:0}.sb-block{--sb-accent: #222222}}.document-content .page-document-flow>:first-child:not(.document-content :not(:first-child) *){margin-top:0}.document-content .page-document-flow>:last-child:not(.document-content :not(:last-child) *){margin-bottom:0}
50
50
  `);var ut=V(fe(),1),pl=bt(Qs);function eC(e){let{code:t,params:a}=e??{},n=a?.component??"";return t==="INTEGRITY_UNAVAILABLE"?pl("integrityUnavailable"):t==="COMPONENT_FETCH_FAILED"?pl("componentFetchFailed",{component:n,reason:a?.reason||pl("networkFailed")}):t==="COMPONENT_CHECKSUM_FAILED"?pl("componentChecksumFailed",{component:n}):e instanceof Error?e.message:pl("remoteLoadFailed")}function tC(e,t,a,n,o){let r=URL.createObjectURL(new Blob([H9(e,t,a,n,o)],{type:"application/json"})),i=window.document.createElement("a");i.href=r,i.download=`${e.title.replace(/[^\p{L}\p{N} _-]/gu,"").trim()||"page"}.showai.json`,i.click(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}function aC({artifact:e,host:t}){let{inlineHost:a}=t,n=pe(Qs),o=pe(Xa),{document:r}=e,i=(0,oa.useMemo)(()=>{let A=t.readOptions();return A?JSON.parse(A).draft===!0:!1},[t]),[l,s]=(0,oa.useState)(()=>{let A=t.readOptions();return A?JSON.parse(A).theme==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches}),[c,d]=(0,oa.useState)(!1),u=(0,oa.useRef)(null),m=(0,oa.useRef)(null),f=(0,oa.useMemo)(()=>ev(t.readOptions()),[t]),y=tv(m,r,f),b=(0,oa.useRef)(null),[x,g]=(0,oa.useState)([]),[p,v]=(0,oa.useState)(""),[k,w]=(0,oa.useState)(!!e.remoteComponents?.length);return(0,oa.useEffect)(()=>{if(!e.remoteComponents?.length)return;if(a){v(n("remoteInlineBlocked")),w(!1);return}let A=new AbortController,L=!0;return w(!0),I9(e.remoteComponents,{signal:A.signal}).then(C=>{L&&(g(C),v(""))}).catch(C=>{L&&v(eC(C))}).finally(()=>{L&&w(!1)}),()=>{L=!1,A.abort()}},[e.remoteComponents]),(0,oa.useEffect)(()=>{t.setTheme(l?"dark":"light")},[l,t]),(0,oa.useEffect)(()=>{if(!c)return;let A=C=>{u.current?.contains(C.target)||d(!1)},L=C=>{C.key==="Escape"&&(d(!1),b.current?.focus())};return window.document.addEventListener("pointerdown",A),window.document.addEventListener("keydown",L),()=>{window.document.removeEventListener("pointerdown",A),window.document.removeEventListener("keydown",L)}},[c]),(0,ut.jsxs)("div",{ref:m,className:`portable-app${e.selection?" portable-partial":""}`,children:[i&&(0,ut.jsx)("div",{className:"portable-draft-note",role:"status",children:n("draftNote")}),(0,ut.jsxs)("div",{className:"portable-options",ref:u,children:[(0,ut.jsx)("button",{ref:b,className:"portable-options-trigger","aria-label":o("pageOptions"),"aria-expanded":c,"aria-controls":"page-options",onClick:()=>d(!c),children:(0,ut.jsx)(P1,{size:19})}),c&&(0,ut.jsxs)("div",{className:"portable-options-menu",id:"page-options",children:[(0,ut.jsxs)("button",{onClick:()=>{tC(r,e.components,e.remoteComponents,e.presentation,e.selection),d(!1)},children:[(0,ut.jsx)(Rr,{size:15})," ",i?n("downloadOriginalSource"):o("downloadSource")]}),(0,ut.jsxs)("button",{onClick:()=>{s(!l),d(!1)},children:[l?(0,ut.jsx)(r6,{size:15}):(0,ut.jsx)(W5,{size:15}),o(l?"lightAppearance":"darkAppearance")]}),(0,ut.jsxs)("button",{onClick:()=>{d(!1),window.print()},children:[(0,ut.jsx)(_5,{size:15})," ",o("print")]})]})]}),y.contextMenu,y.status,(0,ut.jsx)(um,{components:[...e.components??[],...x],inlineHost:a,children:(0,ut.jsx)(Kx,{document:r,presentation:e.presentation,partial:!!e.selection,heading:(0,ut.jsxs)(ut.Fragment,{children:[!a&&!e.selection&&(r.icon||r.title)&&(0,ut.jsxs)("div",{className:"portable-page-heading",children:[r.icon&&(0,ut.jsx)("div",{className:"portable-page-icon",children:(0,ut.jsx)(Zn,{value:r.icon,size:48})}),r.title&&(0,ut.jsx)("h1",{className:"portable-title",children:r.title})]}),!!e.remoteComponents?.length&&(0,ut.jsx)("p",{className:"portable-network-note",children:n(k?"remoteLoading":"remoteRequired")}),p&&(0,ut.jsx)("p",{role:"alert",className:"portable-network-error",children:p})]})})})]})}function nC({host:e}){let t=pe(Qs);(0,oa.useLayoutEffect)(()=>Rl(window.document),[]);let a=(0,oa.useMemo)(()=>{let n=e.readArtifact();if(!n||n.trim()==="null")return{error:pl("emptyPage")};try{return{artifact:j9(n)}}catch(o){return{error:o instanceof Error?o.message:pl("unreadablePage")}}},[e]);return a.artifact?(0,ut.jsx)(aC,{artifact:a.artifact,host:e}):(0,ut.jsxs)("main",{className:"portable-error",children:[(0,ut.jsx)("h1",{children:t("openFailed")}),(0,ut.jsx)("p",{children:a.error})]})}function nv(e,t){g6(f6(t.inlineHost?.lang||window.document.documentElement.lang||navigator.language));let a=(0,av.createRoot)(e);return a.render((0,ut.jsx)(oa.StrictMode,{children:(0,ut.jsx)(nC,{host:t})})),()=>a.unmount()}var oC=0;function kU(e,{artifact:t,options:a,standalone:n=!1}){if(e.id||(e.id=`showai-cdn-${++oC}`),!/^[A-Za-z][\w-]*$/.test(e.id))throw new Error("The ShowAI root needs a simple id.");n||e.setAttribute("data-showai-inline-root",""),e.querySelectorAll(":scope > [data-showai-placeholder]").forEach(c=>c.remove());let o=e.ownerDocument.createElement("div");o.id=`${e.id}-root`,e.append(o);let r=x5(e,{scoped:!n}),i=typeof t=="string"?t:JSON.stringify(t),l=a?JSON.stringify(a):null,s=nv(o,{inlineHost:n?null:e,readArtifact:()=>i,readOptions:()=>l,setTheme:c=>{(n?e.ownerDocument.documentElement:e).dataset.theme=c}});return()=>{s(),r(),o.remove()}}export{kU as mount};
51
- /*! For license information please see reader-3K2OTSBO.js.LEGAL.txt */
51
+ /*! For license information please see reader-4466P53I.js.LEGAL.txt */