@adcops/autocore-react 3.5.7 → 3.5.11

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 (95) hide show
  1. package/dist/components/forms/useEditDraft.d.ts +49 -0
  2. package/dist/components/forms/useEditDraft.d.ts.map +1 -0
  3. package/dist/components/forms/useEditDraft.js +1 -0
  4. package/dist/components/index.d.ts +6 -0
  5. package/dist/components/index.d.ts.map +1 -1
  6. package/dist/components/index.js +1 -1
  7. package/dist/components/tis/TestDataView.d.ts +8 -0
  8. package/dist/components/tis/TestDataView.d.ts.map +1 -1
  9. package/dist/components/tis/TestDataView.js +1 -1
  10. package/dist/components/tis/TestRawDataView.d.ts.map +1 -1
  11. package/dist/components/tis/TestRawDataView.js +1 -1
  12. package/dist/components/tis/chartViews.d.ts +57 -0
  13. package/dist/components/tis/chartViews.d.ts.map +1 -0
  14. package/dist/components/tis/chartViews.js +1 -0
  15. package/dist/components/tis-editor/TisConfigEditor.css +11 -0
  16. package/dist/components/tis-editor/TisConfigEditor.d.ts.map +1 -1
  17. package/dist/components/tis-editor/TisConfigEditor.js +1 -1
  18. package/dist/components/tis-editor/editor/AuthoringContext.d.ts +37 -0
  19. package/dist/components/tis-editor/editor/AuthoringContext.d.ts.map +1 -0
  20. package/dist/components/tis-editor/editor/AuthoringContext.js +1 -0
  21. package/dist/components/tis-editor/editor/ChartViewDialog.d.ts +11 -0
  22. package/dist/components/tis-editor/editor/ChartViewDialog.d.ts.map +1 -1
  23. package/dist/components/tis-editor/editor/ChartViewDialog.js +1 -1
  24. package/dist/components/tis-editor/editor/FieldArrayEditor.d.ts.map +1 -1
  25. package/dist/components/tis-editor/editor/FieldArrayEditor.js +1 -1
  26. package/dist/components/tis-editor/editor/RawDataEditor.d.ts.map +1 -1
  27. package/dist/components/tis-editor/editor/RawDataEditor.js +1 -1
  28. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts +7 -0
  29. package/dist/components/tis-editor/editor/TestFieldDialog.d.ts.map +1 -1
  30. package/dist/components/tis-editor/editor/TestFieldDialog.js +1 -1
  31. package/dist/components/tis-editor/editor/ViewsEditor.d.ts.map +1 -1
  32. package/dist/components/tis-editor/editor/ViewsEditor.js +1 -1
  33. package/dist/components/tis-editor/types.d.ts +6 -0
  34. package/dist/components/tis-editor/types.d.ts.map +1 -1
  35. package/dist/components/varpick/VariableInput.d.ts +41 -0
  36. package/dist/components/varpick/VariableInput.d.ts.map +1 -0
  37. package/dist/components/varpick/VariableInput.js +1 -0
  38. package/dist/components/varpick/VariablePicker.d.ts +45 -0
  39. package/dist/components/varpick/VariablePicker.d.ts.map +1 -0
  40. package/dist/components/varpick/VariablePicker.js +1 -0
  41. package/dist/components/varpick/index.d.ts +16 -0
  42. package/dist/components/varpick/index.d.ts.map +1 -0
  43. package/dist/components/varpick/index.js +1 -0
  44. package/dist/components/varpick/tisCatalogs.d.ts +85 -0
  45. package/dist/components/varpick/tisCatalogs.d.ts.map +1 -0
  46. package/dist/components/varpick/tisCatalogs.js +1 -0
  47. package/dist/components/varpick/varpick.css +167 -0
  48. package/dist/core/AutoCoreTagContext.d.ts.map +1 -1
  49. package/dist/core/AutoCoreTagContext.js +1 -1
  50. package/dist/core/AutoCoreTagTypes.d.ts +13 -0
  51. package/dist/core/AutoCoreTagTypes.d.ts.map +1 -1
  52. package/dist/hooks/index.d.ts +4 -0
  53. package/dist/hooks/index.d.ts.map +1 -1
  54. package/dist/hooks/index.js +1 -1
  55. package/dist/hooks/useGmVariables.d.ts +57 -0
  56. package/dist/hooks/useGmVariables.d.ts.map +1 -0
  57. package/dist/hooks/useGmVariables.js +1 -0
  58. package/dist/hooks/useSequenceProducers.d.ts +38 -0
  59. package/dist/hooks/useSequenceProducers.d.ts.map +1 -0
  60. package/dist/hooks/useSequenceProducers.js +1 -0
  61. package/package.json +7 -2
  62. package/src/components/forms/useEditDraft.ts +0 -0
  63. package/src/components/index.ts +20 -0
  64. package/src/components/tis/TestDataView.tsx +16 -10
  65. package/src/components/tis/TestRawDataView.tsx +6 -7
  66. package/src/components/tis/chartViews.ts +104 -0
  67. package/src/components/tis-editor/TisConfigEditor.css +11 -0
  68. package/src/components/tis-editor/TisConfigEditor.tsx +31 -0
  69. package/src/components/tis-editor/editor/AuthoringContext.tsx +43 -0
  70. package/src/components/tis-editor/editor/ChartViewDialog.tsx +48 -17
  71. package/src/components/tis-editor/editor/FieldArrayEditor.tsx +1 -0
  72. package/src/components/tis-editor/editor/RawDataEditor.tsx +7 -2
  73. package/src/components/tis-editor/editor/TestFieldDialog.tsx +90 -23
  74. package/src/components/tis-editor/editor/ViewsEditor.tsx +56 -5
  75. package/src/components/tis-editor/types.ts +6 -0
  76. package/src/components/varpick/VariableInput.tsx +126 -0
  77. package/src/components/varpick/VariablePicker.tsx +168 -0
  78. package/src/components/varpick/index.ts +22 -0
  79. package/src/components/varpick/tisCatalogs.ts +235 -0
  80. package/src/components/varpick/varpick.css +167 -0
  81. package/src/core/AutoCoreTagContext.tsx +3 -1
  82. package/src/core/AutoCoreTagTypes.ts +14 -0
  83. package/src/hooks/index.ts +11 -0
  84. package/src/hooks/useGmVariables.ts +142 -0
  85. package/src/hooks/useSequenceProducers.ts +104 -0
  86. package/tools/tests/dist/TestFieldDialog-C4mKVh7q.js +32817 -0
  87. package/tools/tests/dist/autocore-react.css +257 -0
  88. package/tools/tests/dist/tis-editor.entry.js +9295 -0
  89. package/tools/tests/dist/varpick.entry.js +113 -0
  90. package/tools/tests/live-server.probe.mjs +172 -0
  91. package/tools/tests/tis-editor.entry.tsx +46 -0
  92. package/tools/tests/tis-editor.test.mjs +133 -0
  93. package/tools/tests/varpick.entry.tsx +81 -0
  94. package/tools/tests/varpick.test.mjs +208 -0
  95. package/tools/tests/vite.config.mjs +35 -0
