@adcops/autocore-react 3.0.40 → 3.1.5

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 (277) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/additional-docs/AutoCoreTagContext.md +441 -0
  3. package/dist/assets/BlocklyLogo.d.ts +1 -0
  4. package/dist/assets/BlocklyLogo.d.ts.map +1 -0
  5. package/dist/assets/Distance.d.ts +1 -0
  6. package/dist/assets/Distance.d.ts.map +1 -0
  7. package/dist/assets/JogLong.d.ts +1 -0
  8. package/dist/assets/JogLong.d.ts.map +1 -0
  9. package/dist/assets/JogMedium.d.ts +1 -0
  10. package/dist/assets/JogMedium.d.ts.map +1 -0
  11. package/dist/assets/JogShort.d.ts +1 -0
  12. package/dist/assets/JogShort.d.ts.map +1 -0
  13. package/dist/assets/PythonLogo.d.ts +1 -0
  14. package/dist/assets/PythonLogo.d.ts.map +1 -0
  15. package/dist/assets/Rotation3D.d.ts +1 -0
  16. package/dist/assets/Rotation3D.d.ts.map +1 -0
  17. package/dist/assets/RotationCcw.d.ts +1 -0
  18. package/dist/assets/RotationCcw.d.ts.map +1 -0
  19. package/dist/assets/RotationCcwA.d.ts +1 -0
  20. package/dist/assets/RotationCcwA.d.ts.map +1 -0
  21. package/dist/assets/RotationCcwB.d.ts +1 -0
  22. package/dist/assets/RotationCcwB.d.ts.map +1 -0
  23. package/dist/assets/RotationCcwC.d.ts +1 -0
  24. package/dist/assets/RotationCcwC.d.ts.map +1 -0
  25. package/dist/assets/RotationCw.d.ts +1 -0
  26. package/dist/assets/RotationCw.d.ts.map +1 -0
  27. package/dist/assets/RotationCwA.d.ts +1 -0
  28. package/dist/assets/RotationCwA.d.ts.map +1 -0
  29. package/dist/assets/RotationCwB.d.ts +1 -0
  30. package/dist/assets/RotationCwB.d.ts.map +1 -0
  31. package/dist/assets/RotationCwC.d.ts +1 -0
  32. package/dist/assets/RotationCwC.d.ts.map +1 -0
  33. package/dist/assets/Run.d.ts +1 -0
  34. package/dist/assets/Run.d.ts.map +1 -0
  35. package/dist/assets/Speed.d.ts +1 -0
  36. package/dist/assets/Speed.d.ts.map +1 -0
  37. package/dist/assets/SpeedFast.d.ts +1 -0
  38. package/dist/assets/SpeedFast.d.ts.map +1 -0
  39. package/dist/assets/SpeedMedium.d.ts +1 -0
  40. package/dist/assets/SpeedMedium.d.ts.map +1 -0
  41. package/dist/assets/SpeedNone.d.ts +1 -0
  42. package/dist/assets/SpeedNone.d.ts.map +1 -0
  43. package/dist/assets/SpeedSlow.d.ts +1 -0
  44. package/dist/assets/SpeedSlow.d.ts.map +1 -0
  45. package/dist/assets/Walk.d.ts +1 -0
  46. package/dist/assets/Walk.d.ts.map +1 -0
  47. package/dist/assets/index.d.ts +1 -0
  48. package/dist/assets/index.d.ts.map +1 -0
  49. package/dist/components/AutoCoreDevPanel.d.ts +144 -0
  50. package/dist/components/AutoCoreDevPanel.d.ts.map +1 -0
  51. package/dist/components/AutoCoreDevPanel.js +1 -0
  52. package/dist/components/BlocklyEditor.d.ts +1 -0
  53. package/dist/components/BlocklyEditor.d.ts.map +1 -0
  54. package/dist/components/BlocklyEditor.js +1 -1
  55. package/dist/components/CodeEditor.d.ts +2 -1
  56. package/dist/components/CodeEditor.d.ts.map +1 -0
  57. package/dist/components/CodeEditor.js +1 -1
  58. package/dist/components/FileList.d.ts +1 -0
  59. package/dist/components/FileList.d.ts.map +1 -0
  60. package/dist/components/FileList.js +1 -1
  61. package/dist/components/FileSelect.d.ts +1 -0
  62. package/dist/components/FileSelect.d.ts.map +1 -0
  63. package/dist/components/FileSelect.js +1 -1
  64. package/dist/components/FitText.d.ts +1 -0
  65. package/dist/components/FitText.d.ts.map +1 -0
  66. package/dist/components/FitText.js +1 -1
  67. package/dist/components/Indicator.d.ts +2 -1
  68. package/dist/components/Indicator.d.ts.map +1 -0
  69. package/dist/components/Indicator.js +1 -1
  70. package/dist/components/IndicatorButton.d.ts +2 -1
  71. package/dist/components/IndicatorButton.d.ts.map +1 -0
  72. package/dist/components/IndicatorButton.js +1 -1
  73. package/dist/components/IndicatorRect.d.ts +2 -1
  74. package/dist/components/IndicatorRect.d.ts.map +1 -0
  75. package/dist/components/JogPanel.d.ts +1 -0
  76. package/dist/components/JogPanel.d.ts.map +1 -0
  77. package/dist/components/Lamp.d.ts +2 -1
  78. package/dist/components/Lamp.d.ts.map +1 -0
  79. package/dist/components/Lamp.js +1 -1
  80. package/dist/components/Osk.d.ts +1 -0
  81. package/dist/components/Osk.d.ts.map +1 -0
  82. package/dist/components/Osk.js +1 -1
  83. package/dist/components/OskDialog.d.ts +1 -0
  84. package/dist/components/OskDialog.d.ts.map +1 -0
  85. package/dist/components/ProgressBarWithValue.d.ts +1 -0
  86. package/dist/components/ProgressBarWithValue.d.ts.map +1 -0
  87. package/dist/components/ProgressBarWithValue.js +1 -1
  88. package/dist/components/TextInput.d.ts +62 -103
  89. package/dist/components/TextInput.d.ts.map +1 -0
  90. package/dist/components/TextInput.js +1 -1
  91. package/dist/components/ToggleGroup.d.ts +2 -1
  92. package/dist/components/ToggleGroup.d.ts.map +1 -0
  93. package/dist/components/ToggleGroup.js +1 -1
  94. package/dist/components/ValueDisplay.d.ts +3 -2
  95. package/dist/components/ValueDisplay.d.ts.map +1 -0
  96. package/dist/components/ValueDisplay.js +1 -1
  97. package/dist/components/ValueIndicator.d.ts +2 -1
  98. package/dist/components/ValueIndicator.d.ts.map +1 -0
  99. package/dist/components/ValueIndicator.js +1 -1
  100. package/dist/components/ValueInput.d.ts +2 -1
  101. package/dist/components/ValueInput.d.ts.map +1 -0
  102. package/dist/components/ValueInput.js +1 -1
  103. package/dist/core/ActionMode.d.ts +1 -0
  104. package/dist/core/ActionMode.d.ts.map +1 -0
  105. package/dist/core/AutoCoreTagContext.d.ts +243 -0
  106. package/dist/core/AutoCoreTagContext.d.ts.map +1 -0
  107. package/dist/core/AutoCoreTagContext.js +1 -0
  108. package/dist/core/AutoCoreTagTypes.d.ts +162 -0
  109. package/dist/core/AutoCoreTagTypes.d.ts.map +1 -0
  110. package/dist/core/AutoCoreTagTypes.js +1 -0
  111. package/dist/core/EventEmitterContext.d.ts +295 -2
  112. package/dist/core/EventEmitterContext.d.ts.map +1 -0
  113. package/dist/core/EventEmitterContext.js +1 -1
  114. package/dist/core/IndicatorButtonState.d.ts +1 -0
  115. package/dist/core/IndicatorButtonState.d.ts.map +1 -0
  116. package/dist/core/IndicatorColor.d.ts +1 -0
  117. package/dist/core/IndicatorColor.d.ts.map +1 -0
  118. package/dist/core/MaskPatterns.d.ts +1 -0
  119. package/dist/core/MaskPatterns.d.ts.map +1 -0
  120. package/dist/core/NumerableTypes.d.ts +1 -0
  121. package/dist/core/NumerableTypes.d.ts.map +1 -0
  122. package/dist/core/NumerableTypes.js +1 -1
  123. package/dist/core/PositionContext.d.ts +1 -1
  124. package/dist/core/PositionContext.d.ts.map +1 -0
  125. package/dist/core/UniqueId.d.ts +1 -0
  126. package/dist/core/UniqueId.d.ts.map +1 -0
  127. package/dist/core/ValueSimulator.d.ts +2 -1
  128. package/dist/core/ValueSimulator.d.ts.map +1 -0
  129. package/dist/core/ValueSimulator.js +1 -1
  130. package/dist/core/hoc.d.ts +1 -0
  131. package/dist/core/hoc.d.ts.map +1 -0
  132. package/dist/core/hoc.js +1 -1
  133. package/dist/hooks/adsHooks.d.ts +1 -0
  134. package/dist/hooks/adsHooks.d.ts.map +1 -0
  135. package/dist/hooks/adsHooks.js +1 -1
  136. package/dist/hooks/commandHooks.d.ts +1 -0
  137. package/dist/hooks/commandHooks.d.ts.map +1 -0
  138. package/dist/hooks/commandHooks.js +1 -1
  139. package/dist/hooks/index.d.ts +1 -0
  140. package/dist/hooks/index.d.ts.map +1 -0
  141. package/dist/hooks/useAutoCoreTag.d.ts +26 -0
  142. package/dist/hooks/useAutoCoreTag.d.ts.map +1 -0
  143. package/dist/hooks/useAutoCoreTag.js +1 -0
  144. package/dist/hooks/useScaledValue.d.ts +1 -0
  145. package/dist/hooks/useScaledValue.d.ts.map +1 -0
  146. package/dist/hooks/useScaledValue.js +1 -1
  147. package/dist/hub/CommandMessage.d.ts +1 -0
  148. package/dist/hub/CommandMessage.d.ts.map +1 -0
  149. package/dist/hub/HubBase.d.ts +3 -2
  150. package/dist/hub/HubBase.d.ts.map +1 -0
  151. package/dist/hub/HubSimulate.d.ts +2 -1
  152. package/dist/hub/HubSimulate.d.ts.map +1 -0
  153. package/dist/hub/HubSimulate.js +1 -1
  154. package/dist/hub/HubTauri.d.ts +2 -1
  155. package/dist/hub/HubTauri.d.ts.map +1 -0
  156. package/dist/hub/HubTauri.js +1 -1
  157. package/dist/hub/HubWebSocket.d.ts +2 -1
  158. package/dist/hub/HubWebSocket.d.ts.map +1 -0
  159. package/dist/hub/HubWebSocket.js +1 -1
  160. package/dist/hub/index.d.ts +2 -1
  161. package/dist/hub/index.d.ts.map +1 -0
  162. package/dist/hub/index.js +1 -1
  163. package/dist/themes/adc-dark/blue/theme.css +305 -0
  164. package/dist/themes/adc-dark/blue/theme.css.map +1 -1
  165. package/package.json +33 -28
  166. package/readme.md +193 -22
  167. package/src/components/AutoCoreDevPanel.tsx +411 -0
  168. package/src/components/CodeEditor.tsx +2 -2
  169. package/src/components/FileList.tsx +2 -2
  170. package/src/components/FileSelect.tsx +31 -11
  171. package/src/components/Indicator.tsx +2 -2
  172. package/src/components/IndicatorButton.tsx +2 -2
  173. package/src/components/IndicatorRect.tsx +2 -2
  174. package/src/components/Lamp.tsx +3 -3
  175. package/src/components/TextInput.tsx +159 -240
  176. package/src/components/ToggleGroup.tsx +3 -3
  177. package/src/components/ValueDisplay.tsx +4 -4
  178. package/src/components/ValueIndicator.tsx +2 -2
  179. package/src/components/ValueInput.tsx +2 -2
  180. package/src/core/AutoCoreTagContext.tsx +1137 -0
  181. package/src/core/AutoCoreTagTypes.ts +202 -0
  182. package/src/core/EventEmitterContext.tsx +357 -43
  183. package/src/core/ValueSimulator.ts +2 -2
  184. package/src/hooks/useAutoCoreTag.ts +103 -0
  185. package/src/hub/HubBase.ts +3 -3
  186. package/src/hub/HubSimulate.ts +2 -2
  187. package/src/hub/HubTauri.ts +3 -3
  188. package/src/hub/HubWebSocket.ts +29 -32
  189. package/src/hub/index.ts +2 -2
  190. package/src/themes/adc-dark/_extensions.scss +327 -0
  191. package/tsconfig.json +43 -28
  192. package/docs/classes/components_BlocklyEditor.BlocklyEditor.html +0 -124
  193. package/docs/classes/components_CodeEditor.CodeEditor.html +0 -128
  194. package/docs/classes/components_JogPanel.JogPanel.html +0 -138
  195. package/docs/classes/components_Lamp.Lamp.html +0 -105
  196. package/docs/classes/components_TextInput.TextInput.html +0 -115
  197. package/docs/classes/components_ValueIndicator.ValueIndicator.html +0 -119
  198. package/docs/classes/components_ValueInput.ValueInput.html +0 -113
  199. package/docs/classes/hub_HubWebSocket.HubWebSocket.html +0 -106
  200. package/docs/enums/components_JogPanel.JogDistanceAction.html +0 -5
  201. package/docs/enums/components_JogPanel.JogPanelAction.html +0 -18
  202. package/docs/enums/components_JogPanel.JogSpeedAction.html +0 -5
  203. package/docs/enums/core_ActionMode.ActionMode.html +0 -6
  204. package/docs/enums/core_IndicatorColor.IndicatorColor.html +0 -23
  205. package/docs/functions/assets_BlocklyLogo.default.html +0 -1
  206. package/docs/functions/assets_Distance.default.html +0 -1
  207. package/docs/functions/assets_JogLong.default.html +0 -1
  208. package/docs/functions/assets_JogMedium.default.html +0 -1
  209. package/docs/functions/assets_JogShort.default.html +0 -1
  210. package/docs/functions/assets_PythonLogo.default.html +0 -1
  211. package/docs/functions/assets_Rotation3D.default.html +0 -1
  212. package/docs/functions/assets_RotationCcw.default.html +0 -1
  213. package/docs/functions/assets_RotationCcwA.default.html +0 -1
  214. package/docs/functions/assets_RotationCcwB.default.html +0 -1
  215. package/docs/functions/assets_RotationCcwC.default.html +0 -1
  216. package/docs/functions/assets_RotationCw.default.html +0 -1
  217. package/docs/functions/assets_RotationCwA.default.html +0 -1
  218. package/docs/functions/assets_RotationCwB.default.html +0 -1
  219. package/docs/functions/assets_RotationCwC.default.html +0 -1
  220. package/docs/functions/assets_Run.default.html +0 -1
  221. package/docs/functions/assets_Speed.default.html +0 -1
  222. package/docs/functions/assets_SpeedFast.default.html +0 -1
  223. package/docs/functions/assets_SpeedMedium.default.html +0 -1
  224. package/docs/functions/assets_SpeedNone.default.html +0 -1
  225. package/docs/functions/assets_SpeedSlow.default.html +0 -1
  226. package/docs/functions/assets_Walk.default.html +0 -1
  227. package/docs/functions/components_BlocklyEditor.createCustomToolbox.html +0 -6
  228. package/docs/functions/components_FileList.FileList.html +0 -21
  229. package/docs/functions/components_FitText.FitText.html +0 -8
  230. package/docs/functions/components_ToggleGroup.ToggleGroup.html +0 -5
  231. package/docs/interfaces/components_JogPanel.JogPanelButtonDefinition.html +0 -5
  232. package/docs/interfaces/components_ToggleGroup.ToggleGroupProps.html +0 -618
  233. package/docs/interfaces/core_IndicatorButtonState.IndicatorButtonState.html +0 -10
  234. package/docs/interfaces/hub_CommandMessage.CommandMessage.html +0 -6
  235. package/docs/interfaces/hub_CommandMessage.CommandMessageResult.html +0 -4
  236. package/docs/modules/assets.html +0 -23
  237. package/docs/modules/assets_BlocklyLogo.html +0 -2
  238. package/docs/modules/assets_Distance.html +0 -2
  239. package/docs/modules/assets_JogLong.html +0 -2
  240. package/docs/modules/assets_JogMedium.html +0 -2
  241. package/docs/modules/assets_JogShort.html +0 -2
  242. package/docs/modules/assets_PythonLogo.html +0 -2
  243. package/docs/modules/assets_Rotation3D.html +0 -2
  244. package/docs/modules/assets_RotationCcw.html +0 -2
  245. package/docs/modules/assets_RotationCcwA.html +0 -2
  246. package/docs/modules/assets_RotationCcwB.html +0 -2
  247. package/docs/modules/assets_RotationCcwC.html +0 -2
  248. package/docs/modules/assets_RotationCw.html +0 -2
  249. package/docs/modules/assets_RotationCwA.html +0 -2
  250. package/docs/modules/assets_RotationCwB.html +0 -2
  251. package/docs/modules/assets_RotationCwC.html +0 -2
  252. package/docs/modules/assets_Run.html +0 -2
  253. package/docs/modules/assets_Speed.html +0 -2
  254. package/docs/modules/assets_SpeedFast.html +0 -2
  255. package/docs/modules/assets_SpeedMedium.html +0 -2
  256. package/docs/modules/assets_SpeedNone.html +0 -2
  257. package/docs/modules/assets_SpeedSlow.html +0 -2
  258. package/docs/modules/assets_Walk.html +0 -2
  259. package/docs/modules/components_BlocklyEditor.html +0 -5
  260. package/docs/modules/components_CodeEditor.html +0 -3
  261. package/docs/modules/components_FileList.html +0 -3
  262. package/docs/modules/components_FitText.html +0 -3
  263. package/docs/modules/components_JogPanel.html +0 -9
  264. package/docs/modules/components_Lamp.html +0 -4
  265. package/docs/modules/components_TextInput.html +0 -2
  266. package/docs/modules/components_ToggleGroup.html +0 -6
  267. package/docs/modules/components_ValueIndicator.html +0 -4
  268. package/docs/modules/components_ValueInput.html +0 -2
  269. package/docs/modules/core_ActionMode.html +0 -2
  270. package/docs/modules/core_IndicatorButtonState.html +0 -2
  271. package/docs/modules/core_IndicatorColor.html +0 -2
  272. package/docs/modules/hub_CommandMessage.html +0 -3
  273. package/docs/modules/hub_HubWebSocket.html +0 -2
  274. package/docs/types/components_IndicatorButton.IndicatorButtonOptionsType.html +0 -1
  275. package/docs/variables/components_BlocklyEditor.StandardToolbox.html +0 -1
  276. package/docs/variables/components_JogPanel.DefaultLinearJogButtons.html +0 -2
  277. package/docs/variables/components_JogPanel.DefaultRotationJogButtons.html +0 -2
