@symbo.ls/mermaid 3.14.599 → 3.14.707

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @symbo.ls/mermaid
2
2
 
3
+ ## 3.14.707
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+ - Updated dependencies
9
+ - @symbo.ls/utils@3.14.707
10
+
11
+ ## 3.14.612
12
+
13
+ ### Patch Changes
14
+
15
+ - Auto-generated cross-repo patch release.
16
+ - Updated dependencies
17
+ - @symbo.ls/tap@3.14.612
18
+
3
19
  ## 3.14.599
4
20
 
5
21
  ### Patch Changes
@@ -1,6 +1,10 @@
1
- import r from"./utils/logger.js";import m from"smbls/iife-string";r.debug(`[BUNDLE] smbls IIFE loaded from smbls/iife-string (${m.length} bytes)`);const p=s=>s.replace(/</g,"\\u003c");function L(){return m}function k(s,e,t,{ProjectDataService:a}={}){if(r.debug(`[BUNDLE] getBundleScript started for ${s}`),!e)return r.warn("[BUNDLE] No data provided, returning empty"),"";try{if(e.merged)Object.assign(e,e.merged),r.debug(`[BUNDLE] Applied precomputed merged data for project ${e.id}`);else if(a&&Array.isArray(e.sharedLibraries)&&e.sharedLibraries.length>0){const o=a.mergeSharedLibraries(e,e.sharedLibraries,e.projectType);Object.assign(e,o),r.debug(`[BUNDLE] Merged ${e.sharedLibraries.length} shared libraries`)}}catch(o){r.error(`[BUNDLE] Failed to ensure merged data: ${o.message}`)}try{if(e.dependencies&&Array.isArray(e.sharedLibraries))for(const o of e.sharedLibraries){const u=o&&o.key;if(u)for(const v of["@symbo-ls","@symbo.ls"]){const i=`${v}/${u}`;e.dependencies[i]&&(delete e.dependencies[i],r.debug(`[BUNDLE] Dropped CDN dependency ${i} \u2014 already merged as shared library`))}}}catch(o){r.error(`[BUNDLE] Failed to strip shared-library dependencies: ${o.message}`)}const f=p(JSON.stringify(e)),g=t?.headers&&typeof t.headers.get=="function"&&t.headers.get("host")||t?.headers?.host||t?.host||t?.url&&(()=>{try{return new URL(t.url).host}catch{return""}})()||"",n=String(g).toLowerCase().split(":")[0],c=(()=>{if(t?.query)return t.query;try{return Object.fromEntries(new URL(t?.url||"","http://x").searchParams)}catch{return{}}})(),b=c.release||!1,y=c.version,l=n.endsWith(".symbo.ls")||n.endsWith(".preview.symbols.app")||n==="localhost"||n.endsWith(".localhost"),d=!!b||!!y||!l,S=e&&(e._id||e.projectId||e.id)||null,x=l?p(JSON.stringify({...e.settings,liveSync:!d,inspect:!0,verbose:!d,projectId:S})):"null",h=`
2
- var context = Smbls.deepDestringifyFunctions(${f});
3
- context.packageManager = 'esm.sh';
1
+ import r from"./utils/logger.js";import*as m from"smbls/iife-string";const p=m.default,f=m.version||null;r.debug(`[BUNDLE] smbls IIFE loaded from smbls/iife-string (${p.length} bytes, v${f||"unknown"})`);const g=s=>s.replace(/</g,"\\u003c");function L(){return p}function T(){return f}function E(s,e,t,{ProjectDataService:a}={}){if(r.debug(`[BUNDLE] getBundleScript started for ${s}`),!e)return r.warn("[BUNDLE] No data provided, returning empty"),"";try{if(e.merged)Object.assign(e,e.merged),r.debug(`[BUNDLE] Applied precomputed merged data for project ${e.id}`);else if(a&&Array.isArray(e.sharedLibraries)&&e.sharedLibraries.length>0){const o=a.mergeSharedLibraries(e,e.sharedLibraries,e.projectType);Object.assign(e,o),r.debug(`[BUNDLE] Merged ${e.sharedLibraries.length} shared libraries`)}}catch(o){r.error(`[BUNDLE] Failed to ensure merged data: ${o.message}`)}try{if(e.dependencies&&Array.isArray(e.sharedLibraries))for(const o of e.sharedLibraries){const u=o&&o.key;if(u)for(const k of["@symbo-ls","@symbo.ls"]){const i=`${k}/${u}`;e.dependencies[i]&&(delete e.dependencies[i],r.debug(`[BUNDLE] Dropped CDN dependency ${i} \u2014 already merged as shared library`))}}}catch(o){r.error(`[BUNDLE] Failed to strip shared-library dependencies: ${o.message}`)}const b=g(JSON.stringify(e)),y=t?.headers&&typeof t.headers.get=="function"&&t.headers.get("host")||t?.headers?.host||t?.host||t?.url&&(()=>{try{return new URL(t.url).host}catch{return""}})()||"",n=String(y).toLowerCase().split(":")[0],c=(()=>{if(t?.query)return t.query;try{return Object.fromEntries(new URL(t?.url||"","http://x").searchParams)}catch{return{}}})(),S=c.release||!1,v=c.version,l=n.endsWith(".symbo.ls")||n.endsWith(".preview.symbols.app")||n==="localhost"||n.endsWith(".localhost"),d=!!S||!!v||!l,w=e&&(e._id||e.projectId||e.id)||null,x=l?g(JSON.stringify({...e.settings,liveSync:!d,inspect:!0,verbose:!d,projectId:w})):"null",h=`
2
+ var context = Smbls.deepDestringifyFunctions(${b});
3
+ // Must name the SAME provider render.js used for the page's importmap
4
+ // (default 'symbols' \u2192 pkg.symbo.ls). This drives prepareDependencies'
5
+ // runtime loads; if the two disagree, a package arrives twice from two
6
+ // different CDNs \u2014 once via the importmap, once via a runtime script tag.
7
+ context.packageManager = 'pkg.symbo.ls';
4
8
  if (context.db && context.db.createClient) delete context.db.createClient;
5
9
  if (context.fetch && context.fetch.createClient) delete context.fetch.createClient;
6
10
 
@@ -94,4 +98,4 @@ import r from"./utils/logger.js";import m from"smbls/iife-string";r.debug(`[BUND
94
98
  }
95
99
 
96
100
  Smbls.create(app, context);
97
- `;return r.debug(`[BUNDLE] Script generated (${h.length} bytes)`),h}export{k as getBundleScript,L as getSmblsIife};
101
+ `;return r.debug(`[BUNDLE] Script generated (${h.length} bytes)`),h}export{E as getBundleScript,L as getSmblsIife,T as getSmblsRuntimeVersion};
@@ -1,10 +1,12 @@
1
- import E from"./utils/logger.js";import ft from"./utils/vartranformer.js";import{getBundleScript as pt,getSmblsIife as gt}from"./bundle.js";import{deepDestringifyFunctions as ht}from"./utils/deepDestringify.js";import{transpile as J}from"./utils/funcql-transpile.js";import{normalizeRoute as mt,resolvePageRoute as dt}from"./route.js";import{generateMetaTags as ut,getPageMetadata as yt,getImportMapScript as bt}from"@symbo.ls/utils";const St=(t,r)=>{const e=parseInt(t,16);if(Number.isNaN(e))return t;const s=g=>g>255?255:g<0?0:g,n=s((e>>16)+r),i=s((e>>8&255)+r);return((s((e&255)+r)|i<<8|n<<16)+16777216).toString(16).slice(1)},H=(t,r)=>{if(typeof t!="string")return;if(r&&typeof r[t]=="string")return r[t];if(/^(#|rgb|hsl|var\(|[a-z]+$)/i.test(t))return t;const e=t.match(/^([a-z][a-z0-9]*)(?:\.(\d+))?([+-]\d+)?$/i);if(e&&(e[2]||e[3])){const s=r&&r[e[1]],n=typeof s=="string"&&s.match(/^#?([0-9a-f]{6})$/i);if(n){let i=n[1];if(e[3]&&(i=St(i,parseInt(e[3],10))),e[2]){const p=parseFloat("0."+e[2]),g=parseInt(i,16);return`rgba(${g>>16&255},${g>>8&255},${g&255},${p})`}return"#"+i}}},$t=process.env.BRENDER!=="false";let B=null,z=null,U=null;if($t)try{const t=await import("@symbo.ls/brender");B=t.renderRoute,z=t.generateSitemap,U=t.prefetchPageData}catch(t){E.debug(`[MERMAID] Brender not available: ${t.message}`)}const Et=`<!doctype html>
1
+ import T from"./utils/logger.js";import ft from"./utils/vartranformer.js";import{getBundleScript as mt,getSmblsIife as gt,getSmblsRuntimeVersion as ht}from"./bundle.js";import{deepDestringifyFunctions as dt}from"./utils/deepDestringify.js";import{transpile as H}from"./utils/funcql-transpile.js";import{normalizeRoute as ut,resolvePageRoute as yt}from"./route.js";import{generateMetaTags as bt,getPageMetadata as St,getImportMapScript as $t}from"@symbo.ls/utils";import{getTapStyles as Tt,getTapRuntimeSnippet as Et}from"@symbo.ls/tap";const Ot=(t,r)=>{const e=parseInt(t,16);if(Number.isNaN(e))return t;const s=m=>m>255?255:m<0?0:m,n=s((e>>16)+r),i=s((e>>8&255)+r);return((s((e&255)+r)|i<<8|n<<16)+16777216).toString(16).slice(1)},z=(t,r)=>{if(typeof t!="string")return;if(r&&typeof r[t]=="string")return r[t];if(/^(#|rgb|hsl|var\(|[a-z]+$)/i.test(t))return t;const e=t.match(/^([a-z][a-z0-9]*)(?:\.(\d+))?([+-]\d+)?$/i);if(e&&(e[2]||e[3])){const s=r&&r[e[1]],n=typeof s=="string"&&s.match(/^#?([0-9a-f]{6})$/i);if(n){let i=n[1];if(e[3]&&(i=Ot(i,parseInt(e[3],10))),e[2]){const f=parseFloat("0."+e[2]),m=parseInt(i,16);return`rgba(${m>>16&255},${m>>8&255},${m&255},${f})`}return"#"+i}}},Rt=process.env.BRENDER!=="false";let B=null,U=null,K=null;if(Rt)try{const t=await import("@symbo.ls/brender");B=t.renderRoute,U=t.generateSitemap,K=t.prefetchPageData}catch(t){T.debug(`[MERMAID] Brender not available: ${t.message}`)}const vt=`<!doctype html>
2
2
  <html'\${{{ ROOT_ATTRS }}}'>
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  '\${{{ HEAD_BOOT }}}'
6
6
  '\${{{ META }}}'
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <style id="smbls-tap-styles">${Tt()}</style>
9
+ <script>${Et()}<\/script>
8
10
  '\${{{ IMPORTMAP }}}'
9
11
  </head>
10
12
  <body>
@@ -20,19 +22,19 @@ import E from"./utils/logger.js";import ft from"./utils/vartranformer.js";import
20
22
  <\/script>
21
23
  '\${{{ EDITOR }}}'
22
24
  </body>
23
- </html>`;function M(t,r=Array.isArray(t)?[]:{}){for(const e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const s=t[e];if(typeof s=="string"){const n=s.trim();if(n.startsWith("(")&&n.includes("=>")||n.startsWith("function")||n.startsWith("async ")){const p=J(s);r[e]=p?p.schema:null}else r[e]=s}else Array.isArray(s)?r[e]=s.map(n=>{if(typeof n=="string"){const i=n.trim();if(i.startsWith("(")&&i.includes("=>")||i.startsWith("function")||i.startsWith("async ")){const g=J(n);return g?g.schema:null}}return n&&typeof n=="object"?M(n):n}):s&&typeof s=="object"&&!Array.isArray(s)?r[e]=M(s):r[e]=s}return r}async function Lt(t,r={}){const{appkey:e,pathname:s="/",channel:n="production",userEnv:i=n,isProd:p=!1,req:g,query:Tt,userId:j,smblsIife:K,editorBundle:A,analyzedScript:W="",indexHtml:V,ssrCache:a,ProjectDataService:Y}=r;if(!t)return{html:"",status:404,contentType:"text/html"};if(typeof e=="string"&&e.includes("/")){const[c,m]=e.split("/");t.key||(t.key=m),t.owner||(t.owner=c)}const N=mt(s),T=dt(t.pages,s),_=i==="production"||i==="staging";let O="",I="",o=null,v=null,w="";if(a&&_){O=a.html||"";const c=[];a.fontLinks&&c.push(a.fontLinks);const m=[a.globalCSS||"",a.resetCss||""].filter(Boolean).join(`
24
- `);m&&c.push(`<style>${m}</style>`),a.css&&c.push(`<style data-emotion="smbls">${a.css}</style>`),I=c.join(`
25
- `);const u=[];if(a.ssrTranslations){const f=(t.config||t.settings||{}).polyglot||t.polyglot,l=f?.storagePrefix||"",h=f?.storageLangKey||"",d=[];for(const y in a.ssrTranslations){const b=a.ssrTranslations[y];b&&typeof b=="object"&&d.push(`localStorage.setItem(${JSON.stringify(l+y)},${JSON.stringify(JSON.stringify(b))})`)}if(h){const y=f?.defaultLang||"en";d.push(`if(!localStorage.getItem(${JSON.stringify(h)}))localStorage.setItem(${JSON.stringify(h)},${JSON.stringify(y)})`)}d.length&&u.push(`<script>try{${d.join(";")}}catch(e){}<\/script>`)}u.push("<script>window.__BRENDER__=true<\/script>"),w=u.join(`
26
- `),o={metadata:a.metadata,prefetchedState:a.prefetchedState,activeLang:a.activeLang}}else if(B&&_)try{const c=T?T.route:N;E.debug(`[MERMAID] Running brender for route: ${c}`);let m=!1;try{(0,eval)("1"),m=!0}catch{}if(v=m?ht(t):M(t),o=await B(v,{route:c,pathname:N}),o){O=o.html||"";const u=[];o.fontLinks&&u.push(o.fontLinks);const S=o.globalCSS||{},f=[S.rootRule||"",o.resetCss||"",S.keyframeRules||""].filter(Boolean).join(`
27
- `);f&&u.push(`<style>${f}</style>`),o.css&&u.push(`<style data-emotion="smbls">${o.css}</style>`),I=u.join(`
28
- `);const l=[];if(o.ssrTranslations){const d=(v?.config||{}).polyglot||v?.polyglot,y=d?.storagePrefix||"",b=d?.storageLangKey||"",R=[];for(const x in o.ssrTranslations){const L=o.ssrTranslations[x];L&&typeof L=="object"&&R.push(`localStorage.setItem(${JSON.stringify(y+x)},${JSON.stringify(JSON.stringify(L))})`)}if(b){const x=d?.defaultLang||"en";R.push(`if(!localStorage.getItem(${JSON.stringify(b)}))localStorage.setItem(${JSON.stringify(b)},${JSON.stringify(x)})`)}R.length&&l.push(`<script>try{${R.join(";")}}catch(e){}<\/script>`)}m&&o.brRegistry&&Object.keys(o.brRegistry).length&&l.push(`<script>window.__BR_REGISTRY__=${JSON.stringify(o.brRegistry)}<\/script>`),l.push("<script>window.__BRENDER__=true<\/script>"),w=l.join(`
29
- `),E.debug(`[MERMAID] Brender completed: body=${O.length}b, registry=${Object.keys(o.brRegistry||{}).length}`)}}catch(c){E.warn(`[MERMAID] Brender failed, falling back to client render: ${c.message}`)}const q=pt(e,t,g,{ProjectDataService:Y}),G=bt(t,t?.settings?.cdnProvider||"esmsh"),Q=t?.files&&t.files["index.html"],X=V||Q?.code||Et,Z=j?`<script>window.__SYMBOLS_AUTH__=${JSON.stringify({userId:j})}<\/script>`:"",D=o?.prefetchedState,tt=(t.config||t.settings||{}).polyglot||t.polyglot,et=o?.activeLang||tt?.defaultLang||"en",st=D&&Object.keys(D).length?{state:D,lang:et,actualPathname:s}:{actualPathname:s},nt=o?.metadata&&Object.keys(o.metadata).length?o.metadata:yt(t,T?T.route:N,st,{isProduction:p,channel:n}),ot=ut(nt,p),k=K||gt();if(!k)return E.error("[MERMAID] smbls IIFE bundle not available"),{html:"Internal Server Error: smbls bundle not found",status:500,contentType:"text/plain"};const rt=A&&!p?`<script defer type="text/javascript">${A}<\/script>`:"",it=p?`<!-- built with symbols.app -->
25
+ </html>`;function M(t,r=Array.isArray(t)?[]:{}){for(const e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const s=t[e];if(typeof s=="string"){const n=s.trim();if(n.startsWith("(")&&n.includes("=>")||n.startsWith("function")||n.startsWith("async ")){const f=H(s);r[e]=f?f.schema:null}else r[e]=s}else Array.isArray(s)?r[e]=s.map(n=>{if(typeof n=="string"){const i=n.trim();if(i.startsWith("(")&&i.includes("=>")||i.startsWith("function")||i.startsWith("async ")){const m=H(n);return m?m.schema:null}}return n&&typeof n=="object"?M(n):n}):s&&typeof s=="object"&&!Array.isArray(s)?r[e]=M(s):r[e]=s}return r}async function kt(t,r={}){const{appkey:e,pathname:s="/",channel:n="production",userEnv:i=n,isProd:f=!1,req:m,query:xt,userId:j,smblsIife:V,editorBundle:A,analyzedScript:W="",indexHtml:Y,ssrCache:a,ProjectDataService:q}=r;if(!t)return{html:"",status:404,contentType:"text/html"};if(typeof e=="string"&&e.includes("/")){const[c,h]=e.split("/");t.key||(t.key=h),t.owner||(t.owner=c)}const N=ut(s),E=yt(t.pages,s),_=i==="production"||i==="staging";let O="",I="",o=null,R=null,w="";if(a&&_){O=a.html||"";const c=[];a.fontLinks&&c.push(a.fontLinks);const h=[a.globalCSS||"",a.resetCss||""].filter(Boolean).join(`
26
+ `);h&&c.push(`<style>${h}</style>`),a.css&&c.push(`<style data-emotion="smbls">${a.css}</style>`),I=c.join(`
27
+ `);const u=[];if(a.ssrTranslations){const p=(t.config||t.settings||{}).polyglot||t.polyglot,l=p?.storagePrefix||"",g=p?.storageLangKey||"",d=[];for(const y in a.ssrTranslations){const b=a.ssrTranslations[y];b&&typeof b=="object"&&d.push(`localStorage.setItem(${JSON.stringify(l+y)},${JSON.stringify(JSON.stringify(b))})`)}if(g){const y=p?.defaultLang||"en";d.push(`if(!localStorage.getItem(${JSON.stringify(g)}))localStorage.setItem(${JSON.stringify(g)},${JSON.stringify(y)})`)}d.length&&u.push(`<script>try{${d.join(";")}}catch(e){}<\/script>`)}u.push("<script>window.__BRENDER__=true<\/script>"),w=u.join(`
28
+ `),o={metadata:a.metadata,prefetchedState:a.prefetchedState,activeLang:a.activeLang}}else if(B&&_)try{const c=E?E.route:N;T.debug(`[MERMAID] Running brender for route: ${c}`);let h=!1;try{(0,eval)("1"),h=!0}catch{}if(R=h?dt(t):M(t),o=await B(R,{route:c,pathname:N}),o){O=o.html||"";const u=[];o.fontLinks&&u.push(o.fontLinks);const S=o.globalCSS||{},p=[S.rootRule||"",o.resetCss||"",S.keyframeRules||""].filter(Boolean).join(`
29
+ `);p&&u.push(`<style>${p}</style>`),o.css&&u.push(`<style data-emotion="smbls">${o.css}</style>`),I=u.join(`
30
+ `);const l=[];if(o.ssrTranslations){const d=(R?.config||{}).polyglot||R?.polyglot,y=d?.storagePrefix||"",b=d?.storageLangKey||"",v=[];for(const x in o.ssrTranslations){const L=o.ssrTranslations[x];L&&typeof L=="object"&&v.push(`localStorage.setItem(${JSON.stringify(y+x)},${JSON.stringify(JSON.stringify(L))})`)}if(b){const x=d?.defaultLang||"en";v.push(`if(!localStorage.getItem(${JSON.stringify(b)}))localStorage.setItem(${JSON.stringify(b)},${JSON.stringify(x)})`)}v.length&&l.push(`<script>try{${v.join(";")}}catch(e){}<\/script>`)}h&&o.brRegistry&&Object.keys(o.brRegistry).length&&l.push(`<script>window.__BR_REGISTRY__=${JSON.stringify(o.brRegistry)}<\/script>`),l.push("<script>window.__BRENDER__=true<\/script>"),w=l.join(`
31
+ `),T.debug(`[MERMAID] Brender completed: body=${O.length}b, registry=${Object.keys(o.brRegistry||{}).length}`)}}catch(c){T.warn(`[MERMAID] Brender failed, falling back to client render: ${c.message}`)}const G=mt(e,t,m,{ProjectDataService:q}),k=ht(),Q=$t(t,t?.settings?.cdnProvider||"symbols",{pin:k?{smbls:k}:void 0}),X=t?.files&&t.files["index.html"],Z=Y||X?.code||vt,tt=j?`<script>window.__SYMBOLS_AUTH__=${JSON.stringify({userId:j})}<\/script>`:"",D=o?.prefetchedState,et=(t.config||t.settings||{}).polyglot||t.polyglot,st=o?.activeLang||et?.defaultLang||"en",nt=D&&Object.keys(D).length?{state:D,lang:st,actualPathname:s}:{actualPathname:s},ot=o?.metadata&&Object.keys(o.metadata).length?o.metadata:St(t,E?E.route:N,nt,{isProduction:f,channel:n}),rt=bt(ot,f),F=V||gt();if(!F)return T.error("[MERMAID] smbls IIFE bundle not available"),{html:"Internal Server Error: smbls bundle not found",status:500,contentType:"text/plain"};const it=A&&!f?`<script defer type="text/javascript">${A}<\/script>`:"",ct=f?`<!-- built with symbols.app -->
30
32
  `:`<!-- symbols | ${e} | ${i} | ${_?"ssr":"csr"} | noindex -->
31
- `,P=t.useDocumentTheme!==!1,$=t.globalTheme&&t.globalTheme!=="auto"?String(t.globalTheme):null,F=t.themeStorageKey?String(t.themeStorageKey):"",ct=P&&$?' data-theme="'+$+'"':"",lt=P?"<script>(function(){try{var t=null;try{t=new URLSearchParams(location.search).get('globalTheme')}catch(e){}"+(F?"if(!t){try{t=localStorage.getItem("+JSON.stringify(F)+")}catch(e){}}":"")+"if(!t||t==='auto'){"+($?"t="+JSON.stringify($)+";":"try{t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}catch(e){}")+`}if(t&&t!=='auto')document.documentElement.setAttribute('data-theme',t);}catch(e){}})();<\/script>
32
- <meta name="color-scheme" content="light dark">`:"";let C="";if(P){const c=t.designSystem||t.config&&t.config.designSystem||{},m=c.color||{},u=c.theme&&c.theme.document||{},S=l=>{const h=u["@"+l];if(!h)return null;const d=H(h.background,m),y=H(h.color,m);return[d&&`background:${d}`,y&&`color:${y}`].filter(Boolean).join(";")||null},f=[];if($){const l=S($);l&&f.push(`html{${l}}`)}else{const l=S("dark"),h=S("light");l&&(f.push(`@media (prefers-color-scheme:dark){:root:not([data-theme]) html{${l}}}`),f.push(`[data-theme="dark"] html{${l}}`)),h&&(f.push(`@media (prefers-color-scheme:light){:root:not([data-theme]) html{${h}}}`),f.push(`[data-theme="light"] html{${h}}`))}f.length&&(C=`<style>${f.join("")}</style>`)}const at=typeof t.__criticalCss=="string"&&t.__criticalCss.trim()?`<style>${t.__criticalCss}</style>`:"";return{html:ft(it+X,{ROOT_ATTRS:ct,HEAD_BOOT:lt+(at||C),META:ot+`
33
+ `,P=t.useDocumentTheme!==!1,$=t.globalTheme&&t.globalTheme!=="auto"?String(t.globalTheme):null,C=t.themeStorageKey?String(t.themeStorageKey):"",lt=P&&$?' data-theme="'+$+'"':"",at=P?"<script>(function(){try{var t=null;try{t=new URLSearchParams(location.search).get('globalTheme')}catch(e){}"+(C?"if(!t){try{t=localStorage.getItem("+JSON.stringify(C)+")}catch(e){}}":"")+"if(!t||t==='auto'){"+($?"t="+JSON.stringify($)+";":"try{t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}catch(e){}")+`}if(t&&t!=='auto')document.documentElement.setAttribute('data-theme',t);}catch(e){}})();<\/script>
34
+ <meta name="color-scheme" content="light dark">`:"";let J="";if(P){const c=t.designSystem||t.config&&t.config.designSystem||{},h=c.color||{},u=c.theme&&c.theme.document||{},S=l=>{const g=u["@"+l];if(!g)return null;const d=z(g.background,h),y=z(g.color,h);return[d&&`background:${d}`,y&&`color:${y}`].filter(Boolean).join(";")||null},p=[];if($){const l=S($);l&&p.push(`html{${l}}`)}else{const l=S("dark"),g=S("light");l&&(p.push(`@media (prefers-color-scheme:dark){:root:not([data-theme]) html{${l}}}`),p.push(`[data-theme="dark"] html{${l}}`)),g&&(p.push(`@media (prefers-color-scheme:light){:root:not([data-theme]) html{${g}}}`),p.push(`[data-theme="light"] html{${g}}`))}p.length&&(J=`<style>${p.join("")}</style>`)}const pt=typeof t.__criticalCss=="string"&&t.__criticalCss.trim()?`<style>${t.__criticalCss}</style>`:"";return{html:ft(ct+Z,{ROOT_ATTRS:lt,HEAD_BOOT:at+(pt||J),META:rt+`
33
35
  `+I+`
