@tuongaz/seeflow 0.1.3

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.
@@ -0,0 +1,3 @@
1
+ /*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE */function Tt(n,o){(o==null||o>n.length)&&(o=n.length);for(var r=0,s=Array(o);r<o;r++)s[r]=n[r];return s}function Qt(n){if(Array.isArray(n))return n}function en(n,o){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var s,f,u,C,U=[],B=!0,v=!1;try{if(u=(r=r.call(n)).next,o!==0)for(;!(B=(s=u.call(r)).done)&&(U.push(s.value),U.length!==o);B=!0);}catch(se){v=!0,f=se}finally{try{if(!B&&r.return!=null&&(C=r.return(),Object(C)!==C))return}finally{if(v)throw f}}return U}}function tn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nn(n,o){return Qt(n)||en(n,o)||on(n,o)||tn()}function on(n,o){if(n){if(typeof n=="string")return Tt(n,o);var r={}.toString.call(n).slice(8,-1);return r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set"?Array.from(n):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(n,o):void 0}}const Nt=Object.entries,gt=Object.setPrototypeOf,rn=Object.isFrozen,an=Object.getPrototypeOf,sn=Object.getOwnPropertyDescriptor;let O=Object.freeze,L=Object.seal,Z=Object.create,Lt=typeof Reflect<"u"&&Reflect,We=Lt.apply,je=Lt.construct;O||(O=function(o){return o});L||(L=function(o){return o});We||(We=function(o,r){for(var s=arguments.length,f=new Array(s>2?s-2:0),u=2;u<s;u++)f[u-2]=arguments[u];return o.apply(r,f)});je||(je=function(o){for(var r=arguments.length,s=new Array(r>1?r-1:0),f=1;f<r;f++)s[f-1]=arguments[f];return new o(...s)});const X=T(Array.prototype.forEach),ln=T(Array.prototype.lastIndexOf),_t=T(Array.prototype.pop),V=T(Array.prototype.push),cn=T(Array.prototype.splice),b=Array.isArray,ae=T(String.prototype.toLowerCase),Ue=T(String.prototype.toString),At=T(String.prototype.match),q=T(String.prototype.replace),Et=T(String.prototype.indexOf),fn=T(String.prototype.trim),un=T(Number.prototype.toString),mn=T(Boolean.prototype.toString),ht=typeof BigInt>"u"?null:T(BigInt.prototype.toString),St=typeof Symbol>"u"?null:T(Symbol.prototype.toString),m=T(Object.prototype.hasOwnProperty),re=T(Object.prototype.toString),S=T(RegExp.prototype.test),he=pn(TypeError);function T(n){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var r=arguments.length,s=new Array(r>1?r-1:0),f=1;f<r;f++)s[f-1]=arguments[f];return We(n,o,s)}}function pn(n){return function(){for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return je(n,r)}}function l(n,o){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae;if(gt&&gt(n,null),!b(o))return n;let s=o.length;for(;s--;){let f=o[s];if(typeof f=="string"){const u=r(f);u!==f&&(rn(o)||(o[s]=u),f=u)}n[f]=!0}return n}function dn(n){for(let o=0;o<n.length;o++)m(n,o)||(n[o]=null);return n}function I(n){const o=Z(null);for(const s of Nt(n)){var r=nn(s,2);const f=r[0],u=r[1];m(n,f)&&(b(u)?o[f]=dn(u):u&&typeof u=="object"&&u.constructor===Object?o[f]=I(u):o[f]=u)}return o}function Tn(n){switch(typeof n){case"string":return n;case"number":return un(n);case"boolean":return mn(n);case"bigint":return ht?ht(n):"0";case"symbol":return St?St(n):"Symbol()";case"undefined":return re(n);case"function":case"object":{if(n===null)return re(n);const o=n,r=J(o,"toString");if(typeof r=="function"){const s=r(o);return typeof s=="string"?s:re(s)}return re(n)}default:return re(n)}}function J(n,o){for(;n!==null;){const s=sn(n,o);if(s){if(s.get)return T(s.get);if(typeof s.value=="function")return T(s.value)}n=an(n)}function r(){return null}return r}function gn(n){try{return S(n,""),!0}catch{return!1}}const yt=O(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),He=O(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ze=O(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_n=O(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ge=O(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),An=O(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rt=O(["#text"]),bt=O(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Be=O(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ot=O(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Se=O(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),En=L(/{{[\w\W]*|^[\w\W]*}}/g),hn=L(/<%[\w\W]*|^[\w\W]*%>/g),Sn=L(/\${[\w\W]*/g),yn=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rn=L(/^aria-[\-\w]+$/),Dt=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bn=L(/^(?:\w+script|data):/i),On=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dn=L(/^html$/i),In=L(/^[a-z][.\w]*(-[.\w]+)+$/i),K={element:1,text:3,progressingInstruction:7,comment:8,document:9},Nn=function(){return typeof window>"u"?null:window},Ln=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let s=null;const f="data-tt-policy-suffix";r&&r.hasAttribute(f)&&(s=r.getAttribute(f));const u="dompurify"+(s?"#"+s:"");try{return o.createPolicy(u,{createHTML(C){return C},createScriptURL(C){return C}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},It=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ct(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nn();const o=a=>Ct(a);if(o.version="3.4.3",o.removed=[],!n||!n.document||n.document.nodeType!==K.document||!n.Element)return o.isSupported=!1,o;let r=n.document;const s=r,f=s.currentScript,u=n.DocumentFragment,C=n.HTMLTemplateElement,U=n.Node,B=n.Element,v=n.NodeFilter,se=n.NamedNodeMap,Mt=se===void 0?n.NamedNodeMap||n.MozNamedAttrMap:se,wt=n.HTMLFormElement,xt=n.DOMParser,le=n.trustedTypes,Q=B.prototype,Pt=J(Q,"cloneNode"),kt=J(Q,"remove"),vt=J(Q,"nextSibling"),Ft=J(Q,"childNodes"),ce=J(Q,"parentNode");if(typeof C=="function"){const a=r.createElement("template");a.content&&a.content.ownerDocument&&(r=a.content.ownerDocument)}let y,ee="";const fe=r,ye=fe.implementation,Ut=fe.createNodeIterator,Ht=fe.createDocumentFragment,zt=fe.getElementsByTagName,Gt=s.importNode;let R=It();o.isSupported=typeof Nt=="function"&&typeof ce=="function"&&ye&&ye.createHTMLDocument!==void 0;const ue=En,me=hn,pe=Sn,Bt=yn,Wt=Rn,jt=bn,Ye=On,Yt=In;let $e=Dt,_=null;const Xe=l({},[...yt,...He,...ze,...Ge,...Rt]);let h=null;const Ve=l({},[...bt,...Be,...Ot,...Se]);let p=Object.seal(Z(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,de=null;const F=Object.seal(Z(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let qe=!0,Re=!0,Ke=!1,Ze=!0,H=!1,ne=!0,z=!1,be=!1,Oe=!1,W=!1,Te=!1,ge=!1,Je=!0,Qe=!1;const et="user-content-";let De=!0,oe=!1,j={},x=null;const Ie=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let tt=null;const nt=l({},["audio","video","img","source","image","track"]);let Ne=null;const ot=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_e="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",P="http://www.w3.org/1999/xhtml";let Y=P,Le=!1,Ce=null;const $t=l({},[_e,Ae,P],Ue);let Me=l({},["mi","mo","mn","ms","mtext"]),we=l({},["annotation-xml"]);const Xt=l({},["title","style","font","a","script"]);let ie=null;const Vt=["application/xhtml+xml","text/html"],qt="text/html";let g=null,$=null;const Kt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},xe=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($&&$===e)return;(!e||typeof e!="object")&&(e={}),e=I(e),ie=Vt.indexOf(e.PARSER_MEDIA_TYPE)===-1?qt:e.PARSER_MEDIA_TYPE,g=ie==="application/xhtml+xml"?Ue:ae,_=m(e,"ALLOWED_TAGS")&&b(e.ALLOWED_TAGS)?l({},e.ALLOWED_TAGS,g):Xe,h=m(e,"ALLOWED_ATTR")&&b(e.ALLOWED_ATTR)?l({},e.ALLOWED_ATTR,g):Ve,Ce=m(e,"ALLOWED_NAMESPACES")&&b(e.ALLOWED_NAMESPACES)?l({},e.ALLOWED_NAMESPACES,Ue):$t,Ne=m(e,"ADD_URI_SAFE_ATTR")&&b(e.ADD_URI_SAFE_ATTR)?l(I(ot),e.ADD_URI_SAFE_ATTR,g):ot,tt=m(e,"ADD_DATA_URI_TAGS")&&b(e.ADD_DATA_URI_TAGS)?l(I(nt),e.ADD_DATA_URI_TAGS,g):nt,x=m(e,"FORBID_CONTENTS")&&b(e.FORBID_CONTENTS)?l({},e.FORBID_CONTENTS,g):Ie,te=m(e,"FORBID_TAGS")&&b(e.FORBID_TAGS)?l({},e.FORBID_TAGS,g):I({}),de=m(e,"FORBID_ATTR")&&b(e.FORBID_ATTR)?l({},e.FORBID_ATTR,g):I({}),j=m(e,"USE_PROFILES")?e.USE_PROFILES&&typeof e.USE_PROFILES=="object"?I(e.USE_PROFILES):e.USE_PROFILES:!1,qe=e.ALLOW_ARIA_ATTR!==!1,Re=e.ALLOW_DATA_ATTR!==!1,Ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ze=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,ne=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,ge=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Je=e.SANITIZE_DOM!==!1,Qe=e.SANITIZE_NAMED_PROPS||!1,De=e.KEEP_CONTENT!==!1,oe=e.IN_PLACE||!1,$e=gn(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Dt,Y=typeof e.NAMESPACE=="string"?e.NAMESPACE:P,Me=m(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS=="object"?I(e.MATHML_TEXT_INTEGRATION_POINTS):l({},["mi","mo","mn","ms","mtext"]),we=m(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS=="object"?I(e.HTML_INTEGRATION_POINTS):l({},["annotation-xml"]);const t=m(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING=="object"?I(e.CUSTOM_ELEMENT_HANDLING):Z(null);if(p=Z(null),m(t,"tagNameCheck")&&it(t.tagNameCheck)&&(p.tagNameCheck=t.tagNameCheck),m(t,"attributeNameCheck")&&it(t.attributeNameCheck)&&(p.attributeNameCheck=t.attributeNameCheck),m(t,"allowCustomizedBuiltInElements")&&typeof t.allowCustomizedBuiltInElements=="boolean"&&(p.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),H&&(Re=!1),Te&&(W=!0),j&&(_=l({},Rt),h=Z(null),j.html===!0&&(l(_,yt),l(h,bt)),j.svg===!0&&(l(_,He),l(h,Be),l(h,Se)),j.svgFilters===!0&&(l(_,ze),l(h,Be),l(h,Se)),j.mathMl===!0&&(l(_,Ge),l(h,Ot),l(h,Se))),F.tagCheck=null,F.attributeCheck=null,m(e,"ADD_TAGS")&&(typeof e.ADD_TAGS=="function"?F.tagCheck=e.ADD_TAGS:b(e.ADD_TAGS)&&(_===Xe&&(_=I(_)),l(_,e.ADD_TAGS,g))),m(e,"ADD_ATTR")&&(typeof e.ADD_ATTR=="function"?F.attributeCheck=e.ADD_ATTR:b(e.ADD_ATTR)&&(h===Ve&&(h=I(h)),l(h,e.ADD_ATTR,g))),m(e,"ADD_URI_SAFE_ATTR")&&b(e.ADD_URI_SAFE_ATTR)&&l(Ne,e.ADD_URI_SAFE_ATTR,g),m(e,"FORBID_CONTENTS")&&b(e.FORBID_CONTENTS)&&(x===Ie&&(x=I(x)),l(x,e.FORBID_CONTENTS,g)),m(e,"ADD_FORBID_CONTENTS")&&b(e.ADD_FORBID_CONTENTS)&&(x===Ie&&(x=I(x)),l(x,e.ADD_FORBID_CONTENTS,g)),De&&(_["#text"]=!0),z&&l(_,["html","head","body"]),_.table&&(l(_,["tbody"]),delete te.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,ee=y.createHTML("")}else y===void 0&&(y=Ln(le,f)),y!==null&&typeof ee=="string"&&(ee=y.createHTML(""));O&&O(e),$=e},rt=l({},[...He,...ze,..._n]),at=l({},[...Ge,...An]),Zt=function(e){let t=ce(e);(!t||!t.tagName)&&(t={namespaceURI:Y,tagName:"template"});const i=ae(e.tagName),c=ae(t.tagName);return Ce[e.namespaceURI]?e.namespaceURI===Ae?t.namespaceURI===P?i==="svg":t.namespaceURI===_e?i==="svg"&&(c==="annotation-xml"||Me[c]):!!rt[i]:e.namespaceURI===_e?t.namespaceURI===P?i==="math":t.namespaceURI===Ae?i==="math"&&we[c]:!!at[i]:e.namespaceURI===P?t.namespaceURI===Ae&&!we[c]||t.namespaceURI===_e&&!Me[c]?!1:!at[i]&&(Xt[i]||!rt[i]):!!(ie==="application/xhtml+xml"&&Ce[e.namespaceURI]):!1},M=function(e){V(o.removed,{element:e});try{ce(e).removeChild(e)}catch{kt(e)}},G=function(e,t){try{V(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch{V(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(W||Te)try{M(t)}catch{}else try{t.setAttribute(e,"")}catch{}},st=function(e){let t=null,i=null;if(Oe)e="<remove></remove>"+e;else{const d=At(e,/^[\r\n\t ]+/);i=d&&d[0]}ie==="application/xhtml+xml"&&Y===P&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=y?y.createHTML(e):e;if(Y===P)try{t=new xt().parseFromString(c,ie)}catch{}if(!t||!t.documentElement){t=ye.createDocument(Y,"template",null);try{t.documentElement.innerHTML=Le?ee:c}catch{}}const A=t.body||t.documentElement;return e&&i&&A.insertBefore(r.createTextNode(i),A.childNodes[0]||null),Y===P?zt.call(t,z?"html":"body")[0]:z?t.documentElement:A},lt=function(e){return Ut.call(e.ownerDocument||e,e,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT|v.SHOW_PROCESSING_INSTRUCTION|v.SHOW_CDATA_SECTION,null)},Pe=function(e){return e instanceof wt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Mt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},ke=function(e){return typeof U=="function"&&e instanceof U};function k(a,e,t){X(a,i=>{i.call(o,e,t,$)})}const ct=function(e){let t=null;if(k(R.beforeSanitizeElements,e,null),Pe(e))return M(e),!0;const i=g(e.nodeName);if(k(R.uponSanitizeElement,e,{tagName:i,allowedTags:_}),ne&&e.hasChildNodes()&&!ke(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent)||ne&&e.namespaceURI===P&&i==="style"&&ke(e.firstElementChild)||e.nodeType===K.progressingInstruction||ne&&e.nodeType===K.comment&&S(/<[/\w]/g,e.data))return M(e),!0;if(te[i]||!(F.tagCheck instanceof Function&&F.tagCheck(i))&&!_[i]){if(!te[i]&&ut(i)&&(p.tagNameCheck instanceof RegExp&&S(p.tagNameCheck,i)||p.tagNameCheck instanceof Function&&p.tagNameCheck(i)))return!1;if(De&&!x[i]){const c=ce(e)||e.parentNode,A=Ft(e)||e.childNodes;if(A&&c){const d=A.length;for(let D=d-1;D>=0;--D){const N=Pt(A[D],!0);c.insertBefore(N,vt(e))}}}return M(e),!0}return e instanceof B&&!Zt(e)||(i==="noscript"||i==="noembed"||i==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)?(M(e),!0):(H&&e.nodeType===K.text&&(t=e.textContent,X([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&(V(o.removed,{element:e.cloneNode()}),e.textContent=t)),k(R.afterSanitizeElements,e,null),!1)},ft=function(e,t,i){if(de[t]||Je&&(t==="id"||t==="name")&&(i in r||i in Kt))return!1;const c=h[t]||F.attributeCheck instanceof Function&&F.attributeCheck(t,e);if(!(Re&&!de[t]&&S(Bt,t))){if(!(qe&&S(Wt,t))){if(!c||de[t]){if(!(ut(e)&&(p.tagNameCheck instanceof RegExp&&S(p.tagNameCheck,e)||p.tagNameCheck instanceof Function&&p.tagNameCheck(e))&&(p.attributeNameCheck instanceof RegExp&&S(p.attributeNameCheck,t)||p.attributeNameCheck instanceof Function&&p.attributeNameCheck(t,e))||t==="is"&&p.allowCustomizedBuiltInElements&&(p.tagNameCheck instanceof RegExp&&S(p.tagNameCheck,i)||p.tagNameCheck instanceof Function&&p.tagNameCheck(i))))return!1}else if(!Ne[t]){if(!S($e,q(i,Ye,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Et(i,"data:")===0&&tt[e])){if(!(Ke&&!S(jt,q(i,Ye,"")))){if(i)return!1}}}}}}return!0},Jt=l({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ut=function(e){return!Jt[ae(e)]&&S(Yt,e)},mt=function(e){k(R.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||Pe(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:h,forceKeepAttr:void 0};let c=t.length;for(;c--;){const A=t[c],d=A.name,D=A.namespaceURI,N=A.value,w=g(d),Fe=N;let E=d==="value"?Fe:fn(Fe);if(i.attrName=w,i.attrValue=E,i.keepAttr=!0,i.forceKeepAttr=void 0,k(R.uponSanitizeAttribute,e,i),E=i.attrValue,Qe&&(w==="id"||w==="name")&&Et(E,et)!==0&&(G(d,e),E=et+E),ne&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,E)){G(d,e);continue}if(w==="attributename"&&At(E,"href")){G(d,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){G(d,e);continue}if(!Ze&&S(/\/>/i,E)){G(d,e);continue}H&&X([ue,me,pe],dt=>{E=q(E,dt," ")});const pt=g(e.nodeName);if(!ft(pt,w,E)){G(d,e);continue}if(y&&typeof le=="object"&&typeof le.getAttributeType=="function"&&!D)switch(le.getAttributeType(pt,w)){case"TrustedHTML":{E=y.createHTML(E);break}case"TrustedScriptURL":{E=y.createScriptURL(E);break}}if(E!==Fe)try{D?e.setAttributeNS(D,d,E):e.setAttribute(d,E),Pe(e)?M(e):_t(o.removed)}catch{G(d,e)}}k(R.afterSanitizeAttributes,e,null)},ve=function(e){let t=null;const i=lt(e);for(k(R.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)k(R.uponSanitizeShadowNode,t,null),ct(t),mt(t),t.content instanceof u&&ve(t.content);k(R.afterSanitizeShadowDOM,e,null)},Ee=function(e){if(e.nodeType===K.element&&e.shadowRoot instanceof u){const c=e.shadowRoot;Ee(c),ve(c)}const t=e.childNodes;if(!t)return;const i=[];X(t,c=>{V(i,c)});for(const c of i)Ee(c)};return o.sanitize=function(a){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,c=null,A=null;if(Le=!a,Le&&(a="<!-->"),typeof a!="string"&&!ke(a)&&(a=Tn(a),typeof a!="string"))throw he("dirty is not a string, aborting");if(!o.isSupported)return a;if(be||xe(e),o.removed=[],typeof a=="string"&&(oe=!1),oe){const N=a.nodeName;if(typeof N=="string"){const w=g(N);if(!_[w]||te[w])throw he("root node is forbidden and cannot be sanitized in-place")}Ee(a)}else if(a instanceof U)t=st("<!---->"),i=t.ownerDocument.importNode(a,!0),i.nodeType===K.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i),Ee(i);else{if(!W&&!H&&!z&&a.indexOf("<")===-1)return y&&ge?y.createHTML(a):a;if(t=st(a),!t)return W?null:ge?ee:""}t&&Oe&&M(t.firstChild);const d=lt(oe?a:t);for(;c=d.nextNode();)ct(c),mt(c),c.content instanceof u&&ve(c.content);if(oe)return a;if(W){if(H){t.normalize();let N=t.innerHTML;X([ue,me,pe],w=>{N=q(N,w," ")}),t.innerHTML=N}if(Te)for(A=Ht.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(h.shadowroot||h.shadowrootmode)&&(A=Gt.call(s,A,!0)),A}let D=z?t.outerHTML:t.innerHTML;return z&&_["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&S(Dn,t.ownerDocument.doctype.name)&&(D="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
3
+ `+D),H&&X([ue,me,pe],N=>{D=q(D,N," ")}),y&&ge?y.createHTML(D):D},o.setConfig=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xe(a),be=!0},o.clearConfig=function(){$=null,be=!1},o.isValidAttribute=function(a,e,t){$||xe({});const i=g(a),c=g(e);return ft(i,c,t)},o.addHook=function(a,e){typeof e=="function"&&V(R[a],e)},o.removeHook=function(a,e){if(e!==void 0){const t=ln(R[a],e);return t===-1?void 0:cn(R[a],t,1)[0]}return _t(R[a])},o.removeHooks=function(a){R[a]=[]},o.removeAllHooks=function(){R=It()},o}var Cn=Ct();export{Cn as default};
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>SeeFlow Studio</title>
7
+ <script type="module" crossorigin src="/assets/index-BlhIMoXf.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-CIpouxGY.css">
9
+ </head>
10
+ <body>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
@@ -0,0 +1,2 @@
1
+ // Placeholder — wire up to your running app to make this demo playable.
2
+ console.log("play triggered");
@@ -0,0 +1,250 @@
1
+ {
2
+ "version": 1,
3
+ "name": "E-Commerce Platform",
4
+ "nodes": [
5
+ {
6
+ "id": "client",
7
+ "type": "shapeNode",
8
+ "position": {
9
+ "x": 80,
10
+ "y": 215.5
11
+ },
12
+ "data": {
13
+ "shape": "user",
14
+ "name": "Customer",
15
+ "description": "Web / Mobile / Partner"
16
+ }
17
+ },
18
+ {
19
+ "id": "api-gateway",
20
+ "type": "playNode",
21
+ "position": {
22
+ "x": 320,
23
+ "y": 227
24
+ },
25
+ "data": {
26
+ "name": "API Gateway",
27
+ "kind": "gateway",
28
+ "stateSource": {
29
+ "kind": "request"
30
+ },
31
+ "description": "Auth, rate-limiting, routing.",
32
+ "detail": "## API Gateway\n\nCentral ingress for every client.\n\n- JWT validation before forwarding\n- Token-bucket rate limiting per user and IP\n- Path-based routing to downstream services\n- OpenTelemetry spans for every request\n\n### Routes\n- `POST /auth/*` → Auth Service\n- `GET /products/*` → Product Catalog\n- `POST /cart/*` → Cart Service\n- `POST /orders` → Order Service",
33
+ "playAction": {
34
+ "kind": "script",
35
+ "interpreter": "bun",
36
+ "args": [
37
+ "run"
38
+ ],
39
+ "scriptPath": "scripts/play.ts"
40
+ }
41
+ }
42
+ },
43
+ {
44
+ "id": "auth-service",
45
+ "type": "stateNode",
46
+ "position": {
47
+ "x": 660,
48
+ "y": 50
49
+ },
50
+ "data": {
51
+ "name": "Auth Service",
52
+ "kind": "service",
53
+ "stateSource": {
54
+ "kind": "request"
55
+ },
56
+ "description": "JWT issuance + OAuth2 / OIDC.",
57
+ "detail": "## Auth Service\n\n- Password login (bcrypt), OAuth2 (Google, Apple), magic-link\n- Access token: 15-min TTL, RS256 signed\n- Refresh token: 30-day TTL in Redis\n\n### Events\n- `auth.login` on success\n- `auth.token_refreshed` on refresh"
58
+ }
59
+ },
60
+ {
61
+ "id": "product-service",
62
+ "type": "stateNode",
63
+ "position": {
64
+ "x": 660,
65
+ "y": 218
66
+ },
67
+ "data": {
68
+ "name": "Product Catalog",
69
+ "kind": "service",
70
+ "stateSource": {
71
+ "kind": "request"
72
+ },
73
+ "description": "SKUs, variants, pricing, full-text search.",
74
+ "detail": "## Product Catalog\n\nSingle source of truth for products and search.\n\n- Products, variants, tiered pricing (B2B / B2C / promo)\n- Elasticsearch full-text search with BM25 ranking\n- Faceted filtering (brand, price, rating, availability)\n\n### Events\n- `product.updated` → re-indexes search"
75
+ }
76
+ },
77
+ {
78
+ "id": "cart-service",
79
+ "type": "playNode",
80
+ "position": {
81
+ "x": 660,
82
+ "y": 413
83
+ },
84
+ "data": {
85
+ "name": "Cart Service",
86
+ "kind": "service",
87
+ "stateSource": {
88
+ "kind": "request"
89
+ },
90
+ "description": "Add/remove items, apply coupons, checkout.",
91
+ "detail": "## Cart Service\n\nPer-user cart stored in Redis.\n\n- `addItem(sku, qty)` — validates stock, adds line item\n- `applyCoupon(code)` — validates and applies discount\n- `checkout()` — freezes cart, emits `cart.checkout`\n\n### Events Emitted\n- `cart.checkout` → Order Service",
92
+ "playAction": {
93
+ "kind": "script",
94
+ "interpreter": "bun",
95
+ "args": [
96
+ "run"
97
+ ],
98
+ "scriptPath": "scripts/play.ts"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "id": "order-service",
104
+ "type": "playNode",
105
+ "position": {
106
+ "x": 1000,
107
+ "y": 413
108
+ },
109
+ "data": {
110
+ "name": "Order Service",
111
+ "kind": "worker",
112
+ "stateSource": {
113
+ "kind": "event"
114
+ },
115
+ "description": "pending → confirmed → shipped → delivered.",
116
+ "detail": "## Order Service\n\nOwns the order record and drives the downstream pipeline.\n\n### State Machine\n```\npending → confirmed → processing → shipped → delivered\n ↘ cancelled\n```\n\n### Triggered by\n- `cart.checkout` event\n\n### Events Emitted\n- `order.created` → Payment Service\n- `order.cancelled` → Notification Service",
117
+ "playAction": {
118
+ "kind": "script",
119
+ "interpreter": "bun",
120
+ "args": [
121
+ "run"
122
+ ],
123
+ "scriptPath": "scripts/play.ts"
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "id": "payment-service",
129
+ "type": "stateNode",
130
+ "position": {
131
+ "x": 1340,
132
+ "y": 349
133
+ },
134
+ "data": {
135
+ "name": "Payment Service",
136
+ "kind": "worker",
137
+ "stateSource": {
138
+ "kind": "event"
139
+ },
140
+ "description": "Stripe + PayPal gateway integration.",
141
+ "detail": "## Payment Service\n\nCharges the customer and records the transaction.\n\n### Triggered by\n- `order.created`\n\n### Steps\n1. Retrieve saved payment method\n2. Authorise charge via Stripe\n3. Capture funds\n4. Persist charge record\n\n### Events Emitted\n- `payment.captured` → Notification Service\n- `payment.failed` → Notification Service"
142
+ }
143
+ },
144
+ {
145
+ "id": "notification-service",
146
+ "type": "stateNode",
147
+ "position": {
148
+ "x": 1680,
149
+ "y": 339
150
+ },
151
+ "data": {
152
+ "name": "Notification Service",
153
+ "kind": "worker",
154
+ "stateSource": {
155
+ "kind": "event"
156
+ },
157
+ "description": "Email + SMS + push via AWS SES / SNS.",
158
+ "detail": "## Notification Service\n\nDelivers transactional messages.\n\n### Channels\n- **Email** — AWS SES with DKIM/DMARC\n- **SMS** — Twilio for OTP and shipping alerts\n- **Push** — Firebase Cloud Messaging\n\n### Triggered by\n- `payment.captured` — order confirmation\n- `payment.failed` — retry prompt\n- `order.cancelled` — refund notification"
159
+ }
160
+ },
161
+ {
162
+ "id": "postgresql",
163
+ "type": "shapeNode",
164
+ "position": {
165
+ "x": 1720,
166
+ "y": 507
167
+ },
168
+ "data": {
169
+ "shape": "database",
170
+ "name": "PostgreSQL",
171
+ "description": "Orders, users, products — primary OLTP store"
172
+ }
173
+ }
174
+ ],
175
+ "connectors": [
176
+ {
177
+ "id": "c-client-api",
178
+ "source": "client",
179
+ "target": "api-gateway",
180
+ "kind": "http",
181
+ "method": "POST",
182
+ "label": "REST API"
183
+ },
184
+ {
185
+ "id": "c-api-auth",
186
+ "source": "api-gateway",
187
+ "target": "auth-service",
188
+ "kind": "http",
189
+ "method": "POST",
190
+ "label": "POST /auth"
191
+ },
192
+ {
193
+ "id": "c-api-product",
194
+ "source": "api-gateway",
195
+ "target": "product-service",
196
+ "kind": "http",
197
+ "method": "GET",
198
+ "label": "GET /products"
199
+ },
200
+ {
201
+ "id": "c-api-cart",
202
+ "source": "api-gateway",
203
+ "target": "cart-service",
204
+ "kind": "http",
205
+ "method": "POST",
206
+ "label": "POST /cart"
207
+ },
208
+ {
209
+ "id": "c-cart-order",
210
+ "source": "cart-service",
211
+ "target": "order-service",
212
+ "kind": "event",
213
+ "eventName": "cart.checkout",
214
+ "label": "cart.checkout"
215
+ },
216
+ {
217
+ "id": "c-order-payment",
218
+ "source": "order-service",
219
+ "target": "payment-service",
220
+ "kind": "event",
221
+ "eventName": "order.created",
222
+ "label": "order.created"
223
+ },
224
+ {
225
+ "id": "c-payment-notify",
226
+ "source": "payment-service",
227
+ "target": "notification-service",
228
+ "kind": "event",
229
+ "eventName": "payment.captured",
230
+ "label": "payment.captured"
231
+ },
232
+ {
233
+ "id": "c-order-pg",
234
+ "source": "order-service",
235
+ "target": "postgresql",
236
+ "kind": "http",
237
+ "method": "POST",
238
+ "label": "read/write"
239
+ },
240
+ {
241
+ "id": "c-payment-pg",
242
+ "source": "payment-service",
243
+ "target": "postgresql",
244
+ "kind": "http",
245
+ "method": "POST",
246
+ "label": "read/write"
247
+ }
248
+ ]
249
+ }
250
+
@@ -0,0 +1,18 @@
1
+ const demoId = process.env.SEEFLOW_DEMO_ID ?? '';
2
+ const runId = process.env.SEEFLOW_RUN_ID ?? '';
3
+ const studioUrl = (process.env.SEEFLOW_STUDIO_URL ?? 'http://localhost:4321').replace(/\/+$/, '');
4
+
5
+ const res = await fetch(`${studioUrl}/demo/orders`, {
6
+ method: 'POST',
7
+ headers: {
8
+ 'content-type': 'application/json',
9
+ 'x-seeflow-demo-id': demoId,
10
+ 'x-seeflow-run-id': runId,
11
+ },
12
+ body: JSON.stringify({ customerId: 'cust_123', items: [{ sku: 'WIDGET-1', qty: 2 }] }),
13
+ });
14
+
15
+ if (!res.ok) {
16
+ console.error(`POST /demo/orders failed: ${res.status}`);
17
+ process.exit(1);
18
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "version": 1,
3
+ "name": "Order Pipeline",
4
+ "nodes": [
5
+ {
6
+ "id": "post-orders",
7
+ "type": "playNode",
8
+ "position": { "x": 50, "y": 200 },
9
+ "data": {
10
+ "name": "POST /orders",
11
+ "kind": "service",
12
+ "stateSource": { "kind": "request" },
13
+ "description": "Creates order, kicks off the pipeline.",
14
+ "detail": "## POST /orders\n\nEntry point for the order pipeline. Accepts a customer ID and list of line items, creates an order record, and publishes the `order.created` event to kick off downstream processing.\n\n### Request\n```json\n{\n \"customerId\": \"cust_123\",\n \"items\": [{ \"sku\": \"WIDGET-1\", \"qty\": 2 }]\n}\n```\n\n### Response\n```json\n{ \"orderId\": \"ord_1234567890\" }\n```\n\n### Emits\n- `order.created` → Inventory Service",
15
+ "playAction": {
16
+ "kind": "script",
17
+ "interpreter": "bun",
18
+ "args": ["run"],
19
+ "scriptPath": "scripts/play.ts"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "id": "inventory-service",
25
+ "type": "stateNode",
26
+ "position": { "x": 350, "y": 200 },
27
+ "data": {
28
+ "name": "Inventory Service",
29
+ "kind": "worker",
30
+ "stateSource": { "kind": "event" },
31
+ "description": "Reserves stock.",
32
+ "detail": "## Inventory Service\n\nListens for `order.created` and attempts to reserve the requested stock in the warehouse. Checks available quantity, places a hold on the items, and records the warehouse location.\n\n### Triggered by\n- `order.created`\n\n### Logic\n1. Look up each SKU in the warehouse\n2. Verify sufficient quantity is available\n3. Place a reservation hold\n4. Record the fulfilling warehouse ID\n\n### Emits\n- `stock.reserved` → Payment Service\n\n### Payload\n```json\n{\n \"reserved\": true,\n \"warehouseId\": \"wh_sydney\"\n}\n```"
33
+ }
34
+ },
35
+ {
36
+ "id": "payment-service",
37
+ "type": "stateNode",
38
+ "position": { "x": 650, "y": 200 },
39
+ "data": {
40
+ "name": "Payment Service",
41
+ "kind": "worker",
42
+ "stateSource": { "kind": "event" },
43
+ "description": "Charges card.",
44
+ "detail": "## Payment Service\n\nListens for `stock.reserved` and charges the customer's card on file. Integrates with the payment gateway to authorise and capture funds for the order total.\n\n### Triggered by\n- `stock.reserved`\n\n### Logic\n1. Retrieve customer's saved payment method\n2. Calculate order total (items + tax + shipping)\n3. Authorise charge with payment gateway\n4. Capture funds and record the charge ID\n\n### Emits\n- `payment.captured` → Fulfillment Service\n\n### Payload\n```json\n{\n \"chargeId\": \"ch_1234567890\",\n \"amount\": 4999\n}\n```"
45
+ }
46
+ },
47
+ {
48
+ "id": "fulfillment-service",
49
+ "type": "stateNode",
50
+ "position": { "x": 950, "y": 200 },
51
+ "data": {
52
+ "name": "Fulfillment Service",
53
+ "kind": "worker",
54
+ "stateSource": { "kind": "event" },
55
+ "description": "Enqueues shipment.",
56
+ "detail": "## Fulfillment Service\n\nListens for `payment.captured` and enqueues a shipment job for the warehouse to pick, pack, and dispatch the order. Assigns a tracking ID and notifies the customer.\n\n### Triggered by\n- `payment.captured`\n\n### Logic\n1. Convert the stock reservation into a pick list\n2. Assign a carrier and service level\n3. Generate a shipment ID and tracking number\n4. Push the job to the warehouse queue\n5. Send dispatch confirmation to the customer\n\n### Payload\n```json\n{\n \"shipmentId\": \"shp_1234567890\",\n \"orderId\": \"ord_1234567890\"\n}\n```"
57
+ }
58
+ }
59
+ ],
60
+ "connectors": [
61
+ {
62
+ "id": "c1",
63
+ "source": "post-orders",
64
+ "target": "inventory-service",
65
+ "kind": "event",
66
+ "eventName": "order.created",
67
+ "label": "order.created"
68
+ },
69
+ {
70
+ "id": "c2",
71
+ "source": "inventory-service",
72
+ "target": "payment-service",
73
+ "kind": "event",
74
+ "eventName": "stock.reserved",
75
+ "label": "stock.reserved"
76
+ },
77
+ {
78
+ "id": "c3",
79
+ "source": "payment-service",
80
+ "target": "fulfillment-service",
81
+ "kind": "event",
82
+ "eventName": "payment.captured",
83
+ "label": "payment.captured"
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,11 @@
1
+ # Order Pipeline — SeeFlow Example
2
+
3
+ A four-stage e-commerce pipeline (Order → Inventory → Payment → Fulfillment) served directly by the SeeFlow studio. Hit **Play** on the canvas and watch each service light up in sequence as events flow through the chain.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ seeflow start
9
+ ```
10
+
11
+ SeeFlow registers this example automatically on first launch. Open the studio at `http://localhost:4321` and click **Play** on the **POST /orders** node.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "order-pipeline",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module"
6
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@tuongaz/seeflow",
3
+ "version": "0.1.3",
4
+ "description": "Local studio that hosts file-defined demos as React Flow canvases wired to a running app via REST + SSE + Zod schema.",
5
+ "keywords": [
6
+ "seeflow",
7
+ "react-flow",
8
+ "diagram",
9
+ "architecture",
10
+ "playable",
11
+ "studio",
12
+ "hono",
13
+ "bun"
14
+ ],
15
+ "homepage": "https://github.com/tuongaz/seeflow#readme",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/tuongaz/seeflow.git",
19
+ "directory": "apps/studio"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/tuongaz/seeflow/issues"
23
+ },
24
+ "license": "MIT",
25
+ "author": "Tuong Le",
26
+ "type": "module",
27
+ "bin": {
28
+ "seeflow": "bin/seeflow",
29
+ "seeflow-mcp": "bin/seeflow-mcp"
30
+ },
31
+ "files": ["bin", "src", "!src/**/*.test.ts", "dist/web", "public", "examples", "README.md"],
32
+ "engines": {
33
+ "node": ">=18"
34
+ },
35
+ "scripts": {
36
+ "typecheck": "tsc --noEmit",
37
+ "dev": "NODE_ENV=development bun --hot run src/cli.ts start",
38
+ "start": "bun run src/cli.ts start",
39
+ "test": "bun test",
40
+ "build:web": "cd ../web && bun run build",
41
+ "prepublishOnly": "bun run build:web && cp ../../README.md ./README.md"
42
+ },
43
+ "dependencies": {
44
+ "@modelcontextprotocol/sdk": "^1.29.0",
45
+ "dagre": "^0.8.5",
46
+ "hono": "^4.6.14",
47
+ "zod": "^3.23.8",
48
+ "zod-to-json-schema": "^3.25.2"
49
+ },
50
+ "devDependencies": {
51
+ "@types/bun": "^1.1.14",
52
+ "@types/dagre": "^0.7.54",
53
+ "typescript": "^5.6.3"
54
+ }
55
+ }