@@ -143,3 +143,4 @@ export declare function useWriteScaledValue(domain: string, symbolName: string,
143
143
  * ```
144
144
  */
145
145
  export declare function useTapValue(domain: string, symbolName: string, fname?: string): () => Promise<void>;
146
+ //# sourceMappingURL=commandHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandHooks.d.ts","sourceRoot":"","sources":["../../src/hooks/commandHooks.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,kBAAkB,GAC3B,QAAS,MAAM,EACf,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,EAC7C,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,UAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAM,SAiEnC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAG,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,GAAG,MAAsB,IAI/E,OAAO,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,mBAO1D;AAOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAG,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,MAAsB,WAGjG,MAAM,mBAa1C;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAG,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,GAAG,MAAsB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAYpH"}
@@ -1 +1 @@
1
- import{useContext,useRef,useEffect,useCallback}from"react";import{EventEmitterContext}from"../core/EventEmitterContext";function sleep(e){return new Promise((t=>setTimeout(t,e)))}export const useRegisterSymbols=(e,t,n,r={})=>{const{subscribe:o,unsubscribe:u,isConnected:s,invoke:c}=useContext(EventEmitterContext),a=useRef([]),i=useRef(!0);return useEffect((()=>{i.current=!0;const r=async()=>{for(const[r,u]of Object.entries(n))try{const n=o(`${e}/${u}`,(e=>{if(i.current){const n=t[r];n&&n(e.value)}}));a.current.push(n),await c(e,"refresh",{topic:`${u}`})}catch(e){}};if(s())r();else{let e=o("HUB/connected",(()=>{setTimeout((()=>{r(),u(e)}),500)}));a.current.push(e)}return()=>{i.current=!1,a.current.forEach((e=>u(e))),a.current=[]}}),[]),null};export function useWriteValue(e,t,n="write_value"){const{invoke:r}=useContext(EventEmitterContext);return async o=>{try{await r(e,n,{topic:t,value:o})}catch(e){}}}export function useWriteScaledValue(e,t,n,r,o="write_value"){const{invoke:u}=useContext(EventEmitterContext);return useCallback((async s=>{const c=(s-r)/n;try{await u(e,o,{symbol_name:t,value:c})}catch(e){}}),[t,n,r,u])}export function useTapValue(e,t,n="write_value"){const{invoke:r}=useContext(EventEmitterContext);return async()=>{try{await r(e,n,{symbol_name:t,value:!0}),await sleep(300),await r(e,n,{symbol_name:t,value:!1})}catch(e){}}}
1
+ import{useContext,useRef,useEffect,useCallback}from"react";import{EventEmitterContext}from"../core/EventEmitterContext";function sleep(e){return new Promise(t=>setTimeout(t,e))}export const useRegisterSymbols=(e,t,n,r={})=>{const{subscribe:o,unsubscribe:u,isConnected:s,invoke:c}=useContext(EventEmitterContext),a=useRef([]),i=useRef(!0);return useEffect(()=>{i.current=!0;const r=async()=>{for(const[r,u]of Object.entries(n))try{const n=o(`${e}/${u}`,e=>{if(i.current){const n=t[r];n&&n(e.value)}});a.current.push(n),await c(e,"refresh",{topic:`${u}`})}catch(e){}};if(s())r();else{let e=o("HUB/connected",()=>{setTimeout(()=>{r(),u(e)},500)});a.current.push(e)}return()=>{i.current=!1,a.current.forEach(e=>u(e)),a.current=[]}},[]),null};export function useWriteValue(e,t,n="write_value"){const{invoke:r}=useContext(EventEmitterContext);return async o=>{try{await r(e,n,{topic:t,value:o})}catch(e){}}}export function useWriteScaledValue(e,t,n,r,o="write_value"){const{invoke:u}=useContext(EventEmitterContext);return useCallback(async s=>{const c=(s-r)/n;try{await u(e,o,{symbol_name:t,value:c})}catch(e){}},[t,n,r,u])}export function useTapValue(e,t,n="write_value"){const{invoke:r}=useContext(EventEmitterContext);return async()=>{try{await r(e,n,{symbol_name:t,value:!0}),await sleep(300),await r(e,n,{symbol_name:t,value:!1})}catch(e){}}}
@@ -1,2 +1,3 @@
1
1
  export { useAdsRegisterSymbols, useAdsWriteValue, useAdsTapValue } from "./adsHooks";
2
2
  export { useScaledValue, kMillimeters2Inches } from './useScaledValue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,qBAAqB,EAAE,gBAAgB,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AACnF,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { BaseContextValue, TagConfig, TagValueMap } from "../core/AutoCoreTagTypes";
2
+ export declare function makeAutoCoreTagHooks<Spec extends readonly TagConfig[]>(Context: React.Context<BaseContextValue<TagValueMap<Spec>>>, tags: Spec): {
3
+ readonly useAutoCoreTag: <K extends Spec[number]["tagName"]>(tagName: K) => {
4
+ readonly value: TagValueMap<Spec>[K];
5
+ readonly rawValue: unknown;
6
+ readonly write: (displayValue: TagValueMap<Spec>[K]) => Promise<void>;
7
+ readonly tap: () => Promise<void>;
8
+ readonly isLoading: boolean;
9
+ };
10
+ readonly useAutoCoreTags: <K extends Spec[number]["tagName"]>(tagNames: readonly K[]) => {
11
+ readonly values: { [P in K]: TagValueMap<Spec>[P]; };
12
+ readonly rawValues: { [P_1 in K]: unknown; };
13
+ readonly write: (tagName: K, value: TagValueMap<Spec>[K]) => Promise<void>;
14
+ readonly isLoading: boolean;
15
+ };
16
+ readonly useAutoCoreSelect: <R>(selector: (all: Readonly<Partial<TagValueMap<Spec>>>) => R, deps?: any[]) => {
17
+ readonly selected: R;
18
+ readonly isLoading: boolean;
19
+ };
20
+ readonly useScales: () => {
21
+ readonly scales: Record<string, import("../core/AutoCoreTagTypes").ScaleConfig>;
22
+ readonly updateScale: (scaleName: string, newScale: number, newLabel: string) => Promise<void>;
23
+ readonly getScale: (scaleName: string) => import("../core/AutoCoreTagTypes").ScaleConfig;
24
+ };
25
+ };
26
+ //# sourceMappingURL=useAutoCoreTag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoCoreTag.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoCoreTag.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEzF,wBAAgB,oBAAoB,CAAC,IAAI,SAAS,SAAS,SAAS,EAAE,EACpE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAC3D,IAAI,EAAE,IAAI;8BAYc,CAAC,2CAA4B,CAAC;;;;;;;+BAyB7B,CAAC,4CAA6B,SAAS,CAAC,EAAE;4BAOrD,CAAC;;kCAY6B,CAAC;;;iCAUlB,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,mBAAM,CAAC,KAAK,CAAC,SAAQ,GAAG,EAAE;;;;;;;uCAW7C,MAAM;;EAKlD"}
@@ -0,0 +1 @@
1
+ import{useCallback,useContext,useMemo}from"react";export function makeAutoCoreTagHooks(e,a){return{useAutoCoreTag:t=>{const{values:s,rawValues:u,isLoading:o,write:r,tap:n}=useContext(e),l=(e=>a.find(a=>a.tagName===e))(t);if(!l)throw new Error(`useAutoCoreTag: unknown tagName '${String(t)}'`);const i=useCallback(e=>r(t,e),[r,t]),c=useCallback(()=>n?.(t),[n,t]);return{value:s[t],rawValue:u[t],write:i,tap:c,isLoading:o}},useAutoCoreTags:a=>{const{values:t,rawValues:s,isLoading:u,write:o}=useContext(e);return{values:useMemo(()=>Object.fromEntries(a.map(e=>[e,t[e]])),[t,a]),rawValues:useMemo(()=>Object.fromEntries(a.map(e=>[e,s[e]])),[s,a]),write:useCallback(async(e,a)=>{await o(e,a)},[o]),isLoading:u}},useAutoCoreSelect:(a,t=[])=>{const{values:s,isLoading:u}=useContext(e);return{selected:useMemo(()=>a(s),[s,...t]),isLoading:u}},useScales:()=>{const{scales:a,updateScale:t}=useContext(e),s=useCallback(e=>a[e],[a]);return{scales:a,updateScale:t,getScale:s}}}}
@@ -62,3 +62,4 @@ type UseScaledValueReturn = [number, (newValue: number) => void];
62
62
  */
63
63
  export declare function useScaledValue(initialValue: number, scale: number, offset?: number): UseScaledValueReturn;
64
64
  export {};
65
+ //# sourceMappingURL=useScaledValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScaledValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useScaledValue.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAiB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAG,MAAyB,CAAC;AAGzD,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,oBAAoB,CAoB5G"}
@@ -1 +1 @@
1
- import{useCallback,useState,useEffect}from"react";export const kMillimeters2Inches=1/25.4;export const kNewtons2Pounds=1/4.4482216153;export function useScaledValue(e,t,s=0){const[u,c]=useState(e),[o,a]=useState((()=>e*t+s));useEffect((()=>{a(u*t+s)}),[u,t,s]);return[o,useCallback((e=>{c(e)}),[t,s])]}
1
+ import{useCallback,useState,useEffect}from"react";export const kMillimeters2Inches=1/25.4;export const kNewtons2Pounds=1/4.4482216153;export function useScaledValue(e,t,s=0){const[u,c]=useState(e),[o,a]=useState(()=>e*t+s);useEffect(()=>{a(u*t+s)},[u,t,s]);return[o,useCallback(e=>{c(e)},[t,s])]}
@@ -10,3 +10,4 @@ export interface CommandMessage {
10
10
  args?: any;
11
11
  result?: CommandMessageResult;
12
12
  }
13
+ //# sourceMappingURL=CommandMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandMessage.d.ts","sourceRoot":"","sources":["../../src/hub/CommandMessage.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,oBAAoB;IAEjC,IAAI,EAAE,GAAG,CAAC;IAEV,OAAO,EAAG,OAAO,CAAC;IAElB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,WAAW,cAAc;IAG3B,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX,MAAM,CAAC,EAAE,oBAAoB,CAAC;CACjC"}
@@ -1,5 +1,5 @@
1
- import { EventEmitterContextType } from '../core/EventEmitterContext';
2
- import { CommandMessageResult } from "./CommandMessage";
1
+ import type { EventEmitterContextType } from '../core/EventEmitterContext';
2
+ import type { CommandMessageResult } from "./CommandMessage";
3
3
  /**
4
4
  * Base class for the interface for the IPC to the backend,
5
5
  * which may be websockets, MQTT, the Tauri API,
@@ -179,3 +179,4 @@ export declare abstract class HubBase {
179
179
  toLocalFName(backendTopic: string): string;
180
180
  }
181
181
  export default HubBase;
182
+ //# sourceMappingURL=HubBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HubBase.d.ts","sourceRoot":"","sources":["../../src/hub/HubBase.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,8BAAsB,OAAO;IAEzB,SAAS,CAAC,2BAA2B,EAAG,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAA4B;IACtF,SAAS,CAAC,sBAAsB,EAAG,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAA4B;IACjF,SAAS,CAAC,2BAA2B,EAAG,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAA4B;IACtF,SAAS,CAAC,2BAA2B,EAAG,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAA4B;IAEtF,SAAS,CAAC,OAAO,EAAG,uBAAuB,GAAG,IAAI,CAAQ;IAE1D,SAAS,CAAC,YAAY,EAAG,OAAO,CAAS;IAGzC;;OAEG;;IAKH;;;;;;;;;;OAUG;IACH,UAAU,CAAC,OAAO,EAAG,uBAAuB,GAAG,IAAI;IAInD;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAG,MAAM,GAAI,OAAO,CAAC,oBAAoB,CAAC;IAGjG;;;OAGG;IACH,SAAS,CAAC,cAAc,GAAI,GAAI,OAAO,UAEtC;IAED;;OAEG;IACH,WAAW,QAAQ,OAAO,CAEzB;IAED;;;;;;;;OAQG;IACH,WAAW,CAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAG,MAAM,EAAE,KAAK,EAAG,MAAM,GAAG,IAAI,EAAE,KAAK,CAAC,EAAG,GAAG,GAAK,OAAO,CAAC,oBAAoB,CAAC;IAQlH;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAG,MAAM,EAAE,IAAI,EAAG,GAAG,GAAG,SAAS,GAAI,IAAI;IAWtD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAG,MAAM,EAAE,YAAY,EAAE,MAAM,GAAK,IAAI;IAK3D;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAI,IAAI;IAYrC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAG,MAAM,EAAE,YAAY,EAAE,MAAM,GAAK,IAAI;IAK3D;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAI,IAAI;IAYrC;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAG,MAAM,GAAI,MAAM;IAa5C;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAG,MAAM,GAAI,MAAM;IAc5C;;;;;OAKG;IACH,YAAY,CAAC,YAAY,EAAG,MAAM,GAAI,MAAM;IAc5C;;;;;OAKG;IACH,YAAY,CAAC,YAAY,EAAG,MAAM,GAAI,MAAM;CAc/C;AAGD,eAAe,OAAO,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { HubBase } from './HubBase';
2
- import { CommandMessageResult } from "./CommandMessage";
2
+ import type { CommandMessageResult } from "./CommandMessage";
3
3
  /**
4
4
  * Hub for simulating functionality when no backend is present.
5
5
  */
@@ -19,3 +19,4 @@ export declare class HubSimulate extends HubBase {
19
19
  invoke(domain: string, fname: string, payload?: object, timeout?: number): Promise<CommandMessageResult>;
20
20
  }
21
21
  export default HubSimulate;
22
+ //# sourceMappingURL=HubSimulate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HubSimulate.d.ts","sourceRoot":"","sources":["../../src/hub/HubSimulate.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D;;GAEG;AACH,qBAAa,WAAY,SAAQ,OAAO;IAEpC;;OAEG;;IAKH;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,MAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAmB/G;AAED,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- import{HubBase}from"./HubBase";export class HubSimulate extends HubBase{constructor(){super()}invoke(e,s,r,t=20){return new Promise(((e,s)=>{setTimeout((()=>{e({data:r,error_message:"",success:!0})}),t)}))}}export default HubSimulate;
1
+ import{HubBase}from"./HubBase";export class HubSimulate extends HubBase{constructor(){super()}invoke(e,s,r,t=20){return new Promise((e,s)=>{setTimeout(()=>{e({data:r,error_message:"",success:!0})},t)})}}export default HubSimulate;
@@ -1,5 +1,5 @@
1
1
  import { HubBase } from './HubBase';
2
- import { CommandMessageResult } from "./CommandMessage";
2
+ import type { CommandMessageResult } from "./CommandMessage";
3
3
  /**
4
4
  * Hub for integrating with the Tauri backend.
5
5
  *
@@ -85,3 +85,4 @@ export declare class HubTauri extends HubBase {
85
85
  */
86
86
  invoke(domain: string, fname: string, payload?: object | undefined): Promise<CommandMessageResult>;
87
87
  }
88
+ //# sourceMappingURL=HubTauri.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HubTauri.d.ts","sourceRoot":"","sources":["../../src/hub/HubTauri.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,qBAAa,QAAS,SAAQ,OAAO;IAEjC;;OAEG;;IAgCH;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAkBtG"}
@@ -1 +1 @@
1
- import{HubBase}from"./HubBase";import{event,invoke}from"@tauri-apps/api";export class HubTauri extends HubBase{constructor(){super(),event.listen("autocore://broadcast_event",(o=>{let e=JSON.parse(o.payload);void 0!==e.topic&&null!==e.topic&&(void 0!==e.payload&&null!==e.payload?this.publish(e.topic,e.payload):this.publish(e.topic,void 0))}))}invoke(o,e,i){if(null!=i){return invoke(`${o}_${e}`,i)}return invoke(e)}}
1
+ import{HubBase}from"./HubBase";import{event,invoke}from"@tauri-apps/api";export class HubTauri extends HubBase{constructor(){super(),event.listen("autocore://broadcast_event",o=>{let e=JSON.parse(o.payload);void 0!==e.topic&&null!==e.topic&&(void 0!==e.payload&&null!==e.payload?this.publish(e.topic,e.payload):this.publish(e.topic,void 0))})}invoke(o,e,i){if(null!=i){return invoke(`${o}_${e}`,i)}return invoke(e)}}
@@ -12,7 +12,7 @@
12
12
  * topic will be: "ADS/GM.fReal"
13
13
  */
14
14
  import { HubBase } from './HubBase';
15
- import { CommandMessage, CommandMessageResult } from "./CommandMessage";
15
+ import type { CommandMessage, CommandMessageResult } from "./CommandMessage";
16
16
  export declare class HubWebSocket extends HubBase {
17
17
  private socket;
18
18
  private requestId;
@@ -33,3 +33,4 @@ export declare class HubWebSocket extends HubBase {
33
33
  disconnect: () => void;
34
34
  protected emit: (eventName: string, payload?: object) => void;
35
35
  }
36
+ //# sourceMappingURL=HubWebSocket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HubWebSocket.d.ts","sourceRoot":"","sources":["../../src/hub/HubWebSocket.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AA8F7E,qBAAa,YAAa,SAAQ,OAAO;IACrC,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,eAAe,CAAoC;IAE3D;;OAEG;;IAgGH;;;;;;OAMG;IACH,MAAM,GAAI,QAAQ,MAAM,EAAE,OAAO,MAAM,EAAE,UAAU,MAAM,KAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBxF;IAED,wBAAwB,GAAI,KAAK,cAAc,UAiB9C;IAED,UAAU,QAAO,IAAI,CAEpB;IAED,SAAS,CAAC,IAAI,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,KAAG,IAAI,CAE3D;CACJ"}
@@ -1 +1 @@
1
- import{HubBase}from"./HubBase";function b64toBlob(e,t="application/octet-stream",s=512){const n=atob(e),o=[];for(let e=0;e<n.length;e+=s){const t=n.slice(e,e+s),r=new Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);const i=new Uint8Array(r);o.push(i)}return new Blob(o,{type:t})}function downloadBlob(e,t){const s=window.URL.createObjectURL(e),n=document.createElement("a");n.href=s,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(s)}export class HubWebSocket extends HubBase{constructor(){super(),Object.defineProperty(this,"socket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pendingRequests",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"invoke",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,s)=>new Promise(((n,o)=>{const r=++this.requestId;this.pendingRequests.set(r,{resolve:n,reject:o});let i={request_id:r,domain:e,fname:t,args:s,result:void 0};this.socket.send(JSON.stringify(i))}))}),Object.defineProperty(this,"handleUnsolicitedMessage",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if("BROADCAST"===e.fname&&e.domain.length>=1&&void 0!==e.result&&null!==e.result&&void 0!==e.result.data&&null!==e.result.data){let t=`${e.domain}/${e.result.data.topic}`;this.publish(t,e.result.data)}}}),Object.defineProperty(this,"disconnect",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.socket.close()}}),Object.defineProperty(this,"emit",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>{this.socket.send(JSON.stringify({eventName:e,payload:t}))}});const e=window.location.hostname;let t;const s=`${"https:"===window.location.protocol?"wss://":"ws://"}${e}${t?":"+t:""}/ws/`;this.socket=new WebSocket(s);let n=this;this.socket.onopen=function(){n.publish("HUB/connected",!0),n.setIsConnected(!0)},this.socket.onmessage=e=>{const t=JSON.parse(e.data);if(t.request_id&&this.pendingRequests.has(t.request_id)){const{resolve:e,reject:s}=this.pendingRequests.get(t.request_id);if("FILE_DOWNLOAD"===t.fname&&void 0!==t.args.file_name&&null!==t.args.file_name&&t.args.file_name.length>0){let n=t.args.file_name.split("/");const o=n[n.length-1];if(t.result&&t.result.success){downloadBlob(b64toBlob(t.result.data),o),t.result.data=o,e(t.result)}else s(new Error(t.result?.error_message))}else t.result?.success?e(t.result):s(new Error(t.result?.error_message));this.pendingRequests.delete(t.request_id)}else this.handleUnsolicitedMessage(t)},this.socket.onerror=e=>{},this.socket.onclose=()=>{n.setIsConnected(!1)}}}
1
+ import{HubBase}from"./HubBase";function b64toBlob(e,t="application/octet-stream",s=512){const n=atob(e),o=[];for(let e=0;e<n.length;e+=s){const t=n.slice(e,e+s),r=new Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);const i=new Uint8Array(r);o.push(i.buffer)}return new Blob(o,{type:t})}function downloadBlob(e,t){const s=window.URL.createObjectURL(e),n=document.createElement("a");n.href=s,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(s)}export class HubWebSocket extends HubBase{constructor(){super(),Object.defineProperty(this,"socket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestId",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pendingRequests",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"invoke",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,s)=>new Promise((n,o)=>{const r=++this.requestId;this.pendingRequests.set(r,{resolve:n,reject:o});let i={request_id:r,domain:e,fname:t,args:s,result:void 0};this.socket.send(JSON.stringify(i))})}),Object.defineProperty(this,"handleUnsolicitedMessage",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if("BROADCAST"===e.fname&&e.domain.length>=1&&void 0!==e.result&&null!==e.result&&void 0!==e.result.data&&null!==e.result.data){let t=`${e.domain}/${e.result.data.topic}`;this.publish(t,e.result.data)}}}),Object.defineProperty(this,"disconnect",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.socket.close()}}),Object.defineProperty(this,"emit",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>{this.socket.send(JSON.stringify({eventName:e,payload:t}))}});const e=window.location.hostname;let t;const s=`${"https:"===window.location.protocol?"wss://":"ws://"}${e}${t?":"+t:""}/ws/`;this.socket=new WebSocket(s);let n=this;this.socket.onopen=function(){n.publish("HUB/connected",!0),n.setIsConnected(!0)},this.socket.onmessage=e=>{const t=JSON.parse(e.data);if(t.request_id&&this.pendingRequests.has(t.request_id)){const{resolve:e,reject:s}=this.pendingRequests.get(t.request_id);if("FILE_DOWNLOAD"===t.fname&&void 0!==t.args.file_name&&null!==t.args.file_name&&t.args.file_name.length>0){let n=t.args.file_name.split("/");const o=n[n.length-1];if(t.result&&t.result.success){downloadBlob(b64toBlob(t.result.data),o),t.result.data=o,e(t.result)}else s(new Error(t.result?.error_message))}else t.result?.success?e(t.result):s(new Error(t.result?.error_message));this.pendingRequests.delete(t.request_id)}else this.handleUnsolicitedMessage(t)},this.socket.onerror=e=>{},this.socket.onclose=()=>{n.setIsConnected(!1)}}}
@@ -2,7 +2,7 @@ import { HubBase as Hub } from './HubBase';
2
2
  import { HubTauri } from './HubTauri';
3
3
  import { HubWebSocket } from "./HubWebSocket";
4
4
  import { HubSimulate } from "./HubSimulate";
5
- import { CommandMessage, CommandMessageResult } from './CommandMessage';
5
+ import type { CommandMessage, CommandMessageResult } from './CommandMessage';
6
6
  /**
7
7
  * Creates a connection to the backend.
8
8
  * @returns Hub
@@ -13,3 +13,4 @@ export { HubTauri };
13
13
  export { HubWebSocket };
14
14
  export { HubSimulate };
15
15
  export type { CommandMessage, CommandMessageResult };
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hub/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK7E;;;GAGG;AACH,wBAAgB,SAAS,IAAI,GAAG,CAoC/B;AAKD,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,CAAA;AACjB,OAAO,EAAC,YAAY,EAAC,CAAA;AACrB,OAAO,EAAC,WAAW,EAAC,CAAA;AACpB,YAAY,EAAC,cAAc,EAAE,oBAAoB,EAAC,CAAA"}
package/dist/hub/index.js CHANGED
@@ -1 +1 @@
1
- import{HubTauri}from"./HubTauri";import{HubWebSocket}from"./HubWebSocket";import{HubSimulate}from"./HubSimulate";let hubInstance=null;export function createHub(){return hubInstance||(hubInstance=void 0!==window.__TAURI__&&null!==window.__TAURI__?new HubTauri:new HubWebSocket),hubInstance}export{HubBase as Hub}from"./HubBase";export{HubTauri};export{HubWebSocket};export{HubSimulate};
1
+ import{HubBase as Hub}from"./HubBase";import{HubTauri}from"./HubTauri";import{HubWebSocket}from"./HubWebSocket";import{HubSimulate}from"./HubSimulate";let hubInstance=null;export function createHub(){return hubInstance||(hubInstance=void 0!==window.__TAURI__&&null!==window.__TAURI__?new HubTauri:new HubWebSocket),hubInstance}export{HubBase as Hub}from"./HubBase";export{HubTauri};export{HubWebSocket};export{HubSimulate};
@@ -1,3 +1,4 @@
1
+ @charset "UTF-8";
1
2
  /*
2
3
  * Copyright (C) 2025 Automated Design Corp.. All Rights Reserved.
3
4
  * Created Date: 2025-07-15 11:55:03
@@ -7076,6 +7077,170 @@
7076
7077
  .p-inline-message-text {
7077
7078
  font-weight: 500;
7078
7079
  }
7080
+ /* ---- ac-toolbar: consistent square icon-button sizing ----
7081
+ *
7082
+ * SVG icons (Lucide, custom <SvgAxis/> ) and PrimeIcon font glyphs
7083
+ * (`<i class="pi pi-...">`) are normalized to render at a consistent
7084
+ * weight inside toolbar buttons. The two need different treatment:
7085
+ *
7086
+ * - Size — both: width/height for SVG, font-size for icon font.
7087
+ * - Weight — SVG only: Lucide ships `stroke-width="2"` on a 24×24
7088
+ * viewBox; when scaled to 18px the strokes drop to
7089
+ * effective 1.5px and look thinner than PrimeIcons.
7090
+ * Setting `stroke-width: 2.25` via CSS (which overrides
7091
+ * the SVG presentation attribute) restores parity. The
7092
+ * fill: none / stroke: currentColor lines defend against
7093
+ * custom SVGs that didn't inherit those by attribute.
7094
+ * - Align — `vertical-align: middle` matches PrimeIcon's default
7095
+ * and prevents baseline drift in non-flex parents.
7096
+ */
7097
+ .ac-toolbar-icon-btn {
7098
+ width: 19mm;
7099
+ height: 12.7mm;
7100
+ padding: 0;
7101
+ display: inline-flex;
7102
+ align-items: center;
7103
+ justify-content: center;
7104
+ flex-shrink: 0;
7105
+ }
7106
+ .ac-toolbar-icon-btn svg, .ac-toolbar-icon-btn i {
7107
+ font-size: 11mm;
7108
+ width: 11mm;
7109
+ height: 11mm;
7110
+ }
7111
+ .ac-toolbar-icon-btn svg {
7112
+ vertical-align: middle;
7113
+ stroke: currentColor;
7114
+ fill: none;
7115
+ stroke-width: 2.25;
7116
+ stroke-linecap: round;
7117
+ stroke-linejoin: round;
7118
+ }
7119
+ .ac-toolbar-icon-btn .p-button-icon {
7120
+ margin: 0;
7121
+ }
7122
+ .ac-toolbar-icon-lg {
7123
+ width: 25.4mm;
7124
+ height: 19mm;
7125
+ padding: 0;
7126
+ display: inline-flex;
7127
+ align-items: center;
7128
+ justify-content: center;
7129
+ flex-shrink: 0;
7130
+ }
7131
+ .ac-toolbar-icon-lg svg, .ac-toolbar-icon-lg i {
7132
+ font-size: 16mm;
7133
+ width: 16mm;
7134
+ height: 16mm;
7135
+ }
7136
+ .ac-toolbar-icon-lg svg {
7137
+ vertical-align: middle;
7138
+ stroke: currentColor;
7139
+ fill: none;
7140
+ stroke-width: 2.25;
7141
+ stroke-linecap: round;
7142
+ stroke-linejoin: round;
7143
+ }
7144
+ .ac-toolbar-icon-lg .p-button-icon {
7145
+ margin: 0;
7146
+ }
7147
+ .ac-toolbar-icon-panic {
7148
+ width: 25.4mm;
7149
+ height: 25.4mm;
7150
+ padding: 0;
7151
+ display: inline-flex;
7152
+ align-items: center;
7153
+ justify-content: center;
7154
+ flex-shrink: 0;
7155
+ }
7156
+ .ac-toolbar-icon-panic svg {
7157
+ width: 20mm;
7158
+ height: 20mm;
7159
+ vertical-align: middle;
7160
+ stroke: currentColor;
7161
+ fill: none;
7162
+ stroke-width: 2.25;
7163
+ stroke-linecap: round;
7164
+ stroke-linejoin: round;
7165
+ }
7166
+ .ac-toolbar-icon-panic .p-button-icon {
7167
+ margin: 0;
7168
+ }
7169
+ /* ---- OverlayPanel + Dialog: comfortable interior padding ----
7170
+ */
7171
+ body .p-component.p-dialog .p-dialog-content {
7172
+ padding: 4mm;
7173
+ }
7174
+ body .p-component.p-overlaypanel .p-overlaypanel-content {
7175
+ padding: 4mm;
7176
+ }
7177
+ :root {
7178
+ --p-dialog-content-padding: 4mm;
7179
+ --p-overlaypanel-content-padding: 4mm;
7180
+ }
7181
+ .ac-toolbar-group {
7182
+ display: flex;
7183
+ flex-direction: row;
7184
+ align-items: center;
7185
+ gap: 2px;
7186
+ }
7187
+ /* ---- ac-toolbar-tool-list: stacked text buttons in an OverlayPanel ---- */
7188
+ /*
7189
+ * Spacing between buttons uses `gap` on the flex parent rather than
7190
+ * `margin` on the buttons. PrimeReact's `.p-button` rules carry their
7191
+ * own margin reset and tie our `.ac-toolbar-tool-item` on specificity;
7192
+ * because PrimeReact's CSS loads later, its margin wins. Flex `gap`
7193
+ * has no PrimeReact equivalent to fight.
7194
+ */
7195
+ .ac-toolbar-tool-list {
7196
+ display: flex;
7197
+ flex-direction: column;
7198
+ min-width: 16rem;
7199
+ padding: 2mm;
7200
+ gap: 2mm;
7201
+ }
7202
+ /* `gap: 0.75rem` here is the *intra-button* spacing — between the
7203
+ * leading icon and the text label — not between buttons. */
7204
+ .ac-toolbar-tool-item {
7205
+ justify-content: flex-start;
7206
+ gap: 0.75rem;
7207
+ }
7208
+ /* ---- ac-form: content page form layout ---- */
7209
+ .ac-form {
7210
+ display: flex;
7211
+ flex-direction: column;
7212
+ gap: 10px;
7213
+ }
7214
+ .ac-form-row {
7215
+ display: flex;
7216
+ flex-direction: row;
7217
+ align-items: center;
7218
+ gap: 8px;
7219
+ }
7220
+ .ac-form-row > * {
7221
+ min-width: 0;
7222
+ }
7223
+ .ac-form-field {
7224
+ flex: 1;
7225
+ min-width: 0;
7226
+ }
7227
+ .ac-form-section {
7228
+ font-size: 11px;
7229
+ font-weight: 700;
7230
+ text-transform: uppercase;
7231
+ letter-spacing: 0.06em;
7232
+ color: #60a5fa;
7233
+ border-bottom: 1px solid #424b57;
7234
+ padding-bottom: 4px;
7235
+ margin-top: 6px;
7236
+ }
7237
+ .ac-form-label {
7238
+ font-size: 13px;
7239
+ font-weight: 600;
7240
+ color: rgba(255, 255, 255, 0.6);
7241
+ white-space: nowrap;
7242
+ flex-shrink: 0;
7243
+ }
7079
7244
  .p-picklist-buttons .p-button,
7080
7245
  .p-orderlist-controls .p-button {
7081
7246
  transition: opacity 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
@@ -7093,5 +7258,145 @@
7093
7258
  color: #030712;
7094
7259
  }
7095
7260
  }
7261
+ /* Padding for OverlayPanels and Dialogs */
7262
+ .p-overlaypanel .p-overlaypanel-content {
7263
+ padding: 4mm !important;
7264
+ }
7265
+
7266
+ .p-dialog .p-dialog-content {
7267
+ padding: 4mm !important;
7268
+ }
7269
+
7270
+ /* Padding for fieldset */
7271
+ .p-fieldset .p-fieldset-legend {
7272
+ padding: 0.5mm;
7273
+ border-width: 0.5mm;
7274
+ margin-left: 1.5mm;
7275
+ }
7276
+ .p-fieldset .p-fieldset-content {
7277
+ padding: 1mm;
7278
+ }
7279
+ .p-fieldset {
7280
+ border-width: 0.5mm;
7281
+ }
7282
+
7283
+ /*
7284
+ * Padding for dropdown items.
7285
+ * Makes them work better on touchscreens.
7286
+ */
7287
+ .p-autocomplete-item {
7288
+ padding-top: 2mm;
7289
+ padding-bottom: 2mm;
7290
+ }
7291
+
7292
+ .p-dropdown-item-label {
7293
+ padding-top: 2mm;
7294
+ padding-bottom: 2mm;
7295
+ }
7296
+
7297
+ /*
7298
+ * Clearable dropdowns (showClear): by default PrimeReact floats the clear
7299
+ * "×" over the selected value, where it obscures the text and is hard to
7300
+ * tap. Reserve space at the far right, move the clear icon to the RIGHT of
7301
+ * the chevron, vertically centre it, and give it a button-like bordered
7302
+ * tap target separated from the chevron so the two are easy to target.
7303
+ */
7304
+ .ac-dropdown-clearable.p-dropdown .p-dropdown-trigger {
7305
+ margin-right: 2.75rem;
7306
+ border-right: 1px solid #424b57;
7307
+ }
7308
+ .ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon {
7309
+ top: 50%;
7310
+ right: 0.4rem;
7311
+ margin-top: 0;
7312
+ transform: translateY(-50%);
7313
+ box-sizing: content-box;
7314
+ width: 1rem;
7315
+ height: 1rem;
7316
+ padding: 0.4rem;
7317
+ border: 1px solid #424b57;
7318
+ border-radius: 3px;
7319
+ color: rgba(255, 255, 255, 0.6);
7320
+ background: rgba(255, 255, 255, 0.04);
7321
+ transition: background-color 0.2s, border-color 0.2s, color 0.2s;
7322
+ }
7323
+ .ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon:hover {
7324
+ background: rgba(255, 255, 255, 0.1);
7325
+ border-color: #60a5fa;
7326
+ color: #60a5fa;
7327
+ }
7328
+ .ac-dropdown-clearable.p-dropdown .p-dropdown-clear-icon * {
7329
+ pointer-events: none;
7330
+ }
7331
+
7332
+ /*
7333
+ * TestSetupView / TestSetupForm scroll containment.
7334
+ *
7335
+ * The whole view fills its parent and confines overflow to the inner
7336
+ * field/history regions, so the tab strip and the section headers stay
7337
+ * visible instead of the entire page scrolling. All the height plumbing
7338
+ * hangs on `min-height: 0` — without it a flex child refuses to shrink
7339
+ * below its content and the overflow leaks back out to the page.
7340
+ */
7341
+ .ac-test-setup-view {
7342
+ display: flex;
7343
+ flex-direction: column;
7344
+ height: 100%;
7345
+ min-height: 0;
7346
+ }
7347
+ .ac-test-setup-view > .p-tabview {
7348
+ display: flex;
7349
+ flex-direction: column;
7350
+ flex: 1 1 auto;
7351
+ min-height: 0;
7352
+ }
7353
+ .ac-test-setup-view .p-tabview-panels {
7354
+ display: flex;
7355
+ flex-direction: column;
7356
+ flex: 1 1 auto;
7357
+ min-height: 0;
7358
+ overflow: hidden;
7359
+ }
7360
+ .ac-test-setup-view .p-tabview-panel {
7361
+ flex: 1 1 auto;
7362
+ min-height: 0;
7363
+ height: 100%;
7364
+ }
7365
+
7366
+ /* Project tab: fixed ProjectSelector + scrolling Test History. */
7367
+ .ac-test-setup-view__tab {
7368
+ display: flex;
7369
+ flex-direction: column;
7370
+ height: 100%;
7371
+ min-height: 0;
7372
+ }
7373
+
7374
+ .ac-test-setup-view__fixed {
7375
+ flex: 0 0 auto;
7376
+ }
7377
+
7378
+ .ac-test-setup-view__scroll {
7379
+ flex: 1 1 auto;
7380
+ min-height: 0;
7381
+ overflow-y: auto;
7382
+ }
7383
+
7384
+ /* Test tab: fixed Test-Setup header + scrolling Test-Configuration list. */
7385
+ .ac-test-setup-form {
7386
+ display: flex;
7387
+ flex-direction: column;
7388
+ height: 100%;
7389
+ min-height: 0;
7390
+ }
7391
+
7392
+ .ac-test-setup-form__head {
7393
+ flex: 0 0 auto;
7394
+ }
7395
+
7396
+ .ac-test-setup-form__body {
7397
+ flex: 1 1 auto;
7398
+ min-height: 0;
7399
+ overflow-y: auto;
7400
+ }
7096
7401
 
7097
7402
  /*# sourceMappingURL=theme.css.map */