34
36
  `+w+`
35
- `+Z,BUNDLE:q,BODY:O,SMBLS_IIFE:k,NODE_ENV:"'production'",IMPORTMAP:G,EDITOR:rt+W},{allowScript:!0}),status:200,contentType:"text/html"}}function Bt(t,r="production",e=null){const s=r!=="production"?` (${r})`:"",n=e==="not_public",i=n?"Site Not Yet Public":"Not Published",p=n?`This site isn't public yet${s}`:`This project hasn't been published yet${s}`;return`<!doctype html>
37
+ `+tt,BUNDLE:G,BODY:O,SMBLS_IIFE:F,NODE_ENV:"'production'",IMPORTMAP:Q,EDITOR:it+W},{allowScript:!0}),status:200,contentType:"text/html"}}function Ft(t,r="production",e=null){const s=r!=="production"?` (${r})`:"",n=e==="not_public",i=n?"Site Not Yet Public":"Not Published",f=n?`This site isn't public yet${s}`:`This project hasn't been published yet${s}`;return`<!doctype html>
36
38
  <html>
37
39
  <head>
38
40
  <meta charset="UTF-8">
@@ -53,9 +55,9 @@ import E from"./utils/logger.js";import ft from"./utils/vartranformer.js";import
53
55
  </head>
