The verify pipeline carried two scripts whose targets no longer
exist after the vanilla deletion at commit 25a9c4c:
test/calc-math.test.js — required public/js/calc-math.js (gone);
every assertion is now covered by shared/clinical/
calculators.test.ts (vitest).
scripts/lint-references.js — scans public/js/*.js for DOM id
references and checks each target exists in public/components/
*.html. Those trees are gone; TypeScript + knip + vite build
cover the equivalent dead-reference class for the React tree.
package.json:
• `verify` drops `test:node` and `lint:refs`; now runs
typecheck + vitest + knip + client vite build.
• `test:node` script removed (test/ directory empty).
public/app/assets/ — fresh vite build so the bundle hashes match
the current source (new chunks for ByVisitAge, Cms, DxPicker,
EditableResult, LabsList, Milestones, OutputActions, Recorder,
Shadess, SlideEditor, VisitNote — all features landed in the
preceding commits).
Verified locally on node 20: tsc + 9 test files / 177 tests pass,
knip finds nothing, vite builds 35 chunks, client bundle is 343 kB
initial / 106 kB gzipped (Cms is the biggest lazy chunk at 402 kB
due to Tiptap/ProseMirror).
1 line
No EOL
1.7 KiB
JavaScript
1 line
No EOL
1.7 KiB
JavaScript
import{i as e,n as t,t as n}from"./jsx-runtime-ByY1xr43.js";var r=e(t(),1),i=n();function a({open:e,title:t,body:n,confirmText:a=`Confirm`,cancelText:o=`Cancel`,danger:s=!1,requirePassword:c=!1,passwordPlaceholder:l=`Password`,onConfirm:u,onCancel:d,busy:f=!1}){let[p,m]=(0,r.useState)(``);if((0,r.useEffect)(()=>{e||m(``)},[e]),(0,r.useEffect)(()=>{function t(t){e&&t.key===`Escape`&&d()}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,d]),!e)return null;let h=f||c&&!p;return(0,i.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`confirm-modal-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4`,onClick:d,children:(0,i.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border border-border bg-background p-5 shadow-lg space-y-3`,onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(`h3`,{id:`confirm-modal-title`,className:`text-base font-semibold`,children:t}),n&&(0,i.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),c&&(0,i.jsx)(`input`,{type:`password`,autoFocus:!0,value:p,onChange:e=>m(e.target.value),placeholder:l,className:`w-full rounded-md border border-input bg-background px-3 py-2 text-sm`,onKeyDown:e=>{e.key===`Enter`&&!h&&u(p)}}),(0,i.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,i.jsx)(`button`,{type:`button`,onClick:d,className:`rounded-md border border-border px-3 py-2 text-sm`,"data-testid":`confirm-modal-cancel`,children:o}),(0,i.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>u(c?p:void 0),className:`rounded-md px-3 py-2 text-sm font-medium text-white disabled:opacity-50 `+(s?`bg-destructive`:`bg-primary`),"data-testid":`confirm-modal-ok`,children:f?`Working…`:a})]})]})})}export{a as t}; |