ss-component-new 1.2.12 → 1.2.14

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.
Files changed (101) hide show
  1. package/dist/{animationData-CyP8-u7i.cjs → animationData-Bk1470H5.cjs} +1 -1
  2. package/dist/{animationData-C_gV7XAN.js → animationData-DGFKjCYk.js} +3 -3
  3. package/dist/array-B35bAMlG.js +1142 -0
  4. package/dist/array-aAE_wKnd.cjs +11 -0
  5. package/dist/{index-DQZ_oAyj.js → index-0F2eUVxy.js} +5 -5
  6. package/dist/{index-B9OZcnHm.cjs → index-AaBAxV_V.cjs} +13 -13
  7. package/dist/{index-ESNVepXU.js → index-B5XUqnF_.js} +5 -5
  8. package/dist/{index-qu3KI1yZ.js → index-B5u0jviA.js} +5 -5
  9. package/dist/{index-C40ofXP7.cjs → index-B67hAD7m.cjs} +1 -1
  10. package/dist/{index-Adqs5vHH.cjs → index-B9sRVMVL.cjs} +1 -1
  11. package/dist/{index-CoVAbxHN.js → index-BFKsm0Yx.js} +1 -1
  12. package/dist/index-BIfQaEzZ.cjs +1 -0
  13. package/dist/{index-DGBDGLOK.cjs → index-BQqFFNAa.cjs} +1 -1
  14. package/dist/{index-BUUEqGRN.cjs → index-BaIFwPts.cjs} +1 -1
  15. package/dist/{index-C68Hri2v.cjs → index-BlK2PVMx.cjs} +1 -1
  16. package/dist/index-Bma_mFLH.js +158 -0
  17. package/dist/{index-CRiovRyR.js → index-Bn5MBUdF.js} +1 -1
  18. package/dist/{index-DHQH1rlQ.js → index-ByAR0Idl.js} +2 -2
  19. package/dist/{index-B7g38Yte.js → index-C2ubyp3H.js} +1 -1
  20. package/dist/{index-BDaeo6qO.js → index-C5WwpGNi.js} +2 -2
  21. package/dist/{index-QkDZ18PI.cjs → index-C9aN-VrN.cjs} +1 -1
  22. package/dist/{index-CjB5ZP_P.js → index-CC9pH_f2.js} +1 -1
  23. package/dist/{index-D4CVC2Sk.js → index-CCF9d9aS.js} +2 -2
  24. package/dist/{index-DfKkN76b.js → index-CF--cUKb.js} +2 -2
  25. package/dist/{index-CAewC69j.cjs → index-CKqCzMnZ.cjs} +1 -1
  26. package/dist/index-COqXf8zH.cjs +1 -0
  27. package/dist/{index-7eyGTvr0.cjs → index-COuendLk.cjs} +1 -1
  28. package/dist/index-CSLbHDxo.js +2567 -0
  29. package/dist/{index-D9l1Z4TO.cjs → index-CSbITu5d.cjs} +1 -1
  30. package/dist/{index-Dwr4RHei.cjs → index-Cjbn2UBR.cjs} +1 -1
  31. package/dist/{index-DTkAIcvV.js → index-Cq6fzImq.js} +13 -13
  32. package/dist/{index-i50hp6po.cjs → index-CstB7vYe.cjs} +1 -1
  33. package/dist/{index-C5gPrwPs.cjs → index-CuQDWf5p.cjs} +1 -1
  34. package/dist/{index-D55zzS4D.cjs → index-CyZ2cmp8.cjs} +1 -1
  35. package/dist/{index-DnU2slQv.cjs → index-Cyt7LP0u.cjs} +1 -1
  36. package/dist/{index-C-c1pt-2.js → index-D5fAObhh.js} +1 -1
  37. package/dist/{index-ecVCII_e.js → index-DD9OzBSS.js} +4 -4
  38. package/dist/{index-CkA2IZJB.js → index-DLHscTIu.js} +5 -5
  39. package/dist/{index-B_ZGJtId.js → index-DNdAK9Jn.js} +1 -1
  40. package/dist/{index-DJMHw-xb.js → index-DS9Dbxhr.js} +10 -10
  41. package/dist/{index-BMYtLkw8.js → index-DfPRUqS4.js} +3 -3
  42. package/dist/{index-CKt6cj9f.cjs → index-DleM0Iie.cjs} +1 -1
  43. package/dist/{index-t6--MDLB.cjs → index-Dlfn0JHU.cjs} +1 -1
  44. package/dist/{index-DsQ-qtQ9.cjs → index-Dqvc_EHA.cjs} +1 -1
  45. package/dist/{index-DkG4A3iE.cjs → index-Dr40ZJEX.cjs} +1 -1
  46. package/dist/{index-BbI9_JbX.js → index-Drb6aHQr.js} +48 -32
  47. package/dist/index-DzUvkDw2.cjs +1 -0
  48. package/dist/{index-CVDv-Zz-.js → index-EHmVdU_u.js} +18 -18
  49. package/dist/{index-B_mFQujY.cjs → index-JiTvtugz.cjs} +1 -1
  50. package/dist/{index-BQ4Rjf8F.js → index-VfaCGVFD.js} +5 -5
  51. package/dist/index-a1HKV1_g.cjs +1 -0
  52. package/dist/index-a9bB4rFY.js +7290 -0
  53. package/dist/{index-BJBNtx2b.cjs → index-gzUDXR5p.cjs} +1 -1
  54. package/dist/{index-D5ShC3zu.cjs → index-hbliXkku.cjs} +1 -1
  55. package/dist/{index-H_3u1NA_.js → index-kOyJPwsW.js} +1 -1
  56. package/dist/{index-CKLBlQoK.js → index-kn9Z3Spm.js} +2129 -2122
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DfPAhslf.js} +8765 -8749
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-_G53poH8.cjs} +108 -108
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Brscnsyu.js} +5 -5
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CmDr-Cyv.cjs} +1 -1
  61. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CGmzewC_.cjs +56 -0
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-D9q4Jzwb.js} +12692 -12647
  63. package/dist/{index.vue_vue_type_style_index_1_lang-CsY5rIO4.js → index.vue_vue_type_style_index_1_lang-BcKOWs1s.js} +2 -2
  64. package/dist/{index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs → index.vue_vue_type_style_index_1_lang-CbS7EB3k.cjs} +1 -1
  65. package/dist/index.vue_vue_type_style_index_1_lang-Iut1fhDN.js +8161 -0
  66. package/dist/index.vue_vue_type_style_index_1_lang-sTxwz1W3.cjs +32 -0
  67. package/dist/{main-DIbH2rlN.js → main-D90k9E9J.js} +4 -4
  68. package/dist/{main-CVaemyhm.cjs → main-DXm7KzRN.cjs} +1 -1
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +2 -2
  71. package/dist/ss-component.js +10 -10
  72. package/dist/ss-component2.cjs +1 -1
  73. package/dist/ss-component2.js +11 -11
  74. package/dist/{threeModel-C0Jdw2O3.cjs → threeModel-C-6_vaGX.cjs} +1 -1
  75. package/dist/{threeModel-27sl0tTS.js → threeModel-V3QSg295.js} +2 -2
  76. package/dist/{threeSceneView-ZDXqO8ZA.js → threeSceneView-Bklnz7S8.js} +7 -7
  77. package/dist/{threeSceneView-CEpBvJSV.cjs → threeSceneView-FVcVEW7a.cjs} +1 -1
  78. package/dist/{threeSceneViewForCPMPIP-BPPWM68P.js → threeSceneViewForCPMPIP-B3G_-YBW.js} +6 -6
  79. package/dist/{threeSceneViewForCPMPIP-B0VPmBWd.cjs → threeSceneViewForCPMPIP-BoeTb3Fi.cjs} +1 -1
  80. package/dist/{threeViewerHost-CKE2a4PV.js → threeViewerHost-Bc0cuY8h.js} +78 -65
  81. package/dist/threeViewerHost-fPCTBYzC.cjs +1 -0
  82. package/dist/{useRayCaster-BM9XKGKx.js → useRayCaster-CcQBZs7h.js} +1 -1
  83. package/dist/{useRayCaster-1DNcSYPR.cjs → useRayCaster-ClCyvaxW.cjs} +1 -1
  84. package/package.json +1 -1
  85. package/dist/array-A59WrroX.js +0 -1207
  86. package/dist/array-BtZq8qON.cjs +0 -11
  87. package/dist/index-2nEz-J89.js +0 -24
  88. package/dist/index-BAOnUk_J.cjs +0 -1
  89. package/dist/index-BeYNgEHV.js +0 -144
  90. package/dist/index-CApZYDIm.cjs +0 -1
  91. package/dist/index-CN29uy_G.js +0 -7293
  92. package/dist/index-CTRmgnKQ.js +0 -2643
  93. package/dist/index-CVadHkfS.cjs +0 -1
  94. package/dist/index-CwhX2vaq.cjs +0 -1
  95. package/dist/index-DDhAMgrO.js +0 -22
  96. package/dist/index-DP7rcz4I.cjs +0 -1
  97. package/dist/index-RVDLy1iy.cjs +0 -1
  98. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs +0 -56
  99. package/dist/index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs +0 -32
  100. package/dist/index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js +0 -7806
  101. package/dist/threeViewerHost-yHvsk7TK.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";const t=require("vue"),m=require("./index-1z9RrjZc.cjs"),B=require("./index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs");const L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(f){const T=sessionStorage.getItem("loginToken")??"123456";return m.service({url:"/api/sysFile/uploadFile",method:"post",data:f,headers:{Authorization:T,"Content-Type":"multipart/form-data"}})}function R(f){const T=sessionStorage.getItem("loginToken")??"123456";return m.service({url:"/api/sysFile/downloadFile",method:"post",data:f,headers:{Authorization:T,Accept:"application/octet-stream"},responseType:"blob"})}const I=m.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(f){this.data=f},getData(){return this.data}}});function A(){const f=B.useMenuState(m.pinia),{platform:T}=m.storeToRefs(f),y=I(m.pinia),F=t.computed(()=>{var e;return(e=y==null?void 0:y.data)==null?void 0:e.extension}),p=["uv","cpt","cyd"],v=["urdf"],s=["obj","stl"],o=[...p,...v,...s],P=e=>{if(!E())throw new Error("不是三维系统");y.setData(e)},d=()=>y.getData(),E=()=>T.value==="three",l=e=>{const i=e==null?void 0:e.toLowerCase(),c=i==null?void 0:i.lastIndexOf(".");let h=i;return c>=0&&(h=h==null?void 0:h.slice(c+1)),h},w=e=>{if(!e)return!1;const i=l(e);return o==null?void 0:o.includes(i)};return{getData:d,setData:P,isThreeSystem:E,isUrdf:e=>{if(!e)return!1;const i=l(e);return v==null?void 0:v.includes(i)},isGeneralFile:e=>{if(!e)return!1;const i=l(e);return s==null?void 0:s.includes(i)},isTrackPathFile:e=>{if(!e)return!1;const i=l(e);return p==null?void 0:p.includes(i)},isThreeFile:w,isUseBackdrop:e=>E()&&w(e),initTrackFileType:e=>{if(!e)return{isCpt:!1,isCyd:!1,isUv:!1};const i=l(e),c=p==null?void 0:p.find(b=>b===i);return{isCpt:c==="cpt",isCyd:c==="cyd",isUv:c==="uv"}},getFileExtension:l,extraExtension:F}}const q={key:4,class:"loading"},x=t.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(f,{emit:T}){const y=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-CEpBvJSV.cjs"))),F=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-C_mY_TBC.cjs"))),p=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeLatheView-CZdorls1.cjs"))),v=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-B0VPmBWd.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=f,P=B.useMenuState(m.pinia),{platName:d}=m.storeToRefs(P),{isGeneralFile:E,isUrdf:l,isTrackPathFile:w,extraExtension:D}=A(),S=t.computed(()=>(o==null?void 0:o.extension)||D.value),k=t.computed(()=>{var r,n;return(n=(r=o==null?void 0:o.threeData)==null?void 0:r.data)==null?void 0:n.trackFileType}),C=t.computed(()=>{var n;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const r=(n=o==null?void 0:o.fileUrls)==null?void 0:n[0];return E(r)?s.PREVIEW:(d==null?void 0:d.value)==="CPMPIP"&&(l(r)||l(S.value))?s.CPMPIP_SCENE:(d==null?void 0:d.value)==="SFRTubeBend"&&(l(r)||l(S.value))?s.ROBOT_SCENE:w(S.value)&&k.value?s.LATHE_SCENE:s.PREVIEW}),g=T,e=t.ref([]),i=t.ref(!1);function c(r){try{const n=new URL(r).pathname,u=n.substring(n.lastIndexOf("/")+1);return decodeURIComponent(u)}catch(n){return console.error("无法解析URL以提取文件名:",r,n),"未知文件名"}}async function h(r){let n,u;if(/^https?:\/\//.test(r))try{const a=await fetch(r);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${r})`);n=await a.blob(),u=c(r)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await R({url:r});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const _=a.headers["content-disposition"];u=b(_)||"无文件名",n=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([n],u,{type:n.type})}function b(r){if(!r)return;const n=r.match(/filename\*\s*=\s*([^;]+)/i);if(n){let a=n[1].trim();a=a.replace(/^"(.*)"$/,"$1");const _=a.split("''");if(_.length===2){const H=_[0].toUpperCase(),U=_[1];try{if(H==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const u=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(u)return u[2].trim()}async function N(r){if(!r||!r.length){e.value=[];return}i.value=!0;try{const n=await Promise.all(r.map(u=>h(u)));e.value=n}catch(n){console.error("文件下载时发生错误:",n),e.value=[]}finally{i.value=!1}}const M=()=>{g("getThreeData")};return t.watch(()=>o.fileUrls,async r=>{await N(r??[])},{immediate:!0,deep:!0}),(r,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[C.value===s.ROBOT_SCENE?(t.openBlock(),t.createBlock(t.unref(y),{key:0,"file-blobs":e.value,"animation-data":r.animationData,onGetThreeData:M,threeData:o.threeData},null,8,["file-blobs","animation-data","threeData"])):C.value===s.LATHE_SCENE?(t.openBlock(),t.createBlock(t.unref(p),{key:1,fileUrls:r.fileUrls,threeData:o.threeData,trackFileType:k.value},null,8,["fileUrls","threeData","trackFileType"])):C.value===s.CPMPIP_SCENE?(t.openBlock(),t.createBlock(t.unref(v),{key:2,"file-blobs":e.value,threeData:o.threeData},null,8,["file-blobs","threeData"])):C.value===s.PREVIEW?(t.openBlock(),t.createBlock(t.unref(F),{key:3,"file-blobs":e.value,"animation-data":r.animationData},null,8,["file-blobs","animation-data"])):t.createCommentVNode("",!0),i.value?(t.openBlock(),t.createElementBlock("div",q," 文件下载中,请稍候... ")):t.createCommentVNode("",!0)],2))}}),V=L._export_sfc(x,[["__scopeId","data-v-5e37b1fe"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=V;exports.downloadAvatarApi=R;exports.threeViewerHost=W;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=A;