54
56
  <body>
55
57
  <div class="container">
56
- <h1>${p}</h1>
58
+ <h1>${f}</h1>
57
59
  <p>${n?"The owner has connected this domain but the project's visibility is set to private. Once they switch it to public in the workspace settings, the site will appear here automatically.":'Run <code>smbls publish</code> to deploy your project, or visit <a href="https://symbols.app">symbols.app</a> to get started.'}</p>
58
60
  <span class="env">${t}${s}</span>
59
61
  </div>
60
62
  </body>
61
- </html>`}export{Et as DEFAULT_TEMPLATE_HTML,z as generateSitemap,U as prefetchPageData,Bt as renderNotPublishedHtml,Lt as renderProjectHtml,M as transpileFunctionStrings};
63
+ </html>`}export{vt as DEFAULT_TEMPLATE_HTML,U as generateSitemap,K as prefetchPageData,Ft as renderNotPublishedHtml,kt as renderProjectHtml,M as transpileFunctionStrings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/mermaid",
3
- "version": "3.14.599",
3
+ "version": "3.14.707",
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "description": "Self-sustaining server runner for Symbols projects from JSON. Renders DOMQL projects to HTML with optional brender SSR.",
@@ -69,7 +69,8 @@
69
69
  "mermaid": "./dist/esm/bin/start.js"
70
70
  },
71
71
  "dependencies": {
72
- "@symbo.ls/utils": "^3.14.599",
72
+ "@symbo.ls/tap": "^3.14.612",
73
+ "@symbo.ls/utils": "^3.14.707",
73
74
  "cors": "^2.8.6",
74
75
  "express": "^4.22.2"
75
76
  },