@takumi-rs/helpers 2.14.0 → 2.15.1
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/emoji.cjs +1 -1
- package/dist/emoji.mjs +1 -1
- package/dist/fonts-By0vjazB.cjs +1 -0
- package/dist/fonts-CuoRVPJ8.mjs +1 -0
- package/dist/{fonts-BrUiG8am.d.cts → fonts-DPg6KAvr.d.cts} +251 -245
- package/dist/{fonts-Du-K60HL.d.mts → fonts-DSTCfPh9.d.mts} +251 -245
- package/dist/helpers-CrbDeBIp.mjs +1 -0
- package/dist/helpers-_gtvoVXa.cjs +1 -0
- package/dist/html.cjs +2 -2
- package/dist/html.d.cts +2 -7
- package/dist/html.d.mts +2 -7
- package/dist/html.mjs +2 -2
- package/dist/index-BZLLNDfO.d.mts +53 -0
- package/dist/index-CnGC2zXt.d.cts +53 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx.cjs +2 -2
- package/dist/jsx.d.cts +1 -52
- package/dist/jsx.d.mts +1 -52
- package/dist/jsx.mjs +2 -2
- package/dist/renderer.cjs +1 -1
- package/dist/renderer.d.cts +1 -1
- package/dist/renderer.d.mts +1 -1
- package/dist/renderer.mjs +1 -1
- package/dist/utils-DXKpO9jU.cjs +1 -0
- package/dist/utils-DivIadzC.mjs +1 -0
- package/package.json +3 -3
- package/dist/fonts-B-pwvIqE.cjs +0 -1
- package/dist/fonts-CBLz8Mte.mjs +0 -1
- package/dist/helpers-4kGcvc-Q.cjs +0 -1
- package/dist/helpers-CVQCT1Rh.mjs +0 -1
- package/dist/utils-4GQubbLq.mjs +0 -1
- package/dist/utils-BndQkSnW.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./helpers-_gtvoVXa.cjs");let t=!1;function n({nodes:e,css:n}){let i={node:r(e),css:n,get stylesheets(){return t||(t=!0,console.warn("takumi: the `stylesheets` result field is deprecated, use `css` instead.")),n}};return Object.defineProperty(i,"stylesheets",{enumerable:!1}),i}function r(t){return t.length===1&&t[0]?t[0]:t.length===0?e.t({}):e.t({children:t,style:{display:`block`,width:e.a(100),height:e.a(100)}})}const i={html:{display:`block`},head:{display:`none`},meta:{display:`none`},title:{display:`none`},link:{display:`none`},style:{display:`none`},script:{display:`none`},noscript:{display:`none`},datalist:{display:`none`},template:{display:`none`},body:{margin:8,display:`block`},p:{marginTop:`1em`,marginBottom:`1em`,display:`block`},blockquote:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figure:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figcaption:{display:`block`},address:{fontStyle:`italic`,display:`block`},article:{display:`block`},aside:{display:`block`},footer:{display:`block`},header:{display:`block`},hgroup:{display:`block`},main:{display:`block`},nav:{display:`block`},section:{display:`block`},center:{textAlign:`center`,display:`block`},hr:{marginTop:`0.5em`,marginBottom:`0.5em`,marginLeft:`auto`,marginRight:`auto`,borderWidth:1,display:`block`},ul:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},ol:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`decimal`},menu:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},li:{display:`list-item`},dl:{marginTop:`1em`,marginBottom:`1em`,display:`block`},dt:{display:`block`},dd:{marginLeft:40,display:`block`},form:{display:`block`},fieldset:{marginLeft:2,marginRight:2,paddingTop:`0.35em`,paddingRight:`0.75em`,paddingBottom:`0.625em`,paddingLeft:`0.75em`,borderWidth:2,display:`block`},legend:{paddingLeft:2,paddingRight:2,display:`block`},details:{display:`block`},summary:{display:`block`},search:{display:`block`},h1:{fontSize:`2em`,marginTop:`0.67em`,marginBottom:`0.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h2:{fontSize:`1.5em`,marginTop:`0.83em`,marginBottom:`0.83em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h3:{fontSize:`1.17em`,marginTop:`1em`,marginBottom:`1em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h4:{marginTop:`1.33em`,marginBottom:`1.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h5:{fontSize:`0.83em`,marginTop:`1.67em`,marginBottom:`1.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h6:{fontSize:`0.67em`,marginTop:`2.33em`,marginBottom:`2.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},u:{textDecoration:`underline`},ins:{textDecoration:`underline`},strong:{fontWeight:`bolder`},b:{fontWeight:`bolder`},i:{fontStyle:`italic`},em:{fontStyle:`italic`},cite:{fontStyle:`italic`},dfn:{fontStyle:`italic`},code:{fontFamily:`monospace`},kbd:{fontFamily:`monospace`},samp:{fontFamily:`monospace`},pre:{fontFamily:`monospace`,whiteSpace:`pre`,margin:`1em 0`,display:`block`},br:{whiteSpace:`pre`},mark:{backgroundColor:`yellow`,color:`black`},big:{fontSize:`larger`},small:{fontSize:`smaller`},s:{textDecoration:`line-through`},del:{textDecoration:`line-through`},sub:{fontSize:`smaller`,verticalAlign:`sub`},sup:{fontSize:`smaller`,verticalAlign:`super`},div:{display:`block`},table:{display:`table`,boxSizing:`border-box`,borderSpacing:`2px`},thead:{display:`table-header-group`,breakInside:`avoid`},tbody:{display:`table-row-group`},tfoot:{display:`table-footer-group`,breakInside:`avoid`},tr:{display:`table-row`},td:{display:`table-cell`,padding:1},th:{display:`table-cell`,padding:1,fontWeight:`bold`,textAlign:`center`},caption:{display:`table-caption`,textAlign:`center`}},a=new Set([`children`,`className`,`class`,`id`,`style`,`ref`,`key`,`dangerouslySetInnerHTML`,`suppressHydrationWarning`]),o=new Set([`string`,`number`,`bigint`,`boolean`]);var s=class{presets;tailwindClassesProperty;constructor(e){this.presets=e?.defaultStyles===!1?void 0:e?.defaultStyles??i,this.tailwindClassesProperty=e?.tailwindClassesProperty??`tw`}read(e,t,n,r){let i=t[this.tailwindClassesProperty];return{tagName:e,className:n,id:t.id,dir:t.dir,lang:t.lang,attributes:this.attributes(t),tw:typeof i==`string`?i:void 0,style:r,preset:this.preset(e)}}preset(e){return this.presets&&e!==void 0&&e in this.presets?this.presets[e]:void 0}attributes(e){let t;for(let[n,r]of Object.entries(e))a.has(n)||n===this.tailwindClassesProperty||r!==!1&&o.has(typeof r)&&(t??={},t[n]=r===!0?``:String(r));return t}};const c=new Set([`head`,`meta`,`link`,`style`,`script`]);function l(e){return c.has(e)}function u(e,t){return e.type===t&&`props`in e}function d(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function f(e){return typeof e==`object`&&!!e&&`type`in e}function p(e){return typeof e==`function`}const m=Symbol.for(`react.forward_ref`),h=Symbol.for(`react.memo`),g=Symbol.for(`react.fragment`);function _(e,t){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===t}function v(e){return _(e,m)&&`render`in e&&typeof e.render==`function`}function y(e){return _(e,h)&&`type`in e}function b(e){return e.type===g}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./helpers-CrbDeBIp.mjs";let n=!1;function r({nodes:e,css:t}){let r={node:i(e),css:t,get stylesheets(){return n||(n=!0,console.warn("takumi: the `stylesheets` result field is deprecated, use `css` instead.")),t}};return Object.defineProperty(r,"stylesheets",{enumerable:!1}),r}function i(n){return n.length===1&&n[0]?n[0]:n.length===0?t({}):t({children:n,style:{display:`block`,width:e(100),height:e(100)}})}const a={html:{display:`block`},head:{display:`none`},meta:{display:`none`},title:{display:`none`},link:{display:`none`},style:{display:`none`},script:{display:`none`},noscript:{display:`none`},datalist:{display:`none`},template:{display:`none`},body:{margin:8,display:`block`},p:{marginTop:`1em`,marginBottom:`1em`,display:`block`},blockquote:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figure:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figcaption:{display:`block`},address:{fontStyle:`italic`,display:`block`},article:{display:`block`},aside:{display:`block`},footer:{display:`block`},header:{display:`block`},hgroup:{display:`block`},main:{display:`block`},nav:{display:`block`},section:{display:`block`},center:{textAlign:`center`,display:`block`},hr:{marginTop:`0.5em`,marginBottom:`0.5em`,marginLeft:`auto`,marginRight:`auto`,borderWidth:1,display:`block`},ul:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},ol:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`decimal`},menu:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},li:{display:`list-item`},dl:{marginTop:`1em`,marginBottom:`1em`,display:`block`},dt:{display:`block`},dd:{marginLeft:40,display:`block`},form:{display:`block`},fieldset:{marginLeft:2,marginRight:2,paddingTop:`0.35em`,paddingRight:`0.75em`,paddingBottom:`0.625em`,paddingLeft:`0.75em`,borderWidth:2,display:`block`},legend:{paddingLeft:2,paddingRight:2,display:`block`},details:{display:`block`},summary:{display:`block`},search:{display:`block`},h1:{fontSize:`2em`,marginTop:`0.67em`,marginBottom:`0.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h2:{fontSize:`1.5em`,marginTop:`0.83em`,marginBottom:`0.83em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h3:{fontSize:`1.17em`,marginTop:`1em`,marginBottom:`1em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h4:{marginTop:`1.33em`,marginBottom:`1.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h5:{fontSize:`0.83em`,marginTop:`1.67em`,marginBottom:`1.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h6:{fontSize:`0.67em`,marginTop:`2.33em`,marginBottom:`2.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},u:{textDecoration:`underline`},ins:{textDecoration:`underline`},strong:{fontWeight:`bolder`},b:{fontWeight:`bolder`},i:{fontStyle:`italic`},em:{fontStyle:`italic`},cite:{fontStyle:`italic`},dfn:{fontStyle:`italic`},code:{fontFamily:`monospace`},kbd:{fontFamily:`monospace`},samp:{fontFamily:`monospace`},pre:{fontFamily:`monospace`,whiteSpace:`pre`,margin:`1em 0`,display:`block`},br:{whiteSpace:`pre`},mark:{backgroundColor:`yellow`,color:`black`},big:{fontSize:`larger`},small:{fontSize:`smaller`},s:{textDecoration:`line-through`},del:{textDecoration:`line-through`},sub:{fontSize:`smaller`,verticalAlign:`sub`},sup:{fontSize:`smaller`,verticalAlign:`super`},div:{display:`block`},table:{display:`table`,boxSizing:`border-box`,borderSpacing:`2px`},thead:{display:`table-header-group`,breakInside:`avoid`},tbody:{display:`table-row-group`},tfoot:{display:`table-footer-group`,breakInside:`avoid`},tr:{display:`table-row`},td:{display:`table-cell`,padding:1},th:{display:`table-cell`,padding:1,fontWeight:`bold`,textAlign:`center`},caption:{display:`table-caption`,textAlign:`center`}},o=new Set([`children`,`className`,`class`,`id`,`style`,`ref`,`key`,`dangerouslySetInnerHTML`,`suppressHydrationWarning`]),s=new Set([`string`,`number`,`bigint`,`boolean`]);var c=class{presets;tailwindClassesProperty;constructor(e){this.presets=e?.defaultStyles===!1?void 0:e?.defaultStyles??a,this.tailwindClassesProperty=e?.tailwindClassesProperty??`tw`}read(e,t,n,r){let i=t[this.tailwindClassesProperty];return{tagName:e,className:n,id:t.id,dir:t.dir,lang:t.lang,attributes:this.attributes(t),tw:typeof i==`string`?i:void 0,style:r,preset:this.preset(e)}}preset(e){return this.presets&&e!==void 0&&e in this.presets?this.presets[e]:void 0}attributes(e){let t;for(let[n,r]of Object.entries(e))o.has(n)||n===this.tailwindClassesProperty||r!==!1&&s.has(typeof r)&&(t??={},t[n]=r===!0?``:String(r));return t}};const l=new Set([`head`,`meta`,`link`,`style`,`script`]);function u(e){return l.has(e)}function d(e,t){return e.type===t&&`props`in e}function f(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function p(e){return typeof e==`object`&&!!e&&`type`in e}function m(e){return typeof e==`function`}const h=Symbol.for(`react.forward_ref`),g=Symbol.for(`react.memo`),_=Symbol.for(`react.fragment`);function v(e,t){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===t}function y(e){return v(e,h)&&`render`in e&&typeof e.render==`function`}function b(e){return v(e,g)&&`type`in e}function x(e){return e.type===_}export{x as a,p as c,r as d,y as i,c as l,m as n,b as o,d as r,u as s,f as t,a as u};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takumi-rs/helpers",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.1",
|
|
4
4
|
"description": "Convert JSX and HTML to Takumi node trees. Load fonts and emoji.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"emoji",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@types/react": "19.2.18",
|
|
100
100
|
"@types/react-dom": "^19.2.7",
|
|
101
101
|
"lucide-react": "^1.45.0",
|
|
102
|
-
"preact": "^
|
|
102
|
+
"preact": "^11.0.0",
|
|
103
103
|
"react": "^19.2.8",
|
|
104
104
|
"react-dom": "^19.2.8",
|
|
105
105
|
"tsdown": "0.23.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"unrun": "^0.3.1"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"preact": "^10.0.0",
|
|
110
|
+
"preact": "^10.0.0 || ^11.0.0",
|
|
111
111
|
"react": "^18.0.0 || ^19.0.0"
|
|
112
112
|
},
|
|
113
113
|
"peerDependenciesMeta": {
|
package/dist/fonts-B-pwvIqE.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{signal;constructor(e,t){let n=e.timeout??3e4,r=[e.signal,t,n<=0?void 0:AbortSignal.timeout(n)].filter(e=>e!=null);this.signal=r.length?AbortSignal.any(r):void 0}waitFor(e){let t=this.signal;return t?new Promise((n,r)=>{function i(){t?.removeEventListener(`abort`,i),r(t?.reason)}t.addEventListener(`abort`,i,{once:!0}),e.then(e=>{t.removeEventListener(`abort`,i),n(e)},e=>{t.removeEventListener(`abort`,i),r(e)}),t.aborted&&i()}):e}};const t=new Set([301,302,303,307,308]),n=new Set([408,429,500,502,503,504]);async function r(e,t={}){return new i(e,t).send()}var i=class r{url;allowUrl;fetchImpl;init;constructor(t,n){if(n.allowUrl&&!n.allowUrl(t))throw Error(`URL blocked by allowUrl policy: ${t}`);this.url=t,this.allowUrl=n.allowUrl,this.fetchImpl=n.fetch??globalThis.fetch,this.init={...n.init,signal:new e(n,n.init?.signal).signal}}async send(){let e=this.allowUrl?await this.followRedirects(this.allowUrl):await this.attempt(this.url,this.init);if(!e.ok)throw Error(`HTTP ${e.status} ${e.statusText} fetching ${this.url}`);return e}async attempt(e,t){let r=t.method?.toUpperCase()??`GET`,i=r===`GET`||r===`HEAD`;for(let r=0;;r++){t.signal?.throwIfAborted();let a=100*2**r;try{let o=await this.fetchImpl.call(void 0,e,t);if(t.signal?.throwIfAborted(),!i||r===2||!n.has(o.status))return o;let s=o.headers.get(`retry-after`);if(s!==null){let e=Number(s),t=Number.isFinite(e)?e*1e3:Date.parse(s)-Date.now();Number.isFinite(t)&&(a=Math.max(a,t))}if(a>1e3)return o;o.body?.cancel().catch(()=>{})}catch(e){if(t.signal?.throwIfAborted(),!i||r===2||!(e instanceof Error)||e.name!==`TypeError`&&e.name!==`TimeoutError`)throw e}await this.wait(a)}}wait(e){let t=this.init.signal;return t?.throwIfAborted(),new Promise((n,r)=>{let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);function a(){clearTimeout(i),r(t?.reason)}t?.addEventListener(`abort`,a,{once:!0})})}async followRedirects(e){let n=this.url,i={...this.init,headers:new Headers(this.init.headers),redirect:`manual`};for(let a=0;a<5;a++){let a=await this.attempt(n,i),o=a.headers.get(`location`);if(!t.has(a.status)||o===null)return a;await a.body?.cancel().catch(()=>{});let s=new URL(o,n);if(!e(s.href))throw Error(`URL blocked by allowUrl policy: ${s.href}`);if(s.protocol!==`https:`&&s.protocol!==`http:`||s.username||s.password)throw Error(`Invalid redirect URL: ${s.href}`);i=r.redirectInit(i,a.status,n,s),n=s.href}throw Error(`Too many redirects fetching ${this.url}`)}static redirectInit(e,t,n,r){if(t!==303&&e.body instanceof ReadableStream)throw Error(`Cannot replay a streamed request body after a redirect`);let i=new Headers(e.headers),a=e.method?.toUpperCase()??`GET`,o=(t===301||t===302)&&a===`POST`||t===303&&a!==`GET`&&a!==`HEAD`;if(o)for(let e of[`content-encoding`,`content-language`,`content-location`,`content-type`,`content-length`])i.delete(e);if(new URL(n).origin!==r.origin)for(let e of[`authorization`,`proxy-authorization`,`cookie`,`cookie2`])i.delete(e);return{...e,headers:i,method:o?`GET`:e.method,body:o?void 0:e.body}}};async function a(e,t){let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>t)throw Error(`Response exceeds ${t} bytes (content-length ${n})`);let r=e.body;if(!r)return e.arrayBuffer();let i=r.getReader(),a=[],o=0;for(;;){let{done:e,value:n}=await i.read();if(e)break;if(o+=n.byteLength,o>t)throw await i.cancel().catch(()=>{}),Error(`Response exceeds ${t} bytes`);a.push(n)}let s=new Uint8Array(o),c=0;for(let e of a)s.set(e,c),c+=e.byteLength;return s.buffer}const o=2097152,s=1048576;var c=class e{static byFetch=new WeakMap;entries=new Map;bytes=0;static forFetch(t){let n=this.byFetch.get(t);return n||(n=new e,this.byFetch.set(t,n)),n}get(e){let t=this.entries.get(e);return t&&(this.entries.delete(e),this.entries.set(e,t)),t?.pending}set(e,t){this.delete(e);let n={pending:t,bytes:e.length*2};this.entries.set(e,n),this.bytes+=n.bytes,this.trim(),t.then(t=>{this.entries.get(e)===n&&(n.bytes+=t.length*2,this.bytes+=t.length*2,n.bytes>s&&this.delete(e),this.trim())},()=>{this.entries.get(e)===n&&this.delete(e)})}delete(e){let t=this.entries.get(e);t&&(this.bytes-=t.bytes,this.entries.delete(e))}trim(){for(let e of this.entries.keys()){if(this.entries.size<=64&&this.bytes<=s)break;this.delete(e)}}static read(e,t){return r(e,{...t,init:{headers:{"User-Agent":`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`}}}).then(e=>a(e,t.maxBytes??o)).then(e=>new TextDecoder().decode(e))}static load(e,t){if(t.signal?.throwIfAborted(),t.signal||t.allowUrl)return this.read(e,t);let n=t.cache??this.forFetch(t.fetch??globalThis.fetch),r=n.get(e);if(r)return r.then(e=>{let n=t.maxBytes??o;if(new TextEncoder().encode(e).byteLength>n)throw Error(`Response exceeds ${n} bytes`);return e});let i=this.read(e,t);return n.set(e,i),t.cache&&i.catch(()=>{n.get(e)===i&&n.delete(e)}),i}};function l(e,t,n,r){let i=new Map(r),a=n.includes(`italic`),o=a?n.includes(`normal`)?[0,1]:[1]:[void 0],s=[...a?[`ital`]:[],...i.keys(),`wght`].sort(),c=o.flatMap(e=>t.map(t=>s.map(n=>n===`ital`?String(e):n===`wght`?t:i.get(n)??``).join(`,`))).sort();return`${e}:${s.join(`,`)}@${c.join(`;`)}`}function u(e){let t=new URL(e.baseUrl??`https://fonts.googleapis.com/css2`);for(let n of e.families){if(typeof n==`string`){t.searchParams.append(`family`,l(n,[`400`],[`normal`],[]));continue}let e=n.weight??400,r=(Array.isArray(e)?[...e].sort((e,t)=>e-t):[e]).map(String),i=n.style??`normal`,a=(Array.isArray(i)?i:[i]).map(String),o=Object.entries(n.axes??{}).filter(([e])=>e!==`ital`&&e!==`wght`).map(([e,t])=>[e,String(t)]);t.searchParams.append(`family`,l(n.name,r,a,o))}return e.display&&t.searchParams.set(`display`,e.display),t.toString()}const d=/(?:\/\*\s*([^*]+?)\s*\*\/\s*)?@font-face\s*\{([^}]*)\}/g;function f(e,t,n){let i=`${e.family} ${e.subset}`,o=e.ranges.map(([e,t])=>`${e}-${t}`).join(`,`);return{name:i,subsetOf:e.family,subsetRank:p(e.ranges),key:`${i}:${e.weight??``}:${e.style??``}:${o}:${n??``}`,weight:e.weight,style:e.style,ranges:e.ranges,generic:n,data:()=>r(e.url,t).then(e=>a(e,t.maxBytes??33554432))}}function p(e){return e.length===0?4294967295:Math.min(...e.map(([e])=>e))}function m(e){let t=[];for(let n of e.split(`,`)){let e=n.trim().replace(/^U\+/i,``);if(e){if(e.includes(`-`)){let[n,r]=e.split(`-`);n&&r&&t.push([parseInt(n,16),parseInt(r,16)])}else if(e.includes(`?`))t.push([parseInt(e.replace(/\?/g,`0`),16),parseInt(e.replace(/\?/g,`F`),16)]);else{let n=parseInt(e,16);t.push([n,n])}}}return t}function h(e){let t=[],n=0;for(let r of e.matchAll(d)){let e=r[2];if(!e)continue;let i=e.match(/src:\s*url\(([^)]+)\)/)?.[1]?.replace(/['"]/g,``).trim(),a=e.match(/font-family:\s*['"]?([^'";]+)['"]?/)?.[1]?.trim();if(!i||!a)continue;let o=e.match(/unicode-range:\s*([^;]+)/)?.[1],s=e.match(/font-weight:\s*(\d+)(?:\s+(\d+))?/);t.push({family:a,subset:r[1]?.trim()||`subset-${n}`,url:i,weight:s&&!s[2]?Number(s[1]):void 0,style:e.match(/font-style:\s*([a-z]+)/i)?.[1],ranges:o?m(o):[]}),n+=1}return t}function g(e){let t=new Map;for(let n of e){let e=t.get(n.url)??new Set;e.add(n.weight),t.set(n.url,e)}let n=new Set,r=[];for(let i of e){if(n.has(i.url))continue;n.add(i.url);let e=(t.get(i.url)?.size??0)>1;r.push(e?{...i,weight:void 0}:i)}return r}function _(e){let t=new Set,n=e=>{for(let n of e)t.add(n.codePointAt(0))},r=e=>{typeof e==`string`?n(e):e.type===`text`?n(e.text):e.type===`container`&&e.children?.forEach(r)};return Array.isArray(e)?e.forEach(r):r(e),t}function v(e,t){if(e.length===0)return!0;for(let n of t)for(let[t,r]of e)if(n>=t&&n<=r)return!0;return!1}function y({fonts:e,source:t}){let n=_(t);return e.filter(e=>v(e.ranges??[],n))}function b(e,t={}){return{key:e,data:()=>r(e,t).then(e=>a(e,t.maxBytes??33554432))}}async function x(e){if(Array.isArray(e)&&(e={families:e}),e.families.length===0)return[];let t=await c.load(u(e),e),n=new Map(e.families.map((e,t)=>[typeof e==`string`?e:e.name,t])),r=new Map(e.families.flatMap(e=>typeof e==`string`||!e.generic?[]:[[e.name,e.generic]]));return g(h(t)).sort((e,t)=>(n.get(e.family)??0)-(n.get(t.family)??0)).map(t=>f(t,e,r.get(t.family)))}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return 33554432}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return`•◦■▪▸◂▾ 0123456789.-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`}});
|
package/dist/fonts-CBLz8Mte.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{signal;constructor(e,t){let n=e.timeout??3e4,r=[e.signal,t,n<=0?void 0:AbortSignal.timeout(n)].filter(e=>e!=null);this.signal=r.length?AbortSignal.any(r):void 0}waitFor(e){let t=this.signal;return t?new Promise((n,r)=>{function i(){t?.removeEventListener(`abort`,i),r(t?.reason)}t.addEventListener(`abort`,i,{once:!0}),e.then(e=>{t.removeEventListener(`abort`,i),n(e)},e=>{t.removeEventListener(`abort`,i),r(e)}),t.aborted&&i()}):e}};const t=new Set([301,302,303,307,308]),n=new Set([408,429,500,502,503,504]),r=33554432;async function i(e,t={}){return new a(e,t).send()}var a=class r{url;allowUrl;fetchImpl;init;constructor(t,n){if(n.allowUrl&&!n.allowUrl(t))throw Error(`URL blocked by allowUrl policy: ${t}`);this.url=t,this.allowUrl=n.allowUrl,this.fetchImpl=n.fetch??globalThis.fetch,this.init={...n.init,signal:new e(n,n.init?.signal).signal}}async send(){let e=this.allowUrl?await this.followRedirects(this.allowUrl):await this.attempt(this.url,this.init);if(!e.ok)throw Error(`HTTP ${e.status} ${e.statusText} fetching ${this.url}`);return e}async attempt(e,t){let r=t.method?.toUpperCase()??`GET`,i=r===`GET`||r===`HEAD`;for(let r=0;;r++){t.signal?.throwIfAborted();let a=100*2**r;try{let o=await this.fetchImpl.call(void 0,e,t);if(t.signal?.throwIfAborted(),!i||r===2||!n.has(o.status))return o;let s=o.headers.get(`retry-after`);if(s!==null){let e=Number(s),t=Number.isFinite(e)?e*1e3:Date.parse(s)-Date.now();Number.isFinite(t)&&(a=Math.max(a,t))}if(a>1e3)return o;o.body?.cancel().catch(()=>{})}catch(e){if(t.signal?.throwIfAborted(),!i||r===2||!(e instanceof Error)||e.name!==`TypeError`&&e.name!==`TimeoutError`)throw e}await this.wait(a)}}wait(e){let t=this.init.signal;return t?.throwIfAborted(),new Promise((n,r)=>{let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);function a(){clearTimeout(i),r(t?.reason)}t?.addEventListener(`abort`,a,{once:!0})})}async followRedirects(e){let n=this.url,i={...this.init,headers:new Headers(this.init.headers),redirect:`manual`};for(let a=0;a<5;a++){let a=await this.attempt(n,i),o=a.headers.get(`location`);if(!t.has(a.status)||o===null)return a;await a.body?.cancel().catch(()=>{});let s=new URL(o,n);if(!e(s.href))throw Error(`URL blocked by allowUrl policy: ${s.href}`);if(s.protocol!==`https:`&&s.protocol!==`http:`||s.username||s.password)throw Error(`Invalid redirect URL: ${s.href}`);i=r.redirectInit(i,a.status,n,s),n=s.href}throw Error(`Too many redirects fetching ${this.url}`)}static redirectInit(e,t,n,r){if(t!==303&&e.body instanceof ReadableStream)throw Error(`Cannot replay a streamed request body after a redirect`);let i=new Headers(e.headers),a=e.method?.toUpperCase()??`GET`,o=(t===301||t===302)&&a===`POST`||t===303&&a!==`GET`&&a!==`HEAD`;if(o)for(let e of[`content-encoding`,`content-language`,`content-location`,`content-type`,`content-length`])i.delete(e);if(new URL(n).origin!==r.origin)for(let e of[`authorization`,`proxy-authorization`,`cookie`,`cookie2`])i.delete(e);return{...e,headers:i,method:o?`GET`:e.method,body:o?void 0:e.body}}};async function o(e,t){let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>t)throw Error(`Response exceeds ${t} bytes (content-length ${n})`);let r=e.body;if(!r)return e.arrayBuffer();let i=r.getReader(),a=[],o=0;for(;;){let{done:e,value:n}=await i.read();if(e)break;if(o+=n.byteLength,o>t)throw await i.cancel().catch(()=>{}),Error(`Response exceeds ${t} bytes`);a.push(n)}let s=new Uint8Array(o),c=0;for(let e of a)s.set(e,c),c+=e.byteLength;return s.buffer}const s=2097152,c=1048576;var l=class e{static byFetch=new WeakMap;entries=new Map;bytes=0;static forFetch(t){let n=this.byFetch.get(t);return n||(n=new e,this.byFetch.set(t,n)),n}get(e){let t=this.entries.get(e);return t&&(this.entries.delete(e),this.entries.set(e,t)),t?.pending}set(e,t){this.delete(e);let n={pending:t,bytes:e.length*2};this.entries.set(e,n),this.bytes+=n.bytes,this.trim(),t.then(t=>{this.entries.get(e)===n&&(n.bytes+=t.length*2,this.bytes+=t.length*2,n.bytes>c&&this.delete(e),this.trim())},()=>{this.entries.get(e)===n&&this.delete(e)})}delete(e){let t=this.entries.get(e);t&&(this.bytes-=t.bytes,this.entries.delete(e))}trim(){for(let e of this.entries.keys()){if(this.entries.size<=64&&this.bytes<=c)break;this.delete(e)}}static read(e,t){return i(e,{...t,init:{headers:{"User-Agent":`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`}}}).then(e=>o(e,t.maxBytes??s)).then(e=>new TextDecoder().decode(e))}static load(e,t){if(t.signal?.throwIfAborted(),t.signal||t.allowUrl)return this.read(e,t);let n=t.cache??this.forFetch(t.fetch??globalThis.fetch),r=n.get(e);if(r)return r.then(e=>{let n=t.maxBytes??s;if(new TextEncoder().encode(e).byteLength>n)throw Error(`Response exceeds ${n} bytes`);return e});let i=this.read(e,t);return n.set(e,i),t.cache&&i.catch(()=>{n.get(e)===i&&n.delete(e)}),i}};function u(e,t,n,r){let i=new Map(r),a=n.includes(`italic`),o=a?n.includes(`normal`)?[0,1]:[1]:[void 0],s=[...a?[`ital`]:[],...i.keys(),`wght`].sort(),c=o.flatMap(e=>t.map(t=>s.map(n=>n===`ital`?String(e):n===`wght`?t:i.get(n)??``).join(`,`))).sort();return`${e}:${s.join(`,`)}@${c.join(`;`)}`}function d(e){let t=new URL(e.baseUrl??`https://fonts.googleapis.com/css2`);for(let n of e.families){if(typeof n==`string`){t.searchParams.append(`family`,u(n,[`400`],[`normal`],[]));continue}let e=n.weight??400,r=(Array.isArray(e)?[...e].sort((e,t)=>e-t):[e]).map(String),i=n.style??`normal`,a=(Array.isArray(i)?i:[i]).map(String),o=Object.entries(n.axes??{}).filter(([e])=>e!==`ital`&&e!==`wght`).map(([e,t])=>[e,String(t)]);t.searchParams.append(`family`,u(n.name,r,a,o))}return e.display&&t.searchParams.set(`display`,e.display),t.toString()}const f=/(?:\/\*\s*([^*]+?)\s*\*\/\s*)?@font-face\s*\{([^}]*)\}/g;function p(e,t,n){let r=`${e.family} ${e.subset}`,a=e.ranges.map(([e,t])=>`${e}-${t}`).join(`,`);return{name:r,subsetOf:e.family,subsetRank:m(e.ranges),key:`${r}:${e.weight??``}:${e.style??``}:${a}:${n??``}`,weight:e.weight,style:e.style,ranges:e.ranges,generic:n,data:()=>i(e.url,t).then(e=>o(e,t.maxBytes??33554432))}}function m(e){return e.length===0?4294967295:Math.min(...e.map(([e])=>e))}function h(e){let t=[];for(let n of e.split(`,`)){let e=n.trim().replace(/^U\+/i,``);if(e){if(e.includes(`-`)){let[n,r]=e.split(`-`);n&&r&&t.push([parseInt(n,16),parseInt(r,16)])}else if(e.includes(`?`))t.push([parseInt(e.replace(/\?/g,`0`),16),parseInt(e.replace(/\?/g,`F`),16)]);else{let n=parseInt(e,16);t.push([n,n])}}}return t}function g(e){let t=[],n=0;for(let r of e.matchAll(f)){let e=r[2];if(!e)continue;let i=e.match(/src:\s*url\(([^)]+)\)/)?.[1]?.replace(/['"]/g,``).trim(),a=e.match(/font-family:\s*['"]?([^'";]+)['"]?/)?.[1]?.trim();if(!i||!a)continue;let o=e.match(/unicode-range:\s*([^;]+)/)?.[1],s=e.match(/font-weight:\s*(\d+)(?:\s+(\d+))?/);t.push({family:a,subset:r[1]?.trim()||`subset-${n}`,url:i,weight:s&&!s[2]?Number(s[1]):void 0,style:e.match(/font-style:\s*([a-z]+)/i)?.[1],ranges:o?h(o):[]}),n+=1}return t}function _(e){let t=new Map;for(let n of e){let e=t.get(n.url)??new Set;e.add(n.weight),t.set(n.url,e)}let n=new Set,r=[];for(let i of e){if(n.has(i.url))continue;n.add(i.url);let e=(t.get(i.url)?.size??0)>1;r.push(e?{...i,weight:void 0}:i)}return r}const v=`•◦■▪▸◂▾ 0123456789.-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;function y(e){let t=new Set,n=e=>{for(let n of e)t.add(n.codePointAt(0))},r=e=>{typeof e==`string`?n(e):e.type===`text`?n(e.text):e.type===`container`&&e.children?.forEach(r)};return Array.isArray(e)?e.forEach(r):r(e),t}function b(e,t){if(e.length===0)return!0;for(let n of t)for(let[t,r]of e)if(n>=t&&n<=r)return!0;return!1}function x({fonts:e,source:t}){let n=y(t);return e.filter(e=>b(e.ranges??[],n))}function S(e,t={}){return{key:e,data:()=>i(e,t).then(e=>o(e,t.maxBytes??33554432))}}async function C(e){if(Array.isArray(e)&&(e={families:e}),e.families.length===0)return[];let t=await l.load(d(e),e),n=new Map(e.families.map((e,t)=>[typeof e==`string`?e:e.name,t])),r=new Map(e.families.flatMap(e=>typeof e==`string`||!e.generic?[]:[[e.name,e.generic]]));return _(g(t)).sort((e,t)=>(n.get(e.family)??0)-(n.get(t.family)??0)).map(t=>p(t,e,r.get(t.family)))}export{x as a,o as c,C as i,e as l,y as n,r as o,S as r,i as s,v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){t&&Object.keys(t).length>0&&(e.style=t)}function t(e,t){t&&Object.keys(t).length>0&&(e.preset=t)}function n(e,t){t.tagName!==void 0&&(e.tagName=t.tagName),t.className!==void 0&&(e.className=t.className),t.id!==void 0&&(e.id=t.id),t.dir!==void 0&&(e.dir=t.dir),t.lang!==void 0&&(e.lang=t.lang),t.attributes!==void 0&&(e.attributes=t.attributes)}function r(r){let i={type:`container`,children:r.children};return r.tw&&(i.tw=r.tw),n(i,r),t(i,r.preset),e(i,r.style),i}function i(r,i){if(typeof r==`string`){let t={type:`text`,text:r};return e(t,i),t}let a={type:`text`,text:r.text};return r.tw&&(a.tw=r.tw),n(a,r),t(a,r.preset),e(a,i??r.style),a}function a(r){let i={type:`image`,src:r.src,width:r.width,height:r.height};return r.tw&&(i.tw=r.tw),n(i,r),t(i,r.preset),e(i,r.style),i}function o(e){return e}function s(e){return`${e}%`}function c(e){return`${e}vw`}function l(e){return`${e}vh`}function u(e){return`${e}em`}function d(e){return`${e}rem`}function f(e){return`${e}fr`}function p(e,t,n,r=1){return`rgb(${e} ${t} ${n} / ${r})`}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return l}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){t&&Object.keys(t).length>0&&(e.style=t)}function t(e,t){t&&Object.keys(t).length>0&&(e.preset=t)}function n(e,t){t.tagName!==void 0&&(e.tagName=t.tagName),t.className!==void 0&&(e.className=t.className),t.id!==void 0&&(e.id=t.id),t.dir!==void 0&&(e.dir=t.dir),t.lang!==void 0&&(e.lang=t.lang),t.attributes!==void 0&&(e.attributes=t.attributes)}function r(r){let i={type:`container`,children:r.children};return r.tw&&(i.tw=r.tw),n(i,r),t(i,r.preset),e(i,r.style),i}function i(r,i){if(typeof r==`string`){let t={type:`text`,text:r};return e(t,i),t}let a={type:`text`,text:r.text};return r.tw&&(a.tw=r.tw),n(a,r),t(a,r.preset),e(a,i??r.style),a}function a(r){let i={type:`image`,src:r.src,width:r.width,height:r.height};return r.tw&&(i.tw=r.tw),n(i,r),t(i,r.preset),e(i,r.style),i}function o(e){return e}function s(e){return`${e}%`}function c(e){return`${e}vw`}function l(e){return`${e}vh`}function u(e){return`${e}em`}function d(e){return`${e}rem`}function f(e){return`${e}fr`}function p(e,t,n,r=1){return`rgb(${e} ${t} ${n} / ${r})`}export{s as a,o as c,c as d,a as i,i as l,u as n,d as o,f as r,p as s,r as t,l as u};
|
package/dist/utils-4GQubbLq.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={html:{display:`block`},head:{display:`none`},meta:{display:`none`},title:{display:`none`},link:{display:`none`},style:{display:`none`},script:{display:`none`},noscript:{display:`none`},datalist:{display:`none`},template:{display:`none`},body:{margin:8,display:`block`},p:{marginTop:`1em`,marginBottom:`1em`,display:`block`},blockquote:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figure:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figcaption:{display:`block`},address:{fontStyle:`italic`,display:`block`},article:{display:`block`},aside:{display:`block`},footer:{display:`block`},header:{display:`block`},hgroup:{display:`block`},main:{display:`block`},nav:{display:`block`},section:{display:`block`},center:{textAlign:`center`,display:`block`},hr:{marginTop:`0.5em`,marginBottom:`0.5em`,marginLeft:`auto`,marginRight:`auto`,borderWidth:1,display:`block`},ul:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},ol:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`decimal`},menu:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},li:{display:`list-item`},dl:{marginTop:`1em`,marginBottom:`1em`,display:`block`},dt:{display:`block`},dd:{marginLeft:40,display:`block`},form:{display:`block`},fieldset:{marginLeft:2,marginRight:2,paddingTop:`0.35em`,paddingRight:`0.75em`,paddingBottom:`0.625em`,paddingLeft:`0.75em`,borderWidth:2,display:`block`},legend:{paddingLeft:2,paddingRight:2,display:`block`},details:{display:`block`},summary:{display:`block`},search:{display:`block`},h1:{fontSize:`2em`,marginTop:`0.67em`,marginBottom:`0.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h2:{fontSize:`1.5em`,marginTop:`0.83em`,marginBottom:`0.83em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h3:{fontSize:`1.17em`,marginTop:`1em`,marginBottom:`1em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h4:{marginTop:`1.33em`,marginBottom:`1.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h5:{fontSize:`0.83em`,marginTop:`1.67em`,marginBottom:`1.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h6:{fontSize:`0.67em`,marginTop:`2.33em`,marginBottom:`2.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},u:{textDecoration:`underline`},ins:{textDecoration:`underline`},strong:{fontWeight:`bolder`},b:{fontWeight:`bolder`},i:{fontStyle:`italic`},em:{fontStyle:`italic`},cite:{fontStyle:`italic`},dfn:{fontStyle:`italic`},code:{fontFamily:`monospace`},kbd:{fontFamily:`monospace`},samp:{fontFamily:`monospace`},pre:{fontFamily:`monospace`,whiteSpace:`pre`,margin:`1em 0`,display:`block`},br:{whiteSpace:`pre`},mark:{backgroundColor:`yellow`,color:`black`},big:{fontSize:`larger`},small:{fontSize:`smaller`},s:{textDecoration:`line-through`},del:{textDecoration:`line-through`},sub:{fontSize:`smaller`,verticalAlign:`sub`},sup:{fontSize:`smaller`,verticalAlign:`super`},div:{display:`block`},table:{display:`table`,boxSizing:`border-box`,borderSpacing:`2px`},thead:{display:`table-header-group`},tbody:{display:`table-row-group`},tfoot:{display:`table-footer-group`},tr:{display:`table-row`},td:{display:`table-cell`,padding:1},th:{display:`table-cell`,padding:1,fontWeight:`bold`,textAlign:`center`},caption:{display:`table-caption`,textAlign:`center`}};function t(t){if(t!==!1)return t??e}function n(e,t){let n;for(let r in e){if(!Object.hasOwn(e,r))continue;let i=e[r];r!==`children`&&r!==`className`&&r!==`class`&&r!==`id`&&r!==`style`&&r!==t&&r!==`ref`&&r!==`key`&&r!==`dangerouslySetInnerHTML`&&r!==`suppressHydrationWarning`&&i!=null&&i!==!1&&typeof i!=`function`&&typeof i!=`symbol`&&typeof i!=`object`&&(n??={},n[r]=i===!0?``:String(i))}return n}let r=!1;function i(e){Object.defineProperty(e,"stylesheets",{enumerable:!1})}function a(){r||(r=!0,console.warn("takumi: the `stylesheets` result field is deprecated, use `css` instead."))}const o=new Set([`head`,`meta`,`link`,`style`,`script`]);function s(e){return o.has(e)}function c(e,t){return e.type===t&&`props`in e}function l(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function u(e){return typeof e==`object`&&!!e&&`type`in e}function d(e){return typeof e==`function`}const f=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.memo`),m=Symbol.for(`react.fragment`);function h(e,t){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===t}function g(e){return h(e,f)&&`render`in e&&typeof e.render==`function`}function _(e){return h(e,p)&&`type`in e}function v(e){return e.type===m}export{g as a,u as c,n as d,t as f,s as i,i as l,d as n,v as o,e as p,c as r,_ as s,l as t,a as u};
|
package/dist/utils-BndQkSnW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={html:{display:`block`},head:{display:`none`},meta:{display:`none`},title:{display:`none`},link:{display:`none`},style:{display:`none`},script:{display:`none`},noscript:{display:`none`},datalist:{display:`none`},template:{display:`none`},body:{margin:8,display:`block`},p:{marginTop:`1em`,marginBottom:`1em`,display:`block`},blockquote:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figure:{marginTop:`1em`,marginBottom:`1em`,marginLeft:40,marginRight:40,display:`block`},figcaption:{display:`block`},address:{fontStyle:`italic`,display:`block`},article:{display:`block`},aside:{display:`block`},footer:{display:`block`},header:{display:`block`},hgroup:{display:`block`},main:{display:`block`},nav:{display:`block`},section:{display:`block`},center:{textAlign:`center`,display:`block`},hr:{marginTop:`0.5em`,marginBottom:`0.5em`,marginLeft:`auto`,marginRight:`auto`,borderWidth:1,display:`block`},ul:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},ol:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`decimal`},menu:{marginTop:`1em`,marginBottom:`1em`,paddingInlineStart:40,display:`block`,listStyleType:`disc`},li:{display:`list-item`},dl:{marginTop:`1em`,marginBottom:`1em`,display:`block`},dt:{display:`block`},dd:{marginLeft:40,display:`block`},form:{display:`block`},fieldset:{marginLeft:2,marginRight:2,paddingTop:`0.35em`,paddingRight:`0.75em`,paddingBottom:`0.625em`,paddingLeft:`0.75em`,borderWidth:2,display:`block`},legend:{paddingLeft:2,paddingRight:2,display:`block`},details:{display:`block`},summary:{display:`block`},search:{display:`block`},h1:{fontSize:`2em`,marginTop:`0.67em`,marginBottom:`0.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h2:{fontSize:`1.5em`,marginTop:`0.83em`,marginBottom:`0.83em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h3:{fontSize:`1.17em`,marginTop:`1em`,marginBottom:`1em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h4:{marginTop:`1.33em`,marginBottom:`1.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h5:{fontSize:`0.83em`,marginTop:`1.67em`,marginBottom:`1.67em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},h6:{fontSize:`0.67em`,marginTop:`2.33em`,marginBottom:`2.33em`,marginLeft:0,marginRight:0,fontWeight:`bold`,display:`block`},u:{textDecoration:`underline`},ins:{textDecoration:`underline`},strong:{fontWeight:`bolder`},b:{fontWeight:`bolder`},i:{fontStyle:`italic`},em:{fontStyle:`italic`},cite:{fontStyle:`italic`},dfn:{fontStyle:`italic`},code:{fontFamily:`monospace`},kbd:{fontFamily:`monospace`},samp:{fontFamily:`monospace`},pre:{fontFamily:`monospace`,whiteSpace:`pre`,margin:`1em 0`,display:`block`},br:{whiteSpace:`pre`},mark:{backgroundColor:`yellow`,color:`black`},big:{fontSize:`larger`},small:{fontSize:`smaller`},s:{textDecoration:`line-through`},del:{textDecoration:`line-through`},sub:{fontSize:`smaller`,verticalAlign:`sub`},sup:{fontSize:`smaller`,verticalAlign:`super`},div:{display:`block`},table:{display:`table`,boxSizing:`border-box`,borderSpacing:`2px`},thead:{display:`table-header-group`},tbody:{display:`table-row-group`},tfoot:{display:`table-footer-group`},tr:{display:`table-row`},td:{display:`table-cell`,padding:1},th:{display:`table-cell`,padding:1,fontWeight:`bold`,textAlign:`center`},caption:{display:`table-caption`,textAlign:`center`}};function t(t){if(t!==!1)return t??e}function n(e,t){let n;for(let r in e){if(!Object.hasOwn(e,r))continue;let i=e[r];r!==`children`&&r!==`className`&&r!==`class`&&r!==`id`&&r!==`style`&&r!==t&&r!==`ref`&&r!==`key`&&r!==`dangerouslySetInnerHTML`&&r!==`suppressHydrationWarning`&&i!=null&&i!==!1&&typeof i!=`function`&&typeof i!=`symbol`&&typeof i!=`object`&&(n??={},n[r]=i===!0?``:String(i))}return n}let r=!1;function i(e){Object.defineProperty(e,"stylesheets",{enumerable:!1})}function a(){r||(r=!0,console.warn("takumi: the `stylesheets` result field is deprecated, use `css` instead."))}const o=new Set([`head`,`meta`,`link`,`style`,`script`]);function s(e){return o.has(e)}function c(e,t){return e.type===t&&`props`in e}function l(e){return e.replace(/([A-Z])/g,`-$1`).toLowerCase()}function u(e){return typeof e==`object`&&!!e&&`type`in e}function d(e){return typeof e==`function`}const f=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.memo`),m=Symbol.for(`react.fragment`);function h(e,t){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===t}function g(e){return h(e,f)&&`render`in e&&typeof e.render==`function`}function _(e){return h(e,p)&&`type`in e}function v(e){return e.type===m}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
|