@carats/render 0.0.9 → 0.0.10

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/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  interface CaratsComponent<T = any> extends JSX.FunctionComponent<T> {
2
2
  defaultProps?: T;
3
- head?: string;
3
+ head?: JSX.Element;
4
4
  burnished?: boolean;
5
5
  recast?: boolean;
6
6
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{matchRoute as c}from"@carats/url";import{transpile as p}from"jjsx";function g(e){return{inAppRouting:e.inAppRouting??!0,routes:e.routes??{},suspense:{loading:e.suspense?.loading??(()=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Loading...")),error:e.suspense?.error??(n=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Error: ",n.message)),notFound:e.suspense?.notFound??(()=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Not Found"))}}}function h(e){let{routes:n,suspense:o}=this,u=new URL(e,"http://localhost").pathname;for(let t in n){let r=n[t],s=c(t,u);if(s)return r instanceof Promise?{component:()=>{let a=`carats-suspense-${t}`;return r.then(i=>{document.getElementById(a)?.replaceWith(p(i))}).catch(i=>{document.getElementById(a)?.replaceWith(p(o.error(i)))}),JJSX.jsxFactory("div",{id:a},o.loading())},params:s,route:t}:{component:r,params:s,route:t}}return{component:o.notFound,params:{},route:"/not-found"}}async function C(e,n){return p(e(n))}function f(e,n){return e.burnished=!0,n?.recast&&(e.recast=!0),e}export{f as Burnish,g as defineFacets,h as getPageComponent,C as renderPage};
1
+ import{matchRoute as c}from"@carats/url";import{transpile as u}from"jjsx";function g(e){return{inAppRouting:e.inAppRouting??!0,routes:e.routes??{},suspense:{loading:e.suspense?.loading??(()=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Loading...")),error:e.suspense?.error??(n=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Error: ",n.message)),notFound:e.suspense?.notFound??(()=>JJSX.jsxFactory(JJSX.fragmentFactory,null,"\u{1F48E} Not Found"))}}}function h(e){let{routes:n,suspense:o}=this,p=new URL(e,"http://localhost").pathname;for(let t in n){let r=n[t],s=c(t,p);if(s)return r instanceof Promise?{component:()=>{let a=`carats-suspense-${t}`;return r.then(i=>{document.getElementById(a)?.replaceWith(u(i))}).catch(i=>{document.getElementById(a)?.replaceWith(u(o.error(i)))}),JJSX.jsxFactory("div",{id:a},o.loading())},params:s,route:t}:{component:r,params:s,route:t}}return{component:o.notFound,params:{},route:"/not-found"}}async function C(e,n){return u(e.call(e,n))}function f(e,n){return e.burnished=!0,n?.recast&&(e.recast=!0),e}export{f as Burnish,g as defineFacets,h as getPageComponent,C as renderPage};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carats/render",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Render module for Carats",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",