ss-component-new 1.2.5 → 1.2.6

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 (116) hide show
  1. package/dist/OrbitControls-Co_9huz0.cjs +1 -0
  2. package/dist/OrbitControls-DA4VpOM_.js +458 -0
  3. package/dist/STLLoader-DmGTF0Nv.js +657 -0
  4. package/dist/STLLoader-RU7KqloS.cjs +6 -0
  5. package/dist/{animationData-C-RfOMuc.cjs → animationData-B0K2ghu6.cjs} +1 -1
  6. package/dist/{animationData-y8dsr3_3.js → animationData-GqECkAbz.js} +4 -4
  7. package/dist/{array-A59WrroX.js → array-D65aMM6H.js} +1 -1
  8. package/dist/{array-BtZq8qON.cjs → array-DMPAgNcb.cjs} +1 -1
  9. package/dist/{iconfont-7cEds3Xj.js → iconfont-ljBfzBSE.js} +2 -2
  10. package/dist/{iconfont-CsuwJCas.cjs → iconfont-t5epssvu.cjs} +1 -1
  11. package/dist/{index-CIH_h4z2.js → index--rLSLEk3.js} +2 -2
  12. package/dist/{index-BstfB43W.cjs → index-67QO-qDa.cjs} +1 -1
  13. package/dist/{index-DTOlfKkI.cjs → index-87kRWJv8.cjs} +1 -1
  14. package/dist/{index-Y9ssLsHN.js → index-8Dyi4QCI.js} +183 -184
  15. package/dist/{index-CxOoKysB.cjs → index-8yRiF_z8.cjs} +1 -1
  16. package/dist/{index-CwnxmCht.js → index-9zEdW6xv.js} +2 -2
  17. package/dist/{index-DQP6am4n.cjs → index-B14iwpkN.cjs} +1 -1
  18. package/dist/{index-De5HlcQy.cjs → index-B7hLDNQ6.cjs} +1 -1
  19. package/dist/{index-Cli0OESv.js → index-BEoEUXZe.js} +10 -10
  20. package/dist/{index-DLBS_tgM.cjs → index-BHJ-tVLT.cjs} +1 -1
  21. package/dist/{index-DX6yycjK.js → index-BMMYAqF1.js} +1 -1
  22. package/dist/{index-DSb6SjE3.js → index-BNOx3XL5.js} +1 -1
  23. package/dist/{index-C5z5UbxK.cjs → index-BNvpuVyw.cjs} +1 -1
  24. package/dist/{index-1z9RrjZc.cjs → index-BOJUyAaV.cjs} +1 -1
  25. package/dist/{index-D2ZBhyUI.cjs → index-BYUPvuvs.cjs} +1 -1
  26. package/dist/{index-CKowlJfn.cjs → index-BaRkv5oc.cjs} +1 -1
  27. package/dist/{index-C1oE8qIa.cjs → index-BpR7F1Fp.cjs} +1 -1
  28. package/dist/{index-BLgbZvdb.js → index-Bs2K1FVH.js} +2 -2
  29. package/dist/{index-NcJvspI2.cjs → index-BsM9qdbC.cjs} +1 -1
  30. package/dist/{index-B8mnYY10.js → index-BsfJJu0R.js} +6 -6
  31. package/dist/{index-BCbxnJnH.js → index-Bw_JtuzR.js} +152 -152
  32. package/dist/{index-C461j30b.js → index-C1FOuBuy.js} +1 -1
  33. package/dist/{index-COKoQtgg.cjs → index-C5CKSB0e.cjs} +1 -1
  34. package/dist/{index-Bc4DtcwM.js → index-C8UOMPgt.js} +2 -2
  35. package/dist/{index-3W-Y0xpv.cjs → index-CA-FC_OL.cjs} +1 -1
  36. package/dist/{index-DNaqgwk-.js → index-CArSUfnV.js} +20 -20
  37. package/dist/{index-DU_1ks22.js → index-CBuqdsPh.js} +4 -4
  38. package/dist/{index-C_GxFCMg.js → index-CMCrQ36H.js} +3 -3
  39. package/dist/{index-DYU11-M5.js → index-CRj9VM12.js} +6 -6
  40. package/dist/{index-700WRwjB.js → index-CRrAiL5l.js} +4 -4
  41. package/dist/{index-Dzrvm_bg.js → index-CShBWCYm.js} +1 -1
  42. package/dist/{index-BwjuTBrR.js → index-CTkF2kl_.js} +1 -1
  43. package/dist/{index-COV5L9rX.cjs → index-CZaBF851.cjs} +1 -1
  44. package/dist/{index-DTCYk2wI.js → index-CbA74tCL.js} +2 -2
  45. package/dist/{index-DgymXtI4.js → index-CbDu4gfZ.js} +2 -2
  46. package/dist/{index-Bxyl11ug.cjs → index-CePZE-QA.cjs} +1 -1
  47. package/dist/{index-DIOVPmEg.cjs → index-CedgKpsz.cjs} +1 -1
  48. package/dist/{index-O8If5b4T.cjs → index-Cm3z0Vmi.cjs} +1 -1
  49. package/dist/{index-Cj8I0l8I.js → index-D-WcrLQv.js} +4 -4
  50. package/dist/{index-OsCw48Sn.cjs → index-D6mwkqWY.cjs} +1 -1
  51. package/dist/{index-BKJg9Djt.cjs → index-D8510-YQ.cjs} +1 -1
  52. package/dist/{index-Bb7Xqt9a.cjs → index-D9oqICYV.cjs} +1 -1
  53. package/dist/{index-BvApH9cT.js → index-DGepdvRW.js} +2 -2
  54. package/dist/{index-ByVPv-Yz.js → index-DGi-ANHr.js} +5 -5
  55. package/dist/{index-C4zGJtAL.js → index-DJGsDpDp.js} +3 -3
  56. package/dist/{index-CIcvrh1S.cjs → index-DPBmAgEA.cjs} +1 -1
  57. package/dist/{index-yQZ9D_YR.js → index-DPWc4No_.js} +2 -2
  58. package/dist/{index-CxnH4vfV.cjs → index-DSchKIyh.cjs} +1 -1
  59. package/dist/{index-CYp77kPp.js → index-DV_ZZQBO.js} +1 -1
  60. package/dist/{index-D8WF1ILq.cjs → index-DVmoPvzr.cjs} +1 -1
  61. package/dist/{index-DWrDb90D.cjs → index-DWs7-g1h.cjs} +1 -1
  62. package/dist/{index-HvKkM5Lq.cjs → index-DZ8a7BZ1.cjs} +1 -1
  63. package/dist/{index-Y6CA0bCm.cjs → index-DcUUpSE1.cjs} +1 -1
  64. package/dist/{index-CX_HTfbe.js → index-DvpVQvAe.js} +2 -2
  65. package/dist/{index-DYx6r9hf.cjs → index-FK1YYpjN.cjs} +1 -1
  66. package/dist/{index-BYDi6Owv.js → index-HvKjB6_P.js} +3 -3
  67. package/dist/{index-DPk1uhLn.js → index-LADv0t0E.js} +12 -12
  68. package/dist/{index-D3-XwkD_.js → index-_66uQhcl.js} +6 -6
  69. package/dist/{index-CJK74ski.cjs → index-_uyv24Pt.cjs} +1 -1
  70. package/dist/{index-CdELRsxO.js → index-g4qw0jRy.js} +6 -6
  71. package/dist/{index-GmZ7sLUW.cjs → index-mtuIEfrj.cjs} +1 -1
  72. package/dist/{index-CjI5pDiU.cjs → index-tttYIzsn.cjs} +1 -1
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLUx599w.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BSOYWm_U.cjs} +1 -1
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BhLzDN6s.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DIMJusrg.js} +2 -2
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-llikchjv.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-D2VLEzGB.cjs} +1 -1
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-D-2EkcBi.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-D58IzjOR.js} +6 -6
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DiMotFL8.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BnNwKutS.cjs} +1 -1
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DodcXWpb.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CJCvJvBM.js} +13 -13
  79. package/dist/{index.vue_vue_type_style_index_1_lang-CFvcnWO4.js → index.vue_vue_type_style_index_1_lang-D5Hjs-g0.js} +1 -1
  80. package/dist/{index.vue_vue_type_style_index_1_lang-BJQzMo8k.cjs → index.vue_vue_type_style_index_1_lang-H_pReDxj.cjs} +46 -45
  81. package/dist/{index.vue_vue_type_style_index_1_lang-BcYTED7W.cjs → index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs} +1 -1
  82. package/dist/{index.vue_vue_type_style_index_1_lang-BMzWMYje.js → index.vue_vue_type_style_index_1_lang-hBa3nAgx.js} +5100 -5012
  83. package/dist/{isString-BNK38WbE.js → isString--ZVOCy4V.js} +1 -1
  84. package/dist/{isString-BmAegMGI.cjs → isString-CELwppr9.cjs} +1 -1
  85. package/dist/{main-C3-nmz2f.cjs → main-C6Iw-pcH.cjs} +1 -1
  86. package/dist/{main-DS4xl7Jm.js → main-CygliYyN.js} +5 -5
  87. package/dist/ss-component.cjs +1 -1
  88. package/dist/ss-component.css +1 -1
  89. package/dist/ss-component.js +11 -11
  90. package/dist/ss-component2.cjs +1 -1
  91. package/dist/ss-component2.js +12 -12
  92. package/dist/three-viewport-gizmo-BHznJ6W3.js +26015 -0
  93. package/dist/three-viewport-gizmo-BV37JzRa.cjs +4197 -0
  94. package/dist/{threeLatheView-BzHB-t_G.cjs → threeLatheView-CdUoB0Te.cjs} +1 -1
  95. package/dist/{threeLatheView-sTBlm0tt.js → threeLatheView-DzpPpdDr.js} +4 -4
  96. package/dist/{threeModel-BoNyasP7.cjs → threeModel-BUCLJlE5.cjs} +1 -1
  97. package/dist/{threeModel-CaxS7sQg.js → threeModel-BfMMeZCc.js} +5 -5
  98. package/dist/threePreview-BEqzg370.js +1972 -0
  99. package/dist/threePreview-C-JW_pcY.cjs +1 -0
  100. package/dist/{threeSceneView-wQdzFhdw.cjs → threeSceneView-BTsG2QJg.cjs} +1 -1
  101. package/dist/{threeSceneView-BIAOu60U.js → threeSceneView-DV5dsTZZ.js} +24 -24
  102. package/dist/{threeSceneViewForCPMPIP-XYA9PRYN.js → threeSceneViewForCPMPIP-Bexwqkry.js} +27 -27
  103. package/dist/{threeSceneViewForCPMPIP-Bkr16khM.cjs → threeSceneViewForCPMPIP-DwLWGNUd.cjs} +2 -2
  104. package/dist/{threeViewerHost-D1i6LUb6.cjs → threeViewerHost-CRqcYbJE.cjs} +1 -1
  105. package/dist/{threeViewerHost-BkOYLPdk.js → threeViewerHost-CTjd2V1D.js} +4 -4
  106. package/dist/{useRayCaster-CdDOIWOo.js → useRayCaster-D0_7oJan.js} +12 -12
  107. package/dist/{useRayCaster-0bnGc301.cjs → useRayCaster-DN56HpNP.cjs} +1 -1
  108. package/package.json +1 -1
  109. package/dist/OrbitControls-D1lM0xvz.cjs +0 -1
  110. package/dist/OrbitControls-DI8fa9gz.js +0 -419
  111. package/dist/STLLoader-KxFIlfhN.cjs +0 -6
  112. package/dist/STLLoader-memlq1bT.js +0 -609
  113. package/dist/three-viewport-gizmo-BxFHxv_x.js +0 -18587
  114. package/dist/three-viewport-gizmo-CwaL5sMV.cjs +0 -4195
  115. package/dist/threePreview-Cy7NY-gw.cjs +0 -1
  116. package/dist/threePreview-DPyqhBkJ.js +0 -1873
