@galacean/cli 2.0.0-alpha.11 → 2.0.0-alpha.12
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/cli.bundle.cjs +3084 -2863
- package/dist/viewport-client/_static/Accordion-4897319b.js +6 -0
- package/dist/viewport-client/_static/AmbientLightAsset-f70b95f1.js +5 -0
- package/dist/viewport-client/_static/AnimationClipAsset-01f3deb6.js +1 -0
- package/dist/viewport-client/_static/AnimatorControllerAsset-b7424e9c.js +1 -0
- package/dist/viewport-client/_static/AnimatorStore-fd98c00e.js +1 -0
- package/dist/viewport-client/_static/AssetPreviewer-24e31d97.js +6 -0
- package/dist/viewport-client/_static/AssetViewer-bc198e16.js +1 -0
- package/dist/viewport-client/_static/AudioAsset-eae03324.js +1 -0
- package/dist/viewport-client/_static/AudioComponent-44070c2c.js +1 -0
- package/dist/viewport-client/_static/Callout-cb4a55ff.js +1 -0
- package/dist/viewport-client/_static/CameraComponent-907ac745.js +1 -0
- package/dist/viewport-client/_static/CanvasRenderer-9dd98cb3.js +1 -0
- package/dist/viewport-client/_static/Component-f923abb1.js +1 -0
- package/dist/viewport-client/_static/DirectLight-58f5fe9e.js +1 -0
- package/dist/viewport-client/_static/FontAsset-abfb9a8a.js +5 -0
- package/dist/viewport-client/_static/FormItemArray-66be8701.js +1 -0
- package/dist/viewport-client/_static/GlTFAsset-9c68f862.js +20 -0
- package/dist/viewport-client/_static/IconPlayerPlayFilled-b058c98f.js +6 -0
- package/dist/viewport-client/_static/IconPointFilled-a304fd34.js +6 -0
- package/dist/viewport-client/_static/InstanceEditorAsset-a70e73fe.js +1 -0
- package/dist/viewport-client/_static/LightBaseComponent-fbc3ae49.js +1 -0
- package/dist/viewport-client/_static/LottieAnimationComponent-1c3e02a5.js +1 -0
- package/dist/viewport-client/_static/LottieAsset-377c1419.js +1 -0
- package/dist/viewport-client/_static/MarkdownAsset-7ea387a9.js +1 -0
- package/dist/viewport-client/_static/MaterialAsset-74a15124.js +1 -0
- package/dist/viewport-client/_static/MaterialInspector-aec1248b.js +1 -0
- package/dist/viewport-client/_static/Menu-cd3be298.js +17 -0
- package/dist/viewport-client/_static/MeshAsset-73e2cc8e.js +1 -0
- package/dist/viewport-client/_static/MeshRendererBaseComponent-3a0e09ed.js +1 -0
- package/dist/viewport-client/_static/MeshRendererComponent-5385d30f.js +1 -0
- package/dist/viewport-client/_static/MeshThumbnail-49273f71.js +1 -0
- package/dist/viewport-client/_static/ParticleRendererComponent-5a7b57d9.js +21 -0
- package/dist/viewport-client/_static/PhysicsMaterialAsset-a5ac9f82.js +1 -0
- package/dist/viewport-client/_static/PhysicsStore-0729e76d.js +1 -0
- package/dist/viewport-client/_static/PointLight-0e1d1546.js +1 -0
- package/dist/viewport-client/_static/PostProcessComponent-8276d33c.js +1 -0
- package/dist/viewport-client/_static/PrefabAsset-1a7edfbd.js +1 -0
- package/dist/viewport-client/_static/PrimitiveMesh-3ce6fa2f.js +1 -0
- package/dist/viewport-client/_static/ProxyConfigs-4de3304c.js +1 -0
- package/dist/viewport-client/_static/ReferencedMaterial-a87818f3.js +1 -0
- package/dist/viewport-client/_static/RenderTargetAsset-33c0d9e7.js +1 -0
- package/dist/viewport-client/_static/SceneAsset-8917c210.js +1 -0
- package/dist/viewport-client/_static/ShaderAsset-cb3ff628.js +185 -0
- package/dist/viewport-client/_static/ShaderChunkAsset-83f923f4.js +5 -0
- package/dist/viewport-client/_static/ShaderUIScriptAsset-d13fa4e2.js +516 -0
- package/dist/viewport-client/_static/SkinnedMeshRendererComponent-2a8323bf.js +1 -0
- package/dist/viewport-client/_static/SpineAnimationComponent-e733d50f.js +1 -0
- package/dist/viewport-client/_static/SpineSkeletonDataAsset-b64a3ee3.js +1 -0
- package/dist/viewport-client/_static/SpotLight-ca6c0c3b.js +1 -0
- package/dist/viewport-client/_static/SpriteAsset-9a31ec24.js +1 -0
- package/dist/viewport-client/_static/SpriteAtlasAsset-a862db46.js +1 -0
- package/dist/viewport-client/_static/SpriteBaseComponent-f6f1731f.js +1 -0
- package/dist/viewport-client/_static/SpriteMaskComponent-778be04f.js +1 -0
- package/dist/viewport-client/_static/SpriteRendererComponent-2b4d153b.js +1 -0
- package/dist/viewport-client/_static/TaskQueue-05c94a4d.js +1 -0
- package/dist/viewport-client/_static/TextBaseComponent-69233798.js +11 -0
- package/dist/viewport-client/_static/TextRendererComponent-130b4e99.js +1 -0
- package/dist/viewport-client/_static/TextureAsset-28fedf2a.js +36 -0
- package/dist/viewport-client/_static/ThumbnailMixin-35997457.js +1 -0
- package/dist/viewport-client/_static/ThumbnailRegistry-495c18c9.js +1 -0
- package/dist/viewport-client/_static/Tooltip-33f770ba.js +1 -0
- package/dist/viewport-client/_static/TrailRendererComponent-148550b5.js +1 -0
- package/dist/viewport-client/_static/TransformBaseComponent-02318c5a.js +1 -0
- package/dist/viewport-client/_static/TransformComponent-96106065.js +1 -0
- package/dist/viewport-client/_static/ViewerManager-202b570a.js +1 -0
- package/dist/viewport-client/_static/XRReferenceImageAsset-6a6adb3b.js +1 -0
- package/dist/viewport-client/_static/assetEditorActions-c4e5962f.js +1 -0
- package/dist/viewport-client/_static/audio-244358e2.js +1 -0
- package/dist/viewport-client/_static/bundlers-9b0d37fc.js +1 -0
- package/dist/viewport-client/_static/createOnModelChange-b57a0da8.js +1 -0
- package/dist/viewport-client/_static/encode-ac4bb64e.js +1 -0
- package/dist/viewport-client/_static/enum-58295f88.js +1 -0
- package/dist/viewport-client/_static/glTFIO-45ff9a17.js +1 -0
- package/dist/viewport-client/_static/index-0a8702e2.js +11217 -0
- package/dist/viewport-client/_static/index-237c84cd.js +20 -0
- package/dist/viewport-client/_static/index-37c74ae9.js +26 -0
- package/dist/viewport-client/_static/index-4cca0201.js +1 -0
- package/dist/viewport-client/_static/index-59732f86.js +1 -0
- package/dist/viewport-client/_static/index-6c8198f6.js +2 -0
- package/dist/viewport-client/_static/index-6f827618.js +1 -0
- package/dist/viewport-client/_static/index-803ca489.js +1 -0
- package/dist/viewport-client/_static/index-85a6cf6a.js +1 -0
- package/dist/viewport-client/_static/index-98982ce2.js +1 -0
- package/dist/viewport-client/_static/index-b3d51f87.js +1 -0
- package/dist/viewport-client/_static/index-be6bc38a.js +177 -0
- package/dist/viewport-client/_static/index-c403cbcd.js +1 -0
- package/dist/viewport-client/_static/index-e46ec5b1.js +16 -0
- package/dist/viewport-client/_static/index-e73966ae.js +1 -0
- package/dist/viewport-client/_static/index-e95b4498.js +1 -0
- package/dist/viewport-client/_static/index-f5a67a46.js +1 -0
- package/dist/viewport-client/_static/ktx-parse.modern-6c9f771f.js +1 -0
- package/dist/viewport-client/_static/ktx2-encoder-1e63c1eb.js +1 -0
- package/dist/viewport-client/_static/ktx2-worker-a04f41ea.js +1 -0
- package/dist/viewport-client/_static/meshopt_simplifier.module-cd99529d.js +1 -0
- package/dist/viewport-client/_static/module-107b7430.js +56 -0
- package/dist/viewport-client/_static/module-5c85b07e.js +1 -0
- package/dist/viewport-client/_static/module-6406b050.js +1 -0
- package/dist/viewport-client/_static/postmen-45d4c238.js +1 -0
- package/dist/viewport-client/_static/scriptPropertyActions-d3a583d2.js +1 -0
- package/dist/viewport-client/_static/utilities-e09052e3.js +11 -0
- package/dist/viewport-client/index.html +20 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as wt,W as ct,X as tt,Y as bt,Z as F,_ as q,$ as it,a0 as xt,a1 as Pt,a2 as St,a3 as nt,a4 as zt,a as At,S as Lt,a5 as W,a6 as st,a7 as et,a8 as Tt,a9 as Mt}from"./index-0a8702e2.js";function ot(a,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}function Rt(a,n,i){return n&&ot(a.prototype,n),i&&ot(a,i),a}function Y(a,n){return Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Y(a,n)}function A(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),n&&Y(a,n)}function O(a,n,i,t){var e=arguments.length,r=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,i):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(a,n,i,t);else for(var o=a.length-1;o>=0;o--)(s=a[o])&&(r=(e<3?s(r):e>3?s(n,i,r):s(n,i))||r);return e>3&&r&&Object.defineProperty(n,i,r),r}var Ot=4,It=.001,Ct=1e-7,Vt=10,D=11,N=1/(D-1),Ft=typeof Float32Array=="function";function _t(a,n){return 1-3*n+3*a}function dt(a,n){return 3*n-6*a}function yt(a){return 3*a}function G(a,n,i){return((_t(n,i)*a+dt(n,i))*a+yt(n))*a}function gt(a,n,i){return 3*_t(n,i)*a*a+2*dt(n,i)*a+yt(n)}function Ut(a,n,i,t,e){var r,s,o=0;do s=n+(i-n)/2,r=G(s,t,e)-a,r>0?i=s:n=s;while(Math.abs(r)>Ct&&++o<Vt);return s}function Bt(a,n,i,t){for(var e=0;e<Ot;++e){var r=gt(n,i,t);if(r===0)return n;var s=G(n,i,t)-a;n-=s/r}return n}function jt(a){return a}var Dt=function(n,i,t,e){if(!(0<=n&&n<=1&&0<=t&&t<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===i&&t===e)return jt;for(var r=Ft?new Float32Array(D):new Array(D),s=0;s<D;++s)r[s]=G(s*N,n,t);function o(u){for(var h=0,f=1,l=D-1;f!==l&&r[f]<=u;++f)h+=N;--f;var p=(u-r[f])/(r[f+1]-r[f]),c=h+p*N,v=gt(c,n,t);return v>=It?Bt(u,c,n,t):v===0?c:Ut(u,h,h+N,n,t)}return function(h){return h===0?0:h===1?1:G(o(h),i,e)}},at=200,ht={};function qt(a,n,i,t,e){var r=e||("bez_"+a+"_"+n+"_"+i+"_"+t).replace(/\./g,"p"),s=ht[r];return s||(s=Dt(a,n,i,t),ht[r]=s,s)}var J={};function Nt(a,n,i,t,e){var r=e?Math.min(e,at):at,s=(a[0]+"_"+a[1]+"_"+n[0]+"_"+n[1]+"_"+i[0]+"_"+i[1]+"_"+t[0]+"_"+t[1]+"_"+r).replace(/\./g,"p");if(!J[s]){for(var o=0,u,h=[],f=0;f<r;f++){for(var l=i.length,p=new Array(l),c=f/(r-1),v=0,_=0;_<l;_+=1){var d=Math.pow(1-c,3)*a[_]+3*Math.pow(1-c,2)*c*(a[_]+i[_])+3*(1-c)*Math.pow(c,2)*(n[_]+t[_])+Math.pow(c,3)*n[_];p[_]=d,u&&(v+=Math.pow(p[_]-u[_],2))}v=Math.sqrt(v),o+=v,h.push({partialLength:v,point:p}),u=p}J[s]={segmentLength:o,points:h}}return J[s]}var K={buildBezierData:Nt,getBezierEasing:qt},L={euclideanModulo:function(n,i){return(n%i+i)%i},codomainBounce:function(n,i,t){return n<i?2*i-n:n>t?2*t-n:n},clamp:function(n,i,t){return n<i?i:n>t?t:n}},mt=/(loopIn|loopOut)\(([^)]+)/,Wt=/["']\w+["']/,ut=function(){function a(i,t,e){this.begin=t,this.end=e,this.total=this.end-this.begin,this.type=i}var n=a.prototype;return n.update=function(t){if(this.type==="in")return t>=this.begin?t:this.end-L.euclideanModulo(this.begin-t,this.total);if(this.type==="out")return t<=this.end?t:this.begin+L.euclideanModulo(t-this.end,this.total)},a}(),lt=function(){function a(i,t,e){this.begin=t,this.end=e,this.total=this.end-this.begin,this.type=i}var n=a.prototype;return n.update=function(t){if(this.type==="in"&&t<this.begin||this.type==="out"&&t>this.end){var e=t-this.end;return this.pingpong(e)}return t},n.pingpong=function(t){var e=Math.floor(t/this.total)%2;return e?this.begin+L.euclideanModulo(t,this.total):this.end-L.euclideanModulo(t,this.total)},a}(),ft={loopIn:function(n,i,t){var e=n[0].t,r=n.length-1,s=Math.min(r,t),o=n[s].t;switch(i){case"cycle":return new ut("in",e,o);case"pingpong":return new lt("in",e,o)}return null},loopOut:function(n,i,t){var e=n.length-1,r=Math.max(0,e-t),s=n[r].t,o=n[e].t;switch(i){case"cycle":return new ut("out",s,o);case"pingpong":return new lt("out",s,o)}return null}};function Gt(a){var n=a.split(/\s*,\s*/);return n.map(function(i){return Wt.test(i)?i.replace(/"|'/g,""):parseInt(i)})}function Kt(a){var n=a.match(mt),i=Gt(n[2]);return{name:n[1],mode:i[0],offset:i[1]}}function Zt(a){return a.x&&mt.test(a.x)}function $t(a){var n=Kt(a.x),i=n.name,t=n.mode,e=n.offset,r=e===void 0?0:e,s=r===0?a.k.length-1:r;return ft[i]&&ft[i](a.k,t,s)}var Z={hasSupportExpression:Zt,getExpression:$t},k=function(){function a(i,t){this.mult=t||1,this.value=i.k,this.animated=i.a,Z.hasSupportExpression(i)&&(this.expression=Z.getExpression(i))}var n=a.prototype;return n.getValue=function(t,e,r,s){var o,u=r.t,h=s.t,f=r.s[e],l=(s.s||r.e)[e];if(r.h===1)return f;if(t>=h)o=1;else if(t<u)o=0;else{var p=r.beziers[e];p||(typeof r.o.x=="number"?p=K.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y):p=K.getBezierEasing(r.o.x[e],r.o.y[e],r.i.x[e],r.i.y[e]),r.beziers[e]=p),o=p((t-u)/(h-u))}return f+(l-f)*o},n.reset=function(){},a}(),kt=function(a){A(n,a);function n(t,e){e===void 0&&(e=1);var r;return r=a.call(this,t,e)||this,r.v=e?r.value*e:r.value,r}var i=n.prototype;return i.update=function(){this.v=this.value*this.mult},n}(k),Ht=function(a){A(n,a);function n(t,e){e===void 0&&(e=1);var r;r=a.call(this,t,e)||this;var s=r.value.length;r.v=new Float32Array(s),r.newValue=new Float32Array(s);for(var o=0;o<s;o+=1)r.v[o]=r.value[o]*r.mult;return r}var i=n.prototype;return i.update=function(){var e;e=this.value;for(var r=0,s=this.v.length;r<s;r++)this.v[r]=e[r]*this.mult},n}(k),Jt=function(a){A(n,a);function n(t,e){e===void 0&&(e=1);var r;return r=a.call(this,t,e)||this,r._value=0,r.v=0,Z.hasSupportExpression(t)&&(r.expression=Z.getExpression(t)),r}var i=n.prototype;return i.reset=function(){this._value=0},i.update=function(e){this.expression&&(e=this.expression.update(e));for(var r=this.value,s,o,u=0,h=r.length-1;u<h&&(s=r[u],o=r[u+1],!(o.t>e));u++);s.beziers||(s.beziers=[]),this.v=this.getValue(e,0,s,o)*this.mult},n}(k),Qt=function(a){A(n,a);function n(t,e,r){e===void 0&&(e=1);var s;s=a.call(this,t,e)||this,s._lastPoint=0,s._addedLength=0;var o=s.value[0].s.length;return r&&(s._frames=r>>0),s.newValue=new Float32Array(o),s.v=new Float32Array(o),s}var i=n.prototype;return i.update=function(e){this.expression&&(e=this.expression.update(e));for(var r=this.value,s=this.newValue,o,u,h=0,f=r.length-1;h<f;h++)if(o=r[h],u=r[h+1],u.t>e){this._lastPoint=0,this._addedLength=0;break}if(e>u.t){for(var l=0,p=this.v.length;l<p;l++)this.v[l]=this.getValue(e,l,o,u)*this.mult;return}if(o.to){var c=u.t,v=o.t;o.bezierData||(o.bezierData=K.buildBezierData(o.s,u.s||o.e,o.to,o.ti,this._frames));var _=o.bezierData,d=_.points,m=_.segmentLength,y=o.timeBezier;y||(y=K.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n),o.timeBezier=y);var b=0;c>=0&&(b=(e-v)/(c-v),b=Math.min(Math.max(0,b),1));for(var g=y(b),x=m*g,E=this._addedLength,P=this._lastPoint,w=P,T=d.length;w<T;w++){if(w===T-1){P=0,E=0;break}P=w;var M=d[w],R=d[w+1],I=R.partialLength;if(x>=E&&x<E+I){for(var U=(x-E)/I,S=0,B=M.point.length;S<B;S+=1)s[S]=M.point[S]+(R.point[S]-M.point[S])*U;break}E+=I}this._lastPoint=P,this._addedLength=E}else{o.beziers||(o.beziers=[]);for(var C=0,j=o.s.length;C<j;C++)s[C]=this.getValue(e,C,o,u)}for(var V=0,H=this.v.length;V<H;V++)this.v[V]=s[V]*this.mult},n}(k),Yt=function(){function a(i){this.properties=[],this.autoOrient=!1;var t=a.create;i.p.k?(this.p=t(i.p,1),this.properties.push(this.p)):(i.p.x&&(this.x=t(i.p.x,1),this.properties.push(this.x)),i.p.y&&(this.y=t(i.p.y,1),this.properties.push(this.y)),i.p.z&&(this.z=t(i.p.z,1),this.properties.push(this.z))),this.a=t(i.a,1),this.properties.push(this.a),this.s=t(i.s,1,.01),this.properties.push(this.s),this.o=t(i.o,0,.01),this.properties.push(this.o),i.r?(this.r=t(i.r,0),this.properties.push(this.r)):i.rx||i.ry||i.rz?(i.rx&&(this.rx=t(i.rx,0),this.properties.push(this.rx)),i.ry&&(this.ry=t(i.ry,0),this.properties.push(this.ry)),i.rz&&(this.rz=t(i.rz,0),this.properties.push(this.rz))):i.or&&(this.or=t(i.or,1),this.properties.push(this.or)),this.properties.length||this.update()}var n=a.prototype;return n.reset=function(){for(var t=0,e=this.properties.length;t<e;t++)this.properties[t].reset()},n.update=function(t){t===void 0&&(t=0);for(var e=this.properties.length,r=0;r<e;r++)this.properties[r].update(t);this.autoOrient},a.create=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t.k.length?typeof t.k[0]=="number"?new Ht(t,r):e?new Qt(t,r,t.k[t.k.length-1].t-t.k[0].t):new Jt(t,r):new kt(t,r)},a}(),rt=function(){function a(i){this.stretch=1,this.parent=null,this.visible=!0,this.startTime=0,this.treeIndex=[],this.childLayers=[],this.is3D=!!i.ddd,this.name=i.nm||"",this.index=i.index,this.timeRemapping=i.tm,this.width=i.w,this.height=i.h,this.inPoint=i.ip,this.outPoint=i.op,i.st&&(this.startTime=i.st),this.stretch=i.stretch||1,this.offsetTime=i.offsetTime||0,i.ks&&(this.transform=new Yt(i.ks))}var n=a.prototype;return n.reset=function(){this.transform&&this.transform.reset();for(var t=0;t<this.childLayers.length;t++)this.childLayers[t].reset()},n.update=function(t,e){t===void 0&&(t=0);var r=(t-this.offsetTime)/this.stretch;e===!0?this.visible=this.inPoint<=r&&this.outPoint>=r:e===!1&&(this.visible=!1),this.transform&&this.visible&&this.transform.update(r);for(var s=0;s<this.childLayers.length;s++)this.childLayers[s].update(t,this.visible)},n.addChild=function(t){t.parent=this,t.entity.parent=this.entity,this.childLayers.push(t)},n.destroy=function(){this.entity.parent=null,this.entity.destroy(),this.entity=null,this.transform=null,this.parent=null},a}(),Q=function(a){A(n,a);function n(t,e,r,s){var o;if(o=a.call(this,t)||this,o.layers=t.layers,o.comps=t.comps,r)o.entity=r,s&&(o.entity.name=s);else{var u=new q(e,s);o.entity=u}return o}var i=n.prototype;return i.destroy=function(){a.prototype.destroy.call(this),this.layers=null,this.comps=null},n}(rt),Xt=function(a){A(n,a);function n(t,e,r,s){var o;o=a.call(this,t)||this;var u;if(t.refId){if(s)o.entity=s,u=s.getComponent(it),o.sprite=u.sprite;else{o.sprite=e.getSprite(t.refId);var h=new q(r.engine,t.nm);u=h.addComponent(it),u.sprite=o.sprite,o.entity=h}var f=o.sprite,l=f.atlasRegion,p=f.texture;p.wrapModeU=p.wrapModeV=xt.Clamp,o.spriteRenderer=u,u.priority=(Number.MAX_SAFE_INTEGER-o.index*1e6)/Number.MAX_SAFE_INTEGER,o.width=l.width*p.width,o.height=l.height*p.height}return o}var i=n.prototype;return i.destroy=function(){a.prototype.destroy.call(this),this.sprite=null,this.spriteRenderer=null},n}(rt),te=function(a){A(n,a);function n(i,t,e,r){var s,o,u,h;s=a.call(this,i)||this,e?(s.entity=e,r&&(s.entity.name=r)):s.entity=new q(t,i.nm);var f=s.entity.addComponent(Pt),l=(h=i)==null||(u=h.t)==null||(o=u.d)==null?void 0:o.k;if(l.length===1){var p,c,v=(c=l)==null||(p=c[0])==null?void 0:p.s;if(v){var _=v.t,d=v.f,m=v.s,y=v.fc,b=v.lh;f.font=St.createFromOS(t,d),f.text=_,f.fontSize=m,f.color.set(y[0],y[1],y[2],1),f.lineSpacing=b}else nt.warn("TextLottieElement: "+r+", No corresponding text data found.")}else nt.warn("TextLottieElement: multi keyframes feature is not supported in this version.");return f.priority=(Number.MAX_SAFE_INTEGER-s.index*1e6)/Number.MAX_SAFE_INTEGER,s}return n}(rt),z=function(a){A(n,a);function n(){var t;return t=a.apply(this,arguments)||this,t.repeats=0,t.isLooping=!1,t.isAlternate=!1,t.direction=1,t.speed=1,t.pixelsPerUnit=zt._pixelsPerUnit,t._alpha=1,t._priority=0,t._priorityDirty=!0,t._layer=At.Layer0,t._layerDirty=!0,t._autoPlay=!1,t._clipEndCallbacks={},t._isPlaying=!1,t._curFrame=0,t._frame=0,t._root=null,t}var i=n.prototype;return i.play=function(e){var r=this;if(e){var s=this.resource.clips[e];this._clip=s}else this._clip=null;return this._isPlaying=!0,this._frame=this._curFrame,new Promise(function(o){e?r._clipEndCallbacks[e]=o:r._clipEndCallbacks.ALL=o})},i.pause=function(){this._isPlaying=!1,this._curFrame=this._frame},i.stop=function(){this._isPlaying=!1,this._curFrame=0,this._frame=0},i._setLayer=function(e,r){r||(r=this.entity),r.layer=e;for(var s=r.children,o=s.length-1;o>=0;o--){var u=s[o];u.layer=e,this._setLayer(e,u)}},i._createLayerElements=function(e,r,s,o){if(e)for(var u=0,h=e.length;u<h;u++){var f=e[u],l=null;if(f.td===void 0){var p=s.treeIndex.concat(u),c=o&&this._findEntityInTree(p);switch(f.ty){case 0:l=new Q(f,this.engine,c,f.id);break;case 2:l=new Xt(f,this._resource.atlas,this.entity,c);break;case 3:var v,_,d;((d=f)==null||(_=d.ks)==null||(v=_.o)==null?void 0:v.k)===0&&(f.ks.o.k=100),l=new Q(f,this.engine,c,f.id);break;case 5:l=new te(f,this.engine,c,f.id);break}l&&(l.treeIndex=p,r.push(l),s.addChild(l),f.layers&&this._createLayerElements(f.layers,r,l,o))}}},i._findEntityInTree=function(e){for(var r,s=0,o=e.length;s<o;s++){var u=e[s];r?r=r.children[u]:r=this.entity.children[u]}return r},i._createElements=function(e,r){var s=new Q(e,this.engine,this.entity);this._root=s;var o=s.layers,u=[];this._createLayerElements(o,u,s,r),this._elements=u},i._updateElements=function(e){this._root.update(e);for(var r=this._elements,s=0,o=r.length;s<o;s++){var u=r[s];this._updateElement(u)}},i._updateElement=function(e){var r,s,o,u,h=e.transform,f=e.entity,l=e.sprite,p=e.spriteRenderer,c=e.parent,v=e.width,_=e.height,d=f.transform,m=h.a.v,y=h.s.v,b=h.o.v,g=this.pixelsPerUnit,x=0,E=0,P=0;if(h.p){var w=h.p.v,T;x=(T=w[0])!=null?T:0;var M;E=(M=w[1])!=null?M:0;var R;P=(R=w[2])!=null?R:0}else h.x&&(x=h.x.v),h.y&&(E=h.y.v),h.z&&(P=h.z.v);var I=0,U=0,S=0;if(!e.visible){f.isActive=e.visible;return}if(h.r)S=h.r.v;else if(h.rx||h.ry||h.rz)I=h.rx?h.rx.v:0,U=h.ry?h.ry.v:0,S=h.rz?h.rz.v:0;else if(h.or){var B=h.or.v;I=B[0],U=B[1],S=B[2]}if(!((s=c)==null||(r=s.transform)==null)&&r.o){var C;b*=(C=c)==null?void 0:C.transform.o.v}if(l){var j=p.color,V=j.r,H=j.g,Et=j.b;p.color.set(V,H,Et,b*this._alpha),l.pixelsPerUnit=g,l.pivot=n._pivotVector.set(m[0]/v,(_-m[1])/_)}f.isActive=e.visible,d.setScale(y[0],y[1],y[2]),d.setRotation(I,U,-S),!((u=c)==null||(o=u.transform)==null)&&o.a?d.setPosition((x-c.transform.a.v[0])/g,(-E+c.transform.a.v[1])/g,P/g):d.setPosition((x-this._width/2)/g,(-E+this._height/2)/g,P/g)},i._resetElements=function(){for(var e=this._elements,r=0,s=e.length;r<s;r++)e[r].reset()},i.onUpdate=function(e){if(!this._isPlaying||!this._resource)return null;if(this._priorityDirty){this._priorityDirty=!1;var r=n._tempRenderers;r.length=0,this.entity.getComponentsIncludeChildren(bt,r);for(var s=0,o=0,u=r.length;o<u;++o){var h=r[o];o===0&&(s=this._priority-Math.floor(h.priority)),h.priority=h.priority+s}}this._layerDirty&&(this._layerDirty=!1,this._setLayer(this.layer,this.entity));var f=this.direction*this.speed*e*1e3;this._frame+=f/this._resource.timePerFrame;var l=this._clip;if(this._spill()){var p=this._resource.duration;if(this._resetElements(),this.repeats>0||this.isLooping)this.repeats>0&&--this.repeats,this.isAlternate?(this.direction*=-1,l?this._frame=L.codomainBounce(this._frame,0,l.end-l.start):this._frame=L.codomainBounce(this._frame,0,p)):(this.direction=1,l?this._frame=L.euclideanModulo(this._frame,l.end-l.start):this._frame=L.euclideanModulo(this._frame,p));else if(l){if(this._frame>=l.end-l.start){var c=this._clipEndCallbacks[l.name];c&&c(l)}this._frame=L.clamp(this._frame,0,l.end-l.start)}else{if(this._frame>=p){var v=this._clipEndCallbacks.ALL;v&&v()}this._frame=L.clamp(this._frame,0,p)}}l?this._updateElements(this._resource.inPoint+this._frame+l.start):this._updateElements(this._resource.inPoint+this._frame)},i._spill=function(){var e;if(this._clip){var r=this._clip;e=r.end-r.start}else e=this._resource.duration;var s=this._frame<=0&&this.direction===-1,o=this._frame>=e&&this.direction===1;return s||o},i._cloneTo=function(e){e._createElements(this._resource,!0)},i._destroy=function(){var e=this._elements;if(e)for(var r=0,s=e.length;r<s;r++)e[r].destroy()},i.onDestroy=function(){this._destroy()},Rt(n,[{key:"resource",get:function(){return this._resource},set:function(e){this._resource!==e&&(this._resource&&(this.pause(),this._destroy(),this._resource.refCount--,this._resource.refCount<=0&&this._resource.destroy()),this._resource=e,e&&(e.refCount++,this._width=e.width,this._height=e.height,this._createElements(e),this._priorityDirty=!0,this._layerDirty=!0),this._curFrame=0,this.play(),this.onUpdate(0),this.autoPlay||this.pause())}},{key:"priority",get:function(){return this._priority},set:function(e){this._priority!==e&&(this._priority=e,this._priorityDirty=!0)}},{key:"layer",get:function(){return this._layer},set:function(e){this._layer!==e&&(this._layer=e,this._layerDirty=!0)}},{key:"alpha",get:function(){return this._alpha},set:function(e){this._alpha!==e&&(this._alpha=e,this.isPlaying||(this.play(),this.onUpdate(0),this.pause()))}},{key:"autoPlay",get:function(){return this._autoPlay},set:function(e){this._autoPlay=e,e&&this.play()}},{key:"frame",get:function(){return this._frame}},{key:"isPlaying",get:function(){return this._isPlaying}}]),n}(Lt);(function(){z._pivotVector=new wt})();(function(){z._tempRenderers=[]})();O([F],z.prototype,"_clipEndCallbacks",void 0);O([F],z.prototype,"_isPlaying",void 0);O([F],z.prototype,"_curFrame",void 0);O([F],z.prototype,"_frame",void 0);O([F],z.prototype,"_root",void 0);O([F],z.prototype,"_elements",void 0);function ee(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function $(){return $=Object.assign||function(n){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},$.apply(this,arguments)}function re(a){"@swc/helpers - typeof";return a&&typeof Symbol<"u"&&a.constructor===Symbol?"symbol":typeof a}var X=function(a){A(n,a);function n(t,e,r){var s;s=a.call(this,t)||this,s.refCount=0,s.timePerFrame=1e3/e.fr,s.duration=Math.floor(e.op-e.ip),s.width=e.w,s.height=e.h,s.inPoint=e.ip,s.outPoint=e.op,s.atlas=r,s.layers=e.layers,s.comps=e.assets,s.name=e.nm,s.clips={};var o={},u=ee(s).comps;if(u)for(var h=0,f=u.length;h<f;h++){var l=u[h];l.id&&(o[l.id]=l)}return s._buildTree(s.layers,o),e.lolitaAnimations&&s._parseAnimations(e.lolitaAnimations),s}var i=n.prototype;return i.setClips=function(e){this.clips={},this._parseAnimations(e)},i._parseAnimations=function(e){var r=this;e.forEach(function(s){r.clips[s.name]=$({},s)})},i._buildTree=function(e,r,s,o,u,h){s===void 0&&(s=0),o===void 0&&(o=1),u===void 0&&(u=0),h===void 0&&(h=1);for(var f={},l=0,p=e.length;l<p;l++){var c=e[l],v;f[(v=c.ind)!=null?v:l]=c}for(var _=e.length-1;_>=0;_--){var d=e[_],m=d.refId,y=d.parent;d.offsetTime=s,d.stretch=o;var b;if(d.index=((b=d.ind)!=null?b:_)*h+u,y&&(f[y].layers||(f[y].layers=[]),f[y].layers.push(d),e.splice(_,1)),m&&r[m]){for(var g=[],x=0;x<r[m].layers.length;x++)g.push(this._deepClone(r[m].layers[x]));var E=(d.offsetTime||0)+(d.st||0),P=(d.stretch||1)*(d.sr||1),w=g.length-1,T,M=h/(((T=g[w].ind)!=null?T:w)+1)*h;if(this._buildTree(g,r,E,P,d.index,M),d.layers){var R;(R=d.layers).push.apply(R,[].concat(g))}else d.layers=[].concat(g)}}},i._deepClone=function(e){var r=this,s=Array.isArray(e)?[].concat(e):$({},e);return Reflect.ownKeys(s).map(function(o){s[o]=r._isObject(e[o])?r._deepClone(e[o]):e[o]}),s},i._isObject=function(e){return(typeof e=="object"||typeof e=="function")&&(typeof e>"u"?"undefined":re(e))!==null},i.destroy=function(){var e,r;(e=(r=this.atlas).destroy)==null||e.call(r),this.atlas=null,this.layers=null,this.clips=null,this.comps=null,a.prototype.destroy.call(this)},n}(Tt),pt=function(a){A(n,a);function n(){return a.apply(this,arguments)}var i=n.prototype;return i.load=function(e,r){return new W(function(s,o){var u=e.url;r._request(u,{type:"json"}).then(function(h){var f=h.jsonUrl,l=h.atlasUrl,p=r._request(st.resolveAbsoluteUrl(u,f),r),c=r.load({url:st.resolveAbsoluteUrl(u,l),type:et.SpriteAtlas});W.all([p,c]).then(function(v){var _=v[0],d=v[1],m=r.engine,y=new X(m,_,d);s(y)}).catch(o)}).catch(o)})},n}(tt);pt=O([ct("EditorLottie",["json"])],pt);var ie=function(){function a(i,t){var e=this;this.sprites={},this.assetsPromises=[],this.assetsPromises=i.map(function(r){return t.resourceManager.load({url:r.p,type:et.Texture2D}).then(function(s){var o=new Mt(t);o.texture=s,e.sprites[r.id]=o})})}var n=a.prototype;return n.request=function(){return Promise.all(this.assetsPromises)},n.getSprite=function(t){return this.sprites[t]},a}(),vt=function(a){A(n,a);function n(){return a.apply(this,arguments)}var i=n.prototype;return i.load=function(e,r){var s=e.urls,o=r._request(s[0],{type:"json"});if(s[1]){var u=r.load({url:s[1],type:et.SpriteAtlas});return W.all([o,u]).then(function(h){var f=h[0],l=h[1],p=r.engine,c=new X(p,f,l),v=new q(p),_=v.addComponent(z);return _.resource=c,v})}else return W.all([o]).then(function(h){var f=h[0],l=r.engine,p=f.assets.filter(function(v){return v.p});f.assets=f.assets.filter(function(v){return!v.p});var c=new ie(p,l);return c.request().then(function(){var v=new X(l,f,c),_=new q(l),d=_.addComponent(z);return d.resource=v,_})})},n}(tt);vt=O([ct("lottie",["json"])],vt);tt.registerClass("LottieAnimation",z);export{z as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as r}from"./index-0a8702e2.js";import"./InstanceEditorAsset-a70e73fe.js";r.createPublisher();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(n,r){return new Proxy(n,{get(t,e,o){return e==="root"?r:Reflect.get(t,e,o)},set(t,e,o,a){return e==="root"?!0:Reflect.set(t,e,o,a)},has(t,e){return e==="root"?!0:Reflect.has(t,e)},ownKeys(t){return Reflect.ownKeys(t)},getOwnPropertyDescriptor(t,e){return e==="root"?{configurable:!0,enumerable:!1,writable:!1,value:r}:Reflect.getOwnPropertyDescriptor(t,e)}})}function p(n,r,t,e){n.inspectorFacade.componentChange(r,t,e)}async function u(n,r,t,e){await n.assetFacade.applyRemoteCodeChange(r,t,e)}export{p as a,u as b,c};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{aJ as a,aD as c,dU as V,e9 as J,ea as De,eb as Ce,ec as Ae,ed as ye,ee as Ne,bH as _e,bM as j,ef as Re,eg as Pe,aH as y,eh as Se,ei as Oe,ej as Te,ek as be,el as je,em as Ee,aK as $e,aI as Y,en as Me}from"./index-0a8702e2.js";function we(e,t=[]){let n=[];function r(i,s){const l=a.createContext(s),d=n.length;n=[...n,s];const u=p=>{var _;const{scope:g,children:m,...v}=p,x=((_=g==null?void 0:g[e])==null?void 0:_[d])||l,N=a.useMemo(()=>v,Object.values(v));return c.jsx(x.Provider,{value:N,children:m})};u.displayName=i+"Provider";function f(p,g){var x;const m=((x=g==null?void 0:g[e])==null?void 0:x[d])||l,v=a.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(s=>a.createContext(s));return function(l){const d=(l==null?void 0:l[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[r,Ie(o,...t)]}function Ie(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:d,scopeName:u})=>{const p=d(i)[`__scope${u}`];return{...l,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function q(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fe(...e){return t=>{let n=!1;const r=e.map(o=>{const i=q(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():q(e[o],null)}}}}function Z(...e){return a.useCallback(Fe(...e),e)}function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function K(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function We(...e){return t=>{let n=!1;const r=e.map(o=>{const i=K(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():K(e[o],null)}}}}function T(...e){return a.useCallback(We(...e),e)}function Le(e,t){const n=a.createContext(t),r=i=>{const{children:s,...l}=i,d=a.useMemo(()=>l,Object.values(l));return c.jsx(n.Provider,{value:d,children:s})};r.displayName=e+"Provider";function o(i){const s=a.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function ke(e,t=[]){let n=[];function r(i,s){const l=a.createContext(s),d=n.length;n=[...n,s];const u=p=>{var _;const{scope:g,children:m,...v}=p,x=((_=g==null?void 0:g[e])==null?void 0:_[d])||l,N=a.useMemo(()=>v,Object.values(v));return c.jsx(x.Provider,{value:N,children:m})};u.displayName=i+"Provider";function f(p,g){var x;const m=((x=g==null?void 0:g[e])==null?void 0:x[d])||l,v=a.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(s=>a.createContext(s));return function(l){const d=(l==null?void 0:l[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[r,Ue(o,...t)]}function Ue(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:d,scopeName:u})=>{const p=d(i)[`__scope${u}`];return{...l,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ge(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var b=e=>{const{present:t,children:n}=e,r=ze(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=T(r.ref,Be(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};b.displayName="Presence";function ze(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),i=a.useRef("none"),s=e?"mounted":"unmounted",[l,d]=Ge(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=S(r.current);i.current=l==="mounted"?u:"none"},[l]),V(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,m=S(u);e?d("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),V(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const x=S(r.current).includes(m.animationName);if(m.target===t&&x&&(d("ANIMATION_END"),!o.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},g=m=>{m.target===t&&(i.current=S(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function S(e){return(e==null?void 0:e.animationName)||"none"}function Be(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],P=Ve.reduce((e,t)=>{const n=a.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?J:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),E="Dialog",[Q,X]=ke(E),[Ye,h]=Q(E),H=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=a.useRef(null),d=a.useRef(null),[u=!1,f]=_e({prop:r,defaultProp:o,onChange:i});return c.jsx(Ye,{scope:t,triggerRef:l,contentRef:d,contentId:j(),titleId:j(),descriptionId:j(),open:u,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(p=>!p),[f]),modal:s,children:n})};H.displayName=E;var ee="DialogTrigger",te=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=h(ee,n),i=T(t,o.triggerRef);return c.jsx(P.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":w(o.open),...r,ref:i,onClick:R(e.onClick,o.onOpenToggle)})});te.displayName=ee;var $="DialogPortal",[qe,ne]=Q($,{forceMount:void 0}),oe=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=h($,t);return c.jsx(qe,{scope:t,forceMount:n,children:a.Children.map(r,s=>c.jsx(b,{present:n||i.open,children:c.jsx(Re,{asChild:!0,container:o,children:s})}))})};oe.displayName=$;var O="DialogOverlay",re=a.forwardRef((e,t)=>{const n=ne(O,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=h(O,e.__scopeDialog);return i.modal?c.jsx(b,{present:r||i.open,children:c.jsx(Ke,{...o,ref:t})}):null});re.displayName=O;var Ke=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=h(O,n);return c.jsx(De,{as:J,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(P.div,{"data-state":w(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),C="DialogContent",ie=a.forwardRef((e,t)=>{const n=ne(C,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=h(C,e.__scopeDialog);return c.jsx(b,{present:r||i.open,children:i.modal?c.jsx(Je,{...o,ref:t}):c.jsx(Ze,{...o,ref:t})})});ie.displayName=C;var Je=a.forwardRef((e,t)=>{const n=h(C,e.__scopeDialog),r=a.useRef(null),o=T(t,n.contentRef,r);return a.useEffect(()=>{const i=r.current;if(i)return Ce(i)},[]),c.jsx(se,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:R(e.onFocusOutside,i=>i.preventDefault())})}),Ze=a.forwardRef((e,t)=>{const n=h(C,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return c.jsx(se,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),se=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=h(C,n),d=a.useRef(null),u=T(t,d);return Ae(),c.jsxs(c.Fragment,{children:[c.jsx(ye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:c.jsx(Ne,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":w(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Xe,{titleId:l.titleId}),c.jsx(et,{contentRef:d,descriptionId:l.descriptionId})]})]})}),M="DialogTitle",ae=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=h(M,n);return c.jsx(P.h2,{id:o.titleId,...r,ref:t})});ae.displayName=M;var ce="DialogDescription",le=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=h(ce,n);return c.jsx(P.p,{id:o.descriptionId,...r,ref:t})});le.displayName=ce;var ue="DialogClose",de=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=h(ue,n);return c.jsx(P.button,{type:"button",...r,ref:t,onClick:R(e.onClick,()=>o.onOpenChange(!1))})});de.displayName=ue;function w(e){return e?"open":"closed"}var fe="DialogTitleWarning",[Qe,ge]=Le(fe,{contentName:C,titleName:M,docsSlug:"dialog"}),Xe=({titleId:e})=>{const t=ge(fe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},He="DialogDescriptionWarning",et=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ge(He).contentName}}.`;return a.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tt=H,nt=te,ot=oe,rt=re,it=ie,st=ae,at=le,pe=de;function ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var me="AlertDialog",[lt,ut]=we(me,[X]),D=X(),I=e=>{const{__scopeAlertDialog:t,...n}=e,r=D(t);return c.jsx(tt,{...r,...n,modal:!0})};I.displayName=me;var dt="AlertDialogTrigger",F=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=D(n);return c.jsx(nt,{...o,...r,ref:t})});F.displayName=dt;var ft="AlertDialogPortal",W=e=>{const{__scopeAlertDialog:t,...n}=e,r=D(t);return c.jsx(ot,{...r,...n})};W.displayName=ft;var gt="AlertDialogOverlay",L=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=D(n);return c.jsx(rt,{...o,...r,ref:t})});L.displayName=gt;var A="AlertDialogContent",[pt,mt]=lt(A),k=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=D(n),s=a.useRef(null),l=Z(t,s),d=a.useRef(null);return c.jsx(Qe,{contentName:A,titleName:ve,docsSlug:"alert-dialog",children:c.jsx(pt,{scope:n,cancelRef:d,children:c.jsxs(it,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:ct(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=d.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Pe,{children:r}),c.jsx(xt,{contentRef:s})]})})})});k.displayName=A;var ve="AlertDialogTitle",U=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=D(n);return c.jsx(st,{...o,...r,ref:t})});U.displayName=ve;var xe="AlertDialogDescription",G=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=D(n);return c.jsx(at,{...o,...r,ref:t})});G.displayName=xe;var vt="AlertDialogAction",z=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=D(n);return c.jsx(pe,{...o,...r,ref:t})});z.displayName=vt;var he="AlertDialogCancel",B=a.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=mt(he,n),i=D(n),s=Z(t,o);return c.jsx(pe,{...i,...r,ref:s})});B.displayName=he;var xt=({contentRef:e})=>{const t=`\`${A}\` requires a description for the component to be accessible for screen reader users.
|
|
6
|
+
|
|
7
|
+
You can add a description to the \`${A}\` by passing a \`${xe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
8
|
+
|
|
9
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${A}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
10
|
+
|
|
11
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ht=I,Dt=F,Ct=W,At=L,yt=k,Nt=z,_t=B,Rt=U,Pt=G;const St=Object.freeze(Object.defineProperty({__proto__:null,Action:Nt,AlertDialog:I,AlertDialogAction:z,AlertDialogCancel:B,AlertDialogContent:k,AlertDialogDescription:G,AlertDialogOverlay:L,AlertDialogPortal:W,AlertDialogTitle:U,AlertDialogTrigger:F,Cancel:_t,Content:yt,Description:Pt,Overlay:At,Portal:Ct,Root:ht,Title:Rt,Trigger:Dt,createAlertDialogScope:ut},Symbol.toStringTag,{value:"Module"})),{Root:Ot,Trigger:Tt,Portal:bt,Overlay:jt,Content:Et,Title:$t,Description:Mt,Cancel:wt,Action:It}=St,Ft=y(jt,Se,{animation:`${Oe} 150ms cubic-bezier(0.16, 1, 0.3, 1)`}),Wt=y(Et,Te,{padding:"$4",maxWidth:"26rem",width:"min(26rem, calc(100vw - 32px))",zIndex:50,animation:`${be} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,"&:focus":{outline:"none"},"&[data-state=open]":{animation:`${je} 250ms ease`},"&[data-state=closed]":{animation:`${Ee} 250ms ease`}}),Lt={display:"grid",gap:"$2"},kt={display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"$2",marginTop:"$5",paddingTop:"$4"},Ut=y("div",Lt),Gt=y($e,kt),zt=y($t,{margin:0,color:"$textStrong",fontSize:"$4",lineHeight:"$lineHeights$4",fontWeight:600}),Bt=y(Mt,{margin:0,color:"$textMuted",fontSize:"$2",lineHeight:"$lineHeights$2",maxWidth:"56ch",whiteSpace:"pre-line"});function Vt(e){const{trigger:t,title:n,description:r,cancelText:o="Cancel",confirmText:i="Confirm",onConfirm:s,onClose:l,zIndex:d,actionable:u=!0,...f}=e;return c.jsxs(Ot,{...f,children:[c.jsx(Tt,{asChild:!0,children:t}),c.jsxs(bt,{children:[c.jsx(Ft,{style:{zIndex:d}}),c.jsxs(Wt,{style:{zIndex:d},children:[c.jsxs(Ut,{children:[c.jsx(zt,{children:n}),r&&c.jsx(Bt,{children:r})]}),u&&c.jsxs(Gt,{gap:"sm",justifyContent:"end",children:[l&&c.jsx(wt,{asChild:!0,children:c.jsx(Y,{variant:"soft",size:"md",onClick:l,children:o})}),s&&c.jsx(It,{asChild:!0,children:c.jsx(Y,{variant:"solid",critical:!0,size:"md",onClick:s,children:i})})]})]})]})]})}let Yt=0;function qt(){return`editor-portal-id-${++Yt}`}function Jt(e){const t=document.createElement("span");t.id=qt(),document.body.appendChild(t);const n=Me(t),r=()=>{n.unmount(),t.remove(),document.body.style.pointerEvents=""},o=()=>{const[i,s]=a.useState(!0),l=()=>{var u;s(!1),r(),(u=e.onClose)==null||u.call(e)},d=()=>{var u;s(!1),r(),(u=e.onConfirm)==null||u.call(e)};return c.jsx(Vt,{...e,trigger:null,onClose:l,onConfirm:d,open:i,onOpenChange:u=>{u||l()}})};return n.render(c.jsx(o,{})),{close:()=>{var i;r(),(i=e.onClose)==null||i.call(e)}}}export{Vt as A,it as C,de as D,rt as O,ot as P,tt as R,nt as T,st as a,at as b,Jt as s};
|
|
@@ -0,0 +1,20 @@
|
|
|
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>CLI Viewport</title>
|
|
7
|
+
<style>
|
|
8
|
+
html, body, #app { margin: 0; width: 100%; height: 100%; overflow: hidden; }
|
|
9
|
+
canvas { width: 100%; height: 100%; display: block; }
|
|
10
|
+
#status { position: fixed; left: 8px; top: 8px; background: rgba(0,0,0,0.6); color: #fff; padding: 6px 8px; font: 12px/1.4 monospace; z-index: 10; border-radius: 4px; transition: opacity 0.3s; }
|
|
11
|
+
</style>
|
|
12
|
+
<script type="module" crossorigin src="/_static/index-0a8702e2.js"></script>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div id="app">
|
|
16
|
+
<div id="status">booting...</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"main": "dist/cli.bundle.cjs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"galacean": "bin/galacean.js"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/cli.bundle.cjs",
|
|
13
13
|
"dist/assets",
|
|
14
|
+
"dist/viewport-client",
|
|
14
15
|
"bin/galacean.js",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|