@flanksource/page-runtime 0.0.0-stage → 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vitest/gavel-reporter-3e3dfb64eda19344.mjs +59 -0
- package/.vitest/vitest-report-root-1793958008919344000.json +1 -0
- package/.vitest/vitest-report-root-1793958052786561000.json +1 -0
- package/.vitest/vitest-report-root-1793958143511414000.json +1 -0
- package/.vitest/vitest-report-root-1793958185908019000.json +1 -0
- package/.vitest/vitest-report-root-1793958252687550000.json +1 -0
- package/.vitest/vitest-report-root-1793958260385388000.json +1 -0
- package/.vitest/vitest-report-root-1793958312358683000.json +1 -0
- package/.vitest/vitest-report-root-1793958386118791000.json +1 -0
- package/.vitest/vitest-report-root-1793958388712140000.json +1 -0
- package/.vitest/vitest-report-root-1793958429135603000.json +1 -0
- package/.vitest/vitest-report-root-1793958433387809000.json +1 -0
- package/.vitest/vitest-report-root-1793958517322792000.json +1 -0
- package/.vitest/vitest-report-root-1793958542332252000.json +1 -0
- package/.vitest/vitest-report-root-1793958617698698000.json +1 -0
- package/.vitest/vitest-report-root-1793958676587753000.json +1 -0
- package/.vitest/vitest-report-root-1793958707827469000.json +1 -0
- package/.vitest/vitest-report-root-1793958729745028000.json +1 -0
- package/.vitest/vitest-report-root-1793958736696408000.json +1 -0
- package/.vitest/vitest-report-root-1793958740449993000.json +1 -0
- package/.vitest/vitest-report-root-1793958841510921000.json +1 -0
- package/.vitest/vitest-report-root-1793958847664582000.json +1 -0
- package/.vitest/vitest-report-root-1793958900327643000.json +1 -0
- package/.vitest/vitest-report-root-1793958950822823000.json +1 -0
- package/.vitest/vitest-report-root-1793959013655262000.json +1 -0
- package/.vitest/vitest-report-root-1793959017905881000.json +1 -0
- package/.vitest/vitest-report-root-1793959093169044000.json +1 -0
- package/.vitest/vitest-report-root-1793959093978087000.json +1 -0
- package/.vitest/vitest-report-root-1793959101111925000.json +1 -0
- package/.vitest/vitest-report-root-1793959145317906000.json +1 -0
- package/.vitest/vitest-report-root-1793959190760607000.json +1 -0
- package/.vitest/vitest-report-root-1793959249695805000.json +1 -0
- package/.vitest/vitest-report-root-1793959323191511000.json +1 -0
- package/.vitest/vitest-report-root-1793959453311564000.json +1 -0
- package/.vitest/vitest-report-root-1793959495806182000.json +1 -0
- package/.vitest/vitest-report-root-1793959499945435000.json +1 -0
- package/.vitest/vitest-report-root-1793959546773807000.json +1 -0
- package/.vitest/vitest-report-root-1793959583335593000.json +1 -0
- package/.vitest/vitest-report-root-1793959621479504000.json +1 -0
- package/.vitest/vitest-report-root-1793959651002360000.json +1 -0
- package/.vitest/vitest-report-root-1793959655646061000.json +1 -0
- package/.vitest/vitest-report-root-1793959741176826000.json +1 -0
- package/.vitest/vitest-report-root-1793959744743733000.json +1 -0
- package/.vitest/vitest-report-root-1793959833244182000.json +1 -0
- package/.vitest/vitest-report-root-1793959882131751000.json +1 -0
- package/.vitest/vitest-report-root-1793959887033254000.json +1 -0
- package/.vitest/vitest-report-root-1793960000631977000.json +1 -0
- package/.vitest/vitest-report-root-1793960011938504000.json +1 -0
- package/.vitest/vitest-report-root-1793961370018852000.json +1 -0
- package/.vitest/vitest-report-root-1793961745370827000.json +1 -0
- package/.vitest/vitest-report-root-1793961764143180000.json +1 -0
- package/.vitest/vitest-report-root-1793961835963066000.json +1 -0
- package/.vitest/vitest-report-root-1793961890729922000.json +1 -0
- package/.vitest/vitest-report-root-1793961968680074000.json +1 -0
- package/.vitest/vitest-report-root-1793962066862337000.json +1 -0
- package/.vitest/vitest-report-root-1793962087917497000.json +1 -0
- package/.vitest/vitest-report-root-1793962157254386000.json +1 -0
- package/.vitest/vitest-report-root-1793962171214865000.json +1 -0
- package/.vitest/vitest-report-root-1793962183290533000.json +1 -0
- package/.vitest/vitest-report-root-1793962184809932000.json +1 -0
- package/.vitest/vitest-report-root-1793962197715204000.json +1 -0
- package/.vitest/vitest-report-root-1793962244650717000.json +1 -0
- package/.vitest/vitest-report-root-1793962259802273000.json +1 -0
- package/.vitest/vitest-report-root-1793962278799745000.json +1 -0
- package/.vitest/vitest-report-root-1793962304412974000.json +1 -0
- package/.vitest/vitest-report-root-1793962328411454000.json +1 -0
- package/.vitest/vitest-report-root-1793962355747869000.json +1 -0
- package/.vitest/vitest-report-root-1793962381401572000.json +1 -0
- package/.vitest/vitest-report-root-1793962393326735000.json +1 -0
- package/.vitest/vitest-report-root-1793962393329206000.json +1 -0
- package/.vitest/vitest-report-root-1793962437796768000.json +1 -0
- package/.vitest/vitest-report-root-1793962444190384000.json +1 -0
- package/.vitest/vitest-report-root-1793962445347541000.json +1 -0
- package/.vitest/vitest-report-root-1793962473691143000.json +1 -0
- package/.vitest/vitest-report-root-1793962474291457000.json +1 -0
- package/.vitest/vitest-report-root-1793962499680468000.json +1 -0
- package/.vitest/vitest-report-root-1793962504410483000.json +1 -0
- package/.vitest/vitest-report-root-1793962516850524000.json +1 -0
- package/.vitest/vitest-report-root-1793962536736273000.json +1 -0
- package/.vitest/vitest-report-root-1793962551181783000.json +1 -0
- package/.vitest/vitest-report-root-1793962553575620000.json +1 -0
- package/.vitest/vitest-report-root-1793962555169730000.json +1 -0
- package/.vitest/vitest-report-root-1793962572639765000.json +1 -0
- package/.vitest/vitest-report-root-1793962597102952000.json +1 -0
- package/.vitest/vitest-report-root-1793962637156669000.json +1 -0
- package/.vitest/vitest-report-root-1793962653530027000.json +1 -0
- package/.vitest/vitest-report-root-1793962665824334000.json +1 -0
- package/.vitest/vitest-report-root-1793962682161714000.json +1 -0
- package/.vitest/vitest-report-root-1793962719526168000.json +1 -0
- package/.vitest/vitest-report-root-1793962723853934000.json +1 -0
- package/.vitest/vitest-report-root-1793962741927728000.json +1 -0
- package/.vitest/vitest-report-root-1793962794308371000.json +1 -0
- package/.vitest/vitest-report-root-1793962796334481000.json +1 -0
- package/.vitest/vitest-report-root-1793962798075169000.json +1 -0
- package/.vitest/vitest-report-root-1793962836466676000.json +1 -0
- package/.vitest/vitest-report-root-1793962846507317000.json +1 -0
- package/.vitest/vitest-report-root-1793962876266701000.json +1 -0
- package/.vitest/vitest-report-root-1793962922031308000.json +1 -0
- package/.vitest/vitest-report-root-1793962932957166000.json +1 -0
- package/.vitest/vitest-report-root-1793962946930725000.json +1 -0
- package/.vitest/vitest-report-root-1793963027896350000.json +1 -0
- package/.vitest/vitest-report-root-1793963036618707000.json +1 -0
- package/.vitest/vitest-report-root-1793963067365318000.json +1 -0
- package/.vitest/vitest-report-root-1793963077597641000.json +1 -0
- package/.vitest/vitest-report-root-1793963126365651000.json +1 -0
- package/.vitest/vitest-report-root-1793963208744553000.json +1 -0
- package/.vitest/vitest-report-root-1793963232806450000.json +1 -0
- package/.vitest/vitest-report-root-1793963325077422000.json +1 -0
- package/.vitest/vitest-report-root-1793963392172877000.json +1 -0
- package/.vitest/vitest-report-root-1793963398218324000.json +1 -0
- package/.vitest/vitest-report-root-1793963410749092000.json +1 -0
- package/.vitest/vitest-report-root-1793963437279580000.json +1 -0
- package/.vitest/vitest-report-root-1793963450096193000.json +1 -0
- package/.vitest/vitest-report-root-1793963478908641000.json +1 -0
- package/.vitest/vitest-report-root-1793963507838465000.json +1 -0
- package/.vitest/vitest-report-root-1793963528668174000.json +1 -0
- package/.vitest/vitest-report-root-1793963601860390000.json +1 -0
- package/.vitest/vitest-report-root-1793963611633446000.json +1 -0
- package/.vitest/vitest-report-root-1793963624713406000.json +1 -0
- package/.vitest/vitest-report-root-1793963680656685000.json +1 -0
- package/.vitest/vitest-report-root-1793963705231851000.json +1 -0
- package/.vitest/vitest-report-root-1793963708929500000.json +1 -0
- package/.vitest/vitest-report-root-1793963710267844000.json +1 -0
- package/.vitest/vitest-report-root-1793963713999248000.json +1 -0
- package/.vitest/vitest-report-root-1793963786513455000.json +1 -0
- package/.vitest/vitest-report-root-1793963792518765000.json +1 -0
- package/.vitest/vitest-report-root-1793963804089549000.json +1 -0
- package/.vitest/vitest-report-root-1793963840412921000.json +1 -0
- package/.vitest/vitest-report-root-1793963880361176000.json +1 -0
- package/.vitest/vitest-report-root-1793963935121106000.json +1 -0
- package/.vitest/vitest-report-root-1793963937290698000.json +1 -0
- package/.vitest/vitest-report-root-1793963977050773000.json +1 -0
- package/.vitest/vitest-report-root-1793963981229158000.json +1 -0
- package/.vitest/vitest-report-root-1793963989422080000.json +1 -0
- package/.vitest/vitest-report-root-1793964025924629000.json +1 -0
- package/.vitest/vitest-report-root-1793964027983705000.json +1 -0
- package/.vitest/vitest-report-root-1793964059969386000.json +1 -0
- package/.vitest/vitest-report-root-1793964071524069000.json +1 -0
- package/.vitest/vitest-report-root-1793964076285860000.json +1 -0
- package/.vitest/vitest-report-root-1793964077988100000.json +1 -0
- package/.vitest/vitest-report-root-1793964093289042000.json +1 -0
- package/.vitest/vitest-report-root-1793964102899356000.json +1 -0
- package/.vitest/vitest-report-root-1793964128089691000.json +1 -0
- package/.vitest/vitest-report-root-1793964129495156000.json +1 -0
- package/.vitest/vitest-report-root-1793964182849665000.json +1 -0
- package/.vitest/vitest-report-root-1793964223959893000.json +1 -0
- package/.vitest/vitest-report-root-1793964253351716000.json +1 -0
- package/.vitest/vitest-report-root-1793964290220122000.json +1 -0
- package/.vitest/vitest-report-root-1793964318037006000.json +1 -0
- package/.vitest/vitest-report-root-1793964334676691000.json +1 -0
- package/.vitest/vitest-report-root-1793964378520677000.json +1 -0
- package/.vitest/vitest-report-root-1793964383748994000.json +1 -0
- package/.vitest/vitest-report-root-1793964394042303000.json +1 -0
- package/.vitest/vitest-report-root-1793964466521881000.json +1 -0
- package/.vitest/vitest-report-root-1793964470478175000.json +1 -0
- package/.vitest/vitest-report-root-1793964484499019000.json +1 -0
- package/.vitest/vitest-report-root-1793964527645213000.json +1 -0
- package/.vitest/vitest-report-root-1793964608875865000.json +1 -0
- package/.vitest/vitest-report-root-1793964623608336000.json +1 -0
- package/.vitest/vitest-report-root-1793964629870846000.json +1 -0
- package/.vitest/vitest-report-root-1793964674515564000.json +1 -0
- package/.vitest/vitest-report-root-1793964706923651000.json +1 -0
- package/.vitest/vitest-report-root-1793964712832942000.json +1 -0
- package/.vitest/vitest-report-root-1793964714824633000.json +1 -0
- package/.vitest/vitest-report-root-1793964755433952000.json +1 -0
- package/.vitest/vitest-report-root-1793964783157670000.json +1 -0
- package/.vitest/vitest-report-root-1793964818963246000.json +1 -0
- package/.vitest/vitest-report-root-1793964843818548000.json +1 -0
- package/.vitest/vitest-report-root-1793964929824204000.json +1 -0
- package/.vitest/vitest-report-root-1793964973060713000.json +1 -0
- package/.vitest/vitest-report-root-1793964983122482000.json +1 -0
- package/.vitest/vitest-report-root-1793965107264567000.json +1 -0
- package/.vitest/vitest-report-root-1793965258759177000.json +1 -0
- package/.vitest/vitest-report-root-1793965277212091000.json +1 -0
- package/.vitest/vitest-report-root-1793965420648188000.json +1 -0
- package/.vitest/vitest-report-root-1793965611688414000.json +1 -0
- package/.vitest/vitest-report-root-1793965753407694000.json +1 -0
- package/.vitest/vitest-report-root-1793965766104309000.json +1 -0
- package/.vitest/vitest-report-root-1793965766823098000.json +1 -0
- package/.vitest/vitest-report-root-1793965806066109000.json +1 -0
- package/.vitest/vitest-report-root-1793965824697182000.json +1 -0
- package/.vitest/vitest-report-root-1793965904374564000.json +1 -0
- package/.vitest/vitest-report-root-1793965920838340000.json +1 -0
- package/.vitest/vitest-report-root-1793965932520617000.json +1 -0
- package/.vitest/vitest-report-root-1793965971574656000.json +1 -0
- package/.vitest/vitest-report-root-1793966049815024000.json +1 -0
- package/.vitest/vitest-report-root-1793966057888034000.json +1 -0
- package/.vitest/vitest-report-root-1793966066838868000.json +1 -0
- package/.vitest/vitest-report-root-1793966160347764000.json +1 -0
- package/.vitest/vitest-report-root-1793966196305985000.json +1 -0
- package/.vitest/vitest-report-root-1793966221538043000.json +1 -0
- package/.vitest/vitest-report-root-1793966251519918000.json +1 -0
- package/.vitest/vitest-report-root-1793966447000588000.json +1 -0
- package/.vitest/vitest-report-root-1793966463178249000.json +1 -0
- package/.vitest/vitest-report-root-1793966486995648000.json +1 -0
- package/.vitest/vitest-report-root-1793966726756953000.json +1 -0
- package/.vitest/vitest-report-root-1793966763656807000.json +1 -0
- package/.vitest/vitest-report-root-1793966979409799000.json +1 -0
- package/.vitest/vitest-report-root-1793967385250149000.json +1 -0
- package/.vitest/vitest-report-root-1793967617080163000.json +1 -0
- package/.vitest/vitest-report-root-1793967649428508000.json +1 -0
- package/.vitest/vitest-report-root-1793967773689520000.json +1 -0
- package/.vitest/vitest-report-root-1793968743743508000.json +1 -0
- package/.vitest/vitest-report-root-1793968846470407000.json +1 -0
- package/.vitest/vitest-report-root-1793968880878391000.json +1 -0
- package/.vitest/vitest-report-root-1793969027713529000.json +1 -0
- package/.vitest/vitest-report-root-1793969041841266000.json +1 -0
- package/.vitest/vitest-report-root-1793969142007468000.json +1 -0
- package/.vitest/vitest-report-root-1793969164867379000.json +1 -0
- package/.vitest/vitest-report-root-1793969193145858000.json +1 -0
- package/.vitest/vitest-report-root-1793969246818533000.json +1 -0
- package/.vitest/vitest-report-root-1793969270845486000.json +1 -0
- package/.vitest/vitest-report-root-1793969272514219000.json +1 -0
- package/.vitest/vitest-report-root-1793969302476105000.json +1 -0
- package/.vitest/vitest-report-root-1793969401697799000.json +1 -0
- package/.vitest/vitest-report-root-1793969433222630000.json +1 -0
- package/.vitest/vitest-report-root-1793969453350714000.json +1 -0
- package/.vitest/vitest-report-root-1793969567187400000.json +1 -0
- package/.vitest/vitest-report-root-1793969602230024000.json +1 -0
- package/.vitest/vitest-report-root-1793969633261063000.json +1 -0
- package/.vitest/vitest-report-root-1793969673876404000.json +1 -0
- package/.vitest/vitest-report-root-1793969702287010000.json +1 -0
- package/.vitest/vitest-report-root-1793969745828386000.json +1 -0
- package/.vitest/vitest-report-root-1793969893687205000.json +1 -0
- package/.vitest/vitest-report-root-1793969949642120000.json +1 -0
- package/.vitest/vitest-report-root-1793969981399076000.json +1 -0
- package/.vitest/vitest-report-root-1793970027152713000.json +1 -0
- package/.vitest/vitest-report-root-1793970030585158000.json +1 -0
- package/.vitest/vitest-report-root-1793970160195767000.json +1 -0
- package/.vitest/vitest-report-root-1793970215752422000.json +1 -0
- package/.vitest/vitest-report-root-1793970217114968000.json +1 -0
- package/.vitest/vitest-report-root-1793970329879319000.json +1 -0
- package/.vitest/vitest-report-root-1793970590586994000.json +1 -0
- package/.vitest/vitest-report-root-1793970625359990000.json +1 -0
- package/.vitest/vitest-report-root-1793970672590269000.json +1 -0
- package/.vitest/vitest-report-root-1793970796789022000.json +1 -0
- package/.vitest/vitest-report-root-1793970825710990000.json +1 -0
- package/.vitest/vitest-report-root-1793970884000509000.json +1 -0
- package/.vitest/vitest-report-root-1793970900444617000.json +1 -0
- package/.vitest/vitest-report-root-1793972186024681000.json +1 -0
- package/.vitest/vitest-report-root-1793972227757396000.json +1 -0
- package/.vitest/vitest-report-root-1793972736341600000.json +1 -0
- package/.vitest/vitest-report-root-1793972769249562000.json +1 -0
- package/.vitest/vitest-report-root-1793972859435283000.json +1 -0
- package/.vitest/vitest-report-root-1793972915169294000.json +1 -0
- package/.vitest/vitest-report-root-1793973081515450000.json +1 -0
- package/.vitest/vitest-report-root-1793973111336773000.json +1 -0
- package/.vitest/vitest-report-root-1793973253986969000.json +1 -0
- package/.vitest/vitest-report-root-1793973561283775000.json +1 -0
- package/.vitest/vitest-report-root-1793973593320977000.json +1 -0
- package/.vitest/vitest-report-root-1793973648302867000.json +1 -0
- package/.vitest/vitest-report-root-1793973819657242000.json +1 -0
- package/.vitest/vitest-report-root-1793973952727311000.json +1 -0
- package/.vitest/vitest-report-root-1793974334455876000.json +1 -0
- package/.vitest/vitest-report-root-1793974437074196000.json +1 -0
- package/.vitest/vitest-report-root-1793974437553146000.json +1 -0
- package/.vitest/vitest-report-root-1793974461818626000.json +1 -0
- package/.vitest/vitest-report-root-1793974515255198000.json +1 -0
- package/.vitest/vitest-report-root-1793974516267191000.json +1 -0
- package/.vitest/vitest-report-root-1793974621202824000.json +1 -0
- package/.vitest/vitest-report-root-1793974718450330000.json +1 -0
- package/.vitest/vitest-report-root-1793974834942373000.json +1 -0
- package/.vitest/vitest-report-root-1793974921367314000.json +1 -0
- package/.vitest/vitest-report-root-1793975019367156000.json +1 -0
- package/.vitest/vitest-report-root-1793975048166096000.json +1 -0
- package/.vitest/vitest-report-root-1793975133024339000.json +1 -0
- package/.vitest/vitest-report-root-1793975159711704000.json +1 -0
- package/.vitest/vitest-report-root-1793975517481736000.json +1 -0
- package/.vitest/vitest-report-root-1793975680008825000.json +1 -0
- package/.vitest/vitest-report-root-1793976067648494000.json +1 -0
- package/.vitest/vitest-report-root-1793976314122479000.json +1 -0
- package/.vitest/vitest-report-root-1793976513022402000.json +1 -0
- package/.vitest/vitest-report-root-1793976540410805000.json +1 -0
- package/.vitest/vitest-report-root-1793976555103273000.json +1 -0
- package/.vitest/vitest-report-root-1793976702974407000.json +1 -0
- package/.vitest/vitest-report-root-1793976721093108000.json +1 -0
- package/.vitest/vitest-report-root-1793976955473681000.json +1 -0
- package/.vitest/vitest-report-root-1793977049628483000.json +1 -0
- package/.vitest/vitest-report-root-1793977098467804000.json +1 -0
- package/.vitest/vitest-report-root-1793977132144900000.json +1 -0
- package/.vitest/vitest-report-root-1793977279648191000.json +1 -0
- package/.vitest/vitest-report-root-1793977365312127000.json +1 -0
- package/.vitest/vitest-report-root-1793978227796817000.json +1 -0
- package/.vitest/vitest-report-root-1793978255189735000.json +1 -0
- package/.vitest/vitest-report-root-1793978306509070000.json +1 -0
- package/.vitest/vitest-report-root-1793978418301216000.json +1 -0
- package/.vitest/vitest-report-root-1793978445072573000.json +1 -0
- package/.vitest/vitest-report-root-1793978546605517000.json +1 -0
- package/.vitest/vitest-report-root-1793978576060950000.json +1 -0
- package/.vitest/vitest-report-root-1793978590261408000.json +1 -0
- package/.vitest/vitest-report-root-1793978674733179000.json +1 -0
- package/.vitest/vitest-report-root-1793978718588785000.json +1 -0
- package/.vitest/vitest-report-root-1793978725363453000.json +1 -0
- package/.vitest/vitest-report-root-1793978729967285000.json +1 -0
- package/.vitest/vitest-report-root-1793978755641607000.json +1 -0
- package/.vitest/vitest-report-root-1793978782769802000.json +1 -0
- package/.vitest/vitest-report-root-1793978784870947000.json +1 -0
- package/.vitest/vitest-report-root-1793978806927335000.json +1 -0
- package/.vitest/vitest-report-root-1793978822508324000.json +1 -0
- package/.vitest/vitest-report-root-1793978836339794000.json +1 -0
- package/.vitest/vitest-report-root-1793978837947352000.json +1 -0
- package/.vitest/vitest-report-root-1793978891548295000.json +1 -0
- package/.vitest/vitest-report-root-1793978946172947000.json +1 -0
- package/.vitest/vitest-report-root-1793978947109807000.json +1 -0
- package/.vitest/vitest-report-root-1793979034208662000.json +1 -0
- package/.vitest/vitest-report-root-1793979070583608000.json +1 -0
- package/.vitest/vitest-report-root-1793979081187144000.json +1 -0
- package/.vitest/vitest-report-root-1793979085428673000.json +1 -0
- package/.vitest/vitest-report-root-1793979155097858000.json +1 -0
- package/.vitest/vitest-report-root-1793979233508873000.json +1 -0
- package/.vitest/vitest-report-root-1793979268653273000.json +1 -0
- package/.vitest/vitest-report-root-1793979341978843000.json +1 -0
- package/.vitest/vitest-report-root-1793979345344877000.json +1 -0
- package/.vitest/vitest-report-root-1793979389390374000.json +1 -0
- package/.vitest/vitest-report-root-1793979400063493000.json +1 -0
- package/.vitest/vitest-report-root-1793979432448725000.json +1 -0
- package/.vitest/vitest-report-root-1793979459139430000.json +1 -0
- package/.vitest/vitest-report-root-1793979480341961000.json +1 -0
- package/.vitest/vitest-report-root-1793979510130869000.json +1 -0
- package/.vitest/vitest-report-root-1793979524763924000.json +1 -0
- package/.vitest/vitest-report-root-1793979571563010000.json +1 -0
- package/.vitest/vitest-report-root-1793979627916920000.json +1 -0
- package/.vitest/vitest-report-root-1793979726395379000.json +1 -0
- package/.vitest/vitest-report-root-1793979752029533000.json +1 -0
- package/.vitest/vitest-report-root-1793979753365744000.json +1 -0
- package/.vitest/vitest-report-root-1793979759386206000.json +1 -0
- package/.vitest/vitest-report-root-1793979787819109000.json +1 -0
- package/.vitest/vitest-report-root-1793979827615051000.json +1 -0
- package/.vitest/vitest-report-root-1793979927737393000.json +1 -0
- package/.vitest/vitest-report-root-1793979929836169000.json +1 -0
- package/.vitest/vitest-report-root-1793979955780781000.json +1 -0
- package/.vitest/vitest-report-root-1793980200569636000.json +1 -0
- package/.vitest/vitest-report-root-1793980206045213000.json +1 -0
- package/.vitest/vitest-report-root-1793980285772027000.json +1 -0
- package/.vitest/vitest-report-root-1793980459229828000.json +1 -0
- package/.vitest/vitest-report-root-1793980460545874000.json +1 -0
- package/.vitest/vitest-report-root-1793980554484341000.json +1 -0
- package/.vitest/vitest-report-root-1793980674494388000.json +1 -0
- package/.vitest/vitest-report-root-1793980683752195000.json +1 -0
- package/.vitest/vitest-report-root-1793980947108651000.json +1 -0
- package/.vitest/vitest-report-root-1793981129616629000.json +1 -0
- package/.vitest/vitest-report-root-1793981196611441000.json +1 -0
- package/.vitest/vitest-report-root-1793981226583545000.json +1 -0
- package/.vitest/vitest-report-root-1793981294259721000.json +1 -0
- package/.vitest/vitest-report-root-1793981353393048000.json +1 -0
- package/.vitest/vitest-report-root-1793981424585368000.json +1 -0
- package/.vitest/vitest-report-root-1793981513266687000.json +1 -0
- package/.vitest/vitest-report-root-1793981526418218000.json +1 -0
- package/.vitest/vitest-report-root-1793981540069877000.json +1 -0
- package/.vitest/vitest-report-root-1793981761193625000.json +1 -0
- package/.vitest/vitest-report-root-1793981868520992000.json +1 -0
- package/.vitest/vitest-report-root-1793982048467772000.json +1 -0
- package/.vitest/vitest-report-root-1793982119518020000.json +1 -0
- package/.vitest/vitest-report-root-1793982243473651000.json +1 -0
- package/.vitest/vitest-report-root-1793982406880629000.json +1 -0
- package/.vitest/vitest-report-root-1793982433563632000.json +1 -0
- package/.vitest/vitest-report-root-1793982496753204000.json +1 -0
- package/.vitest/vitest-report-root-1793982500153311000.json +1 -0
- package/.vitest/vitest-report-root-1793982542086095000.json +1 -0
- package/.vitest/vitest-report-root-1793982659482988000.json +1 -0
- package/.vitest/vitest-report-root-1793983799132716000.json +1 -0
- package/.vitest/vitest-report-root-1793983822721833000.json +1 -0
- package/.vitest/vitest-report-root-1793984998618484000.json +1 -0
- package/.vitest/vitest-report-root-1793985050475750000.json +1 -0
- package/.vitest/vitest-report-root-1793985095516077000.json +1 -0
- package/.vitest/vitest-report-root-1793985130729074000.json +1 -0
- package/.vitest/vitest-report-root-1793985177150997000.json +1 -0
- package/.vitest/vitest-report-root-1793985267658626000.json +1 -0
- package/.vitest/vitest-report-root-1793985412705211000.json +1 -0
- package/.vitest/vitest-report-root-1793985433752853000.json +1 -0
- package/.vitest/vitest-report-root-1794087938302852000.json +1 -0
- package/.vitest/vitest-report-root-1794087978339022000.json +1 -0
- package/.vitest/vitest-report-root-1794088095283811000.json +1 -0
- package/.vitest/vitest-report-root-1794088129997065000.json +1 -0
- package/.vitest/vitest-report-root-1794088147336556000.json +1 -0
- package/.vitest/vitest-report-root-1794088173414593000.json +1 -0
- package/.vitest/vitest-report-root-1794088221289657000.json +1 -0
- package/.vitest/vitest-report-root-1794088250766611000.json +1 -0
- package/.vitest/vitest-report-root-1794088365553234000.json +1 -0
- package/.vitest/vitest-report-root-1794088395202655000.json +1 -0
- package/.vitest/vitest-report-root-1794090028732187000.json +1 -0
- package/.vitest/vitest-report-root-1794090054787283000.json +1 -0
- package/.vitest/vitest-report-root-1794090153955794000.json +1 -0
- package/.vitest/vitest-report-root-1794090161850160000.json +1 -0
- package/.vitest/vitest-report-root-1794091755693314000.json +1 -0
- package/.vitest/vitest-report-root-1794091765029349000.json +1 -0
- package/.vitest/vitest-report-root-1794091975649927000.json +1 -0
- package/.vitest/vitest-report-root-1794091994027950000.json +1 -0
- package/.vitest/vitest-report-root-1794092005178771000.json +1 -0
- package/.vitest/vitest-report-root-1794113295302382000.json +1 -0
- package/.vitest/vitest-report-root-1794114156337032000.json +1 -0
- package/.vitest/vitest-report-root-1794114198454137000.json +1 -0
- package/.vitest/vitest-report-root-1794114254064413000.json +1 -0
- package/.vitest/vitest-report-root-1794114280107510000.json +1 -0
- package/.vitest/vitest-report-root-1794114495199837000.json +1 -0
- package/.vitest/vitest-report-root-1794114646604233000.json +1 -0
- package/.vitest/vitest-report-root-1794114666311689000.json +1 -0
- package/.vitest/vitest-report-root-1794114974303438000.json +1 -0
- package/.vitest/vitest-report-root-1794115037361450000.json +1 -0
- package/.vitest/vitest-report-root-1794115097838937000.json +1 -0
- package/.vitest/vitest-report-root-1794115604669388000.json +1 -0
- package/.vitest/vitest-report-root-1794115633814500000.json +1 -0
- package/.vitest/vitest-report-root-1794115648756242000.json +1 -0
- package/.vitest/vitest-report-root-1794115873440741000.json +1 -0
- package/.vitest/vitest-report-root-1794115952930230000.json +1 -0
- package/.vitest/vitest-report-root-1794115963344701000.json +1 -0
- package/.vitest/vitest-report-root-1794116196067450000.json +1 -0
- package/.vitest/vitest-report-root-1794116254301280000.json +1 -0
- package/.vitest/vitest-report-root-1794116259342966000.json +1 -0
- package/.vitest/vitest-report-root-1794118178787879000.json +1 -0
- package/.vitest/vitest-report-root-1794137087891409000.json +1 -0
- package/.vitest/vitest-report-root-1794137100301214000.json +1 -0
- package/.vitest/vitest-report-root-1794137107377813000.json +1 -0
- package/.vitest/vitest-report-root-1794137171230704000.json +1 -0
- package/.vitest/vitest-report-root-1794137317761465000.json +1 -0
- package/.vitest/vitest-report-root-1794137320282368000.json +1 -0
- package/LICENSE +17 -0
- package/PACKAGE_PUBLICATIONS.md +26 -0
- package/builder-package.json +19 -0
- package/package.json +77 -3
- package/scripts/build-builder.ts +27 -0
- package/scripts/build-library-runtime.ts +9 -0
- package/scripts/build-static.ts +75 -0
- package/scripts/build.ts +6 -0
- package/scripts/check-fragment.ts +12 -0
- package/scripts/local-workspaces.test.ts +31 -0
- package/scripts/local-workspaces.ts +55 -0
- package/scripts/release-version-cli.test.ts +40 -0
- package/scripts/release-version.test.ts +29 -0
- package/scripts/release-version.ts +46 -0
- package/scripts/run-package-build.ts +8 -0
- package/scripts/serve-packages.ts +8 -0
- package/spikes/README.md +70 -0
- package/spikes/barrel-rewriting/README.md +97 -0
- package/spikes/barrel-rewriting/measure.ts +134 -0
- package/spikes/barrel-rewriting/readme.ts +174 -0
- package/spikes/barrel-rewriting/results.json +3440 -0
- package/spikes/barrel-rewriting/run.ts +330 -0
- package/spikes/barrel-rewriting/setup.ts +90 -0
- package/spikes/barrel-rewriting/sw.ts +148 -0
- package/spikes/barrel-rewriting/tenant.ts +91 -0
- package/spikes/barrel-rewriting/worker-config.ts +33 -0
- package/spikes/closure-fragments/README.md +157 -0
- package/spikes/closure-fragments/results.json +959 -0
- package/spikes/closure-fragments/run.ts +298 -0
- package/spikes/compiler/README.md +177 -0
- package/spikes/compiler/compile.test.ts +78 -0
- package/spikes/compiler/compile.ts +82 -0
- package/spikes/compiler/facet-redact.d.ts +5 -0
- package/spikes/compiler/markers.ts +88 -0
- package/spikes/compiler/pages.ts +43 -0
- package/spikes/compiler/readme.ts +116 -0
- package/spikes/compiler/reference.ts +81 -0
- package/spikes/compiler/render.ts +113 -0
- package/spikes/compiler/results.json +3310 -0
- package/spikes/compiler/run.ts +250 -0
- package/spikes/compiler/sucrase-parser.d.ts +8 -0
- package/spikes/compiler/sw.ts +62 -0
- package/spikes/diagram-readiness/README.md +134 -0
- package/spikes/diagram-readiness/analysis.test.ts +52 -0
- package/spikes/diagram-readiness/analysis.ts +35 -0
- package/spikes/diagram-readiness/browser.ts +209 -0
- package/spikes/diagram-readiness/readme.ts +65 -0
- package/spikes/diagram-readiness/results.json +30289 -0
- package/spikes/diagram-readiness/run.ts +103 -0
- package/spikes/diagram-readiness/server.ts +53 -0
- package/spikes/esm-sh/README.md +27 -0
- package/spikes/esm-sh/browser-client.ts +18 -0
- package/spikes/esm-sh/browser-server.ts +104 -0
- package/spikes/esm-sh/fixtures/copy-to-clipboard-entry.headers +15 -0
- package/spikes/esm-sh/fixtures/copy-to-clipboard-entry.mjs.txt +3 -0
- package/spikes/esm-sh/fixtures/copy-to-clipboard-module.headers +13 -0
- package/spikes/esm-sh/fixtures/copy-to-clipboard-module.mjs.txt +142 -0
- package/spikes/esm-sh/fixtures/react-copy-to-clipboard-entry.headers +15 -0
- package/spikes/esm-sh/fixtures/react-copy-to-clipboard-entry.mjs.txt +3 -0
- package/spikes/esm-sh/fixtures/react-copy-to-clipboard-module.headers +11 -0
- package/spikes/esm-sh/fixtures/react-copy-to-clipboard-module.mjs.txt +222 -0
- package/spikes/esm-sh/fixtures/toggle-selection-entry.headers +14 -0
- package/spikes/esm-sh/fixtures/toggle-selection-entry.mjs.txt +3 -0
- package/spikes/esm-sh/fixtures/toggle-selection-module.headers +11 -0
- package/spikes/esm-sh/fixtures/toggle-selection-module.mjs.txt +76 -0
- package/spikes/esm-sh/fixtures.ts +54 -0
- package/spikes/esm-sh/redact.ts +1 -0
- package/spikes/frame-commenting/README.md +183 -0
- package/spikes/frame-commenting/agent.ts +110 -0
- package/spikes/frame-commenting/hook.ts +1 -0
- package/spikes/frame-commenting/host.ts +66 -0
- package/spikes/frame-commenting/measure.ts +180 -0
- package/spikes/frame-commenting/model.test.ts +27 -0
- package/spikes/frame-commenting/model.ts +40 -0
- package/spikes/frame-commenting/readme.ts +61 -0
- package/spikes/frame-commenting/results.json +5320 -0
- package/spikes/frame-commenting/run.ts +73 -0
- package/spikes/frame-commenting/setup.ts +125 -0
- package/spikes/lib/barrels.test.ts +107 -0
- package/spikes/lib/barrels.ts +309 -0
- package/spikes/lib/cjs-export-names.mjs +22 -0
- package/spikes/lib/content-types.ts +28 -0
- package/spikes/lib/convert-commonjs.ts +168 -0
- package/spikes/lib/fragment.ts +108 -0
- package/spikes/lib/library-set.ts +194 -0
- package/spikes/lib/module-transform.test.ts +133 -0
- package/spikes/lib/module-transform.ts +351 -0
- package/spikes/lib/origin.ts +140 -0
- package/spikes/lib/pages.ts +290 -0
- package/spikes/lib/report.ts +23 -0
- package/spikes/lib/runtime-server.ts +282 -0
- package/spikes/lib/static-server.ts +82 -0
- package/spikes/lib/trace.ts +384 -0
- package/spikes/local-folder-link/README.md +85 -0
- package/spikes/local-folder-link/checkout.ts +132 -0
- package/spikes/local-folder-link/documents.ts +36 -0
- package/spikes/local-folder-link/readme.ts +42 -0
- package/spikes/local-folder-link/results.json +12815 -0
- package/spikes/local-folder-link/rewrite.test.ts +27 -0
- package/spikes/local-folder-link/rewrite.ts +38 -0
- package/spikes/local-folder-link/run.ts +123 -0
- package/spikes/local-folder-link/server.ts +100 -0
- package/spikes/local-folder-link/sw.ts +97 -0
- package/spikes/origin-isolation/README.md +426 -0
- package/spikes/origin-isolation/browsers.ts +43 -0
- package/spikes/origin-isolation/helper.ts +6 -0
- package/spikes/origin-isolation/host.ts +25 -0
- package/spikes/origin-isolation/measure.ts +118 -0
- package/spikes/origin-isolation/model.test.ts +45 -0
- package/spikes/origin-isolation/model.ts +49 -0
- package/spikes/origin-isolation/proxy.ts +35 -0
- package/spikes/origin-isolation/readme.ts +83 -0
- package/spikes/origin-isolation/results.json +3242 -0
- package/spikes/origin-isolation/run.ts +35 -0
- package/spikes/origin-isolation/server.ts +108 -0
- package/spikes/origin-isolation/sw.ts +28 -0
- package/spikes/origin-isolation/tenant.ts +165 -0
- package/spikes/react-runtime-set/README.md +48 -0
- package/spikes/react-runtime-set/convert.ts +118 -0
- package/spikes/react-runtime-set/export-names.mjs +8 -0
- package/spikes/react-runtime-set/page/page.js +46 -0
- package/spikes/react-runtime-set/results.json +84 -0
- package/spikes/react-runtime-set/run.ts +255 -0
- package/spikes/run.ts +15 -0
- package/spikes/sw-tenant-frame/README.md +95 -0
- package/spikes/sw-tenant-frame/results.json +1348 -0
- package/spikes/sw-tenant-frame/run.ts +373 -0
- package/spikes/sw-tenant-frame/site/frame.html +113 -0
- package/spikes/sw-tenant-frame/site/host.html +25 -0
- package/spikes/sw-tenant-frame/site/sw.js +10 -0
- package/spikes/tailwind-parity/README.md +78 -0
- package/spikes/tailwind-parity/compare.test.ts +70 -0
- package/spikes/tailwind-parity/compare.ts +91 -0
- package/spikes/tailwind-parity/facet-font-scale.d.ts +6 -0
- package/spikes/tailwind-parity/facet-styles.ts +77 -0
- package/spikes/tailwind-parity/results.json +885 -0
- package/spikes/tailwind-parity/run.ts +385 -0
- package/spikes/tailwind-parity/runtime-tailwind.ts +82 -0
- package/src/activity-schema.ts +91 -0
- package/src/activity.test.ts +57 -0
- package/src/build/README.md +94 -0
- package/src/build/barrels.test.ts +107 -0
- package/src/build/barrels.ts +306 -0
- package/src/build/base.ts +2 -0
- package/src/build/check-fragment.ts +45 -0
- package/src/build/cjs-export-names.mjs +24 -0
- package/src/build/commonjs-exports.ts +24 -0
- package/src/build/convert-commonjs.ts +183 -0
- package/src/build/dependencies.ts +4 -0
- package/src/build/dependency-barrels.ts +59 -0
- package/src/build/dependency-cache.ts +40 -0
- package/src/build/dependency-plugin.ts +58 -0
- package/src/build/dependency-runtime.test.ts +121 -0
- package/src/build/dependency-runtime.ts +147 -0
- package/src/build/errors.ts +9 -0
- package/src/build/fragment.ts +89 -0
- package/src/build/index.ts +7 -0
- package/src/build/library-runtime.test.ts +343 -0
- package/src/build/library-runtime.ts +98 -0
- package/src/build/module-utils.ts +11 -0
- package/src/build/recipe-dependencies.ts +14 -0
- package/src/build/runtime-entries.ts +10 -0
- package/src/build/trace.ts +429 -0
- package/src/design-schema.ts +25 -0
- package/src/dev/README.md +48 -0
- package/src/dev/catalog.ts +79 -0
- package/src/dev/cli.test.ts +12 -0
- package/src/dev/cli.ts +25 -0
- package/src/dev/index.ts +115 -0
- package/src/dev/packages.test.ts +175 -0
- package/src/editing.test.tsx +31 -0
- package/src/editing.ts +25 -0
- package/src/frame/activity.browser.ts +34 -0
- package/src/frame/activity.test.ts +27 -0
- package/src/frame/activity.ts +50 -0
- package/src/frame/agent/README.md +47 -0
- package/src/frame/agent/agent.browser.ts +127 -0
- package/src/frame/agent/design.ts +62 -0
- package/src/frame/agent/index.ts +148 -0
- package/src/frame/agent/overlay.test.ts +42 -0
- package/src/frame/agent/overlay.ts +91 -0
- package/src/frame/agent/owner.test.ts +78 -0
- package/src/frame/agent/owner.ts +58 -0
- package/src/frame/agent/provider.tsx +14 -0
- package/src/frame/agent/react-override.ts +55 -0
- package/src/frame/agent/review.browser.ts +65 -0
- package/src/frame/agent/review.ts +107 -0
- package/src/frame/agent/testing/callsite.tsx +5 -0
- package/src/frame/agent/testing/client.ts +99 -0
- package/src/frame/agent/testing/library.ts +3 -0
- package/src/frame/agent/testing/modal.tsx +5 -0
- package/src/frame/agent/testing/review-client.ts +43 -0
- package/src/frame/agent/testing/review-server.ts +31 -0
- package/src/frame/agent/testing/server.ts +72 -0
- package/src/frame/agent/testing/vocabulary-host.ts +20 -0
- package/src/frame/agent/testing/vocabulary.tsx +10 -0
- package/src/frame/agent/vitest.browser.config.ts +6 -0
- package/src/frame/agent/vocabulary.browser.ts +30 -0
- package/src/frame/agent/vocabulary.test.ts +36 -0
- package/src/frame/agent/vocabulary.ts +13 -0
- package/src/frame/agent.ts +2 -0
- package/src/frame/boot-bundle.test.ts +20 -0
- package/src/frame/boot-styles.test.ts +102 -0
- package/src/frame/boot-styles.ts +50 -0
- package/src/frame/boot.test.ts +108 -0
- package/src/frame/boot.ts +205 -0
- package/src/frame/bridge.ts +27 -0
- package/src/frame/devtools-hook.ts +1 -0
- package/src/frame/entry.ts +4 -0
- package/src/frame/export-compiler.test.ts +23 -0
- package/src/frame/export-compiler.ts +18 -0
- package/src/frame/export-page.ts +59 -0
- package/src/frame/export.test.ts +17 -0
- package/src/frame/export.ts +90 -0
- package/src/frame/index.ts +7 -0
- package/src/frame/local-runtime.browser.ts +36 -0
- package/src/frame/page-agent.ts +2 -0
- package/src/frame/readiness.ts +51 -0
- package/src/frame/review-integration.browser.ts +48 -0
- package/src/frame/runtime.browser.ts +71 -0
- package/src/frame/tailwind/README.md +49 -0
- package/src/frame/tailwind/boot-styles.browser.ts +18 -0
- package/src/frame/tailwind/cache.test.ts +53 -0
- package/src/frame/tailwind/cache.ts +20 -0
- package/src/frame/tailwind/load.test.ts +74 -0
- package/src/frame/tailwind/load.ts +66 -0
- package/src/frame/tailwind/recipe.ts +81 -0
- package/src/frame/tailwind/runtime-cache.test.ts +97 -0
- package/src/frame/tailwind/runtime.ts +113 -0
- package/src/frame/tailwind/store.test.ts +104 -0
- package/src/frame/tailwind/store.ts +55 -0
- package/src/frame/tailwind/stylesheets.ts +37 -0
- package/src/frame/tailwind/tailwind.browser.ts +71 -0
- package/src/frame/tailwind/tailwind.test.ts +119 -0
- package/src/frame/tailwind/testing/client.ts +132 -0
- package/src/frame/tailwind/testing/compare.ts +91 -0
- package/src/frame/tailwind/testing/pages.ts +14 -0
- package/src/frame/tailwind/testing/server.ts +89 -0
- package/src/frame/tailwind/vitest.browser.config.ts +7 -0
- package/src/frame/testing/boot-page.ts +3 -0
- package/src/frame/testing/host.ts +60 -0
- package/src/frame/testing/local-host.tsx +33 -0
- package/src/frame/testing/server.ts +120 -0
- package/src/host/BuildLog.test.tsx +40 -0
- package/src/host/BuildLog.tsx +27 -0
- package/src/host/PageFrame.test.tsx +39 -0
- package/src/host/PageFrame.tsx +41 -0
- package/src/host/RuntimeActivity.tsx +75 -0
- package/src/host/activity-state.test.ts +37 -0
- package/src/host/activity-state.ts +69 -0
- package/src/host/agent-source.test.ts +9 -0
- package/src/host/agent-source.ts +14 -0
- package/src/host/agent-validation.test.ts +40 -0
- package/src/host/agent-validation.ts +73 -0
- package/src/host/bridge-request.test.ts +87 -0
- package/src/host/bridge.test.ts +34 -0
- package/src/host/bridge.ts +55 -0
- package/src/host/build-log.test.ts +47 -0
- package/src/host/build-log.ts +29 -0
- package/src/host/clear-cache.test.ts +75 -0
- package/src/host/clear-cache.ts +66 -0
- package/src/host/design-validation.test.ts +38 -0
- package/src/host/design-validation.ts +96 -0
- package/src/host/index.ts +11 -0
- package/src/host/link/index.ts +66 -0
- package/src/host/link/transport.test.ts +10 -0
- package/src/host/link/transport.ts +67 -0
- package/src/host/link/watch.ts +62 -0
- package/src/host/message-values.ts +55 -0
- package/src/host/origin.test.ts +10 -0
- package/src/host/origin.ts +7 -0
- package/src/host/review/README.md +32 -0
- package/src/host/review/index.ts +42 -0
- package/src/host/review/remote.test.ts +21 -0
- package/src/host/review/source.test.ts +19 -0
- package/src/host/review/validation.test.ts +34 -0
- package/src/host/review/validation.ts +55 -0
- package/src/host/runtime-integration.test.ts +29 -0
- package/src/host/source-path.test.ts +14 -0
- package/src/host/validation.ts +111 -0
- package/src/host/vocabulary-validation.test.ts +60 -0
- package/src/link/README.md +115 -0
- package/src/link/barrels.ts +5 -0
- package/src/link/build-cli.ts +12 -0
- package/src/link/build.test.ts +25 -0
- package/src/link/build.ts +99 -0
- package/src/link/commonjs.test.ts +34 -0
- package/src/link/commonjs.ts +39 -0
- package/src/link/examples/server.ts +18 -0
- package/src/link/index.ts +6 -0
- package/src/link/link.browser.ts +66 -0
- package/src/link/local-relay.browser.ts +22 -0
- package/src/link/overrides.test.ts +103 -0
- package/src/link/overrides.ts +69 -0
- package/src/link/page-sources.test.ts +52 -0
- package/src/link/page-sources.ts +69 -0
- package/src/link/source.ts +25 -0
- package/src/link/storage.ts +32 -0
- package/src/link/testing/client.ts +96 -0
- package/src/link/testing/folder.ts +19 -0
- package/src/link/testing/local-client.ts +30 -0
- package/src/link/testing/local-server.ts +26 -0
- package/src/link/testing/local-worker.ts +17 -0
- package/src/link/testing/server.ts +128 -0
- package/src/link/testing/worker.ts +32 -0
- package/src/link/testing-cache.ts +20 -0
- package/src/link/testing-fixtures.ts +16 -0
- package/src/link/types.ts +27 -0
- package/src/link/validation.ts +44 -0
- package/src/link/vitest.browser.config.ts +3 -0
- package/src/markers.ts +18 -0
- package/src/publication/build.ts +27 -0
- package/src/publication/fixtures/build.mjs +2 -0
- package/src/publication/index.ts +3 -0
- package/src/publication/lock.ts +32 -0
- package/src/publication/manifest.ts +14 -0
- package/src/publication/publication.test.ts +89 -0
- package/src/publication/publish.ts +80 -0
- package/src/publication/runtime.ts +28 -0
- package/src/publication/schema.ts +13 -0
- package/src/review-schema.ts +17 -0
- package/src/schema.ts +149 -0
- package/src/storage/db.test.ts +52 -0
- package/src/storage/db.ts +64 -0
- package/src/sw/activity-router.test.ts +53 -0
- package/src/sw/activity.ts +66 -0
- package/src/sw/barrels.ts +44 -0
- package/src/sw/candidates.test.ts +9 -0
- package/src/sw/candidates.ts +14 -0
- package/src/sw/compile.test.ts +152 -0
- package/src/sw/compile.ts +92 -0
- package/src/sw/compiler-columns.ts +44 -0
- package/src/sw/compiler-internals.d.ts +8 -0
- package/src/sw/compiler-plugins.ts +18 -0
- package/src/sw/compiler.test.ts +51 -0
- package/src/sw/compiler.ts +86 -0
- package/src/sw/composition.test.ts +51 -0
- package/src/sw/composition.ts +86 -0
- package/src/sw/content-types.ts +28 -0
- package/src/sw/converted-resolver.test.ts +129 -0
- package/src/sw/converted-router.test.ts +91 -0
- package/src/sw/converted.browser.ts +31 -0
- package/src/sw/converted.test.ts +31 -0
- package/src/sw/converted.ts +64 -0
- package/src/sw/editable-sites.ts +42 -0
- package/src/sw/errors.test.ts +8 -0
- package/src/sw/errors.ts +17 -0
- package/src/sw/index.ts +7 -0
- package/src/sw/integrity.ts +10 -0
- package/src/sw/legacy-storage.ts +18 -0
- package/src/sw/link-activity.test.ts +126 -0
- package/src/sw/link-activity.ts +21 -0
- package/src/sw/link-cache.test.ts +15 -0
- package/src/sw/link-cache.ts +19 -0
- package/src/sw/link-compiler.ts +112 -0
- package/src/sw/link-folder.ts +29 -0
- package/src/sw/link-markdown.test.ts +52 -0
- package/src/sw/link-relay.ts +40 -0
- package/src/sw/link-route.test.ts +150 -0
- package/src/sw/link-route.ts +239 -0
- package/src/sw/link-source.test.ts +31 -0
- package/src/sw/link-source.ts +41 -0
- package/src/sw/markers.test.ts +33 -0
- package/src/sw/markers.ts +128 -0
- package/src/sw/module-transform.test.ts +131 -0
- package/src/sw/module-transform.ts +352 -0
- package/src/sw/package-generation.test.ts +33 -0
- package/src/sw/page-clients.test.ts +37 -0
- package/src/sw/page-clients.ts +45 -0
- package/src/sw/profile.test.ts +21 -0
- package/src/sw/profile.ts +88 -0
- package/src/sw/resolver.test.ts +183 -0
- package/src/sw/resolver.ts +220 -0
- package/src/sw/router-cache.test.ts +78 -0
- package/src/sw/router.ts +320 -0
- package/src/sw/runtime-module.test.ts +61 -0
- package/src/sw/runtime-module.ts +13 -0
- package/src/sw/source-hash.test.ts +7 -0
- package/src/sw/source-hash.ts +37 -0
- package/src/sw/storage.test.ts +108 -0
- package/src/sw/versions.ts +89 -0
- package/src/sw/worker.ts +87 -0
- package/static/README.md +15 -0
- package/static/profile.example.json +15 -0
- package/tsconfig.json +10 -0
- package/vitest.browser.config.ts +4 -0
- package/vitest.config.ts +9 -0
- package/README.md +0 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { FrameConfig } from "../../schema.ts";
|
|
2
|
+
import { orderLibraries, validateRecipe, type CompilerLoaders, type LibraryStyles } from "./recipe.ts";
|
|
3
|
+
|
|
4
|
+
export type ImportModule = (url: string) => Promise<Record<string, unknown>>;
|
|
5
|
+
const importModule: ImportModule = (url) => import(/* @vite-ignore */ url) as Promise<Record<string, unknown>>;
|
|
6
|
+
|
|
7
|
+
export function resolveStyleImport(options: { id: string; base: string; config: FrameConfig }): string {
|
|
8
|
+
const { id, config } = options;
|
|
9
|
+
let target: string | undefined;
|
|
10
|
+
if (/^(?:[./]|https?:)/.test(id)) target = new URL(id, options.base).href;
|
|
11
|
+
else {
|
|
12
|
+
const scopes = Object.entries(config.lock.map.scopes).filter(([scope]) => options.base.startsWith(new URL(scope, location.origin).href)).sort(([a], [b]) => b.length - a.length);
|
|
13
|
+
for (const table of [...scopes.map(([, table]) => table), config.lock.map.imports]) {
|
|
14
|
+
target = table[id];
|
|
15
|
+
if (!target) {
|
|
16
|
+
const prefix = Object.keys(table).filter((key) => key.endsWith("/") && id.startsWith(key)).sort((a, b) => b.length - a.length)[0];
|
|
17
|
+
if (prefix) target = table[prefix]! + id.slice(prefix.length);
|
|
18
|
+
}
|
|
19
|
+
if (target) break;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (!target) throw new Error(`${options.base}: unmapped page-style import ${id}`);
|
|
23
|
+
const url = new URL(target, location.origin);
|
|
24
|
+
const packageRoute = url.pathname.startsWith("/npm/") || (config.profile.links === "allow" && url.pathname.startsWith("/link/"));
|
|
25
|
+
if (url.origin !== location.origin || !packageRoute) throw new Error(`${id}: page styles must load through the runtime package route: ${url.href}`);
|
|
26
|
+
url.searchParams.set("page", config.page);
|
|
27
|
+
return url.href;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** The lock's integrity entry for a package-route URL, which is absent for linked modules. */
|
|
31
|
+
function lockedIntegrity(url: string, config: FrameConfig): string | undefined {
|
|
32
|
+
const { pathname } = new URL(url);
|
|
33
|
+
const path = pathname.startsWith("/npm/") ? decodeURIComponent(pathname.slice("/npm/".length)) : pathname.startsWith("/esm/") ? decodeURIComponent(pathname.slice(1)) : undefined;
|
|
34
|
+
return path === undefined ? undefined : config.lock.integrity[path];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Every library's published base stylesheets, in library order, resolved through the integrity-checked package route. */
|
|
38
|
+
export function baseStylesheetUrls(options: { libraries: LibraryStyles[]; config: FrameConfig }): string[] {
|
|
39
|
+
return [...new Set(options.libraries.flatMap((library) => library.recipe.base.map((id) => resolveStyleImport({ id, base: library.base, config: options.config }))))];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export async function loadLibraries(options: { config: FrameConfig; importModule?: ImportModule }): Promise<{ libraries: LibraryStyles[]; loaders: CompilerLoaders }> {
|
|
43
|
+
const importer = options.importModule ?? importModule;
|
|
44
|
+
const libraries: LibraryStyles[] = await Promise.all(Object.keys(options.config.profile.managed).map(async (name) => {
|
|
45
|
+
const version = options.config.lock.versions[name];
|
|
46
|
+
if (!version) throw new Error(`${name}: managed library has no version in the page lock`);
|
|
47
|
+
const url = resolveStyleImport({ id: `${name}/page-styles`, base: location.href, config: options.config });
|
|
48
|
+
const loaded = await importer(url);
|
|
49
|
+
const recipe = validateRecipe(loaded.pageStyles ?? loaded.default, name);
|
|
50
|
+
const integrity = lockedIntegrity(url, options.config);
|
|
51
|
+
return { id: url, name, version, ...(integrity ? { integrity } : {}), base: new URL(".", url).href, recipe };
|
|
52
|
+
}));
|
|
53
|
+
return { libraries: orderLibraries(libraries), loaders: {
|
|
54
|
+
loadStylesheet: async (id, base) => {
|
|
55
|
+
const url = resolveStyleImport({ id, base, config: options.config });
|
|
56
|
+
const response = await fetch(url);
|
|
57
|
+
if (!response.ok || response.headers.has("x-page-runtime-error")) throw new Error(`${url}: stylesheet fetch failed (HTTP ${response.status})`);
|
|
58
|
+
return { path: url, base: new URL(".", url).href, content: await response.text() };
|
|
59
|
+
},
|
|
60
|
+
loadModule: async (id, base) => {
|
|
61
|
+
const url = resolveStyleImport({ id, base, config: options.config });
|
|
62
|
+
const loaded = await importer(url);
|
|
63
|
+
return { path: url, base: new URL(".", url).href, module: loaded.default ?? loaded };
|
|
64
|
+
},
|
|
65
|
+
} };
|
|
66
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { compile } from "tailwindcss";
|
|
2
|
+
import autoprefixer from "autoprefixer";
|
|
3
|
+
import postcss from "postcss";
|
|
4
|
+
import type { PageStylesRecipe } from "../../schema.ts";
|
|
5
|
+
|
|
6
|
+
export type { PageStylesRecipe };
|
|
7
|
+
export type LibraryStyles = {
|
|
8
|
+
/** The recipe module's URL, used for loading only: it carries the requesting page and is not part of any cache key. */
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
/** The recipe module's `lock.integrity` entry; absent for linked modules, which cannot key a cache. */
|
|
13
|
+
integrity?: string;
|
|
14
|
+
base: string;
|
|
15
|
+
recipe: PageStylesRecipe;
|
|
16
|
+
};
|
|
17
|
+
export type CompilerLoaders = Required<Pick<NonNullable<Parameters<typeof compile>[1]>, "loadStylesheet" | "loadModule">>;
|
|
18
|
+
export const layerOrder = "@layer theme, base, facet, components, utilities;";
|
|
19
|
+
|
|
20
|
+
/** Deterministic library order: a library that is extended comes before its extender, and ties are sorted by name. */
|
|
21
|
+
export function orderLibraries(libraries: LibraryStyles[]): LibraryStyles[] {
|
|
22
|
+
const byName = new Map(libraries.map((library) => [library.name, library]));
|
|
23
|
+
const waiting = new Map<string, Set<string>>();
|
|
24
|
+
for (const library of libraries) {
|
|
25
|
+
const needs = new Set(library.recipe.extends ?? []);
|
|
26
|
+
for (const name of needs) if (!byName.has(name)) throw new Error(`${library.name}/page-styles: extends ${name}, which is not a managed library`);
|
|
27
|
+
waiting.set(library.name, needs);
|
|
28
|
+
}
|
|
29
|
+
const ordered: LibraryStyles[] = [];
|
|
30
|
+
while (waiting.size) {
|
|
31
|
+
const ready = [...waiting].filter(([, needs]) => needs.size === 0).map(([name]) => name).sort();
|
|
32
|
+
if (!ready.length) throw new Error(`page-styles: libraries extend each other in a cycle: ${[...waiting.keys()].sort().join(", ")}`);
|
|
33
|
+
const next = ready[0]!;
|
|
34
|
+
ordered.push(byName.get(next)!);
|
|
35
|
+
waiting.delete(next);
|
|
36
|
+
for (const needs of waiting.values()) needs.delete(next);
|
|
37
|
+
}
|
|
38
|
+
return ordered;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Only the most-derived recipes compile: their presets already include the libraries they extend. */
|
|
42
|
+
function compiledLibraries(libraries: LibraryStyles[]): LibraryStyles[] {
|
|
43
|
+
const extended = new Set(libraries.flatMap((library) => library.recipe.extends ?? []));
|
|
44
|
+
return libraries.filter((library) => !extended.has(library.name));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export async function compileLibraries(options: { libraries: LibraryStyles[]; loaders: CompilerLoaders }) {
|
|
48
|
+
const entries: Record<string, LibraryStyles> = {};
|
|
49
|
+
const entry = compiledLibraries(options.libraries).map((library, index) => {
|
|
50
|
+
const id = `page-runtime:recipe-${index}`;
|
|
51
|
+
entries[id] = library;
|
|
52
|
+
return `@import "${id}";`;
|
|
53
|
+
});
|
|
54
|
+
return compile([layerOrder, ...entry].join("\n"), {
|
|
55
|
+
loadStylesheet: async (id, base) => {
|
|
56
|
+
const library = entries[id];
|
|
57
|
+
if (library) return { path: id, base: library.base, content: library.recipe.entry };
|
|
58
|
+
return options.loaders.loadStylesheet(id, base);
|
|
59
|
+
},
|
|
60
|
+
loadModule: options.loaders.loadModule,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function transformCss(options: { css: string; libraries: LibraryStyles[] }): string {
|
|
65
|
+
options.css = postcss([autoprefixer({ grid: false })]).process(options.css, { from: undefined }).css;
|
|
66
|
+
for (const { recipe } of options.libraries) {
|
|
67
|
+
if (recipe.transform) options.css = recipe.transform(options.css);
|
|
68
|
+
}
|
|
69
|
+
return options.css;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const strings = (value: unknown): value is string[] => Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
73
|
+
|
|
74
|
+
export function validateRecipe(value: unknown, name: string): PageStylesRecipe {
|
|
75
|
+
if (!value || typeof value !== "object") throw new Error(`${name}/page-styles: expected a recipe`);
|
|
76
|
+
const recipe = value as PageStylesRecipe;
|
|
77
|
+
if (recipe.name !== name || typeof recipe.layer !== "string" || !recipe.layer || typeof recipe.entry !== "string" || typeof recipe.theme !== "string" || !strings(recipe.base) || !recipe.base.length || recipe.base.some((specifier) => !specifier) || !strings(recipe.runtimeDependencies) || (recipe.extends !== undefined && !strings(recipe.extends)) || (recipe.transform !== undefined && typeof recipe.transform !== "function")) throw new Error(`${name}/page-styles: invalid recipe`);
|
|
78
|
+
const imported = recipe.base.find((specifier) => recipe.entry.includes(specifier));
|
|
79
|
+
if (imported) throw new Error(`${name}/page-styles: entry must not import the base stylesheet ${imported}`);
|
|
80
|
+
return recipe;
|
|
81
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
import { IDBFactory } from "fake-indexeddb";
|
|
3
|
+
import { expect, it, vi } from "vitest";
|
|
4
|
+
import { memoryCaches } from "../../link/testing-cache.ts";
|
|
5
|
+
import { openRuntimeDb, result } from "../../storage/db.ts";
|
|
6
|
+
import { prepareTailwind, type TailwindOptions } from "./runtime.ts";
|
|
7
|
+
import { cssCacheKey, libraryKey, tailwindCssUrl } from "./cache.ts";
|
|
8
|
+
import { createTailwindStore } from "./store.ts";
|
|
9
|
+
import type { LibraryStyles } from "./recipe.ts";
|
|
10
|
+
|
|
11
|
+
const build = vi.hoisted(() => vi.fn((_candidates: string[]) => ".known{display:block}.dynamic{display:flex}"));
|
|
12
|
+
vi.mock("./recipe.ts", () => ({ compileLibraries: async () => ({ build }), transformCss: ({ css }: { css: string }) => css }));
|
|
13
|
+
|
|
14
|
+
const libraries: LibraryStyles[] = [{ id: "https://runtime.example/npm/lib@1/page-styles.js?page=a.tsx", name: "lib", version: "1.0.0", integrity: "sha384-lib", base: "https://runtime.example/npm/lib@1/", recipe: { name: "lib", layer: "components", base: ["lib/styles.css"], entry: "", theme: "", runtimeDependencies: [] } }];
|
|
15
|
+
|
|
16
|
+
async function harness(runtimeVersion: string, keep?: number) {
|
|
17
|
+
const root = document.createElement("div"); document.body.append(root);
|
|
18
|
+
const db = openRuntimeDb({ factory: new IDBFactory() });
|
|
19
|
+
const cache = await memoryCaches().open("tailwind");
|
|
20
|
+
const fetchCached = async (url: string | URL | Request) => (await cache.match(String(url))) ?? new Response("missing", { status: 404, headers: { "x-page-runtime-error": "fetch" } });
|
|
21
|
+
const store = createTailwindStore({ db: () => db, cache, origin: location.origin, fetch: fetchCached as typeof fetch, ...(keep ? { keep } : {}) });
|
|
22
|
+
const options: TailwindOptions = { libraries, loaders: { loadStylesheet: vi.fn(), loadModule: vi.fn() }, runtimeVersion, root, candidates: ["known"], store, timeoutMs: 1000, onError: (error: unknown) => { throw error; } };
|
|
23
|
+
const key = await cssCacheKey({ libraryKey: libraryKey(options), candidates: options.candidates });
|
|
24
|
+
const records = async () => result((await db).transaction("tailwind").objectStore("tailwind").getAll());
|
|
25
|
+
return { root, options, cache, store, key, records };
|
|
26
|
+
}
|
|
27
|
+
const settled = () => new Promise<void>((resolve) => queueMicrotask(resolve));
|
|
28
|
+
|
|
29
|
+
it("rejects a stored record whose cached stylesheet is missing instead of treating it as a cache miss", async () => {
|
|
30
|
+
const { root, options, cache, key } = await harness("missing-response");
|
|
31
|
+
try {
|
|
32
|
+
const first = await prepareTailwind(options); first.stop();
|
|
33
|
+
await cache.delete(tailwindCssUrl({ key, origin: location.origin }));
|
|
34
|
+
await expect(prepareTailwind(options)).rejects.toThrow(`record ${key} has no cached stylesheet at ${tailwindCssUrl({ key, origin: location.origin })}`);
|
|
35
|
+
} finally { root.remove(); }
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("restores discovered DOM classes with cached CSS so remounting does not rebuild the same styles", async () => {
|
|
39
|
+
const { root, options, records, key } = await harness("dom-cache");
|
|
40
|
+
const first = await prepareTailwind(options);
|
|
41
|
+
root.className = "dynamic";
|
|
42
|
+
await settled();
|
|
43
|
+
await first.ready(); first.stop(); root.className = "";
|
|
44
|
+
expect((await records()).map(({ key: stored, candidates, domClasses }) => ({ stored, candidates, domClasses }))).toEqual([{ stored: key, candidates: ["known"], domClasses: ["dynamic"] }]);
|
|
45
|
+
const count = build.mock.calls.length;
|
|
46
|
+
const second = await prepareTailwind(options);
|
|
47
|
+
try {
|
|
48
|
+
root.className = "dynamic";
|
|
49
|
+
await settled();
|
|
50
|
+
await second.ready();
|
|
51
|
+
expect({ warm: second.warm, builds: build.mock.calls.length - count, classes: [...second.candidates].sort() }).toEqual({ warm: true, builds: 0, classes: ["dynamic", "known"] });
|
|
52
|
+
} finally { second.stop(); root.remove(); }
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("derives the cache key from source candidates alone, so DOM classes at mount time reuse the same entry", async () => {
|
|
56
|
+
const { root, options, records, key } = await harness("key-from-source");
|
|
57
|
+
root.className = "dynamic";
|
|
58
|
+
const styles = await prepareTailwind(options);
|
|
59
|
+
try {
|
|
60
|
+
await styles.ready();
|
|
61
|
+
expect((await records()).map((record) => record.key)).toEqual([key]);
|
|
62
|
+
} finally { styles.stop(); root.remove(); }
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("persists DOM-driven rebuilds once per idle period, not once per mutation batch", async () => {
|
|
66
|
+
vi.useFakeTimers({ toFake: ["setTimeout", "clearTimeout"] });
|
|
67
|
+
const { root, options, store } = await harness("debounce");
|
|
68
|
+
const write = vi.spyOn(store, "write");
|
|
69
|
+
const styles = await prepareTailwind(options);
|
|
70
|
+
try {
|
|
71
|
+
expect(write).toHaveBeenCalledTimes(1);
|
|
72
|
+
for (const name of ["a", "b", "c"]) { root.className = name; await settled(); }
|
|
73
|
+
expect(write).toHaveBeenCalledTimes(1);
|
|
74
|
+
await vi.runAllTimersAsync();
|
|
75
|
+
expect(write).toHaveBeenCalledTimes(2);
|
|
76
|
+
expect(write.mock.calls[1]![0].domClasses).toEqual(["a", "b", "c"]);
|
|
77
|
+
} finally { styles.stop(); root.remove(); vi.useRealTimers(); }
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("flushes a pending DOM-driven persist when readiness is awaited", async () => {
|
|
81
|
+
const { root, options, records } = await harness("flush-on-ready");
|
|
82
|
+
const styles = await prepareTailwind(options);
|
|
83
|
+
try {
|
|
84
|
+
root.className = "late";
|
|
85
|
+
await settled();
|
|
86
|
+
await styles.ready();
|
|
87
|
+
expect((await records())[0]!.domClasses).toEqual(["late"]);
|
|
88
|
+
} finally { styles.stop(); root.remove(); }
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("bounds stored stylesheets per library key and deletes the evicted responses", async () => {
|
|
92
|
+
const { root, options, cache, records } = await harness("bounded", 2);
|
|
93
|
+
try {
|
|
94
|
+
for (const candidates of [["one"], ["two"], ["three"]]) { const styles = await prepareTailwind({ ...options, candidates }); await styles.ready(); styles.stop(); }
|
|
95
|
+
expect({ records: (await records()).map((record) => record.candidates[0]).sort(), responses: (await cache.keys()).length }).toEqual({ records: ["three", "two"], responses: 2 });
|
|
96
|
+
} finally { root.remove(); }
|
|
97
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { compileLibraries, transformCss, type CompilerLoaders, type LibraryStyles } from "./recipe.ts";
|
|
2
|
+
import { cssCacheKey, libraryKey } from "./cache.ts";
|
|
3
|
+
import { insertCss } from "./stylesheets.ts";
|
|
4
|
+
import type { TailwindStore } from "./store.ts";
|
|
5
|
+
import type { TailwindActivity } from "../../activity-schema.ts";
|
|
6
|
+
|
|
7
|
+
type Compiled = { compiler: Awaited<ReturnType<typeof compileLibraries>>; candidates: Set<string> };
|
|
8
|
+
const compilers = new Map<string, Promise<Compiled>>();
|
|
9
|
+
const IDLE_PERSIST_MS = 1000;
|
|
10
|
+
export type TailwindOptions = { libraries: LibraryStyles[]; loaders: CompilerLoaders; runtimeVersion: string; root: HTMLElement; candidates: string[]; store: TailwindStore; timeoutMs: number; onError: (error: unknown) => void; onActivity?: (activity: TailwindActivity) => void };
|
|
11
|
+
|
|
12
|
+
export function loadTailwind(options: Pick<TailwindOptions, "libraries" | "loaders" | "runtimeVersion" | "onActivity">): Promise<Compiled> {
|
|
13
|
+
const key = libraryKey(options);
|
|
14
|
+
let compiling = compilers.get(key);
|
|
15
|
+
if (!compiling) {
|
|
16
|
+
const startMs = performance.now();
|
|
17
|
+
compiling = compileLibraries(options).then((compiler) => { options.onActivity?.({ kind: "libraries", startMs, durationMs: performance.now() - startMs, candidates: 0, cssBytes: 0, cacheHit: false }); return { compiler, candidates: new Set<string>() }; });
|
|
18
|
+
compilers.set(key, compiling);
|
|
19
|
+
} else options.onActivity?.({ kind: "libraries", startMs: performance.now(), durationMs: 0, candidates: 0, cssBytes: 0, cacheHit: true });
|
|
20
|
+
return compiling;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function classesUnder(options: { node: Element; root: HTMLElement; candidates: Set<string> }): boolean {
|
|
24
|
+
if (!options.root.contains(options.node)) return false;
|
|
25
|
+
let fresh = false;
|
|
26
|
+
for (const element of [options.node, ...options.node.querySelectorAll("[class]")]) {
|
|
27
|
+
for (const name of element.classList) {
|
|
28
|
+
if (!options.candidates.has(name)) { options.candidates.add(name); fresh = true; }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return fresh;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function whenIdle(callback: () => void): () => void {
|
|
35
|
+
if (typeof requestIdleCallback === "function") {
|
|
36
|
+
const id = requestIdleCallback(callback, { timeout: IDLE_PERSIST_MS });
|
|
37
|
+
return () => cancelIdleCallback(id);
|
|
38
|
+
}
|
|
39
|
+
const id = setTimeout(callback, IDLE_PERSIST_MS);
|
|
40
|
+
return () => clearTimeout(id);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function prepareTailwind(options: TailwindOptions) {
|
|
44
|
+
if (options.candidates.some((candidate) => typeof candidate !== "string")) throw new Error("runtime Tailwind: source candidates must be strings");
|
|
45
|
+
const library = libraryKey(options);
|
|
46
|
+
const source = new Set(options.candidates);
|
|
47
|
+
const candidates = new Set(source);
|
|
48
|
+
const key = await cssCacheKey({ libraryKey: library, candidates: source });
|
|
49
|
+
const cached = await options.store.read(key);
|
|
50
|
+
if (cached) for (const candidate of cached.record.domClasses) candidates.add(candidate);
|
|
51
|
+
const fresh = classesUnder({ node: options.root, root: options.root, candidates });
|
|
52
|
+
performance.mark("page-runtime:css-cache");
|
|
53
|
+
let style: HTMLStyleElement | undefined;
|
|
54
|
+
let imports = Promise.resolve();
|
|
55
|
+
let failure: unknown;
|
|
56
|
+
let observing = false;
|
|
57
|
+
const report = (error: unknown) => { failure = error; if (observing) options.onError(error); };
|
|
58
|
+
const insert = (css: string) => {
|
|
59
|
+
const output = insertCss({ document: options.root.ownerDocument, ...(style ? { previous: style } : {}), css, timeoutMs: options.timeoutMs });
|
|
60
|
+
style = output.style; imports = output.ready;
|
|
61
|
+
void imports.catch(report);
|
|
62
|
+
};
|
|
63
|
+
if (cached) { insert(cached.css); options.onActivity?.({ kind: "candidates", startMs: performance.now(), durationMs: 0, candidates: candidates.size, cssBytes: new TextEncoder().encode(cached.css).byteLength, cacheHit: true }); }
|
|
64
|
+
const compiled = await loadTailwind(options);
|
|
65
|
+
let current = cached?.css ?? "";
|
|
66
|
+
const build = () => {
|
|
67
|
+
for (const candidate of candidates) compiled.candidates.add(candidate);
|
|
68
|
+
return transformCss({ css: compiled.compiler.build([...compiled.candidates]), libraries: options.libraries });
|
|
69
|
+
};
|
|
70
|
+
let persisted = Promise.resolve();
|
|
71
|
+
let pending: (() => void) | undefined;
|
|
72
|
+
const flush = (): Promise<void> => {
|
|
73
|
+
if (pending) {
|
|
74
|
+
pending(); pending = undefined;
|
|
75
|
+
const write = { key, libraryKey: library, candidates: [...source].sort(), domClasses: [...candidates].filter((name) => !source.has(name)).sort(), css: current };
|
|
76
|
+
persisted = persisted.then(() => options.store.write(write));
|
|
77
|
+
void persisted.catch(report);
|
|
78
|
+
}
|
|
79
|
+
return persisted;
|
|
80
|
+
};
|
|
81
|
+
const persist = () => { pending ??= whenIdle(() => { void flush(); }); };
|
|
82
|
+
const update = () => {
|
|
83
|
+
const startMs = performance.now();
|
|
84
|
+
current = build();
|
|
85
|
+
options.onActivity?.({ kind: "candidates", startMs, durationMs: performance.now() - startMs, candidates: compiled.candidates.size, cssBytes: new TextEncoder().encode(current).byteLength, cacheHit: false });
|
|
86
|
+
insert(current);
|
|
87
|
+
for (const candidate of compiled.candidates) candidates.add(candidate);
|
|
88
|
+
persist();
|
|
89
|
+
};
|
|
90
|
+
if (!cached || fresh) update();
|
|
91
|
+
else for (const candidate of candidates) compiled.candidates.add(candidate);
|
|
92
|
+
performance.mark("page-runtime:css-built");
|
|
93
|
+
if (!cached) await flush();
|
|
94
|
+
await imports;
|
|
95
|
+
performance.mark("page-runtime:css-imports");
|
|
96
|
+
const observer = new MutationObserver((records) => {
|
|
97
|
+
try {
|
|
98
|
+
let changed = false;
|
|
99
|
+
for (const record of records) {
|
|
100
|
+
const nodes = record.type === "attributes" ? [record.target] : [...record.addedNodes];
|
|
101
|
+
for (const node of nodes) if (node instanceof Element && classesUnder({ node, root: options.root, candidates })) changed = true;
|
|
102
|
+
}
|
|
103
|
+
if (changed) update();
|
|
104
|
+
} catch (error) { observer.disconnect(); report(error); }
|
|
105
|
+
});
|
|
106
|
+
observer.observe(options.root, { subtree: true, childList: true, attributes: true, attributeFilter: ["class"] });
|
|
107
|
+
observing = true;
|
|
108
|
+
return {
|
|
109
|
+
warm: Boolean(cached), get style() { return style!; }, candidates,
|
|
110
|
+
ready: async () => { await imports; await flush(); if (failure) throw failure; },
|
|
111
|
+
stop: () => { observer.disconnect(); style?.remove(); if (pending) void flush().catch(report); },
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IDBFactory } from "fake-indexeddb";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { memoryCaches } from "../../link/testing-cache.ts";
|
|
4
|
+
import { openRuntimeDb, result, type TailwindRecord } from "../../storage/db.ts";
|
|
5
|
+
import { tailwindCssUrl } from "./cache.ts";
|
|
6
|
+
import { createTailwindStore, TAILWIND_ENTRIES_PER_LIBRARY } from "./store.ts";
|
|
7
|
+
|
|
8
|
+
const origin = "https://runtime.example";
|
|
9
|
+
const hex = (index: number) => index.toString(16).padStart(64, "0");
|
|
10
|
+
|
|
11
|
+
async function setup(options: { keep?: number } = {}) {
|
|
12
|
+
const db = openRuntimeDb({ factory: new IDBFactory() });
|
|
13
|
+
const cache = await memoryCaches().open("tailwind");
|
|
14
|
+
let clock = 1000;
|
|
15
|
+
const fetchCached = async (url: string | URL | Request) => (await cache.match(String(url))) ?? new Response("missing", { status: 404, headers: { "x-page-runtime-error": "fetch" } });
|
|
16
|
+
const store = createTailwindStore({ db: () => db, cache, origin, fetch: fetchCached as typeof fetch, now: () => ++clock, ...options });
|
|
17
|
+
const write = (index: number, extra: { libraryKey?: string; css?: string } = {}) => store.write({ key: hex(index), libraryKey: extra.libraryKey ?? "library-a", candidates: ["block"], domClasses: [], css: extra.css ?? `.u${index}{display:block}` });
|
|
18
|
+
const records = async (): Promise<TailwindRecord[]> => (await result((await db).transaction("tailwind").objectStore("tailwind").getAll())).sort((a, b) => a.key.localeCompare(b.key));
|
|
19
|
+
const cached = async () => (await cache.keys()).map((request) => request.url).sort();
|
|
20
|
+
return { store, cache, write, records, cached, db };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe("tailwind store", () => {
|
|
24
|
+
it("writes a text/css response and an IndexedDB record that agree on the byte size", async () => {
|
|
25
|
+
const { store, cache, records } = await setup();
|
|
26
|
+
const css = ".ünï{content:'日本語'}";
|
|
27
|
+
await store.write({ key: hex(1), libraryKey: "library-a", candidates: ["b", "a"], domClasses: ["dom"], css });
|
|
28
|
+
const [record] = await records();
|
|
29
|
+
const response = (await cache.match(tailwindCssUrl({ key: hex(1), origin })))!;
|
|
30
|
+
const body = new Uint8Array(await response.arrayBuffer());
|
|
31
|
+
expect({ type: response.headers.get("content-type"), length: Number(response.headers.get("content-length")), body: body.byteLength, bytes: record!.bytes, text: new TextDecoder().decode(body) })
|
|
32
|
+
.toEqual({ type: "text/css; charset=utf-8", length: new TextEncoder().encode(css).byteLength, body: new TextEncoder().encode(css).byteLength, bytes: new TextEncoder().encode(css).byteLength, text: css });
|
|
33
|
+
expect(record).toMatchObject({ key: hex(1), libraryKey: "library-a", candidates: ["b", "a"], domClasses: ["dom"], url: tailwindCssUrl({ key: hex(1), origin }) });
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("reads a record's CSS back through its URL and returns nothing for an unknown key", async () => {
|
|
37
|
+
const { store, write } = await setup();
|
|
38
|
+
await write(1, { css: ".one{display:block}" });
|
|
39
|
+
expect((await store.read(hex(1)))?.css).toBe(".one{display:block}");
|
|
40
|
+
expect(await store.read(hex(2))).toBeUndefined();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("throws naming the key and URL when a record's cached response is missing", async () => {
|
|
44
|
+
const { store, cache, write } = await setup();
|
|
45
|
+
await write(1);
|
|
46
|
+
await cache.delete(tailwindCssUrl({ key: hex(1), origin }));
|
|
47
|
+
await expect(store.read(hex(1))).rejects.toThrow(`record ${hex(1)} has no cached stylesheet at ${tailwindCssUrl({ key: hex(1), origin })} (HTTP 404)`);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("caches the response before it commits the record, and leaves no record when caching fails", async () => {
|
|
51
|
+
const { store, cache, records, db } = await setup();
|
|
52
|
+
const events: string[] = [];
|
|
53
|
+
const put = cache.put.bind(cache);
|
|
54
|
+
cache.put = async (...args: Parameters<Cache["put"]>) => { events.push("cache.put"); await put(...args); };
|
|
55
|
+
const database = await db;
|
|
56
|
+
const transaction = database.transaction.bind(database);
|
|
57
|
+
database.transaction = ((...args: Parameters<IDBDatabase["transaction"]>) => { events.push("idb.transaction"); return transaction(...args); }) as IDBDatabase["transaction"];
|
|
58
|
+
await store.write({ key: hex(1), libraryKey: "library-a", candidates: [], domClasses: [], css: ".a{}" });
|
|
59
|
+
expect(events).toEqual(["cache.put", "idb.transaction"]);
|
|
60
|
+
cache.put = async () => { throw new Error("quota exceeded"); };
|
|
61
|
+
await expect(store.write({ key: hex(2), libraryKey: "library-a", candidates: [], domClasses: [], css: ".b{}" })).rejects.toThrow("quota exceeded");
|
|
62
|
+
database.transaction = transaction;
|
|
63
|
+
expect((await records()).map((record) => record.key)).toEqual([hex(1)]);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("keeps the newest N records per library key and deletes the evicted responses", async () => {
|
|
67
|
+
const { write, records, cached } = await setup({ keep: 3 });
|
|
68
|
+
for (let index = 1; index <= 5; index++) await write(index);
|
|
69
|
+
expect((await records()).map((record) => record.key)).toEqual([hex(3), hex(4), hex(5)]);
|
|
70
|
+
expect(await cached()).toEqual([3, 4, 5].map((index) => tailwindCssUrl({ key: hex(index), origin })));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("treats a read as a use when choosing what to evict", async () => {
|
|
74
|
+
const { store, write, records } = await setup({ keep: 2 });
|
|
75
|
+
await write(1); await write(2);
|
|
76
|
+
await store.read(hex(1));
|
|
77
|
+
await write(3);
|
|
78
|
+
expect((await records()).map((record) => record.key)).toEqual([hex(1), hex(3)]);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("clears every record and response of a stale library key on the first write of a new one, but not on later writes", async () => {
|
|
82
|
+
const { write, records, cached } = await setup();
|
|
83
|
+
await write(1, { libraryKey: "library-a" }); await write(2, { libraryKey: "library-a" });
|
|
84
|
+
await write(3, { libraryKey: "library-b" });
|
|
85
|
+
expect((await records()).map((record) => [record.key, record.libraryKey])).toEqual([[hex(3), "library-b"]]);
|
|
86
|
+
expect(await cached()).toEqual([tailwindCssUrl({ key: hex(3), origin })]);
|
|
87
|
+
await write(4, { libraryKey: "library-b" });
|
|
88
|
+
expect((await records()).map((record) => record.key)).toEqual([hex(3), hex(4)]);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("rewriting a key replaces its CSS and domClasses but keeps createdAt", async () => {
|
|
92
|
+
const { store, records } = await setup();
|
|
93
|
+
await store.write({ key: hex(1), libraryKey: "library-a", candidates: ["a"], domClasses: [], css: ".a{}" });
|
|
94
|
+
const [first] = await records();
|
|
95
|
+
await store.write({ key: hex(1), libraryKey: "library-a", candidates: ["a"], domClasses: ["dom"], css: ".a{}.dom{}" });
|
|
96
|
+
const [second] = await records();
|
|
97
|
+
expect({ dom: second!.domClasses, bytes: second!.bytes, created: second!.createdAt, used: second!.lastUsedAt > first!.lastUsedAt }).toEqual({ dom: ["dom"], bytes: 10, created: first!.createdAt, used: true });
|
|
98
|
+
expect((await store.read(hex(1)))?.css).toBe(".a{}.dom{}");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("bounds each library key at 32 entries by default", () => {
|
|
102
|
+
expect(TAILWIND_ENTRIES_PER_LIBRARY).toBe(32);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { committed, result, type TailwindRecord } from "../../storage/db.ts";
|
|
2
|
+
import { tailwindCssUrl } from "./cache.ts";
|
|
3
|
+
|
|
4
|
+
/** Generated stylesheets kept per library key; the least recently used beyond this are evicted. */
|
|
5
|
+
export const TAILWIND_ENTRIES_PER_LIBRARY = 32;
|
|
6
|
+
export type TailwindWrite = { key: string; libraryKey: string; candidates: string[]; domClasses: string[]; css: string };
|
|
7
|
+
export type TailwindStoreOptions = { db: () => Promise<IDBDatabase>; cache: Cache; origin: string; fetch: typeof fetch; keep?: number; now?: () => number };
|
|
8
|
+
export type TailwindStore = ReturnType<typeof createTailwindStore>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Generated CSS is a plain `text/css` response in Cache Storage, served by the worker at `/__runtime/tailwind/<key>.css`.
|
|
12
|
+
* The IndexedDB record is the commit point: it is written after the response, and a record whose response is missing
|
|
13
|
+
* is an invariant violation, not a miss.
|
|
14
|
+
*/
|
|
15
|
+
export function createTailwindStore(options: TailwindStoreOptions) {
|
|
16
|
+
const keep = options.keep ?? TAILWIND_ENTRIES_PER_LIBRARY;
|
|
17
|
+
let last = 0;
|
|
18
|
+
// Strictly increasing, so records written within one millisecond still order by recency.
|
|
19
|
+
const now = options.now ?? (() => last = Math.max(Date.now(), last + 1));
|
|
20
|
+
|
|
21
|
+
/** The record and its CSS, or undefined when nothing was stored for the key. Counts as a use for eviction. */
|
|
22
|
+
async function read(key: string): Promise<{ record: TailwindRecord; css: string } | undefined> {
|
|
23
|
+
const tx = (await options.db()).transaction("tailwind", "readwrite");
|
|
24
|
+
const store = tx.objectStore("tailwind");
|
|
25
|
+
const record = await result<TailwindRecord | undefined>(store.get(key));
|
|
26
|
+
if (record) store.put({ ...record, lastUsedAt: now() });
|
|
27
|
+
await committed(tx);
|
|
28
|
+
if (!record) return undefined;
|
|
29
|
+
const response = await options.fetch(record.url);
|
|
30
|
+
if (!response.ok || response.headers.has("x-page-runtime-error")) throw new Error(`runtime Tailwind: record ${key} has no cached stylesheet at ${record.url} (HTTP ${response.status}); its Cache Storage entry was removed while the IndexedDB record remained`);
|
|
31
|
+
return { record, css: await response.text() };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function write(input: TailwindWrite): Promise<void> {
|
|
35
|
+
const url = tailwindCssUrl({ key: input.key, origin: options.origin });
|
|
36
|
+
const bytes = new TextEncoder().encode(input.css).byteLength;
|
|
37
|
+
await options.cache.put(url, new Response(input.css, { headers: { "content-type": "text/css; charset=utf-8", "content-length": String(bytes), "x-tailwind-library-key": encodeURIComponent(input.libraryKey) } }));
|
|
38
|
+
const tx = (await options.db()).transaction("tailwind", "readwrite");
|
|
39
|
+
const store = tx.objectStore("tailwind");
|
|
40
|
+
const own = IDBKeyRange.bound([input.libraryKey, 0], [input.libraryKey, Infinity]);
|
|
41
|
+
const index = store.index("libraryKey+lastUsedAt");
|
|
42
|
+
const [previous, known] = await Promise.all([result<TailwindRecord | undefined>(store.get(input.key)), result(index.count(own))]);
|
|
43
|
+
const time = now();
|
|
44
|
+
store.put({ key: input.key, libraryKey: input.libraryKey, candidates: input.candidates, domClasses: input.domClasses, bytes, url, createdAt: previous?.createdAt ?? time, lastUsedAt: time } satisfies TailwindRecord);
|
|
45
|
+
const evicted: TailwindRecord[] = [];
|
|
46
|
+
if (known === 0) evicted.push(...(await result<TailwindRecord[]>(store.getAll())).filter((record) => record.libraryKey !== input.libraryKey));
|
|
47
|
+
const others = (await result<TailwindRecord[]>(index.getAll(own))).filter((record) => record.key !== input.key);
|
|
48
|
+
evicted.push(...others.slice(0, Math.max(0, others.length - (keep - 1))));
|
|
49
|
+
for (const record of evicted) store.delete(record.key);
|
|
50
|
+
await committed(tx);
|
|
51
|
+
await Promise.all(evicted.map((record) => options.cache.delete(record.url)));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return { read, write };
|
|
55
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Links the libraries' published stylesheets in the given order; `ready` rejects naming the stylesheet that failed or timed out. */
|
|
2
|
+
export function insertBaseLinks(options: { document: Document; urls: string[]; timeoutMs: number }): { links: HTMLLinkElement[]; ready: Promise<void> } {
|
|
3
|
+
const links = options.urls.map((url) => {
|
|
4
|
+
const link = options.document.createElement("link");
|
|
5
|
+
link.rel = "stylesheet"; link.href = url; link.dataset["pageRuntimeBase"] = url;
|
|
6
|
+
return link;
|
|
7
|
+
});
|
|
8
|
+
const ready = Promise.all(links.map((link) => new Promise<void>((resolve, reject) => {
|
|
9
|
+
const timer = setTimeout(() => reject(new Error(`${link.href}: base stylesheet timeout after ${options.timeoutMs}ms`)), options.timeoutMs);
|
|
10
|
+
link.addEventListener("load", () => { clearTimeout(timer); resolve(); }, { once: true });
|
|
11
|
+
link.addEventListener("error", () => { clearTimeout(timer); reject(new Error(`${link.href}: base stylesheet failed to load`)); }, { once: true });
|
|
12
|
+
}))).then(() => undefined);
|
|
13
|
+
options.document.head.append(...links);
|
|
14
|
+
return { links, ready };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function insertCss(options: { document: Document; previous?: HTMLStyleElement; css: string; timeoutMs: number }) {
|
|
18
|
+
const style = options.document.createElement("style");
|
|
19
|
+
style.id = "runtime-tailwind";
|
|
20
|
+
const ready = /@import\s/.test(options.css) ? new Promise<void>((resolve, reject) => {
|
|
21
|
+
const done = (error?: Error) => {
|
|
22
|
+
clearTimeout(timer);
|
|
23
|
+
style.removeEventListener("load", loaded);
|
|
24
|
+
style.removeEventListener("error", failed);
|
|
25
|
+
if (error) reject(error); else resolve();
|
|
26
|
+
};
|
|
27
|
+
const loaded = () => done();
|
|
28
|
+
const failed = () => done(new Error("runtime Tailwind stylesheet import failed"));
|
|
29
|
+
const timer = setTimeout(() => done(new Error(`runtime Tailwind stylesheet imports timeout after ${options.timeoutMs}ms`)), options.timeoutMs);
|
|
30
|
+
style.addEventListener("load", loaded);
|
|
31
|
+
style.addEventListener("error", failed);
|
|
32
|
+
}) : Promise.resolve();
|
|
33
|
+
style.textContent = options.css;
|
|
34
|
+
if (options.previous) options.previous.replaceWith(style);
|
|
35
|
+
else options.document.head.append(style);
|
|
36
|
+
return { style, ready };
|
|
37
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
|
+
import { startTailwindServer } from "./testing/server.ts";
|
|
5
|
+
import { compare, type Snapshot } from "./testing/compare.ts";
|
|
6
|
+
import { parityPages } from "./testing/pages.ts";
|
|
7
|
+
|
|
8
|
+
const exec = promisify(execFile);
|
|
9
|
+
const session = `page-runtime-E-${process.pid}`;
|
|
10
|
+
let server: Awaited<ReturnType<typeof startTailwindServer>>;
|
|
11
|
+
let opened = false;
|
|
12
|
+
async function browser(...args: string[]) {
|
|
13
|
+
const { stdout } = await exec("agent-browser", ["--engine", "chrome", "--session", session, ...args], { timeout: 45000, maxBuffer: 128_000_000 });
|
|
14
|
+
return stdout.trim();
|
|
15
|
+
}
|
|
16
|
+
async function run(path: string) {
|
|
17
|
+
await browser("open", `${server.url}/${path}`); opened = true;
|
|
18
|
+
await browser("wait", "--fn", 'document.title === "DONE"');
|
|
19
|
+
const result = JSON.parse(await browser("get", "text", "#result"));
|
|
20
|
+
if (result.error) throw new Error(`${result.error}\n${result.stack}`);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
beforeAll(async () => {
|
|
24
|
+
server = await startTailwindServer();
|
|
25
|
+
await browser("open", "about:blank"); opened = true;
|
|
26
|
+
await browser("set", "viewport", "1920", "1080");
|
|
27
|
+
});
|
|
28
|
+
afterAll(async () => { try { if (opened) await browser("close"); } finally { await server?.close(); } });
|
|
29
|
+
|
|
30
|
+
describe("tailwind Chromium", () => {
|
|
31
|
+
it("styles source candidates before layout effects, runtime classes before paint, excludes overlays and warms from Cache Storage", async () => {
|
|
32
|
+
const result = await run("?probe=1");
|
|
33
|
+
expect(result, JSON.stringify(result)).toMatchObject({ sourceWidth: 137, dynamicWidth: 237, changedWidth: 319, excluded: true, warm: true, layoutWidth: 137, importFailed: true, errors: [] });
|
|
34
|
+
expect(result.imported).toBeGreaterThanOrEqual(180);
|
|
35
|
+
});
|
|
36
|
+
it("keeps base rules out of the generated stylesheet and stores it as a few-KB text/css response with agreeing IndexedDB metadata", async () => {
|
|
37
|
+
const result = await run("?probe=1");
|
|
38
|
+
expect(result.baseInGenerated).toBe(false);
|
|
39
|
+
expect(result.generatedKilobytes).toBeLessThan(20);
|
|
40
|
+
expect(result.cold).toMatchObject({ records: 1, candidateRecords: 0, legacyCandidateEntries: 0, contentType: "text/css; charset=utf-8" });
|
|
41
|
+
expect(result.cold.cachedBytes).toBe(result.cold.recordBytes);
|
|
42
|
+
expect(result.cold.kilobytes).toBeLessThan(20);
|
|
43
|
+
});
|
|
44
|
+
it("warms from the stored record, adding the DOM classes the cold load discovered without a second entry", async () => {
|
|
45
|
+
const result = await run("?probe=1");
|
|
46
|
+
expect(result.warm).toBe(true);
|
|
47
|
+
expect(result.warmStorage).toMatchObject({ records: 1, legacyCandidateEntries: 0 });
|
|
48
|
+
expect(result.cold.domClasses).toEqual(expect.arrayContaining(["w-[237px]", "w-[319px]"]));
|
|
49
|
+
});
|
|
50
|
+
it("styles a page that does not opt in from the base links alone, with no runtime style element", async () => {
|
|
51
|
+
const result = await run("?plain=1");
|
|
52
|
+
expect(result).toMatchObject({ runtimeStyle: false, styled: true });
|
|
53
|
+
expect(result.baseLinks).toBeGreaterThanOrEqual(1);
|
|
54
|
+
});
|
|
55
|
+
it.each(parityPages)("matches facet's v4 build in two fresh renders: %s", async (name) => {
|
|
56
|
+
const runtime = await run(`?page=${name}&mode=runtime`) as Snapshot;
|
|
57
|
+
const reference = await run(`?page=${name}&mode=reference`) as Snapshot;
|
|
58
|
+
const differences = compare(runtime, reference).differences;
|
|
59
|
+
expect(differences, JSON.stringify(differences.slice(0, 12))).toEqual([]);
|
|
60
|
+
expect(runtime.selectors.length).toBeGreaterThan(10);
|
|
61
|
+
});
|
|
62
|
+
it.each(["LiveDiagram", "DataFlowDiagram"])("keeps styled diagram measurements at 2560x1440: %s", async (name) => {
|
|
63
|
+
await browser("set", "viewport", "2560", "1440");
|
|
64
|
+
try {
|
|
65
|
+
const runtime = await run(`?page=${name}&mode=runtime`) as Snapshot;
|
|
66
|
+
const reference = await run(`?page=${name}&mode=reference`) as Snapshot;
|
|
67
|
+
const differences = compare(runtime, reference).differences;
|
|
68
|
+
expect(differences, JSON.stringify(differences.slice(0, 12))).toEqual([]);
|
|
69
|
+
} finally { await browser("set", "viewport", "1920", "1080"); }
|
|
70
|
+
});
|
|
71
|
+
});
|