@stacksjs/stx 0.2.194 → 0.2.196
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/chunk-0ae6chzd.js +4 -0
- package/dist/chunk-0w0mrtme.js +2 -0
- package/dist/chunk-0y46fbkx.js +3 -0
- package/dist/chunk-118a77bs.js +4471 -0
- package/dist/chunk-12nvcvtn.js +3 -0
- package/dist/chunk-14ynv5ah.js +2 -0
- package/dist/chunk-1e25ksp6.js +3 -0
- package/dist/chunk-1mhc4g86.js +43 -0
- package/dist/chunk-1thssz8x.js +2 -0
- package/dist/chunk-1yk07x7b.js +2 -0
- package/dist/chunk-2zkj69dg.js +13 -0
- package/dist/chunk-338316c2.js +2 -0
- package/dist/chunk-3952ykhb.js +1655 -0
- package/dist/chunk-3es366z4.js +3 -0
- package/dist/chunk-3m49eb4v.js +2 -0
- package/dist/chunk-3nmpfsw5.js +2 -0
- package/dist/chunk-3vy1q9da.js +2 -0
- package/dist/chunk-4a4h28pp.js +3022 -0
- package/dist/chunk-4pf61rcb.js +2 -0
- package/dist/chunk-5anpcnde.js +2 -0
- package/dist/chunk-5mkkre22.js +505 -0
- package/dist/chunk-5n0dt838.js +2 -0
- package/dist/chunk-5s2y052b.js +2 -0
- package/dist/chunk-5v64c8tr.js +2 -0
- package/dist/chunk-5xd7vge2.js +2 -0
- package/dist/chunk-6bxcjdp4.js +2 -0
- package/dist/chunk-6msvxnbr.js +2 -0
- package/dist/chunk-7kger0se.js +1280 -0
- package/dist/chunk-7ry55nms.js +3 -0
- package/dist/chunk-7s0wfa4e.js +24 -0
- package/dist/chunk-7w4c5w2b.js +2 -0
- package/dist/chunk-8src5smc.js +15 -0
- package/dist/chunk-937effkz.js +2 -0
- package/dist/chunk-9b82d4g5.js +3 -0
- package/dist/chunk-9xh78snm.js +3 -0
- package/dist/chunk-a2899x2t.js +2 -0
- package/dist/chunk-abpw3b39.js +2 -0
- package/dist/chunk-avwj12at.js +194 -0
- package/dist/chunk-b6jhznkh.js +71 -0
- package/dist/chunk-bpa2jeyw.js +3 -0
- package/dist/chunk-cbc56wpd.js +3 -0
- package/dist/chunk-dhpy0h9y.js +2 -0
- package/dist/chunk-dtmwr674.js +302 -0
- package/dist/chunk-dxfcyj8t.js +2 -0
- package/dist/chunk-e0460y7f.js +29 -0
- package/dist/chunk-ede7zpjf.js +2 -0
- package/dist/chunk-ehfzp7xe.js +2 -0
- package/dist/chunk-fd77g6t6.js +2 -0
- package/dist/chunk-fnkxbnka.js +30 -0
- package/dist/chunk-fvjh7rx0.js +84 -0
- package/dist/chunk-g19skgmw.js +18 -0
- package/dist/chunk-gcnrdgrq.js +3 -0
- package/dist/chunk-h2wpnxrh.js +8 -0
- package/dist/chunk-hb83d0qc.js +2 -0
- package/dist/chunk-hncp9gz6.js +8 -0
- package/dist/chunk-ht51fz7w.js +4 -0
- package/dist/chunk-hyrjade7.js +321 -0
- package/dist/chunk-hyyzp99b.js +2 -0
- package/dist/chunk-jpbk42j7.js +2 -0
- package/dist/chunk-jr5tp4ks.js +2 -0
- package/dist/chunk-k03b9z9e.js +898 -0
- package/dist/chunk-kjr22neh.js +3 -0
- package/dist/chunk-mjt5e2jy.js +2 -0
- package/dist/chunk-mkm91b6w.js +2 -0
- package/dist/chunk-mtr2f82n.js +2 -0
- package/dist/chunk-n8zpm7xb.js +397 -0
- package/dist/chunk-ndnc7k2n.js +22 -0
- package/dist/chunk-nenge2m2.js +2 -0
- package/dist/chunk-nngpktr2.js +2 -0
- package/dist/chunk-nsjyn31z.js +2 -0
- package/dist/chunk-nye9brje.js +147 -0
- package/dist/chunk-p5kp35dy.js +2 -0
- package/dist/chunk-pw0rzgpv.js +3 -0
- package/dist/chunk-q020t182.js +2 -0
- package/dist/chunk-q4gp9egt.js +4 -0
- package/dist/chunk-q8szpd6w.js +3 -0
- package/dist/chunk-q9n5swx7.js +3 -0
- package/dist/chunk-qpcwahse.js +2 -0
- package/dist/chunk-qz75kx6n.js +231 -0
- package/dist/chunk-r41nsgym.js +116 -0
- package/dist/chunk-r4qnvxhv.js +18 -0
- package/dist/chunk-r6p4ws0a.js +3809 -0
- package/dist/chunk-rdf7d42n.js +2 -0
- package/dist/chunk-rs2fa3g1.js +2 -0
- package/dist/chunk-ryjpp51z.js +499 -0
- package/dist/chunk-s018d32j.js +30 -0
- package/dist/chunk-spn8e3b3.js +2 -0
- package/dist/chunk-sry9atvv.js +2 -0
- package/dist/chunk-st5qggks.js +3 -0
- package/dist/chunk-tywvd1zc.js +11 -0
- package/dist/chunk-v3ryxw4v.js +2 -0
- package/dist/chunk-va9k88da.js +2 -0
- package/dist/chunk-vgk5v31k.js +216 -0
- package/dist/chunk-vj320kyr.js +2 -0
- package/dist/chunk-vr3qtsj4.js +2 -0
- package/dist/chunk-w0ng9e1m.js +341 -0
- package/dist/chunk-w29sv5jf.js +2 -0
- package/dist/chunk-whq99ytc.js +7987 -0
- package/dist/chunk-wnaddtv3.js +288 -0
- package/dist/chunk-wtengj6h.js +2 -0
- package/dist/chunk-x0ks1fer.js +1194 -0
- package/dist/chunk-x0zh76yv.js +4 -0
- package/dist/chunk-x13f5bbe.js +358 -0
- package/dist/chunk-xfp10a23.js +2 -0
- package/dist/chunk-xp3fp266.js +11 -0
- package/dist/chunk-xz019t7t.js +2 -0
- package/dist/chunk-y35rktea.js +12 -0
- package/dist/chunk-y4hkqsgw.js +4 -0
- package/dist/chunk-yab6d6kb.js +28 -0
- package/dist/chunk-yckd6ks5.js +3 -0
- package/dist/chunk-ycn1vnv2.js +5 -0
- package/dist/chunk-yf3bmmkk.js +8 -0
- package/dist/chunk-ygr11tgz.js +3 -0
- package/dist/chunk-ymccpdg6.js +351 -0
- package/dist/chunk-yr2wc2pa.js +3 -0
- package/dist/chunk-yv340gxj.js +2 -0
- package/dist/chunk-z2sp0k8d.js +3 -0
- package/dist/chunk-z5cm0bwn.js +11 -0
- package/dist/chunk-zda3hvde.js +14 -0
- package/dist/chunk-zgvga8rc.js +5 -0
- package/dist/chunk-zqbw8zqq.js +3 -0
- package/dist/cli.js +108 -27481
- package/dist/craft-entry.js +9 -5
- package/dist/craft.js +7 -18503
- package/dist/database.js +2 -2
- package/dist/pwa.js +8 -16603
- package/dist/ssg.js +52 -15512
- package/dist/variable-extractor.js +12 -2
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
package/dist/craft-entry.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tj as Nj,Uj as wj,Vj as Aj}from"./chunk-hncp9gz6.js";import{$j as _j,Xj as Uj,Yj as Xj,Zj as Yj,_j as Zj,ak as $j,bk as qj,ck as Fj,dk as Oj,ek as Vj,fk as Ij,gk as Qj,hk as Wj,ik as Kj}from"./chunk-4a4h28pp.js";import"./chunk-g19skgmw.js";import"./chunk-r6p4ws0a.js";import"./chunk-8src5smc.js";import"./chunk-gcnrdgrq.js";import"./chunk-xp3fp266.js";import"./chunk-nye9brje.js";import"./chunk-tywvd1zc.js";import"./chunk-cbc56wpd.js";import"./chunk-x0zh76yv.js";import"./chunk-0ae6chzd.js";import"./chunk-kjr22neh.js";import"./chunk-3952ykhb.js";import"./chunk-dtmwr674.js";import"./chunk-pw0rzgpv.js";var I=new Map,Q=new Map;function L(j,B){let G=B?.id||g(j),J=h(j),U=I.get(G);if(U&&U.hash===J)return U;let X=S(j),Z=y(j),Y=T(j),_=v(X),{staticParts:q,dynamicParts:$}=C(X),F=u(j),O={id:G,hash:J,tree:X,scripts:Z,styles:Y,staticParts:q,dynamicParts:$,dependencies:F,metadata:_};return I.set(G,O),O}async function r(j,B={},G={}){let J=performance.now();if(G.cache){let Y=`${j.id}:${JSON.stringify(B)}`,_=Q.get(Y);if(_&&Date.now()-_.timestamp<(G.cacheTTL||60000))return{html:_.html,styles:j.styles.join(`
|
|
3
|
+
`),scripts:j.scripts.join(`
|
|
4
|
+
`),metadata:{renderTime:0,cacheHit:!0,totalSize:_.html.length,componentCount:j.metadata.componentCount}}}let U;if(G.streaming)U=await H(j.tree,B);else U=W(j.tree,B);let X;if(G.hydrate){let Y=k(U,j,B);U=Y.html,X=Y.data}if(G.minify)U=x(U);if(G.cache){let Y=`${j.id}:${JSON.stringify(B)}`;Q.set(Y,{html:U,timestamp:Date.now()})}let Z=performance.now()-J;return{html:U,styles:j.styles.join(`
|
|
5
|
+
`),scripts:j.scripts.join(`
|
|
6
|
+
`),hydrationData:X,metadata:{renderTime:Z,cacheHit:!1,totalSize:U.length,componentCount:j.metadata.componentCount}}}function c(j,B){let G=[],J=[],U=[],X=new Map,Z=[];return K(j.tree,(Y,_)=>{if(Y.type==="component"&&Y.componentName){if(R(Y.componentName))G.push(Y.componentName)}if(Y.type==="element"&&Y.tag){let q=i(Y);if(q)Z.push(q);if(Y.props){for(let[$,F]of Object.entries(Y.props))if($.startsWith("on")&&typeof F==="string"){let O=`handler_${X.size}`;X.set(O,F)}}}if(Y.isStatic&&Y.type==="element")J.push(z(Y));else if(!Y.isStatic&&Y.type!=="text")U.push(Y.tag||Y.componentName||"unknown")}),{nativeComponents:G,staticHTML:J,dynamicParts:U,eventHandlers:X,nativeWidgets:Z}}function d(j,B={}){let G=L(j),J=f(G,B),U=new Map,X=[];return K(G.tree,(Z)=>{if(Z.type==="component"&&Z.componentName){if(R(Z.componentName)){X.push(Z.componentName);let Y=`<!--craft:${Z.componentName}:${Z.hydrationKey||"default"}-->`;U.set(Z.hydrationKey||Z.componentName,Y)}}}),{staticHTML:J,dynamicPlaceholders:U,craftComponents:X}}function S(j){let B={type:"fragment",children:[]},G=B,J=[B],U=j,X=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(U.length>0){let Z=U.match(/^<(@?[\w-]+)([^>]*)>/);if(Z){let[q,$,F]=Z,O=M(F),V=$.startsWith("@craft-"),N=V?$:$.toLowerCase(),w={type:V?"component":"element",tag:N,props:O,children:[],componentName:V?N.slice(1):void 0,isStatic:!A(F),hydrationKey:p()};if(G.children=G.children||[],G.children.push(w),!X.has(N)&&!F.endsWith("/"))J.push(w),G=w;U=U.slice(q.length);continue}let Y=U.match(/^<\/(@?[\w-]+)>/);if(Y){let[q,$]=Y,O=$.startsWith("@craft-")?$:$.toLowerCase();while(J.length>1){let V=J.pop();if(G=J[J.length-1],V.tag===O)break}U=U.slice(q.length);continue}let _=U.match(/^[^<]+/);if(_){let q=_[0];if(q.trim()){let $={type:"text",text:q,isStatic:!A(q)};G.children=G.children||[],G.children.push($)}U=U.slice(q.length);continue}U=U.slice(1)}return B}function M(j){let B={},G=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,J;while((J=G.exec(j))!==null){let[,U,X,Z,Y]=J,_=X??Z??Y??!0;B[U]=_}return B}function K(j,B,G=[]){if(B(j,G),j.children)j.children.forEach((J,U)=>{K(J,B,[...G,`${U}`])})}function W(j,B){switch(j.type){case"text":return E(j.text||"",B);case"element":case"component":{let G=j.tag||"div",J=D(j.props||{},B),U=(j.children||[]).map((X)=>W(X,B)).join("");if(!j.children||j.children.length===0){if(["input","br","hr","img","meta","link"].includes(G))return`<${G}${J} />`}return`<${G}${J}>${U}</${G}>`}case"fragment":return(j.children||[]).map((G)=>W(G,B)).join("");case"slot":return`<!--slot:${j.slotName||"default"}-->`;default:return""}}function z(j){if(j.type==="text")return j.text||"";let B=j.tag||"div",G=D(j.props||{},{});return`<${B}${G}></${B}>`}function D(j,B){let G=[];for(let[J,U]of Object.entries(j))if(U===!0)G.push(` ${J}`);else if(U!==!1&&U!==null&&U!==void 0){let X=E(String(U),B);G.push(` ${J}="${P(X)}"`)}return G.join("")}async function H(j,B){return W(j,B)}function f(j,B){let G=[];return K(j.tree,(J)=>{if(J.isStatic)G.push(W(J,B))}),G.join("")}function k(j,B,G){let J={templateId:B.id,context:G,dynamicParts:Array.from(B.dynamicParts.entries())},U=`
|
|
7
|
+
<script data-craft-hydration>
|
|
8
|
+
window.__CRAFT_HYDRATION__ = ${JSON.stringify(J)};
|
|
9
|
+
</script>`;return{html:j+U,data:J}}function v(j){let B=!1,G=!1,J=!1,U=!1,X=0,Z=0;function Y(_,q){if(Z=Math.max(Z,q),_.type==="slot")B=!0;if(_.type==="component")X++;if(!_.isStatic)G=!0;if(_.props)for(let $ of Object.keys(_.props)){if($.startsWith("on"))J=!0;if($==="@async"||$==="data-async")U=!0}if(_.children)_.children.forEach(($)=>Y($,q+1))}return Y(j,0),{hasSlots:B,hasDynamicContent:G,hasEventHandlers:J,hasAsyncContent:U,componentCount:X,maxDepth:Z,estimatedSize:JSON.stringify(j).length}}function C(j){let B=new Map,G=new Map;return K(j,(J,U)=>{let X=U.join(".");if(J.isStatic)B.set(X,z(J));else G.set(X,J.tag||J.componentName||"dynamic")}),{staticParts:B,dynamicParts:G}}function y(j){let B=[],G=/<script[^>]*>([\s\S]*?)<\/script>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function T(j){let B=[],G=/<style[^>]*>([\s\S]*?)<\/style>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function u(j){let B=[],G=/@include\s*\(\s*['"]([^'"]+)['"]/g,J;while((J=G.exec(j))!==null)B.push(J[1]);let U=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((J=U.exec(j))!==null)B.push(J[1]);let X=/<@craft-[\w-]+/g;while((J=X.exec(j))!==null)B.push(J[0].slice(2));return[...new Set(B)]}function A(j){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(j)}function E(j,B){let G=j.replace(/\{\{\s*(.+?)\s*\}\}/g,(J,U)=>{try{let X=b(U.trim(),B);return P(String(X??""))}catch{return""}});return G=G.replace(/\{!!\s*(.+?)\s*!!\}/g,(J,U)=>{try{let X=b(U.trim(),B);return String(X??"")}catch{return""}}),G}function b(j,B){if(/^[\w.]+$/.test(j)){let G=j.split("."),J=B;for(let U of G)if(J&&typeof J==="object"&&U in J)J=J[U];else return;return J}try{return Function(...Object.keys(B),`return ${j}`)(...Object.values(B))}catch{return}}function P(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function x(j){return j.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function g(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return`tpl_${Math.abs(B).toString(36)}`}function h(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return Math.abs(B).toString(36)}var m=0;function p(){return`h_${++m}`}function R(j){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(j)}function i(j){let B=j.tag?.toLowerCase(),G=j.props?.type,J={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},U=G?`${B}:${G}`:B,X=J[U||""]||J[B||""];if(X)return{htmlSelector:U||B||"",nativeComponent:X.component,confidence:X.confidence,reason:X.reason};return null}function s(){I.clear()}function l(){Q.clear()}function o(){s(),l()}function a(){return{templateCacheSize:I.size,renderCacheSize:Q.size,totalEntries:I.size+Q.size}}export{r as renderSSR,Vj as registerCraftComponent,Zj as processCraftDirective,Oj as processCraftComponents,d as prerenderForCraft,Yj as isCraftEnvironment,_j as injectCraftBridge,a as getSSRCacheStats,Ij as getCraftComponents,Wj as getAvailableTargets,Kj as getAvailableFormats,c as generateCraftOptimizations,Xj as generateCraftBridgeScript,Aj as createHotReloadServer,wj as compileToNative,L as compileTemplate,s as clearTemplateCache,l as clearRenderCache,o as clearAllCaches,Qj as buildNative,Nj as NATIVE_COMPONENTS,qj as CRAFT_COMPONENT_STYLES,Fj as CRAFT_COMPONENT_RUNTIME,$j as CRAFT_COMPONENTS,Uj as CRAFT_BRIDGE_SCRIPT};
|