@rainbow-robotics/preview-host 1.1.5 → 1.2.1
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/assets/AmrCapabilityControl.DRoAHzZG.js +1 -0
- package/dist/assets/MapInfo.BRSi53tx.js +31 -0
- package/dist/assets/RbLocalizationProvider.DW8fvKpP.js +3230 -0
- package/dist/assets/{__federation_expose_App.B8ghVwJZ.js → __federation_expose_App.DIk25Rgb.js} +259 -264
- package/dist/assets/__federation_fn_import.ByOnqCI5.js +24 -0
- package/dist/assets/__federation_shared_@emotion/{styled.ETfwMsQo.js → styled.CajkAQAy.js} +1 -1
- package/dist/assets/__federation_shared_@tanstack/{react-query.fVz8BOIk.js → react-query.DZtZx7JL.js} +1 -1
- package/dist/assets/{cssMode.B1WRGz2P.js → cssMode._j_NX3lN.js} +1 -1
- package/dist/assets/{emotion-styled-base.browser.esm.BIcjgOzg.js → emotion-styled-base.browser.esm.BLoY4bbE.js} +1 -1
- package/dist/assets/{freemarker2.DxwQi0Vl.js → freemarker2.e0gdno-Q.js} +1 -1
- package/dist/assets/{handlebars.CISO_-nK.js → handlebars.Chu_cPzA.js} +1 -1
- package/dist/assets/{html.CRKtsYAs.js → html.CshfLfCA.js} +1 -1
- package/dist/assets/{htmlMode.CbOz7q93.js → htmlMode.DN7b6_e5.js} +1 -1
- package/dist/assets/index.CL9BouW3.js +1 -0
- package/dist/assets/index.CiEcqJMW.js +1 -0
- package/dist/assets/index.HCpvvIgz.js +1 -0
- package/dist/assets/{javascript.xwJmMx3N.js → javascript.BnpjX_Xu.js} +1 -1
- package/dist/assets/{jsonMode.DNTL3LsL.js → jsonMode.C9FU0l6F.js} +1 -1
- package/dist/assets/{liquid.7giyXJcd.js → liquid.DXgMtcgb.js} +1 -1
- package/dist/assets/{lspLanguageFeatures.DkpQjGEm.js → lspLanguageFeatures.CAZ7dR1a.js} +1 -1
- package/dist/assets/{mdx.DbnSttva.js → mdx.DpwNc1EL.js} +1 -1
- package/dist/assets/{python.BjlZGDuM.js → python.C-b03Dzy.js} +1 -1
- package/dist/assets/{razor.2o42V7p1.js → razor.3d91s3Ea.js} +1 -1
- package/dist/assets/remoteEntry.js +1 -1
- package/dist/assets/{tsMode.DLdDyHxy.js → tsMode.CC68na3J.js} +1 -1
- package/dist/assets/{typescript.DpZ3i4h4.js → typescript.DBglff5C.js} +1 -1
- package/dist/assets/useBottomStatusBar.B_NReCDH.js +4773 -0
- package/dist/assets/{xml.DvTdrB67.js → xml.CYPQHUER.js} +1 -1
- package/dist/assets/{yaml.CmRtfvoc.js → yaml.MSYh2xPr.js} +1 -1
- package/dist/index.html +8 -6
- package/package.json +1 -1
- package/dist/assets/AmrCapabilityControl.CIryt6ql.js +0 -1
- package/dist/assets/FactoryMap.ueKWRlfd.js +0 -7997
- package/dist/assets/MapInfo.DtV58gtH.js +0 -1
- package/dist/assets/__federation_fn_import.DdkEuT6t.js +0 -23
- package/dist/assets/index.BUHgLgDe.js +0 -1
- package/dist/assets/index.BjeZQvY_.js +0 -1
- package/dist/assets/index.DFvSDgis.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./__federation_expose_App.
|
|
1
|
+
import{l as e}from"./__federation_expose_App.DIk25Rgb.js";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{n as conf,o as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./__federation_expose_App.
|
|
1
|
+
import{l as e}from"./__federation_expose_App.DIk25Rgb.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
|
package/dist/index.html
CHANGED
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Rainbow Robotics System</title>
|
|
8
8
|
<script type="importmap">{"imports":{"react":"/plugin-shared/react.js","react/jsx-runtime":"/plugin-shared/react_jsx-runtime.js","react/jsx-dev-runtime":"/plugin-shared/react_jsx-dev-runtime.js","react-dom":"/plugin-shared/react-dom.js","react-dom/client":"/plugin-shared/react-dom_client.js","@rainbow-robotics/plugin-ui/react":"/plugin-shared/plugin-ui_react.js","@rainbow-robotics/plugin-ui/sdk":"/plugin-shared/plugin-ui_sdk.js","@rainbow-robotics/plugin-ui/host-ui":"/plugin-shared/plugin-ui_host-ui.js","@rainbow-robotics/plugin-ui/ws":"/plugin-shared/plugin-ui_ws.js"}}</script>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index.
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/__federation_fn_import.
|
|
9
|
+
<script type="module" crossorigin src="/assets/index.CiEcqJMW.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/__federation_fn_import.ByOnqCI5.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/index.P6snMalu.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/emotion-styled-base.browser.esm.BIcjgOzg.js">
|
|
13
12
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime.CBqCNPYB.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/emotion-styled-base.browser.esm.BLoY4bbE.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/RbLocalizationProvider.DW8fvKpP.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/index.B3zY1kf7.js">
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/index.
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/index.HCpvvIgz.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/useBottomStatusBar.B_NReCDH.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_App.DIk25Rgb.js">
|
|
19
|
+
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as f}from"./__federation_fn_import.DdkEuT6t.js";import{dH as g,aG as s,a2 as t,aT as v,aR as p,a3 as b,c$ as c,cF as O,bT as F,bY as B,aS as E,cq as P,cC as w,aW as T,gV as R,hB as _}from"./FactoryMap.ueKWRlfd.js";import{b as D}from"./index.BjeZQvY_.js";const{useQuery:M}=await f("@tanstack/react-query"),C=[{key:"dock",endpoint:"/{robot_model}/capability/dock",labelKey:"move.amr.rightPanel.capability.dock"},{key:"io",endpoint:"/{robot_model}/capability/Io",labelKey:"move.amr.rightPanel.capability.io"},{key:"camera",endpoint:"/{robot_model}/capability/camera",labelKey:"move.amr.rightPanel.capability.camera"},{key:"lidar2d",endpoint:"/{robot_model}/capability/lidar2d",labelKey:"move.amr.rightPanel.capability.lidar2d"},{key:"lidar3d",endpoint:"/{robot_model}/capability/lidar3d",labelKey:"move.amr.rightPanel.capability.lidar3d"},{key:"imu",endpoint:"/{robot_model}/capability/imu",labelKey:"move.amr.rightPanel.capability.imu"},{key:"safetyBumper",endpoint:"/{robot_model}/capability/safetyBumper",labelKey:"move.amr.rightPanel.capability.safetyBumper"},{key:"safetyInterlock",endpoint:"/{robot_model}/capability/safetyInterlock",labelKey:"move.amr.rightPanel.capability.safetyInterlock"},{key:"safetyObstacle",endpoint:"/{robot_model}/capability/safetyObstacle",labelKey:"move.amr.rightPanel.capability.safetyObstacle"},{key:"safetyOperationStop",endpoint:"/{robot_model}/capability/safetyOperationStop",labelKey:"move.amr.rightPanel.capability.safetyOperationStop"},{key:"safetySpeedControl",endpoint:"/{robot_model}/capability/safetySpeedControl",labelKey:"move.amr.rightPanel.capability.safetySpeedControl"},{key:"tabos",endpoint:"/{robot_model}/capability/tabos",labelKey:"move.amr.rightPanel.capability.tabos"}],L=e=>typeof e=="object"&&e!==null&&"enabled"in e&&e.enabled===!1,K=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"message"in e){const a=e.message;if(typeof a=="string")return a}},q=async({robot_model:e})=>{const a=await Promise.allSettled(C.map(l=>{const n=l.endpoint.replace("{robot_model}",e);return D.get(n)}));return C.map((l,n)=>{const r=a[n];return r.status==="fulfilled"?{...l,supported:!L(r.value),data:r.value}:{...l,supported:!1,data:null,errorMessage:K(r.reason)}})},$=({robot_model:e,enabled:a=!0})=>M({queryKey:["amrCapabilities",e],queryFn:()=>q({robot_model:e}),enabled:!!e&&a,staleTime:5*1e3,gcTime:60*1e3}),{useMutation:U}=await f("@tanstack/react-query"),V=()=>U({mutationFn:({robot_model:e,target:a,frequency:l})=>D.post(`/${e}/control/streamFrequency`,{target:a,frequency:Math.min(10,Math.max(0,l))})}),{useState:k}=await f("react"),j=4294967295,x=e=>{if(!(e==null||e===j))return`${e} ms`},G={0:"NONE",1:"CHARGING",2:"COMPLETE",3:"FAIL",4:"CANCEL"},Y={0:"DEFAULT",1:"TABOS"},z={0:"CABLE",1:"CONTACT",2:"INDUCTIVE"},H={0:"RPLIDAR",1:"SICK",2:"LAKI",3:"LIVOX",4:"HOKUYO"},Q={0:"ORBBEC"},i=({label:e,children:a})=>s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:e}),t("span",{className:b("typo-compact-xs-normal text-right",a!=null?"text-fg-default":"text-fg-subtler"),children:a??"—"})]}),X={default:"gray",success:"green",warning:"orange",danger:"red"},y=({label:e,variant:a="default"})=>t(T,{type:"soft",color:X[a],children:e}),h=({label:e,value:a})=>t(i,{label:e,children:t(y,{label:a?"ON":"OFF",variant:a?"success":"default"})}),u=({label:e,bits:a})=>s(c,{className:"gap-1",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:e}),a?.length?t(p,{className:"gap-1",children:a.map((l,n)=>t("div",{className:b("size-4 rounded-sm border text-center leading-4",l?"border-fg-success bg-fill-success-subtlest":"border-border-subtler bg-fill-disabled"),children:t("span",{className:b("typo-compact-2xs-normal",l?"text-fg-success":"text-fg-subtler"),children:n})},n))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]}),N=({label:e,connection:a,rows:l,children:n})=>{const{t:r}=g();return s(c,{className:"bg-fill-disabled gap-1.5 rounded-md p-2.5",children:[s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-semibold text-fg-default min-w-0 break-words",children:e}),t("span",{className:b("typo-compact-2xs-medium shrink-0",a?"text-fg-success":"text-fg-subtler"),children:r(a?"settings.amr.frs.status.connected":"settings.amr.frs.status.disconnected")})]}),l.map(({key:o,value:d})=>t(i,{label:o,children:d},o)),n]})},W=({label:e,value:a})=>t(T,{type:"soft",color:a?"green":"gray",children:s(p,{className:"items-center gap-1",children:[a?t(R,{className:"size-3"}):t(_,{className:"size-3"}),t("span",{children:e}),t("span",{className:"font-semibold",children:a?"On":"Off"})]})}),I=({flags:e})=>t(p,{className:"flex-wrap gap-1.5",children:e.map(({label:a,value:l})=>t(W,{label:a,value:l},a))}),J=({streams:e})=>e.length?s(c,{className:"border-subtle mt-0.5 gap-1 border-t pt-1.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Streams"}),t(p,{className:"flex-wrap gap-1",children:e.map(a=>s(p,{className:"border-subtle bg-alt-1 items-center gap-1 rounded px-1.5 py-1",children:[t("span",{className:"typo-compact-2xs-semibold text-fg-default",children:a.quality}),s("span",{className:"typo-compact-2xs-normal text-fg-subtle",children:[a.width,"x",a.height]}),s("span",{className:"typo-compact-2xs-normal text-fg-subtler",children:[a.fps,"fps"]})]},`${a.camId}-${a.quality}`))})]}):null,Z=({data:e})=>{const a=G[e.chargeState??-1]??String(e.chargeState),l=e.chargeState===1?"success":e.chargeState===3?"danger":e.chargeState===4?"warning":"default";return s(c,{className:"gap-2",children:[s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Dock State",value:e.dockState}),t(i,{label:"Charge State",children:t(y,{label:a,variant:l})}),s(i,{label:"Battery",children:[e.batteryPercent?.toFixed(1)," %"]}),s(i,{label:"Charge Current",children:[e.chargeCurrent?.toFixed(2)," A"]}),s(i,{label:"Contact Voltage",children:[e.contactVoltage?.toFixed(2)," V"]}),t(i,{label:"Battery Type",children:t(y,{label:Y[e.batteryType??0]??"—"})})]}),s(p,{className:"items-center gap-1.5 px-0.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:"Charge Type"}),e.chargeType?.length?t(p,{className:"flex-wrap gap-1.5",children:e.chargeType.map(n=>t(y,{label:z[n]??String(n),variant:"default"},n))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]})]})},ee=({data:e})=>s(c,{className:"gap-3 p-0.5",children:[t(u,{label:"MCU0 DIO",bits:e.mcu0Dio}),t(u,{label:"MCU1 DIO",bits:e.mcu1Dio}),t(u,{label:"MCU0 DIN",bits:e.mcu0Din}),t(u,{label:"MCU1 DIN",bits:e.mcu1Din})]}),ae=({data:e})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs},{label:"Depth",value:e.enabledDepth},{label:"Filter",value:e.enabledFilter}]}),e.info?.length?e.info.map((a,l)=>{const n=typeof a.type=="number"?Q[a.type]??String(a.type):a.type??"—",r=a.camId??a.index??l,o=e.rtspInfo?.filter(d=>d.camId===r)??[];return t(N,{label:`Camera ${r}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:n},{key:"TF",value:a.tf?.length?a.tf.map(d=>d.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(a.dataAgeMs)}],children:t(J,{streams:o})},l)}):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),A=({data:e,is3d:a=!1})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs}]}),e.info?.length?e.info.map((l,n)=>t(N,{label:`Lidar ${l.index??n}${l.serial?` · ${l.serial}`:""}`,connection:l.connection,rows:[{key:"Type",value:H[l.type]??String(l.type??"—")},...a?[]:[{key:"IP",value:l.ip}],{key:"Safety",value:l.safety!==void 0?l.safety?"Safety":"Normal":void 0},{key:"TF",value:l.tf?.length?l.tf.map(r=>r.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(l.dataAgeMs)}]},n)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),te=({data:e})=>t(c,{className:"gap-2",children:e.info?.length?e.info.map((a,l)=>t(N,{label:`IMU ${a.index??l}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:a.type===1?"IMU":"DEFAULT"},{key:"Data Age",value:x(a.dataAgeMs)}]},l)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})}),le=({data:e})=>{const a=[{label:"Bumper State",value:e.bumperState},{label:"Interlock State",value:e.interlockState},{label:"Obstacle Detect",value:e.obsDetect},{label:"Operation Stop",value:e.operationStopState},{label:"Speed Control",value:e.speedControlState}].filter(l=>l.value!==void 0);return s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Enabled",value:e.enabled}),a.map(l=>t(h,{label:l.label,value:l.value},l.label))]})},se=({data:e})=>s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[s(i,{label:"Voltage",children:[e.tabosVoltage?.toFixed(2)," V"]}),s(i,{label:"Current",children:[e.tabosCurrent?.toFixed(2)," A"]}),s(i,{label:"SOC",children:[e.tabosSoc?.toFixed(1)," %"]}),s(i,{label:"SOH",children:[e.tabosSoh?.toFixed(1)," %"]}),s(i,{label:"Temp",children:[e.tabosTemp?.toFixed(1)," °C"]})]}),ne=({capKey:e,data:a})=>{switch(e){case"dock":return t(Z,{data:a});case"io":return t(ee,{data:a});case"camera":return t(ae,{data:a});case"lidar2d":return t(A,{data:a});case"lidar3d":return t(A,{data:a,is3d:!0});case"imu":return t(te,{data:a});case"tabos":return t(se,{data:a});default:return t(le,{data:a})}},re=[{label:"LiDAR 2D",value:"lidar2d"},{label:"LiDAR 3D",value:"lidar3d"},{label:"OBS Map",value:"obsMap"}],ce=({robotModel:e})=>{const[a,l]=k("lidar2d"),[n,r]=k("1"),{mutate:o,isPending:d}=V();return s(c,{className:"gap-2 pb-1",children:[s(p,{className:"items-center justify-between gap-2",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Target"}),t(B,{size:"2xs",variant:"brand",disabled:d,onClick:()=>{const m=Math.min(10,Math.max(0,Number(n)));o({robot_model:e,target:a,frequency:m})},children:"Set"})]}),t(P,{size:"sm",value:a,handleChange:m=>l(m),children:re.map(({label:m,value:S})=>t(E,{value:S,children:m},S))}),t(p,{className:"items-center gap-2",children:t(w,{className:"flex-1",size:"sm",value:n,step:1,digit:0,fixedDigit:0,min:"0",max:"10",handleChange:m=>r(m)})})]})},oe=({item:e})=>{const{t:a}=g();return e.supported?e.data?t("div",{className:"pb-1",children:t(ne,{capKey:e.key,data:e.data})}):null:t("p",{className:"typo-compact-xs-normal text-fg-disabled px-1 py-2",children:a("move.amr.rightPanel.capability.status.notSupported")})},ie=()=>{const{t:e}=g();return t(F,{className:"flex-1 [&_[data-slot='empty-view-section']]:h-full",type:"icon",icon:t(O,{size:20}),message:e("move.amr.rightPanel.capability.status.loading")})},ue=({className:e,robotModel:a})=>{const{t:l}=g(),{data:n,isLoading:r}=$({robot_model:a});return s(c,{className:b("AmrCapabilityControl h-full min-h-0",e),children:[r&&t(ie,{}),(n??[]).map(o=>t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{disabled:!o.supported,title:t(p,{className:"w-full items-center justify-between gap-2",children:t("span",{className:b("typo-compact-sm2-semibold min-w-0 truncate",o.supported?"text-fg-default":"text-fg-disabled"),children:l(o.labelKey)})}),children:t(oe,{item:o})})},o.key)),t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{title:t("span",{className:"typo-compact-sm2-semibold text-fg-default",children:l("move.amr.rightPanel.capability.streamFrequency")}),children:t(ce,{robotModel:a})})})]})};export{ue as default};
|