@@ -1 +1 @@
1
- {"version":3,"file":"TestFieldDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/tis-editor/editor/TestFieldDialog.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,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O,CAAC;CAC1B;AAID,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+W1D,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useContext,useEffect,useMemo,useState}from"react";import{Dialog}from"primereact/dialog";import{Button}from"primereact/button";import{InputText}from"primereact/inputtext";import{InputTextarea}from"primereact/inputtextarea";import{Dropdown}from"primereact/dropdown";import{Checkbox}from"primereact/checkbox";import{InputNumber}from"primereact/inputnumber";import{FormRow}from"../../forms/FormRow";import{boundText,parseBound,boundInvalid}from"../../tis/TestFieldRow";import{AutoCoreTagContext}from"../../../core/AutoCoreTagContext";const FIELD_TYPES=[{label:"string",value:"string"},{label:"i32",value:"i32"},{label:"i64",value:"i64"},{label:"u32",value:"u32"},{label:"u64",value:"u64"},{label:"f32",value:"f32"},{label:"f64",value:"f64"},{label:"bool",value:"bool"}],AGG_FNS=[{label:"— none (analysis-fed) —",value:""},{label:"avg",value:"avg"},{label:"min",value:"min"},{label:"max",value:"max"},{label:"stddev",value:"stddev"},{label:"count (how many went into the rollup)",value:"count"}],AGG_FROMS=[{label:"cycle field (every cycle, every test)",value:"cycle_fields"},{label:"result (one value per test)",value:"results"}],COUNT_CHOICES=[{label:"cycles in this test",value:"test_cycles",scope:"test",from:"cycle_fields"},{label:"cycles for this sample, all tests",value:"project_cycles",scope:"project",from:"cycle_fields"},{label:"tests for this sample",value:"project_tests",scope:"project",from:"results"}],AGG_SCOPES=[{label:"this test only",value:"test"},{label:"this sample, every test in the project",value:"project"}],blank={name:"",type:"f32"};export const TestFieldDialog=({visible:e,initial:t,onCancel:a,onSave:o,siblingNames:l,isResultsField:n=!1,isCycleConfigField:r=!1,cycleFieldNames:i=[],resultsFieldNames:s=[]})=>{const[u,c]=useState(blank),[d,m]=useState(""),[h,p]=useState(null),{scales:g}=useContext(AutoCoreTagContext),f=useMemo(()=>Object.keys(g??{}).sort().map(e=>({label:e,value:e})),[g]);useEffect(()=>{e&&(c(t?{...t}:{...blank}),m(null==t?.default?"":String(t.default)),p(null))},[e,t]);const v=u.aggregate,b=v?.from??"cycle_fields",x=v?.scope??"test",_=COUNT_CHOICES.find(e=>e.scope===x&&e.from===b)?.value??"test_cycles",y=("results"===b?s:i).filter(e=>e&&e!==u.name).map(e=>({label:e,value:e}));return _jsxs(Dialog,{header:t?`Edit field: ${t.name}`:"New field",visible:e,onHide:a,style:{width:"36rem"},children:[h&&_jsx("div",{style:{color:"#dc2626",marginBottom:"0.75rem"},children:h}),_jsx(FormRow,{label:"Name",required:!0,hint:"Wire-format key. Also the column name in CSV exports.",children:_jsx(InputText,{value:u.name,onChange:e=>c({...u,name:e.target.value})})}),_jsx(FormRow,{label:"Type",required:!0,children:_jsx(Dropdown,{value:u.type,options:FIELD_TYPES,onChange:e=>c({...u,type:e.value}),editable:!0})}),_jsx(FormRow,{label:"Quantity",hint:"Ties this field to a row of the machine's units.json, so it follows the operator's Metric/Imperial choice and takes its unit label from the active system. Set this in preference to Units/Scale, which are fixed.",children:_jsx(Dropdown,{value:u.quantity??"",options:f,onChange:e=>c({...u,quantity:e.value||void 0}),placeholder:"— none (fixed Units/Scale below) —",showClear:!0,editable:!0})}),_jsx(FormRow,{label:"Units",hint:"Fixed display label appended to form labels (e.g. m/s). Ignored when Quantity is set — the active unit system supplies the label.",children:_jsx(InputText,{value:u.units??"",onChange:e=>c({...u,units:e.target.value||void 0})})}),_jsx(FormRow,{label:"Label",hint:"Pretty form label. Falls back to name when empty.",children:_jsx(InputText,{value:u.label??"",onChange:e=>c({...u,label:e.target.value||void 0})})}),_jsx(FormRow,{label:"Required",hint:r?"Blocks the machine until the operator fills this in — tis.cycle_ready stays false and start_test is refused. This is what stops an unannotated row from being recorded.":void 0,children:_jsx(Checkbox,{checked:!!u.required,onChange:e=>c({...u,required:!!e.checked})})}),r&&_jsx(FormRow,{label:"Autoclear",hint:"Clear the operator's entry once a row has recorded it, so the next row can't inherit a stale value. Fires after each cycle under 'cycle' scope, at the end of the run under 'run' scope. Pair with Required — on its own it turns stale data into silently missing data.",children:_jsx(Checkbox,{checked:!!u.autoclear,onChange:e=>c({...u,autoclear:!!e.checked})})}),_jsx(FormRow,{label:"Source",hint:"Optional gm.* variable to bind this field to.",children:_jsx(InputText,{value:u.source??"",onChange:e=>c({...u,source:e.target.value||void 0}),placeholder:"gm.<variable_name>"})}),_jsx(FormRow,{label:"Scale",hint:"display = raw × scale. Leave blank for 1.0 (no conversion).",children:_jsx(InputNumber,{value:u.scale??null,onValueChange:e=>c({...u,scale:"number"==typeof e.value?e.value:void 0}),mode:"decimal",minFractionDigits:0,maxFractionDigits:9})}),_jsx(FormRow,{label:"Min",hint:"Optional lower bound the operator can enter (display units). Blank = no minimum. Or bind it to the machine with an FQDN token like ${gm.press_force_min_n} — for a bound that moves, e.g. a load-cell force ceiling.",children:_jsx(InputText,{value:boundText(u.min),onChange:e=>c({...u,min:parseBound(e.target.value)}),className:boundInvalid(u.min)?"p-invalid":"",placeholder:"number or ${gm.…}"})}),_jsx(FormRow,{label:"Max",hint:"Optional upper bound the operator can enter (display units). Blank = no maximum. Or bind it to the machine with an FQDN token like ${gm.press_force_max_n}.",children:_jsx(InputText,{value:boundText(u.max),onChange:e=>c({...u,max:parseBound(e.target.value)}),className:boundInvalid(u.max)?"p-invalid":"",placeholder:"number or ${gm.…}"})}),_jsx(FormRow,{label:"Default",hint:"Applied every time the method loads (operator can override). A literal (display units) like 5, or an FQDN token like ${gm.safe_speed} that snapshots that value on load.",children:_jsx(InputText,{value:d,onChange:e=>m(e.target.value),placeholder:"e.g. 5 or ${gm.safe_speed}"})}),n&&_jsxs(_Fragment,{children:[_jsx("div",{style:{borderTop:"1px solid #e5e7eb",margin:"0.75rem 0 0.25rem"}}),_jsx(FormRow,{label:"Aggregate",hint:"Cross-test rollup. When set, this result is derived server-side over the non-excluded tests sharing the same sample_id — the analysis script does not supply it.",children:_jsx(Dropdown,{value:v?.fn??"",options:AGG_FNS,onChange:e=>(e=>{if(""===e)return void c({...u,aggregate:void 0});if("count"===e)return void c({...u,aggregate:{fn:"count",from:u.aggregate?.from??"cycle_fields",scope:u.aggregate?.scope??"test"}});const t={fn:e,of:u.aggregate?.of,from:u.aggregate?.from??"cycle_fields",scope:u.aggregate?.scope??"test"};c({...u,aggregate:t})})(e.value)})}),v&&"count"===v.fn&&_jsx(FormRow,{label:"Count",hint:"What is being counted. A test's own cycles is the usual choice — it's the number the operator can see in the Cycle Data table.",children:_jsx(Dropdown,{value:_,options:COUNT_CHOICES,onChange:e=>{const t=COUNT_CHOICES.find(t=>t.value===e.value);t&&c({...u,aggregate:{...v,scope:t.scope,from:t.from}})}})}),v&&"count"!==v.fn&&_jsxs(_Fragment,{children:[_jsx(FormRow,{label:"Scope",hint:"How wide the reduction reaches. 'This test only' is the default: a value on a test's own results panel or report describes that test.",children:_jsx(Dropdown,{value:x,options:AGG_SCOPES,onChange:e=>c({...u,aggregate:{...v,scope:e.value}})})}),_jsx(FormRow,{label:"Aggregate from",hint:"Which per-test source the target field is read from.",children:_jsx(Dropdown,{value:b,options:AGG_FROMS,onChange:e=>c({...u,aggregate:{...v,from:e.value}})})}),_jsx(FormRow,{label:"Aggregate of",required:!0,hint:"The field to reduce across tests.",children:_jsx(Dropdown,{value:v.of??null,options:y,onChange:e=>c({...u,aggregate:{...v,of:e.value||void 0}}),editable:!0,placeholder:y.length?"Select a field":`No ${b} defined yet`})})]})]}),_jsx(FormRow,{label:"Description",hint:"Hover tooltip in the form.",children:_jsx(InputTextarea,{rows:2,value:u.description??"",onChange:e=>c({...u,description:e.target.value||void 0})})}),_jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",marginTop:"1rem"},children:[_jsx(Button,{label:"Cancel",className:"p-button-text",onClick:a}),_jsx(Button,{label:"Save",onClick:()=>{const e={...u},a=(e=>{const t=e.trim();if(""!==t){if(t.startsWith("${"))return t;if("true"===t)return!0;if("false"===t)return!1;if(/^-?\d*\.?\d+$/.test(t)){const e=Number(t);if(Number.isFinite(e))return e}return t}})(d);void 0===a?delete e.default:e.default=a;const n=(e=>{if(!e.name.trim())return"Field name is required.";if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e.name))return"Name must be a valid identifier (letters, digits, underscore; cannot start with a digit).";if(l.some(a=>a===e.name&&a!==t?.name))return`A field named "${e.name}" already exists in this array.`;if("number"==typeof e.min&&"number"==typeof e.max&&e.min>e.max)return`Min (${e.min}) cannot be greater than Max (${e.max}).`;for(const t of["min","max"])if(boundInvalid(e[t]))return`${"min"===t?"Min":"Max"} must be a number or an FQDN token like \${gm.some_var} — "${e[t]}" is neither.`;return e.aggregate&&"count"!==e.aggregate.fn&&!e.aggregate.of?.trim()?`Aggregate "${e.aggregate.fn}" needs a target field (the field to ${e.aggregate.fn} across tests).`:null})(e);n?p(n):o(e)}})]})]})};
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useContext,useEffect,useMemo,useState}from"react";import{Dialog}from"primereact/dialog";import{Button}from"primereact/button";import{InputText}from"primereact/inputtext";import{InputTextarea}from"primereact/inputtextarea";import{Dropdown}from"primereact/dropdown";import{Checkbox}from"primereact/checkbox";import{InputNumber}from"primereact/inputnumber";import{FormRow}from"../../forms/FormRow";import{useEditDraft}from"../../forms/useEditDraft";import{boundText,parseBound,boundInvalid}from"../../tis/TestFieldRow";import{AutoCoreTagContext}from"../../../core/AutoCoreTagContext";import{VariableInput}from"../../varpick";import{boundCatalog,configSourceCatalog,cycleSourceCatalog}from"../../varpick";import{useAuthoringCatalogs}from"./AuthoringContext";const FIELD_TYPES=[{label:"string",value:"string"},{label:"i32",value:"i32"},{label:"i64",value:"i64"},{label:"u32",value:"u32"},{label:"u64",value:"u64"},{label:"f32",value:"f32"},{label:"f64",value:"f64"},{label:"bool",value:"bool"}],AGG_FNS=[{label:"— none (analysis-fed) —",value:""},{label:"avg",value:"avg"},{label:"min",value:"min"},{label:"max",value:"max"},{label:"stddev",value:"stddev"},{label:"count (how many went into the rollup)",value:"count"}],AGG_FROMS=[{label:"cycle field (every cycle, every test)",value:"cycle_fields"},{label:"result (one value per test)",value:"results"}],COUNT_CHOICES=[{label:"cycles in this test",value:"test_cycles",scope:"test",from:"cycle_fields"},{label:"cycles for this sample, all tests",value:"project_cycles",scope:"project",from:"cycle_fields"},{label:"tests for this sample",value:"project_tests",scope:"project",from:"results"}],AGG_SCOPES=[{label:"this test only",value:"test"},{label:"this sample, every test in the project",value:"project"}],blank={name:"",type:"f32"};export const TestFieldDialog=({visible:e,initial:t,onCancel:a,onSave:o,siblingNames:l,isResultsField:r=!1,isCycleConfigField:i=!1,isCycleField:n=!1,cycleFieldNames:s=[],resultsFieldNames:c=[]})=>{const{variables:u,producedNames:d}=useAuthoringCatalogs(),{draft:m,setDraft:h,token:p}=useEditDraft(e,t?.name??"",()=>({field:t?{...t}:{...blank},defaultText:null==t?.default?"":String(t.default)})),g=m.field,f=m.defaultText,b=e=>h(t=>({...t,field:e})),[v,x]=useState(null);useEffect(()=>{x(null)},[p]);const{scales:_}=useContext(AutoCoreTagContext),y=useMemo(()=>Object.keys(_??{}).sort().map(e=>({label:e,value:e})),[_]),w=useMemo(()=>({variables:u,unitFor:e=>_?.[e]?.label}),[u,_]),C=g.aggregate,j=C?.from??"cycle_fields",F=C?.scope??"test",k=COUNT_CHOICES.find(e=>e.scope===F&&e.from===j)?.value??"test_cycles",T=("results"===j?c:s).filter(e=>e&&e!==g.name).map(e=>({label:e,value:e}));return _jsxs(Dialog,{header:t?`Edit field: ${t.name}`:"New field",visible:e,onHide:a,style:{width:"36rem"},children:[v&&_jsx("div",{style:{color:"#dc2626",marginBottom:"0.75rem"},children:v}),_jsx(FormRow,{label:"Name",required:!0,hint:"Wire-format key. Also the column name in CSV exports.",children:_jsx(InputText,{value:g.name,onChange:e=>b({...g,name:e.target.value})})}),_jsx(FormRow,{label:"Type",required:!0,children:_jsx(Dropdown,{value:g.type,options:FIELD_TYPES,onChange:e=>b({...g,type:e.value}),editable:!0})}),_jsx(FormRow,{label:"Quantity",hint:"Ties this field to a row of the machine's units.json, so it follows the operator's Metric/Imperial choice and takes its unit label from the active system. Set this in preference to Units/Scale, which are fixed.",children:_jsx(Dropdown,{value:g.quantity??"",options:y,onChange:e=>b({...g,quantity:e.value||void 0}),placeholder:"— none (fixed Units/Scale below) —",showClear:!0,editable:!0})}),_jsx(FormRow,{label:"Units",hint:"Fixed display label appended to form labels (e.g. m/s). Ignored when Quantity is set — the active unit system supplies the label.",children:_jsx(InputText,{value:g.units??"",onChange:e=>b({...g,units:e.target.value||void 0})})}),_jsx(FormRow,{label:"Label",hint:"Pretty form label. Falls back to name when empty.",children:_jsx(InputText,{value:g.label??"",onChange:e=>b({...g,label:e.target.value||void 0})})}),_jsx(FormRow,{label:"Required",hint:i?"Blocks the machine until the operator fills this in — tis.cycle_ready stays false and start_test is refused. This is what stops an unannotated row from being recorded.":void 0,children:_jsx(Checkbox,{checked:!!g.required,onChange:e=>b({...g,required:!!e.checked})})}),i&&_jsx(FormRow,{label:"Autoclear",hint:"Clear the operator's entry once a row has recorded it, so the next row can't inherit a stale value. Fires after each cycle under 'cycle' scope, at the end of the run under 'run' scope. Pair with Required — on its own it turns stale data into silently missing data.",children:_jsx(Checkbox,{checked:!!g.autoclear,onChange:e=>b({...g,autoclear:!!e.checked})})}),_jsx(FormRow,{label:"Source",hint:n?"Where this column’s value comes from. Leave empty when the sequence records it — a store_value step is matched to this column by NAME, not by a binding.":"Optional gm.* variable this field reads and writes.",children:_jsx(VariableInput,{value:g.source??"",onChange:e=>b({...g,source:e||void 0}),catalog:()=>n?cycleSourceCatalog(w,{producedNames:d,fieldName:g.name}):configSourceCatalog(w),ariaLabel:"Choose a source for this field",pickerTitle:"Where does this value come from?",pickerHint:n?"A column filled by the sequence needs no Source — choosing one below clears it, which is correct.":"The Test Setup form writes the operator’s entry to this variable, so only variables a UI may write are listed.",placeholder:"gm.<variable_name>"})}),_jsx(FormRow,{label:"Scale",hint:"display = raw × scale. Leave blank for 1.0 (no conversion).",children:_jsx(InputNumber,{value:g.scale??null,onValueChange:e=>b({...g,scale:"number"==typeof e.value?e.value:void 0}),mode:"decimal",minFractionDigits:0,maxFractionDigits:9})}),_jsx(FormRow,{label:"Min",hint:"Optional lower bound the operator can enter (display units). Blank = no minimum. Or bind it to the machine with an FQDN token like ${gm.press_force_min_n} — for a bound that moves, e.g. a load-cell force ceiling.",children:_jsx(VariableInput,{value:boundText(g.min),onChange:e=>b({...g,min:parseBound(e)}),invalid:boundInvalid(g.min),catalog:()=>boundCatalog(w),ariaLabel:"Bind Min to a machine variable",pickerTitle:"Bind Min to a machine value",pickerHint:"The bound then follows the machine — a load-cell ceiling that changes with the fitted cell, rather than a number that goes stale.",placeholder:"number or ${gm.…}"})}),_jsx(FormRow,{label:"Max",hint:"Optional upper bound the operator can enter (display units). Blank = no maximum. Or bind it to the machine with an FQDN token like ${gm.press_force_max_n}.",children:_jsx(VariableInput,{value:boundText(g.max),onChange:e=>b({...g,max:parseBound(e)}),invalid:boundInvalid(g.max),catalog:()=>boundCatalog(w),ariaLabel:"Bind Max to a machine variable",pickerTitle:"Bind Max to a machine value",pickerHint:"The bound then follows the machine — a load-cell ceiling that changes with the fitted cell, rather than a number that goes stale.",placeholder:"number or ${gm.…}"})}),_jsx(FormRow,{label:"Default",hint:"Applied every time the method loads (operator can override). A literal (display units) like 5, or an FQDN token like ${gm.safe_speed} that snapshots that value on load.",children:_jsx(VariableInput,{value:f,onChange:e=>h(t=>({...t,defaultText:e})),catalog:()=>boundCatalog(w),ariaLabel:"Use a machine variable as the default",pickerTitle:"Default from a machine value",pickerHint:"A token default SNAPSHOTS the value when the method loads. It is not a live binding — that is what Source is.",placeholder:"e.g. 5 or ${gm.safe_speed}"})}),r&&_jsxs(_Fragment,{children:[_jsx("div",{style:{borderTop:"1px solid #e5e7eb",margin:"0.75rem 0 0.25rem"}}),_jsx(FormRow,{label:"Aggregate",hint:"Cross-test rollup. When set, this result is derived server-side over the non-excluded tests sharing the same sample_id — the analysis script does not supply it.",children:_jsx(Dropdown,{value:C?.fn??"",options:AGG_FNS,onChange:e=>(e=>{if(""===e)return void b({...g,aggregate:void 0});if("count"===e)return void b({...g,aggregate:{fn:"count",from:g.aggregate?.from??"cycle_fields",scope:g.aggregate?.scope??"test"}});const t={fn:e,of:g.aggregate?.of,from:g.aggregate?.from??"cycle_fields",scope:g.aggregate?.scope??"test"};b({...g,aggregate:t})})(e.value)})}),C&&"count"===C.fn&&_jsx(FormRow,{label:"Count",hint:"What is being counted. A test's own cycles is the usual choice — it's the number the operator can see in the Cycle Data table.",children:_jsx(Dropdown,{value:k,options:COUNT_CHOICES,onChange:e=>{const t=COUNT_CHOICES.find(t=>t.value===e.value);t&&b({...g,aggregate:{...C,scope:t.scope,from:t.from}})}})}),C&&"count"!==C.fn&&_jsxs(_Fragment,{children:[_jsx(FormRow,{label:"Scope",hint:"How wide the reduction reaches. 'This test only' is the default: a value on a test's own results panel or report describes that test.",children:_jsx(Dropdown,{value:F,options:AGG_SCOPES,onChange:e=>b({...g,aggregate:{...C,scope:e.value}})})}),_jsx(FormRow,{label:"Aggregate from",hint:"Which per-test source the target field is read from.",children:_jsx(Dropdown,{value:j,options:AGG_FROMS,onChange:e=>b({...g,aggregate:{...C,from:e.value}})})}),_jsx(FormRow,{label:"Aggregate of",required:!0,hint:"The field to reduce across tests.",children:_jsx(Dropdown,{value:C.of??null,options:T,onChange:e=>b({...g,aggregate:{...C,of:e.value||void 0}}),editable:!0,placeholder:T.length?"Select a field":`No ${j} defined yet`})})]})]}),_jsx(FormRow,{label:"Description",hint:"Hover tooltip in the form.",children:_jsx(InputTextarea,{rows:2,value:g.description??"",onChange:e=>b({...g,description:e.target.value||void 0})})}),_jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",marginTop:"1rem"},children:[_jsx(Button,{label:"Cancel",className:"p-button-text",onClick:a}),_jsx(Button,{label:"Save",onClick:()=>{const e={...g},a=(e=>{const t=e.trim();if(""!==t){if(t.startsWith("${"))return t;if("true"===t)return!0;if("false"===t)return!1;if(/^-?\d*\.?\d+$/.test(t)){const e=Number(t);if(Number.isFinite(e))return e}return t}})(f);void 0===a?delete e.default:e.default=a;const r=(e=>{if(!e.name.trim())return"Field name is required.";if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e.name))return"Name must be a valid identifier (letters, digits, underscore; cannot start with a digit).";if(l.some(a=>a===e.name&&a!==t?.name))return`A field named "${e.name}" already exists in this array.`;if("number"==typeof e.min&&"number"==typeof e.max&&e.min>e.max)return`Min (${e.min}) cannot be greater than Max (${e.max}).`;for(const t of["min","max"])if(boundInvalid(e[t]))return`${"min"===t?"Min":"Max"} must be a number or an FQDN token like \${gm.some_var} — "${e[t]}" is neither.`;return e.aggregate&&"count"!==e.aggregate.fn&&!e.aggregate.of?.trim()?`Aggregate "${e.aggregate.fn}" needs a target field (the field to ${e.aggregate.fn} across tests).`:null})(e);r?x(r):o(e)}})]})]})};
@@ -1 +1 @@
1
- {"version":3,"file":"ViewsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/tis-editor/editor/ViewsEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAQD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwFlD,CAAC"}
1
+ {"version":3,"file":"ViewsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/tis-editor/editor/ViewsEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,UAAU,CAAC;AAIjE,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AAQD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwIlD,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useState}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{FormSection}from"../../forms/FormSection";import{ChartViewDialog}from"./ChartViewDialog";export const ViewsEditor=({method:e,onChange:t})=>{const i=e.views??{},a=Object.entries(i).map(([e,t])=>({id:e,title:t.title??"",type:t.type??""})),[s,n]=useState(!1),[o,r]=useState(null),l=[...(e.project_fields??[]).map(e=>e.name),...(e.config_fields??[]).map(e=>e.name),...(e.cycle_config_fields??[]).map(e=>e.name),...(e.cycle_fields??[]).map(e=>e.name),...(e.results_fields??[]).map(e=>e.name),...Object.keys(e.raw_data?.columns??{}),"cycle_index","timestamp"];return _jsxs(_Fragment,{children:[_jsx(FormSection,{title:"Views",description:"Named chart definitions rendered by <TestDataView> (cycle_scatter) and <TestRawDataView> (raw_trace).",actions:_jsx(Button,{label:"Add view",icon:"pi pi-plus",size:"small",onClick:()=>{r(null),n(!0)}}),children:_jsxs(DataTable,{value:a,dataKey:"id",emptyMessage:"No views defined.",children:[_jsx(Column,{field:"id",header:"View ID"}),_jsx(Column,{field:"title",header:"Title"}),_jsx(Column,{field:"type",header:"Type",style:{width:"8rem"}}),_jsx(Column,{header:"",body:a=>_jsxs("div",{style:{display:"flex",gap:"0.25rem"},children:[_jsx(Button,{icon:"pi pi-pencil",className:"p-button-text p-button-sm",onClick:()=>{return e=a.id,r(e),void n(!0);var e},"aria-label":"Edit"}),_jsx(Button,{icon:"pi pi-trash",className:"p-button-text p-button-danger p-button-sm",onClick:()=>(a=>{if(!window.confirm(`Remove view "${a}"?`))return;const s={...i};delete s[a],t({...e,views:s})})(a.id),"aria-label":"Remove"})]}),style:{width:"6rem"}})]})}),_jsx(ChartViewDialog,{visible:s,initial:o?{viewId:o,view:i[o]}:null,knownKeys:l,siblingIds:Object.keys(i),onCancel:()=>n(!1),onSave:(a,s)=>{const r={...i};o&&o!==a&&delete r[o],r[a]=s,t({...e,views:r}),n(!1)}})]})};
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useState}from"react";import{DataTable}from"primereact/datatable";import{Column}from"primereact/column";import{Button}from"primereact/button";import{FormSection}from"../../forms/FormSection";import{moveView,orderedViews}from"../../tis/chartViews";import{ChartViewDialog}from"./ChartViewDialog";import{chartFieldCatalog}from"../../varpick";export const ViewsEditor=({method:e,onChange:t})=>{const i=e.views??{},a=orderedViews(i).map(({name:e,view:t})=>({id:e,title:t.title??"",type:t.type??""})),[o,s]=useState(!1),[n,l]=useState(null),r=[...(e.project_fields??[]).map(e=>e.name),...(e.config_fields??[]).map(e=>e.name),...(e.cycle_config_fields??[]).map(e=>e.name),...(e.cycle_fields??[]).map(e=>e.name),...(e.results_fields??[]).map(e=>e.name),...Object.keys(e.raw_data?.columns??{}),"cycle_index","timestamp"],m=(a,o)=>{const s=moveView(i,a,o);s!==i&&t({...e,views:s})};return _jsxs(_Fragment,{children:[_jsx(FormSection,{title:"Views",description:"Named chart definitions rendered by <TestDataView> (cycle_scatter) and <TestRawDataView> (raw_trace). Top to bottom is the order the operator sees in the view picker, and the first one is the chart the Data tab opens on.",actions:_jsx(Button,{label:"Add view",icon:"pi pi-plus",size:"small",onClick:()=>{l(null),s(!0)}}),children:_jsxs(DataTable,{value:a,dataKey:"id",emptyMessage:"No views defined.",children:[_jsx(Column,{field:"id",header:"View ID"}),_jsx(Column,{field:"title",header:"Title"}),_jsx(Column,{field:"type",header:"Type",style:{width:"8rem"}}),_jsx(Column,{header:"",body:(o,n)=>_jsxs("div",{style:{display:"flex",gap:"0.25rem"},children:[_jsx(Button,{icon:"pi pi-arrow-up",className:"p-button-text p-button-sm",disabled:0===n.rowIndex,onClick:()=>m(n.rowIndex,-1),"aria-label":"Move up"}),_jsx(Button,{icon:"pi pi-arrow-down",className:"p-button-text p-button-sm",disabled:n.rowIndex===a.length-1,onClick:()=>m(n.rowIndex,1),"aria-label":"Move down"}),_jsx(Button,{icon:"pi pi-pencil",className:"p-button-text p-button-sm",onClick:()=>{return e=o.id,l(e),void s(!0);var e},"aria-label":"Edit"}),_jsx(Button,{icon:"pi pi-trash",className:"p-button-text p-button-danger p-button-sm",onClick:()=>(a=>{if(!window.confirm(`Remove view "${a}"?`))return;const o={...i};delete o[a],t({...e,views:o})})(o.id),"aria-label":"Remove"})]}),style:{width:"10rem"}})]})}),_jsx(ChartViewDialog,{visible:o,initial:n?{viewId:n,view:i[n]}:null,knownKeys:r,fieldCatalog:t=>chartFieldCatalog({viewType:t,cycleFields:[...(e.cycle_config_fields??[]).map(e=>e.name),...(e.cycle_fields??[]).map(e=>e.name),"cycle_index","timestamp"].filter(Boolean),resultsFields:(e.results_fields??[]).map(e=>e.name).filter(Boolean),rawColumns:Object.keys(e.raw_data?.columns??{}),testFields:[...(e.project_fields??[]).map(e=>e.name),...(e.config_fields??[]).map(e=>e.name)].filter(Boolean)}),siblingIds:Object.keys(i),onCancel:()=>s(!1),onSave:(a,o)=>{const l={...i};n&&n!==a&&delete l[n],l[a]=o,t({...e,views:l}),s(!1)}})]})};
@@ -91,6 +91,12 @@ export interface ChartView {
91
91
  * prints 17-digit ticks.
92
92
  */
93
93
  x_decimals?: number;
94
+ /**
95
+ * Position in the view picker, ascending. Set by the editor's Move
96
+ * up / Move down; see `components/tis/chartViews.ts` for why the order
97
+ * cannot just be the order of the keys.
98
+ */
99
+ order?: number;
94
100
  }
95
101
  export type RawColumnSource = 'time' | 'derived' | string;
96
102
  export interface RawColumn {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/tis-editor/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,SAAS,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mB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,aAAa,GACnB,gBAAgB,GAChB,eAAe,GACf,qBAAqB,GACrB,cAAc,GACd,gBAAgB,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * VariableInput — a text input with a picker button.
3
+ *
4
+ * A drop-in replacement for the `<InputText>` inside a `FormRow`, so adding a
5
+ * picker to a field is a one-line change and the field keeps its label, hint and
6
+ * error handling.
7
+ *
8
+ * Typing still works exactly as before. That is the point: an author who knows
9
+ * the name types it, and an author who does not gets a list instead of a guess.
10
+ */
11
+ import * as React from 'react';
12
+ import { type Catalog, type InsertMode } from '@adcops/autocore-varpick';
13
+ import './varpick.css';
14
+ export interface VariableInputProps {
15
+ value: string;
16
+ onChange: (value: string) => void;
17
+ /**
18
+ * Built when the dialog opens, not on every render — a machine's variable
19
+ * table is ~100 rows and this sits inside a dialog that re-renders on live
20
+ * tag traffic.
21
+ */
22
+ catalog: () => Catalog;
23
+ /**
24
+ * `replace` when the whole field IS one binding (a `source`, a bound);
25
+ * `caret` when the field is an expression and the pick is one term of it.
26
+ * Defaults to `replace`, which is what every TIS field is.
27
+ */
28
+ mode?: InsertMode;
29
+ /** Dialog heading and the line under it. */
30
+ pickerTitle?: string;
31
+ pickerHint?: React.ReactNode;
32
+ /** Accessible name for the button — it is icon-only, so this is required. */
33
+ ariaLabel: string;
34
+ placeholder?: string;
35
+ className?: string;
36
+ disabled?: boolean;
37
+ invalid?: boolean;
38
+ }
39
+ export declare const VariableInput: React.FC<VariableInputProps>;
40
+ export default VariableInput;
41
+ //# sourceMappingURL=VariableInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariableInput.d.ts","sourceRoot":"","sources":["../../../src/components/varpick/VariableInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAGH,KAAK,OAAO,EACZ,KAAK,UAAU,EAElB,MAAM,0BAA0B,CAAC;AAElC,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyEtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import*as React from"react";import{Button}from"primereact/button";import{InputText}from"primereact/inputtext";import{applyInsert,queryFromCaret}from"@adcops/autocore-varpick";import{VariablePicker}from"./VariablePicker";import"./varpick.css";export const VariableInput=({value:e,onChange:t,catalog:a,mode:r="replace",pickerTitle:n,pickerHint:c,ariaLabel:i,placeholder:s,className:l,disabled:o,invalid:u})=>{const p=React.useRef(null),m=React.useRef({start:0,end:0}),[d,b]=React.useState(!1),[x,v]=React.useState([]),f=()=>{const e=p.current;e&&(m.current={start:e.selectionStart??e.value.length,end:e.selectionEnd??e.value.length})};return _jsxs("div",{className:"ac-varpick__input",children:[_jsx(InputText,{ref:p,value:e,placeholder:s,disabled:o,className:`${l??""}${u?" p-invalid":""}`,onChange:e=>t(e.target.value),onSelect:f,onFocus:f}),_jsx(Button,{type:"button",icon:"pi pi-list","aria-label":i,disabled:o,className:"p-button-outlined",onClick:()=>{v(a()),b(!0)}}),d&&_jsx(VariablePicker,{visible:!0,catalog:x,title:n,hint:c,initialQuery:"caret"===r?queryFromCaret(e,m.current.start,m.current.end):"",onCancel:()=>b(!1),onPick:a=>{const{start:n,end:c}=m.current,i=applyInsert(e,a,r,n,c);t(i.value),b(!1),requestAnimationFrame(()=>{const e=p.current;e&&(e.focus(),e.setSelectionRange(i.caret,i.caret),m.current={start:i.caret,end:i.caret})})}})]})};export default VariableInput;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * VariablePicker — a searchable, described list of the machine's variables.
3
+ *
4
+ * ## Why
5
+ *
6
+ * Every place the TIS method editor asks an author to name a machine value was
7
+ * a bare text box: a field's `Source` hinting `gm.<variable_name>`, a bound
8
+ * hinting `${gm.…}`. Nobody can type a variable out of a program they cannot
9
+ * see, and a wrong name fails SILENTLY in both directions — a `source` that
10
+ * names nothing never binds, a bound that resolves to nothing is simply
11
+ * unbounded.
12
+ *
13
+ * Typing is still allowed. The button is additive: it opens the list, shows what
14
+ * each variable MEANS, and writes the right spelling for the field it came from.
15
+ *
16
+ * ## Rules honoured here
17
+ *
18
+ * - **No tooltips, no `title`.** Half the installed base is a touchscreen with
19
+ * no hover, so the description is on the row, not behind it.
20
+ * - **Pick-then-Insert.** A stray tap in a list must not rewrite a method.
21
+ * - **A disabled entry is shown with its reason**, never omitted — hiding it
22
+ * answers "where is my variable?" with the same silence as a text box.
23
+ *
24
+ * The dialog's own state is deliberately trivial (a query and a selection) and
25
+ * it is unmounted between openings, so there is no draft here to reseed — see
26
+ * `useEditDraft` for the fields that DO have one.
27
+ */
28
+ import * as React from 'react';
29
+ import { type Catalog, type VariableEntry } from '@adcops/autocore-varpick';
30
+ import './varpick.css';
31
+ export interface VariablePickerProps {
32
+ visible: boolean;
33
+ catalog: Catalog;
34
+ /** Dialog heading. */
35
+ title?: string;
36
+ /** One line saying what picking will do to the field. */
37
+ hint?: React.ReactNode;
38
+ /** Seeds the search box — usually the word the caret was sitting in. */
39
+ initialQuery?: string;
40
+ onCancel: () => void;
41
+ onPick: (entry: VariableEntry) => void;
42
+ }
43
+ export declare const VariablePicker: React.FC<VariablePickerProps>;
44
+ export default VariablePicker;
45
+ //# sourceMappingURL=VariablePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariablePicker.d.ts","sourceRoot":"","sources":["../../../src/components/varpick/VariablePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAGH,KAAK,OAAO,EACZ,KAAK,aAAa,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgHxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import*as React from"react";import{Dialog}from"primereact/dialog";import{Button}from"primereact/button";import{InputText}from"primereact/inputtext";import{firstChoosable,searchCatalog}from"@adcops/autocore-varpick";import"./varpick.css";export const VariablePicker=({visible:a,catalog:e,title:i,hint:s,initialQuery:c,onCancel:t,onPick:r})=>{const[l,n]=React.useState(c??""),[o,p]=React.useState(null);React.useEffect(()=>{a&&n(c??"")},[a,c]);const d=React.useMemo(()=>searchCatalog(e,l),[e,l]);React.useEffect(()=>{p(firstChoosable(d)?.id??null)},[d]);const _=a=>null===a?void 0:d.flatMap(a=>a.entries).find(e=>e.id===a),m=a=>{const e=a??_(o);e&&!e.disabled&&r(e)},h=_jsxs("div",{className:"ac-varpick__foot",children:[_jsx(Button,{label:"Cancel",className:"p-button-text",onClick:t}),_jsx(Button,{label:"Insert",disabled:void 0===_(o),onClick:()=>m()})]});return _jsxs(Dialog,{header:i??"Insert a variable",visible:a,onHide:t,footer:h,style:{width:"44rem",maxWidth:"95vw"},children:[s&&_jsx("div",{className:"ac-varpick__hint",children:s}),_jsx(InputText,{className:"ac-varpick__search",value:l,autoFocus:!0,placeholder:"name, or what it means — try “load” or “EL3356”",onChange:a=>n(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),m())}}),0===d.length?_jsx("div",{className:"ac-varpick__empty",children:0===e.length?"Nothing to pick from. The machine published no variables — the server may be an older build without gm.get_variables.":`No variable matches “${l}”.`}):_jsx("div",{className:"ac-varpick__list",children:d.map(a=>_jsxs("div",{className:"ac-varpick__group",children:[_jsxs("div",{className:"ac-varpick__grouphead",children:[_jsx("span",{className:"ac-varpick__grouptitle",children:a.title}),a.hint&&_jsx("span",{className:"ac-varpick__grouphint",children:a.hint})]}),a.entries.map(a=>_jsxs("button",{type:"button",className:"ac-varpick__row"+(a.id===o?" ac-varpick__row--on":"")+(a.disabled?" ac-varpick__row--off":""),"aria-pressed":a.id===o,disabled:!!a.disabled,onClick:()=>p(a.id),onDoubleClick:()=>m(a),children:[_jsxs("span",{className:"ac-varpick__line",children:[_jsx("code",{className:"ac-varpick__name",children:a.name}),a.label&&_jsx("span",{className:"ac-varpick__label",children:a.label}),a.unit&&_jsx("span",{className:"ac-varpick__chip",children:a.unit}),a.type&&_jsx("span",{className:"ac-varpick__chip",children:a.type}),void 0!==a.live&&_jsxs("span",{className:"ac-varpick__live",children:["now ",a.live]})]}),a.description&&_jsx("span",{className:"ac-varpick__desc",children:a.description}),a.disabled&&_jsx("span",{className:"ac-varpick__why",children:a.disabled}),a.note&&_jsx("span",{className:"ac-varpick__note",children:a.note})]},a.id))]},a.id))})]})};export default VariablePicker;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The variable picker: a field with a button that opens a searchable, described
3
+ * list of the machine's variables.
4
+ *
5
+ * The model (catalog shape, search ranking, caret-aware insertion, the `${fqdn}`
6
+ * token grammar) lives in `@adcops/autocore-varpick`, which has no UI in it —
7
+ * the sequence editor renders the same model with a different widget layer, and
8
+ * neither package may import the other's.
9
+ */
10
+ export { VariablePicker } from './VariablePicker';
11
+ export type { VariablePickerProps } from './VariablePicker';
12
+ export { VariableInput } from './VariableInput';
13
+ export type { VariableInputProps } from './VariableInput';
14
+ export { boundCatalog, chartFieldCatalog, configSourceCatalog, cycleSourceCatalog, rawSourceCatalog, } from './tisCatalogs';
15
+ export type { TisCatalogContext } from './tisCatalogs';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/varpick/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EACH,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ export{VariablePicker}from"./VariablePicker";export{VariableInput}from"./VariableInput";export{boundCatalog,chartFieldCatalog,configSourceCatalog,cycleSourceCatalog,rawSourceCatalog}from"./tisCatalogs";
@@ -0,0 +1,85 @@
1
+ /**
2
+ * The catalogs the TIS method editor's pickers offer.
3
+ *
4
+ * Each field wants a different list, spelled differently, and getting either
5
+ * wrong fails SILENTLY:
6
+ *
7
+ * - a `config_fields` **Source** is written by the Test Setup form, so a
8
+ * hardware-owned variable there would have the operator's entry overwritten
9
+ * by the module on the next scan;
10
+ * - a **bound** is `${gm.…}` and an unresolvable one means NO bound — the
11
+ * field is simply unlimited, with nothing on screen to say so;
12
+ * - a `cycle_fields` **Source** has two possible producers and the editor used
13
+ * to show neither.
14
+ *
15
+ * Which is why the spelling and the filter live here, next to each other, rather
16
+ * than at each call site.
17
+ */
18
+ import { type Catalog, type GmVariable } from '@adcops/autocore-varpick';
19
+ export interface TisCatalogContext {
20
+ /** From `gm.get_variables` (or the tag-spec fallback). */
21
+ variables: GmVariable[];
22
+ /** Unit label for a quantity, from the machine's resolved units.json. */
23
+ unitFor?: (quantity: string) => string | undefined;
24
+ /** Current value, formatted, by FQDN. */
25
+ liveFor?: (fqdn: string) => string | undefined;
26
+ }
27
+ /**
28
+ * Variables a form field may WRITE — a `config_fields` source.
29
+ *
30
+ * `TestSetupForm` writes the operator's entry straight to this tag, so a
31
+ * variable produced by a module is not a candidate: the write would land and
32
+ * then be overwritten before anything read it.
33
+ */
34
+ export declare function configSourceCatalog(ctx: TisCatalogContext): Catalog;
35
+ /** Variables a bound (`min`/`max`) or a token default may READ. */
36
+ export declare function boundCatalog(ctx: TisCatalogContext): Catalog;
37
+ /**
38
+ * Where a **cycle field's** value comes from.
39
+ *
40
+ * The one catalog that is not just a variable list, because a cycle field has
41
+ * two possible producers and picking the wrong kind is invisible:
42
+ *
43
+ * 1. `source: "gm.<var>"` — the generated `add_cycle()` reads the tag.
44
+ * 2. `source: null` — whoever records the row supplies it by NAME. On gen4_ac
45
+ * that is the sequencer: a `store_value` step fills a row buffer keyed by
46
+ * name, and `tis.add_cycle` writes `cycle_data` verbatim without checking it
47
+ * against `cycle_fields`. So a declared column with no producer is blank on
48
+ * every row, forever, and nothing says why.
49
+ *
50
+ * Offering only FQDNs — which is what a plain variable picker would do — lets an
51
+ * author wire a binding that never fills. So the sequence's own `store_value`
52
+ * names are offered as a first-class group, and choosing one CLEARS the source
53
+ * (its `insert` is the empty string) rather than setting a binding.
54
+ */
55
+ export declare function cycleSourceCatalog(ctx: TisCatalogContext, opts: {
56
+ /** `store_value` names in this method's `.seq.json`, if the host read it. */
57
+ producedNames?: string[];
58
+ /** The cycle field being edited, so its own name can be highlighted. */
59
+ fieldName?: string;
60
+ }): Catalog;
61
+ /**
62
+ * Columns a chart axis or series may plot.
63
+ *
64
+ * A chart naming a column that does not exist renders an empty plot with no
65
+ * error, which reads as "the machine recorded nothing".
66
+ */
67
+ export declare function chartFieldCatalog(opts: {
68
+ cycleFields?: string[];
69
+ resultsFields?: string[];
70
+ rawColumns?: string[];
71
+ /** Project/config fields — one value for the whole test. */
72
+ testFields?: string[];
73
+ /** `raw_trace` views plot raw columns; `cycle_scatter` plots cycle fields. */
74
+ viewType?: string;
75
+ }): Catalog;
76
+ /**
77
+ * Sources a raw-data column may read.
78
+ *
79
+ * `time` and `derived` are the two the server always understands; everything
80
+ * else is a module channel FQDN. The channel list is not modelled here — the
81
+ * editor has no NI catalog — so the two known values are offered by name and
82
+ * the field stays free text for the rest.
83
+ */
84
+ export declare function rawSourceCatalog(channels?: string[]): Catalog;
85
+ //# sourceMappingURL=tisCatalogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tisCatalogs.d.ts","sourceRoot":"","sources":["../../../src/components/varpick/tisCatalogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEH,KAAK,OAAO,EAEZ,KAAK,UAAU,EAElB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAC9B,0DAA0D;IAC1D,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACnD,yCAAyC;IACzC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAClD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAOnE;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAM5D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE;IACF,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,GACF,OAAO,CA0CT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CA2CV;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAqC7D"}
@@ -0,0 +1 @@
1
+ import{gmCatalog}from"@adcops/autocore-varpick";export function configSourceCatalog(e){return gmCatalog(e.variables,{spelling:"fqdn",writableOnly:!0,unitFor:e.unitFor,liveFor:e.liveFor})}export function boundCatalog(e){return gmCatalog(e.variables,{spelling:"token",unitFor:e.unitFor,liveFor:e.liveFor})}export function cycleSourceCatalog(e,t){const n=[],i=t.producedNames??[];if(i.length>0){const e=i.map(e=>({id:`seq:${e}`,insert:"",name:e,kind:"column",description:e===t.fieldName?"The sequence stores this name every cycle, and it matches this column. Nothing else is needed — leave Source empty.":`The sequence stores this name every cycle. It only lands in this column if the column is called "${e}" too.`,note:e===t.fieldName?void 0:`Rename this field to "${e}", or the value is recorded with no column to show it in.`,keywords:["sequence","store_value"]}));n.push({id:"sequence",title:"Recorded by the sequence",hint:"Matched by NAME, not by binding. Picking one clears Source — that is correct, and is how gen4_ac records every column.",entries:e})}return n.push(...gmCatalog(e.variables,{spelling:"fqdn",unitFor:e.unitFor,liveFor:e.liveFor})),n}export function chartFieldCatalog(e){const t=[],n=(e,t)=>e.map(e=>({id:`${t}:${e}`,insert:e,name:e,kind:"column"})),i=e.rawColumns??[],o=e.cycleFields??[],r=e.resultsFields??[],s="raw_trace"===e.viewType,l={id:"raw",title:"Raw trace columns",hint:"Per-cycle trace columns declared under Raw Data.",entries:n(i,"raw")},c={id:"cycle",title:"Cycle Data columns",hint:"One value per cycle.",entries:n(o,"cycle")};return s?t.push(l,c):t.push(c,l),t.push({id:"results",title:"Results",hint:"One value per test.",entries:n(r,"result")}),t.push({id:"test",title:"Test setup values",hint:"Entered once per test, so they plot as a constant across cycles.",entries:n(e.testFields??[],"test")}),t.filter(e=>e.entries.length>0)}export function rawSourceCatalog(e){const t=[{id:"builtin",title:"Built-in",entries:[{id:"src:time",insert:"time",name:"time",kind:"column",description:"Sample timestamp, seconds from the start of the cycle."},{id:"src:derived",insert:"derived",name:"derived",kind:"column",description:"Computed from the other columns by this column’s Formula."}]}];return e&&e.length>0&&t.push({id:"channels",title:"DAQ channels",hint:"Published by the acquisition module.",entries:e.map(e=>({id:`chan:${e}`,insert:e,name:e,kind:"column"}))}),t}
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Variable picker.
3
+ *
4
+ * Colours come from the PrimeReact theme's variables so the dialog matches
5
+ * whatever theme the machine is running, light or dark. Every value has a
6
+ * literal fallback: an un-themed host (the playground, a test harness) must
7
+ * still render legible text rather than black on black.
8
+ */
9
+
10
+ .ac-varpick__input {
11
+ display: flex;
12
+ align-items: stretch;
13
+ gap: 0;
14
+ min-width: 0;
15
+ }
16
+
17
+ .ac-varpick__input .p-inputtext {
18
+ flex: 1 1 auto;
19
+ min-width: 0;
20
+ border-top-right-radius: 0;
21
+ border-bottom-right-radius: 0;
22
+ }
23
+
24
+ /* Sized to the full control height, not shrunk to fit: these screens are
25
+ * touchscreens, and a button an operator has to aim at is one they mis-tap. */
26
+ .ac-varpick__input > .p-button {
27
+ flex: 0 0 auto;
28
+ border-top-left-radius: 0;
29
+ border-bottom-left-radius: 0;
30
+ margin-left: -1px;
31
+ }
32
+
33
+ .ac-varpick__hint {
34
+ font-size: 0.8125rem;
35
+ color: var(--text-color-secondary, #6b7280);
36
+ margin-bottom: 0.75rem;
37
+ line-height: 1.4;
38
+ }
39
+
40
+ .ac-varpick__search { width: 100%; }
41
+
42
+ .ac-varpick__empty {
43
+ padding: 1.5rem 0.25rem;
44
+ color: var(--text-color-secondary, #6b7280);
45
+ font-size: 0.875rem;
46
+ }
47
+
48
+ .ac-varpick__list {
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: 1rem;
52
+ margin-top: 0.75rem;
53
+ /* Bounded so the search box and the footer stay put while the list moves. */
54
+ max-height: 55vh;
55
+ overflow-y: auto;
56
+ }
57
+
58
+ .ac-varpick__group { display: flex; flex-direction: column; gap: 2px; }
59
+
60
+ .ac-varpick__grouphead {
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ align-items: baseline;
64
+ gap: 0.5rem;
65
+ padding-bottom: 0.25rem;
66
+ margin-bottom: 0.25rem;
67
+ border-bottom: 1px solid var(--surface-border, rgba(127, 127, 127, 0.25));
68
+ position: sticky;
69
+ top: 0;
70
+ background: var(--surface-overlay, #ffffff);
71
+ z-index: 1;
72
+ }
73
+
74
+ .ac-varpick__grouptitle {
75
+ font-size: 0.75rem;
76
+ font-weight: 700;
77
+ letter-spacing: 0.04em;
78
+ text-transform: uppercase;
79
+ color: var(--text-color-secondary, #6b7280);
80
+ }
81
+
82
+ .ac-varpick__grouphint {
83
+ font-size: 0.75rem;
84
+ color: var(--text-color-secondary, #8b95a1);
85
+ }
86
+
87
+ /*
88
+ * Two lines by design — the identifier, then what it MEANS. A one-line list of
89
+ * identifiers is the problem this dialog exists to solve, so the description is
90
+ * never truncated and never hidden behind a hover: there is no hover on a
91
+ * touchscreen.
92
+ */
93
+ .ac-varpick__row {
94
+ display: flex;
95
+ flex-direction: column;
96
+ align-items: flex-start;
97
+ gap: 2px;
98
+ width: 100%;
99
+ text-align: left;
100
+ min-height: 2.25rem;
101
+ padding: 0.375rem 0.75rem;
102
+ border: 1px solid transparent;
103
+ border-radius: 3px;
104
+ background: transparent;
105
+ color: var(--text-color, #111827);
106
+ font: inherit;
107
+ cursor: pointer;
108
+ }
109
+
110
+ .ac-varpick__row:hover { background: var(--surface-hover, rgba(127, 127, 127, 0.08)); }
111
+
112
+ .ac-varpick__row:focus-visible {
113
+ outline: 2px solid var(--primary-color, #2563eb);
114
+ outline-offset: -2px;
115
+ }
116
+
117
+ .ac-varpick__row--on {
118
+ background: var(--highlight-bg, rgba(37, 99, 235, 0.14));
119
+ border-color: var(--primary-color, #2563eb);
120
+ }
121
+
122
+ .ac-varpick__row--off { opacity: 0.55; cursor: default; }
123
+
124
+ .ac-varpick__line {
125
+ display: flex;
126
+ flex-wrap: wrap;
127
+ align-items: baseline;
128
+ gap: 0.5rem;
129
+ min-width: 0;
130
+ }
131
+
132
+ .ac-varpick__name {
133
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
134
+ font-weight: 600;
135
+ }
136
+
137
+ .ac-varpick__label { font-size: 0.875rem; }
138
+
139
+ .ac-varpick__chip {
140
+ font-size: 0.75rem;
141
+ padding: 0 6px;
142
+ border-radius: 999px;
143
+ background: var(--surface-100, rgba(127, 127, 127, 0.12));
144
+ border: 1px solid var(--surface-border, rgba(127, 127, 127, 0.25));
145
+ color: var(--text-color-secondary, #6b7280);
146
+ /* A unit symbol's case is meaningful: "mm/s", "N", "MPa". */
147
+ text-transform: none;
148
+ }
149
+
150
+ /* The current reading. Nothing turns an unfamiliar name into an obvious one
151
+ * faster than seeing what it says right now. */
152
+ .ac-varpick__live {
153
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
154
+ font-size: 0.75rem;
155
+ color: var(--green-600, #15803d);
156
+ }
157
+
158
+ .ac-varpick__desc {
159
+ font-size: 0.8125rem;
160
+ color: var(--text-color-secondary, #6b7280);
161
+ line-height: 1.35;
162
+ }
163
+
164
+ .ac-varpick__why { font-size: 0.8125rem; color: var(--orange-600, #b45309); }
165
+ .ac-varpick__note { font-size: 0.8125rem; color: var(--blue-600, #0369a1); }
166
+
167
+ .ac-varpick__foot { display: flex; justify-content: flex-end; gap: 0.5rem; }
@@ -1 +1 @@
1
- {"version":3,"file":"AutoCoreTagContext.d.ts","sourceRoot":"","sources":["../../src/core/AutoCoreTagContext.tsx"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,EAQV,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EAGd,MAAM,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IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CA8uBA,CAAC"}
@@ -1 +1 @@
1
- import{jsx as _jsx}from"react/jsx-runtime";import React,{useRef,createContext,useCallback,useContext,useEffect,useMemo,useState}from"react";import{EventEmitterContext}from"./EventEmitterContext";import{MessageType}from"../hub/CommandMessage";import{formatScaled}from"./formatScaled";export const AutoCoreTagContext=createContext({values:{},rawValues:{},isLoading:!0,write:async()=>{},tap:async()=>{},press:async()=>{},release:async()=>{},scales:{},updateScale:async()=>{},findTagByFqdn:()=>{}});const sleep=e=>new Promise(t=>setTimeout(t,e));export const AutoCoreTagProvider=({children:e,tags:t,scales:a,eagerRead:s=!0,flushIntervalMs:n=33})=>{const c=useRef(!1),r=useMemo(()=>({}),[]),o=a??r,{invoke:u,read:l,write:i,serverSubscribe:f,isConnected:m,subscribe:y,unsubscribe:b}=useContext(EventEmitterContext),[d,p]=useState(()=>{const e={};for(const a of t)void 0!==a.initialValue&&(e[a.tagName]=a.initialValue);return e}),[g,v]=useState({}),[C,N]=useState(o),h=useRef(C),w=useRef(d);useEffect(()=>{h.current=C},[C]),useEffect(()=>{w.current=d},[d]);const[T,M]=useState(!0),[k,S]=useState(null),[E,q]=useState(null),x=useRef(null),R=useRef(null);useEffect(()=>{x.current=E},[E]),useEffect(()=>{R.current=k},[k]);const j=useCallback((e,t)=>{const a={};for(const[s,n]of Object.entries(e.scales??{})){const e=n?.[t];e&&"number"==typeof e.scalar&&(a[s]={name:s,scale:e.scalar,label:e.label??"",offset:"absolute"===n?.kind?e.offset??0:0,precision:e.precision,precisionMode:e.precision_mode})}return a},[]),_=useCallback((e,a)=>{S(e),q(a);const s=j(e,a);h.current=s,N(s),v(e=>{const a={...e};for(const e of t){const t=e.quantity??e.scale;if(!t||!s[t])continue;const n=w.current[e.tagName];if("number"!=typeof n)continue;const c=s[t];a[e.tagName]=n*c.scale+(c.offset??0)}return a})},[j,t]),$=useCallback((e,t)=>{const{valueType:a,codec:s}=e,n=e.quantity??e.scale;if("number"===a&&"number"==typeof t&&n){const e=h.current[n];return t*(e?.scale??1)+(e?.offset??0)}if("json"===a&&s?.fromServer)try{return s.fromServer(t)}catch{}return t},[]),O=useCallback((e,t)=>{const{valueType:a,codec:s}=e,n=e.quantity??e.scale;if("json"===a&&s?.toServer)try{t=s.toServer(t)}catch{}if("number"===a&&"number"==typeof t&&n){const e=h.current[n],a=e?.scale??1;return(t-(e?.offset??0))/a}return t},[]),V=useCallback(e=>{const a=t.filter(t=>(t.quantity??t.scale)===e);a.length&&v(e=>{const t={...e};for(const e of a){const a=w.current[e.tagName];if("number"!=typeof a)continue;const s=$(e,a);t[e.tagName]!==s&&(t[e.tagName]=s)}return t})},[t,$]),A=useRef(new Map),P=useRef(new Map),B=useRef(null),F=useCallback(()=>{B.current=null;const e=A.current,t=P.current;0===e.size&&0===t.size||(A.current=new Map,P.current=new Map,p(t=>{let a=t;return e.forEach((e,s)=>{a[s]!==e&&(a===t&&(a={...t}),a[s]=e)}),a}),v(e=>{let a=e;return t.forEach((t,s)=>{a[s]!==t&&(a===e&&(a={...e}),a[s]=t)}),a}))},[]),U=useCallback((e,t)=>{const a=$(e,t);if(n<=0)return p(a=>a[e.tagName]===t?a:{...a,[e.tagName]:t}),void v(t=>t[e.tagName]===a?t:{...t,[e.tagName]:a});A.current.set(e.tagName,t),P.current.set(e.tagName,a),null===B.current&&(B.current=setTimeout(F,n))},[$,n,F]);useEffect(()=>()=>{null!==B.current&&(clearTimeout(B.current),B.current=null),A.current=new Map,P.current=new Map},[]);const z=useCallback(async(e,t,a)=>{const s=a?.concurrency??4,n=a?.minDelayMs??20,c=a?.jitterMs??40;let r=0;const o=Array.from({length:s},()=>(async()=>{for(;;){const a=r++;if(a>=t.length)return;const s=t[a];try{let t=!1;try{await u(s.fqdn,MessageType.Request,{action:"refresh"}),t=!0}catch{}if(!t){const t="GNV"===e.toUpperCase()?{group:"ux"}:{};try{const e=await l(s.fqdn,t);e?.success&&U(s,e.data)}catch(e){}}}catch(e){}finally{const e=Math.floor(Math.random()*c);await sleep(n+e)}}})());await Promise.all(o)},[u,l,U]),L=useCallback(async()=>{try{const e=await u("system.get_units",MessageType.Request,{}),t=e?.data??e,a=t?.units;if(!a||!a.scales)return;const s=t?.active_system??a.default_system;_(a,s)}catch(e){}},[u,_]),D=useCallback(async e=>{await u("system.set_unit_system",MessageType.Request,{system:e});k&&_(k,e)},[u,k,_]);useEffect(()=>{if(!m)return;const e=y("system.unit_system_changed",e=>{const t=e?.value?.system??e?.system;if(!t)return;const a=R.current;a&&t!==x.current&&_(a,t)});return()=>{b(e)}},[m,y,b,_]);const G=useCallback(async()=>{for(const[e,t]of Object.entries(o)){if(!t.serverTag)continue;const{domain:a,symbolName:s}=t.serverTag;try{const t=await l(`${a}.${s}`,{group:"ux"});if(t.data&&(t.success??1)&&(t.valid??1)){const a=JSON.parse(t.data);if(a&&"number"==typeof a.scale){const{scale:t,label:s}=a;N(a=>({...a,[e]:{...a[e],scale:t,label:s??a[e]?.label??"---"}})),V(e)}}}catch{}}},[l,o,V]);useEffect(()=>{let e=!0;const a=[],n=async()=>{if(e&&!c.current){c.current=!0;try{await(async()=>{try{await L(),await G();for(const n of t){await f(n.tagName,n.fqdn,n.subscriptionOptions);const t=y(n.tagName,t=>{e&&U(n,t)});a.push(t),s&&l(n.fqdn).then(t=>{e&&t?.success&&U(n,t.data)}).catch(e=>{})}}finally{e&&setTimeout(()=>e&&M(!1),100)}})()}finally{e&&setTimeout(()=>e&&M(!1),100)}}};if(m())n();else{const e=y("HUB/connected",()=>{b(e),n()});a.push(e)}return()=>{e=!1,a.forEach(b),c.current=!1}},[y,b,m,u,f,s,t,G,z,U]);const H=useMemo(()=>Object.entries(o).filter(([,e])=>e.serverTag).map(([e,t])=>({scaleName:e,domain:t.serverTag.domain,symbolName:t.serverTag.symbolName})),[o]);useEffect(()=>{let e=!0;const t=[];for(const{scaleName:a,domain:s,symbolName:n}of H){const c=y(`${s}.${n}`,t=>{if(!e)return;const s=t?.value;if(s&&"object"==typeof s&&"number"==typeof s.scale){const{scale:e,label:t}=s;N(s=>({...s,[a]:{...s[a],scale:e,label:t??s[a]?.label??"---"}})),V(a)}});t.push(c)}return()=>{e=!1,t.forEach(b)}},[y,b,H,V]);const I=useCallback(async(e,a)=>{const s=t.find(t=>t.tagName===e);if(!s)return;const n=O(s,a);await i(s.fqdn,n)},[t,i,O]),J=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&(i(a.fqdn,!0).catch(e=>{}),await sleep(300),i(a.fqdn,!1).catch(e=>{}))},[t,i]),Q=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&await i(a.fqdn,!0)},[t,i]),K=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&await i(a.fqdn,!1)},[t,i]),W=useCallback(async(e,t,a)=>{const s=C[e];if(s){if(s.serverTag){const n=`${s.serverTag.domain}.${s.serverTag.symbolName}`;await i(n,{name:e,scale:t,label:a})}N(s=>({...s,[e]:{...s[e],scale:t,label:a}})),V(e)}},[C,i,V]);useEffect(()=>{v(e=>{const a={...e};for(const e of t){const t=w.current[e.tagName];if(void 0===t)continue;const s=$(e,t);a[e.tagName]!==s&&(a[e.tagName]=s)}return a})},[t,$,C]);const X=useMemo(()=>{const e=new Map;for(const a of t)e.set(a.fqdn,a);return e},[t]),Y=useCallback(e=>X.get(e),[X]),Z=useCallback((e,t)=>{const a=C[e];return a&&Number.isFinite(t)?formatScaled(t*a.scale+(a.offset??0),a):String(t)},[C]),ee=useMemo(()=>({values:g,rawValues:d,isLoading:T,write:I,tap:J,press:Q,release:K,scales:C,updateScale:W,findTagByFqdn:Y,units:k,activeSystem:E,setUnitSystem:D,formatQuantity:Z}),[g,d,T,I,J,Q,K,C,W,Y,k,E,D,Z]);return _jsx(AutoCoreTagContext.Provider,{value:ee,children:e})};
1
+ import{jsx as _jsx}from"react/jsx-runtime";import React,{useRef,createContext,useCallback,useContext,useEffect,useMemo,useState}from"react";import{EventEmitterContext}from"./EventEmitterContext";import{MessageType}from"../hub/CommandMessage";import{formatScaled}from"./formatScaled";export const AutoCoreTagContext=createContext({values:{},rawValues:{},isLoading:!0,write:async()=>{},tap:async()=>{},press:async()=>{},release:async()=>{},scales:{},updateScale:async()=>{},findTagByFqdn:()=>{},tags:[]});const sleep=e=>new Promise(t=>setTimeout(t,e));export const AutoCoreTagProvider=({children:e,tags:t,scales:a,eagerRead:s=!0,flushIntervalMs:n=33})=>{const c=useRef(!1),r=useMemo(()=>({}),[]),o=a??r,{invoke:u,read:l,write:i,serverSubscribe:f,isConnected:m,subscribe:y,unsubscribe:b}=useContext(EventEmitterContext),[d,p]=useState(()=>{const e={};for(const a of t)void 0!==a.initialValue&&(e[a.tagName]=a.initialValue);return e}),[g,v]=useState({}),[C,N]=useState(o),h=useRef(C),w=useRef(d);useEffect(()=>{h.current=C},[C]),useEffect(()=>{w.current=d},[d]);const[T,M]=useState(!0),[k,S]=useState(null),[E,q]=useState(null),x=useRef(null),R=useRef(null);useEffect(()=>{x.current=E},[E]),useEffect(()=>{R.current=k},[k]);const j=useCallback((e,t)=>{const a={};for(const[s,n]of Object.entries(e.scales??{})){const e=n?.[t];e&&"number"==typeof e.scalar&&(a[s]={name:s,scale:e.scalar,label:e.label??"",offset:"absolute"===n?.kind?e.offset??0:0,precision:e.precision,precisionMode:e.precision_mode})}return a},[]),_=useCallback((e,a)=>{S(e),q(a);const s=j(e,a);h.current=s,N(s),v(e=>{const a={...e};for(const e of t){const t=e.quantity??e.scale;if(!t||!s[t])continue;const n=w.current[e.tagName];if("number"!=typeof n)continue;const c=s[t];a[e.tagName]=n*c.scale+(c.offset??0)}return a})},[j,t]),$=useCallback((e,t)=>{const{valueType:a,codec:s}=e,n=e.quantity??e.scale;if("number"===a&&"number"==typeof t&&n){const e=h.current[n];return t*(e?.scale??1)+(e?.offset??0)}if("json"===a&&s?.fromServer)try{return s.fromServer(t)}catch{}return t},[]),O=useCallback((e,t)=>{const{valueType:a,codec:s}=e,n=e.quantity??e.scale;if("json"===a&&s?.toServer)try{t=s.toServer(t)}catch{}if("number"===a&&"number"==typeof t&&n){const e=h.current[n],a=e?.scale??1;return(t-(e?.offset??0))/a}return t},[]),V=useCallback(e=>{const a=t.filter(t=>(t.quantity??t.scale)===e);a.length&&v(e=>{const t={...e};for(const e of a){const a=w.current[e.tagName];if("number"!=typeof a)continue;const s=$(e,a);t[e.tagName]!==s&&(t[e.tagName]=s)}return t})},[t,$]),A=useRef(new Map),P=useRef(new Map),B=useRef(null),F=useCallback(()=>{B.current=null;const e=A.current,t=P.current;0===e.size&&0===t.size||(A.current=new Map,P.current=new Map,p(t=>{let a=t;return e.forEach((e,s)=>{a[s]!==e&&(a===t&&(a={...t}),a[s]=e)}),a}),v(e=>{let a=e;return t.forEach((t,s)=>{a[s]!==t&&(a===e&&(a={...e}),a[s]=t)}),a}))},[]),U=useCallback((e,t)=>{const a=$(e,t);if(n<=0)return p(a=>a[e.tagName]===t?a:{...a,[e.tagName]:t}),void v(t=>t[e.tagName]===a?t:{...t,[e.tagName]:a});A.current.set(e.tagName,t),P.current.set(e.tagName,a),null===B.current&&(B.current=setTimeout(F,n))},[$,n,F]);useEffect(()=>()=>{null!==B.current&&(clearTimeout(B.current),B.current=null),A.current=new Map,P.current=new Map},[]);const z=useCallback(async(e,t,a)=>{const s=a?.concurrency??4,n=a?.minDelayMs??20,c=a?.jitterMs??40;let r=0;const o=Array.from({length:s},()=>(async()=>{for(;;){const a=r++;if(a>=t.length)return;const s=t[a];try{let t=!1;try{await u(s.fqdn,MessageType.Request,{action:"refresh"}),t=!0}catch{}if(!t){const t="GNV"===e.toUpperCase()?{group:"ux"}:{};try{const e=await l(s.fqdn,t);e?.success&&U(s,e.data)}catch(e){}}}catch(e){}finally{const e=Math.floor(Math.random()*c);await sleep(n+e)}}})());await Promise.all(o)},[u,l,U]),L=useCallback(async()=>{try{const e=await u("system.get_units",MessageType.Request,{}),t=e?.data??e,a=t?.units;if(!a||!a.scales)return;const s=t?.active_system??a.default_system;_(a,s)}catch(e){}},[u,_]),D=useCallback(async e=>{await u("system.set_unit_system",MessageType.Request,{system:e});k&&_(k,e)},[u,k,_]);useEffect(()=>{if(!m)return;const e=y("system.unit_system_changed",e=>{const t=e?.value?.system??e?.system;if(!t)return;const a=R.current;a&&t!==x.current&&_(a,t)});return()=>{b(e)}},[m,y,b,_]);const G=useCallback(async()=>{for(const[e,t]of Object.entries(o)){if(!t.serverTag)continue;const{domain:a,symbolName:s}=t.serverTag;try{const t=await l(`${a}.${s}`,{group:"ux"});if(t.data&&(t.success??1)&&(t.valid??1)){const a=JSON.parse(t.data);if(a&&"number"==typeof a.scale){const{scale:t,label:s}=a;N(a=>({...a,[e]:{...a[e],scale:t,label:s??a[e]?.label??"---"}})),V(e)}}}catch{}}},[l,o,V]);useEffect(()=>{let e=!0;const a=[],n=async()=>{if(e&&!c.current){c.current=!0;try{await(async()=>{try{await L(),await G();for(const n of t){await f(n.tagName,n.fqdn,n.subscriptionOptions);const t=y(n.tagName,t=>{e&&U(n,t)});a.push(t),s&&l(n.fqdn).then(t=>{e&&t?.success&&U(n,t.data)}).catch(e=>{})}}finally{e&&setTimeout(()=>e&&M(!1),100)}})()}finally{e&&setTimeout(()=>e&&M(!1),100)}}};if(m())n();else{const e=y("HUB/connected",()=>{b(e),n()});a.push(e)}return()=>{e=!1,a.forEach(b),c.current=!1}},[y,b,m,u,f,s,t,G,z,U]);const H=useMemo(()=>Object.entries(o).filter(([,e])=>e.serverTag).map(([e,t])=>({scaleName:e,domain:t.serverTag.domain,symbolName:t.serverTag.symbolName})),[o]);useEffect(()=>{let e=!0;const t=[];for(const{scaleName:a,domain:s,symbolName:n}of H){const c=y(`${s}.${n}`,t=>{if(!e)return;const s=t?.value;if(s&&"object"==typeof s&&"number"==typeof s.scale){const{scale:e,label:t}=s;N(s=>({...s,[a]:{...s[a],scale:e,label:t??s[a]?.label??"---"}})),V(a)}});t.push(c)}return()=>{e=!1,t.forEach(b)}},[y,b,H,V]);const I=useCallback(async(e,a)=>{const s=t.find(t=>t.tagName===e);if(!s)return;const n=O(s,a);await i(s.fqdn,n)},[t,i,O]),J=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&(i(a.fqdn,!0).catch(e=>{}),await sleep(300),i(a.fqdn,!1).catch(e=>{}))},[t,i]),Q=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&await i(a.fqdn,!0)},[t,i]),K=useCallback(async e=>{const a=t.find(t=>t.tagName===e);a&&"boolean"===a.valueType&&await i(a.fqdn,!1)},[t,i]),W=useCallback(async(e,t,a)=>{const s=C[e];if(s){if(s.serverTag){const n=`${s.serverTag.domain}.${s.serverTag.symbolName}`;await i(n,{name:e,scale:t,label:a})}N(s=>({...s,[e]:{...s[e],scale:t,label:a}})),V(e)}},[C,i,V]);useEffect(()=>{v(e=>{const a={...e};for(const e of t){const t=w.current[e.tagName];if(void 0===t)continue;const s=$(e,t);a[e.tagName]!==s&&(a[e.tagName]=s)}return a})},[t,$,C]);const X=useMemo(()=>{const e=new Map;for(const a of t)e.set(a.fqdn,a);return e},[t]),Y=useCallback(e=>X.get(e),[X]),Z=useCallback((e,t)=>{const a=C[e];return a&&Number.isFinite(t)?formatScaled(t*a.scale+(a.offset??0),a):String(t)},[C]),ee=useMemo(()=>({values:g,rawValues:d,isLoading:T,write:I,tap:J,press:Q,release:K,scales:C,updateScale:W,findTagByFqdn:Y,tags:t,units:k,activeSystem:E,setUnitSystem:D,formatQuantity:Z}),[g,d,T,I,J,Q,K,C,W,Y,t,k,E,D,Z]);return _jsx(AutoCoreTagContext.Provider,{value:ee,children:e})};
@@ -370,6 +370,19 @@ export interface BaseContextValue<VMap extends Record<string, any>> {
370
370
  * if no tag is registered for the given FQDN.
371
371
  */
372
372
  findTagByFqdn: (fqdn: string) => TagConfig | undefined;
373
+ /**
374
+ * The tag spec this provider was built with.
375
+ *
376
+ * Exposed so a consumer can enumerate what the HMI knows about rather than
377
+ * having every host thread `acTagSpec` down by hand. The variable picker
378
+ * uses it as its fallback catalog when the server is an older build with no
379
+ * `gm.get_variables` — names and types, no descriptions.
380
+ *
381
+ * It is NOT the machine's full variable table: `acctl codegen-tags` emits
382
+ * only variables marked `ux: true`. Treat it as a floor, never as the
383
+ * authoritative list.
384
+ */
385
+ tags: readonly TagConfig[];
373
386
  }
374
387
  export {};
375
388
  //# sourceMappingURL=AutoCoreTagTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoCoreTagTypes.d.ts","sourceRoot":"","sources":["../../src/core/AutoCoreTagTypes.ts"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AAEH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErE,oDAAoD;AACpD,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AACtD,MAAM,MAAM,SAAS,GACf,aAAa,GACb;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5B,SAAS,EAAE,CAAC;AAElB;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,aAAa,IAC1C,CAAC,SAAS,SAAS,GAAG,OAAO,GAC7B,CAAC,SAAS,QAAQ,GAAG,MAAM,GAC3B,CAAC,SAAS,QAAQ,GAAG,MAAM,GAC3B,iBAAiB,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC;IACjC,0CAA0C;IAC1C,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,6DAA6D;IAC7D,QAAQ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