rari 0.15.10 → 0.15.11
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/og.d.mts +1 -0
- package/dist/og.mjs +1 -1
- package/package.json +8 -8
package/dist/og.d.mts
CHANGED
package/dist/og.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,p as t}from"./type-guards-CTkEL8zw.mjs";const n=Symbol.for(`react.memo`),r=Symbol.for(`react.forward_ref`);function i(e){return t(e)&&typeof e.toString==`function`}function a(e){return t(e)&&`then`in e}function o(e){let t=e;for(;i(t);)if(t.$$typeof===n&&t.type!==void 0)t=t.type;else if(t.$$typeof===r&&t.render!==void 0)t=t.render;else break;return typeof t==`function`||i(t)?t:null}var s=class{element;options;constructor(e,t={}){this.element=e,this.options={width:t.width!=null&&t.width!==0?t.width:1200,height:t.height!=null&&t.height!==0?t.height:630}}toJSON(){return{type:`ImageResponse`,element:this.serializeElement(this.element),options:this.options}}resolveAndInvoke(e,t){let n=o(e);if(n==null||typeof n!=`function`)return null;try{let e=n(t);return e!==null&&a(e)?(console.warn(`[ImageResponse] async/server component "${n.name||n.toString()}" is not supported; skipping`),null):this.serializeElement(e)}catch(e){return console.error(`[ImageResponse] failed to render component "${n.name||n.toString()}":`,e),null}}serializeElement(n){if(typeof n==`string`||typeof n==`number`)return{type:`text`,value:String(n)};if(!t(n)||!e(n))return null;let{type:r,props:a={}}=n,s=o(r);if(typeof s==`function`||s!=null&&i(s))return this.resolveAndInvoke(r,a);let c=this.serializeChildren(a.children);return{type:`element`,elementType:r,props:this.serializeProps(a),children:c}}serializeChildren(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(e=>{let t=this.serializeElement(e);return t?[t]:[]});let t=this.serializeElement(e);return t?[t]:[]}serializeProps(e){let t={};for(let[n,r]of Object.entries(e))n
|
|
1
|
+
import{f as e,p as t}from"./type-guards-CTkEL8zw.mjs";const n=Symbol.for(`react.memo`),r=Symbol.for(`react.forward_ref`);function i(e){return t(e)&&typeof e.toString==`function`}function a(e){return t(e)&&`then`in e}function o(e){let t=e;for(;i(t);)if(t.$$typeof===n&&t.type!==void 0)t=t.type;else if(t.$$typeof===r&&t.render!==void 0)t=t.render;else break;return typeof t==`function`||i(t)?t:null}var s=class{element;options;constructor(e,t={}){this.element=e,this.options={width:t.width!=null&&t.width!==0?t.width:1200,height:t.height!=null&&t.height!==0?t.height:630}}toJSON(){return{type:`ImageResponse`,element:this.serializeElement(this.element),options:this.options}}resolveAndInvoke(e,t){let n=o(e);if(n==null||typeof n!=`function`)return null;try{let e=n(t);return e!==null&&a(e)?(console.warn(`[ImageResponse] async/server component "${n.name||n.toString()}" is not supported; skipping`),null):this.serializeElement(e)}catch(e){return console.error(`[ImageResponse] failed to render component "${n.name||n.toString()}":`,e),null}}serializeElement(n){if(typeof n==`string`||typeof n==`number`)return{type:`text`,value:String(n)};if(!t(n)||!e(n))return null;let{type:r,props:a={}}=n,s=o(r);if(typeof s==`function`||s!=null&&i(s))return this.resolveAndInvoke(r,a);let c=this.serializeChildren(a.children);return{type:`element`,elementType:r,props:this.serializeProps(a),children:c}}serializeChildren(e){if(e==null)return[];if(Array.isArray(e))return e.flatMap(e=>{let t=this.serializeElement(e);return t?[t]:[]});let t=this.serializeElement(e);return t?[t]:[]}serializeProps(e){let t={};for(let[n,r]of Object.entries(e)){if(n===`children`)continue;let e=this.serializePropValue(r);e!==void 0&&(t[n]=e)}return t}serializePropValue(e,n=new Set){if(e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(Array.isArray(e)){if(n.has(e))return;n.add(e);try{return e.map(e=>this.serializePropValue(e,n)).filter(e=>e!==void 0)}finally{n.delete(e)}}if(t(e)){if(n.has(e))return;n.add(e);try{let t={};for(let[r,i]of Object.entries(e)){let e=this.serializePropValue(i,n);e!==void 0&&(t[r]=e)}return t}finally{n.delete(e)}}}};export{s as ImageResponse};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rari",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.11",
|
|
5
5
|
"description": "Runtime Accelerated Rendering Infrastructure (rari)",
|
|
6
6
|
"author": "Ryan Skinner",
|
|
7
7
|
"license": "MIT",
|
|
@@ -145,13 +145,13 @@
|
|
|
145
145
|
"rolldown": "^1.2.3"
|
|
146
146
|
},
|
|
147
147
|
"optionalDependencies": {
|
|
148
|
-
"@rari/use-cache": "0.15.
|
|
149
|
-
"rari-darwin-arm64": "0.15.
|
|
150
|
-
"rari-darwin-x64": "0.15.
|
|
151
|
-
"rari-linux-arm64": "0.15.
|
|
152
|
-
"rari-linux-x64": "0.15.
|
|
153
|
-
"rari-win32-arm64": "0.15.
|
|
154
|
-
"rari-win32-x64": "0.15.
|
|
148
|
+
"@rari/use-cache": "0.15.11",
|
|
149
|
+
"rari-darwin-arm64": "0.15.11",
|
|
150
|
+
"rari-darwin-x64": "0.15.11",
|
|
151
|
+
"rari-linux-arm64": "0.15.11",
|
|
152
|
+
"rari-linux-x64": "0.15.11",
|
|
153
|
+
"rari-win32-arm64": "0.15.11",
|
|
154
|
+
"rari-win32-x64": "0.15.11"
|
|
155
155
|
},
|
|
156
156
|
"devDependencies": {
|
|
157
157
|
"@mdx-js/mdx": "^3.1.1",
|