@@ -1,4 +1,4 @@
1
- import { bC as t, h as i, bD as s } from "./index-CYp77kPp.js";
1
+ import { bC as t, h as i, bD as s } from "./index-DV_ZZQBO.js";
2
2
  var n = "[object String]";
3
3
  function g(r) {
4
4
  return typeof r == "string" || !i(r) && t(r) && s(r) == n;
@@ -1 +1 @@
1
- "use strict";const t=require("./index-1z9RrjZc.cjs");var r="[object String]";function n(i){return typeof i=="string"||!t.isArray(i)&&t.isObjectLike(i)&&t.baseGetTag(i)==r}exports.isString=n;
1
+ "use strict";const t=require("./index-BOJUyAaV.cjs");var r="[object String]";function n(i){return typeof i=="string"||!t.isArray(i)&&t.isObjectLike(i)&&t.baseGetTag(i)==r}exports.isString=n;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-DYx6r9hf.cjs"),i=require("./index-1z9RrjZc.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-BcYTED7W.cjs"),Z=require("./index-BKJg9Djt.cjs"),G=require("./array-BtZq8qON.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-FK1YYpjN.cjs"),i=require("./index-BOJUyAaV.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs"),Z=require("./index-D8510-YQ.cjs"),G=require("./array-DMPAgNcb.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
@@ -1,9 +1,9 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, onUnmounted as ie, createVNode as A } from "vue";
2
- import { m as me, a as de, b as ye } from "./index-DYU11-M5.js";
3
- import { p as E, s as ee, c as k } from "./index-CYp77kPp.js";
4
- import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-CFvcnWO4.js";
5
- import { g as ge } from "./index-Y9ssLsHN.js";
6
- import { e as he, a as ke } from "./array-A59WrroX.js";
2
+ import { m as me, a as de, b as ye } from "./index-CRj9VM12.js";
3
+ import { p as E, s as ee, c as k } from "./index-DV_ZZQBO.js";
4
+ import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-D5Hjs-g0.js";
5
+ import { g as ge } from "./index-8Dyi4QCI.js";
6
+ import { e as he, a as ke } from "./array-D65aMM6H.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const x = [
9
9
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLUx599w.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-BcYTED7W.cjs");require("./index-1z9RrjZc.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-C3-nmz2f.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-OsCw48Sn.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CKowlJfn.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DWrDb90D.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-HvKkM5Lq.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-D8WF1ILq.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-BoNyasP7.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-D1i6LUb6.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BSOYWm_U.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs");require("./index-BOJUyAaV.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-C6Iw-pcH.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-D6mwkqWY.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BaRkv5oc.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DWs7-g1h.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DZ8a7BZ1.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DVmoPvzr.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-BUCLJlE5.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-CRqcYbJE.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;