@alfadocs/ui-kit-debug 1.73.2 → 1.74.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/dist/_chunks/alia-sidebar-CsTRAxC8.js +1323 -0
- package/dist/_chunks/alia-sidebar-CsTRAxC8.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js → anamnesis-summary-rows-vNDyE5HW.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BedVmSAB.js.map → anamnesis-summary-rows-vNDyE5HW.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js → antenatal-schedule-timeline-BGewPfEX.js} +18 -18
- package/dist/_chunks/{antenatal-schedule-timeline-DW_qkGo1.js.map → antenatal-schedule-timeline-BGewPfEX.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js → appointment-timeline-1-Za2miy.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CKwMXUid.js.map → appointment-timeline-1-Za2miy.js.map} +1 -1
- package/dist/_chunks/{ar-pLopgMbL.js → ar-C4YQVTH6.js} +2 -2
- package/dist/_chunks/{ar-pLopgMbL.js.map → ar-C4YQVTH6.js.map} +1 -1
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js → auth-form-parts-B3GWChvG.js} +2 -2
- package/dist/_chunks/{auth-form-parts-DHv6LVV2.js.map → auth-form-parts-B3GWChvG.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js → balance-badge-cell-B49xgL6H.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DG5JWB2p.js.map → balance-badge-cell-B49xgL6H.js.map} +1 -1
- package/dist/_chunks/{booking-CTRoFbIS.js → booking-sq9sa29d.js} +9 -9
- package/dist/_chunks/booking-sq9sa29d.js.map +1 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js +63 -0
- package/dist/_chunks/brand-mark-DLk9kD8g.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js → calendar-appointment-editor-dialog-CctI6mpd.js} +8 -8
- package/dist/_chunks/{calendar-appointment-editor-dialog-Lji2y0qJ.js.map → calendar-appointment-editor-dialog-CctI6mpd.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js → cycle-calculator-HO3s5InI.js} +5 -5
- package/dist/_chunks/{cycle-calculator-Ycp3li61.js.map → cycle-calculator-HO3s5InI.js.map} +1 -1
- package/dist/_chunks/{date-picker-KcoNNsM0.js → date-picker-CdhXlgVI.js} +4 -4
- package/dist/_chunks/{date-picker-KcoNNsM0.js.map → date-picker-CdhXlgVI.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js → date-picker-variants-Dt6UbonG.js} +25 -25
- package/dist/_chunks/{date-picker-variants-DN37Oj5-.js.map → date-picker-variants-Dt6UbonG.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js → date-range-picker-B_j4VQlV.js} +5 -5
- package/dist/_chunks/{date-range-picker-CjcjUJLW.js.map → date-range-picker-B_j4VQlV.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js → date-time-picker-n-yrlMJq.js} +3 -3
- package/dist/_chunks/{date-time-picker-BVQNZ4yC.js.map → date-time-picker-n-yrlMJq.js.map} +1 -1
- package/dist/_chunks/{de-lVkJRPnh.js → de-B1B3PIgY.js} +2 -2
- package/dist/_chunks/{de-lVkJRPnh.js.map → de-B1B3PIgY.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js → due-date-calculator-CDWTSblh.js} +6 -6
- package/dist/_chunks/{due-date-calculator-B0gyOijA.js.map → due-date-calculator-CDWTSblh.js.map} +1 -1
- package/dist/_chunks/{el-CHzxNWPj.js → el-iLqGpapg.js} +16 -16
- package/dist/_chunks/{el-CHzxNWPj.js.map → el-iLqGpapg.js.map} +1 -1
- package/dist/_chunks/{en-GB-CwxYmmhU.js → en-GB-CxPRQbD6.js} +6 -6
- package/dist/_chunks/{en-GB-CwxYmmhU.js.map → en-GB-CxPRQbD6.js.map} +1 -1
- package/dist/_chunks/{es-Ck-oxbHW.js → es-Bg1oqwDs.js} +2 -2
- package/dist/_chunks/{es-Ck-oxbHW.js.map → es-Bg1oqwDs.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js → forgot-password-form-BSOZVrZG.js} +3 -3
- package/dist/_chunks/{forgot-password-form-D6kB72OD.js.map → forgot-password-form-BSOZVrZG.js.map} +1 -1
- package/dist/_chunks/{format-D-1gTdHF.js → format--x5jypvH.js} +13 -13
- package/dist/_chunks/{format-D-1gTdHF.js.map → format--x5jypvH.js.map} +1 -1
- package/dist/_chunks/{fr-fWRnDcSD.js → fr-DpGxyOGI.js} +2 -2
- package/dist/_chunks/{fr-fWRnDcSD.js.map → fr-DpGxyOGI.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js → gestational-age-calculator-CTHeJJdb.js} +7 -7
- package/dist/_chunks/{gestational-age-calculator-Bu_a-K9z.js.map → gestational-age-calculator-CTHeJJdb.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js → hcg-doubling-BBk-a33g.js} +11 -11
- package/dist/_chunks/{hcg-doubling-BnopYgd-.js.map → hcg-doubling-BBk-a33g.js.map} +1 -1
- package/dist/_chunks/{hi-B5uX0h3V.js → hi-3Dtsksrw.js} +2 -2
- package/dist/_chunks/{hi-B5uX0h3V.js.map → hi-3Dtsksrw.js.map} +1 -1
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js → isSameWeek-DyVftHWi.js} +2 -2
- package/dist/_chunks/{isSameWeek-u81Z-J7h.js.map → isSameWeek-DyVftHWi.js.map} +1 -1
- package/dist/_chunks/{it-DBoNIelY.js → it-Cp0CA13d.js} +3 -3
- package/dist/_chunks/{it-DBoNIelY.js.map → it-Cp0CA13d.js.map} +1 -1
- package/dist/_chunks/{ja-Du8gfg8p.js → ja-9FOyR1lb.js} +22 -22
- package/dist/_chunks/{ja-Du8gfg8p.js.map → ja-9FOyR1lb.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js → kit-extensions-sNTZWkoo.js} +4 -4
- package/dist/_chunks/{kit-extensions-DgBi3tsK.js.map → kit-extensions-sNTZWkoo.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js → link-cell-renderer-B0riA_h_.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-BDxxpfJM.js.map → link-cell-renderer-B0riA_h_.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js → login-dev-card-DRxTPkE9.js} +3 -3
- package/dist/_chunks/{login-dev-card-pnJbVaoQ.js.map → login-dev-card-DRxTPkE9.js.map} +1 -1
- package/dist/_chunks/{nl-BCBwxYi8.js → nl-sfx-zJgR.js} +2 -2
- package/dist/_chunks/{nl-BCBwxYi8.js.map → nl-sfx-zJgR.js.map} +1 -1
- package/dist/_chunks/{notes-panel-C_QshXyI.js → notes-panel-CxjMovCh.js} +2 -2
- package/dist/_chunks/{notes-panel-C_QshXyI.js.map → notes-panel-CxjMovCh.js.map} +1 -1
- package/dist/_chunks/{parse-UB4FJGNA.js → parse-B0s7bY4d.js} +3 -3
- package/dist/_chunks/{parse-UB4FJGNA.js.map → parse-B0s7bY4d.js.map} +1 -1
- package/dist/_chunks/{parseISO-y3LncvfO.js → parseISO-DZZ5a-zK.js} +2 -2
- package/dist/_chunks/{parseISO-y3LncvfO.js.map → parseISO-DZZ5a-zK.js.map} +1 -1
- package/dist/_chunks/{patient-details-Cd_dCqkg.js → patient-details-Dgd_tocD.js} +2 -2
- package/dist/_chunks/{patient-details-Cd_dCqkg.js.map → patient-details-Dgd_tocD.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js → patient-field-row-BFVlJnS9.js} +3 -3
- package/dist/_chunks/{patient-field-row-D6Ftm46u.js.map → patient-field-row-BFVlJnS9.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js → patient-summary-card-BTKvFUmh.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BSOHR4Ol.js.map → patient-summary-card-BTKvFUmh.js.map} +1 -1
- package/dist/_chunks/{phone-input-O9camxkq.js → phone-input-EwVuqFik.js} +74 -74
- package/dist/_chunks/phone-input-EwVuqFik.js.map +1 -0
- package/dist/_chunks/{pl-HwLM6gPs.js → pl-BLh7KO-s.js} +3 -3
- package/dist/_chunks/{pl-HwLM6gPs.js.map → pl-BLh7KO-s.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js → pregnancy-dating-JBAUbM40.js} +7 -7
- package/dist/_chunks/{pregnancy-dating-CvNFirHt.js.map → pregnancy-dating-JBAUbM40.js.map} +1 -1
- package/dist/_chunks/{pt-BxhT5ZQH.js → pt-CPKOrOLj.js} +2 -2
- package/dist/_chunks/{pt-BxhT5ZQH.js.map → pt-CPKOrOLj.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js → radiograph-panel.agent-DQh2SX8G.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-ESnkuDfH.js.map → radiograph-panel.agent-DQh2SX8G.js.map} +1 -1
- package/dist/_chunks/registration-form-B6qqeXP1.js +1310 -0
- package/dist/_chunks/registration-form-B6qqeXP1.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BXFgcvBW.js → rich-text-editor-BZTyxQBd.js} +1683 -1673
- package/dist/_chunks/rich-text-editor-BZTyxQBd.js.map +1 -0
- package/dist/_chunks/{ro-Do9W55ae.js → ro-Dc-oNqbF.js} +2 -2
- package/dist/_chunks/{ro-Do9W55ae.js.map → ro-Dc-oNqbF.js.map} +1 -1
- package/dist/_chunks/{ru-PDBX5gdf.js → ru-BtNpDZRR.js} +3 -3
- package/dist/_chunks/{ru-PDBX5gdf.js.map → ru-BtNpDZRR.js.map} +1 -1
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js +409 -0
- package/dist/_chunks/send-registration-link-form-pO2bGjGa.js.map +1 -0
- package/dist/_chunks/{slot-grid-uA9j7Nik.js → slot-grid-Bb13H9Rl.js} +3 -3
- package/dist/_chunks/{slot-grid-uA9j7Nik.js.map → slot-grid-Bb13H9Rl.js.map} +1 -1
- package/dist/_chunks/{sq-DnvsgyIh.js → sq-D4c7olaV.js} +2 -2
- package/dist/_chunks/{sq-DnvsgyIh.js.map → sq-D4c7olaV.js.map} +1 -1
- package/dist/_chunks/subDays-DKISP2nE.js +8 -0
- package/dist/_chunks/{subDays-xH7cpN6B.js.map → subDays-DKISP2nE.js.map} +1 -1
- package/dist/_chunks/{sv-CpFSK8xS.js → sv-Bf_dHPvh.js} +2 -2
- package/dist/_chunks/{sv-CpFSK8xS.js.map → sv-Bf_dHPvh.js.map} +1 -1
- package/dist/_chunks/{task-editor-BTeUFGUX.js → task-editor-CRhfwP9T.js} +2 -2
- package/dist/_chunks/{task-editor-BTeUFGUX.js.map → task-editor-CRhfwP9T.js.map} +1 -1
- package/dist/_chunks/{tr-DW4oQYHT.js → tr-xqQ6cbGY.js} +2 -2
- package/dist/_chunks/{tr-DW4oQYHT.js.map → tr-xqQ6cbGY.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js → use-appointment-details-read-BFslxbRr.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BWbOiLVw.js.map → use-appointment-details-read-BFslxbRr.js.map} +1 -1
- package/dist/_chunks/use-field-match-C8ug3sdQ.js +30 -0
- package/dist/_chunks/use-field-match-C8ug3sdQ.js.map +1 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js +112 -0
- package/dist/_chunks/use-registration-submit-CLGHxwoT.js.map +1 -0
- package/dist/_chunks/{zh-CN-QGEs29fQ.js → zh-CN-C657DBCO.js} +3 -3
- package/dist/_chunks/{zh-CN-QGEs29fQ.js.map → zh-CN-C657DBCO.js.map} +1 -1
- package/dist/agent-catalog.json +87 -3
- package/dist/agent-i18n/en.json +9 -2
- package/dist/alia-asteroid-icon/index.js +52 -0
- package/dist/alia-asteroid-icon/index.js.map +1 -0
- package/dist/aws-transcribe/index.js +320 -0
- package/dist/aws-transcribe/index.js.map +1 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-field-match.d.ts +2 -2
- package/dist/hooks/use-field-match.d.ts.map +1 -1
- package/dist/i18n/locales/ar.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +38 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +36 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +38 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +36 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +38 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +36 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +38 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +36 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +38 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +36 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +38 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +36 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +38 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +36 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +38 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +36 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +38 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +36 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +38 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +36 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +38 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +36 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +38 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +36 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +38 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +36 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +38 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +36 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +38 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +36 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +38 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +36 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +38 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +36 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +38 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +296 -292
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +38 -2
- package/dist/locales/de.json +38 -2
- package/dist/locales/el.json +38 -2
- package/dist/locales/en.json +38 -2
- package/dist/locales/es.json +38 -2
- package/dist/locales/fr.json +38 -2
- package/dist/locales/hi.json +38 -2
- package/dist/locales/it.json +38 -2
- package/dist/locales/ja.json +38 -2
- package/dist/locales/nl.json +38 -2
- package/dist/locales/pl.json +38 -2
- package/dist/locales/pt.json +38 -2
- package/dist/locales/ro.json +38 -2
- package/dist/locales/ru.json +38 -2
- package/dist/locales/sq.json +38 -2
- package/dist/locales/sv.json +38 -2
- package/dist/locales/tr.json +38 -2
- package/dist/locales/zh.json +38 -2
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +22 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +7 -6
- package/dist/patterns/alia-assistant/index.js.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/registration-form/index.d.ts +1 -0
- package/dist/patterns/registration-form/index.d.ts.map +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/registration-form/registration-form.d.ts +43 -0
- package/dist/patterns/registration-form/registration-form.d.ts.map +1 -1
- package/dist/patterns/registration-form/registration-verification.d.ts +38 -0
- package/dist/patterns/registration-form/registration-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts +107 -0
- package/dist/patterns/registration-form/use-contact-verification.d.ts.map +1 -0
- package/dist/patterns/registration-form/verification-requests.d.ts +9 -0
- package/dist/patterns/registration-form/verification-requests.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.d.ts +3 -0
- package/dist/patterns/send-registration-link-form/index.d.ts.map +1 -0
- package/dist/patterns/send-registration-link-form/index.js +6 -0
- package/dist/patterns/send-registration-link-form/index.js.map +1 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts +80 -0
- package/dist/patterns/send-registration-link-form/send-registration-link-form.d.ts.map +1 -0
- package/dist/speech/aws-transcribe.d.ts +65 -0
- package/dist/speech/aws-transcribe.d.ts.map +1 -0
- package/dist/speech/event-stream.d.ts +13 -0
- package/dist/speech/event-stream.d.ts.map +1 -0
- package/dist/tokens.css +1 -1
- package/package.json +13 -1
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js +0 -1290
- package/dist/_chunks/alia-sidebar-DZoyUFW8.js.map +0 -1
- package/dist/_chunks/booking-CTRoFbIS.js.map +0 -1
- package/dist/_chunks/phone-input-O9camxkq.js.map +0 -1
- package/dist/_chunks/registration-form-BGSVMAga.js +0 -819
- package/dist/_chunks/registration-form-BGSVMAga.js.map +0 -1
- package/dist/_chunks/rich-text-editor-BXFgcvBW.js.map +0 -1
- package/dist/_chunks/subDays-xH7cpN6B.js +0 -8
- package/dist/_chunks/use-field-match-pdbEnKvO.js +0 -28
- package/dist/_chunks/use-field-match-pdbEnKvO.js.map +0 -1
- package/dist/_chunks/use-registration-submit-eWAECgUC.js +0 -171
- package/dist/_chunks/use-registration-submit-eWAECgUC.js.map +0 -1
|
@@ -2,6 +2,7 @@ import { type HTMLAttributes, type ReactNode } from 'react';
|
|
|
2
2
|
import { type UsePasswordRequirementsOptions } from '../../components/password-input';
|
|
3
3
|
import { type SelectOption } from '../../components/select';
|
|
4
4
|
import { type BrandMarkMotion } from '../_shared/brand-mark';
|
|
5
|
+
import { type RegistrationFieldVerification, type RegistrationVerifiableField } from './use-contact-verification';
|
|
5
6
|
/** The fields of the form, in the order they appear. */
|
|
6
7
|
export declare const REGISTRATION_FORM_FIELDS: readonly ["firstName", "lastName", "email", "emailConfirm", "password", "passwordConfirm", "phone", "branch", "terms"];
|
|
7
8
|
export type RegistrationFormField = (typeof REGISTRATION_FORM_FIELDS)[number];
|
|
@@ -92,6 +93,19 @@ export interface RegistrationFormProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
92
93
|
* posted. Keep any heading inside it below the card's own level.
|
|
93
94
|
*/
|
|
94
95
|
children?: ReactNode;
|
|
96
|
+
/**
|
|
97
|
+
* A short notice above the fields, as plain text already translated. It
|
|
98
|
+
* shows as an info alert, quiet to screen readers (it is not news). For
|
|
99
|
+
* a server-rendered page that can only pass JSON. Comes before
|
|
100
|
+
* `benefits` and `children`.
|
|
101
|
+
*/
|
|
102
|
+
notice?: string;
|
|
103
|
+
/**
|
|
104
|
+
* What the person gets, one short line each, already translated. They
|
|
105
|
+
* show as a compact list with a tick. Comes after `notice` and before
|
|
106
|
+
* `children`.
|
|
107
|
+
*/
|
|
108
|
+
benefits?: string[];
|
|
95
109
|
/**
|
|
96
110
|
* The fields to show. Default: all of them, which is the doctor form.
|
|
97
111
|
* A patient form is `['email', 'password', 'passwordConfirm', 'terms']`.
|
|
@@ -174,9 +188,21 @@ export interface RegistrationFormProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
174
188
|
* required.
|
|
175
189
|
*/
|
|
176
190
|
termsLabel?: ReactNode;
|
|
191
|
+
/**
|
|
192
|
+
* `termsLabel` as a string, for a host that can only pass JSON. Already
|
|
193
|
+
* translated. Mark the links with `<terms>…</terms>` and
|
|
194
|
+
* `<privacy>…</privacy>`: they lead to `termsHref` and `privacyHref`
|
|
195
|
+
* (new tab; without a safe address, the words show without a link).
|
|
196
|
+
* Any other tag shows its text only. No marker: plain text. Ignored
|
|
197
|
+
* when `termsLabel` is set.
|
|
198
|
+
*/
|
|
199
|
+
termsLabelText?: string;
|
|
177
200
|
/** A line shown with the terms box and read out with it, e.g. "We
|
|
178
201
|
* will not send you any advertising". Pass it translated. */
|
|
179
202
|
termsDescription?: ReactNode;
|
|
203
|
+
/** `termsDescription` as a string, with the same markers as
|
|
204
|
+
* `termsLabelText`. Ignored when `termsDescription` is set. */
|
|
205
|
+
termsDescriptionText?: string;
|
|
180
206
|
/** Adds "Already have an account? Sign in". Same rule as `termsHref`. */
|
|
181
207
|
loginHref?: string;
|
|
182
208
|
/** A Google reCAPTCHA v2 site key of the invisible type. The check
|
|
@@ -223,6 +249,23 @@ export interface RegistrationFormProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
223
249
|
* `fieldNames` is left out: the form's own field wins.
|
|
224
250
|
*/
|
|
225
251
|
hiddenFields?: Readonly<Record<string, string>>;
|
|
252
|
+
/**
|
|
253
|
+
* Proves an email or a phone number with a code before the form
|
|
254
|
+
* submits. For each field named here the card shows "Send code" beside
|
|
255
|
+
* the field, a code box once a code is out, and locks the field
|
|
256
|
+
* (read-only, still posted) when the code is right. The host sends and
|
|
257
|
+
* checks the codes on its server, which must also refuse the form when
|
|
258
|
+
* the value was not verified: this is a convenience for the person,
|
|
259
|
+
* not the check. Without it the form is unchanged.
|
|
260
|
+
*
|
|
261
|
+
* `Confirm email` stays; leave `emailConfirm` out of `fields` to drop it.
|
|
262
|
+
*/
|
|
263
|
+
verification?: Partial<Record<RegistrationVerifiableField, RegistrationFieldVerification>>;
|
|
264
|
+
/**
|
|
265
|
+
* With `verification`, the form does not submit until every field named
|
|
266
|
+
* there is verified. Default true.
|
|
267
|
+
*/
|
|
268
|
+
requireVerification?: boolean;
|
|
226
269
|
}
|
|
227
270
|
/**
|
|
228
271
|
* The registration form card, for doctors and for patients. The host
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration-form.d.ts","sourceRoot":"","sources":["../../../src/patterns/registration-form/registration-form.tsx"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"registration-form.d.ts","sourceRoot":"","sources":["../../../src/patterns/registration-form/registration-form.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAQL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMpE,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMxE,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AAYpC,wDAAwD;AACxD,eAAO,MAAM,wBAAwB,wHAU3B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,uEAAuE;AACvE,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,qBAAqB,EACnB,WAAW,GACX,UAAU,GACV,OAAO,GACP,cAAc,GACd,U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;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;kEAC8D;IAC9D,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;oEACgE;IAChE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;0BAEsB;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;0CACsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC;uDACmD;IACnD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACpD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,OAAO,CACpB,MAAM,CAAC,2BAA2B,EAAE,6BAA6B,CAAC,CACnE,CAAC;IACF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAyND;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,kHAsjC5B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RegistrationVerifiableField, UseContactVerificationReturn } from './use-contact-verification';
|
|
2
|
+
/** The message a failed send leaves under the field. */
|
|
3
|
+
export declare function useSendFailureMessage(state: UseContactVerificationReturn): string | undefined;
|
|
4
|
+
interface VerificationActionProps {
|
|
5
|
+
state: UseContactVerificationReturn;
|
|
6
|
+
/** True when the value could be an address or a number. */
|
|
7
|
+
canSend: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** "Send code", beside the field. Gone once a code is out. */
|
|
10
|
+
export declare function VerificationAction({ state, canSend, }: VerificationActionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
interface VerificationPanelProps {
|
|
12
|
+
field: RegistrationVerifiableField;
|
|
13
|
+
state: UseContactVerificationReturn;
|
|
14
|
+
/** Hide "Change email": the address cannot be edited here. */
|
|
15
|
+
canChange?: boolean;
|
|
16
|
+
/** Show "Change" beside the success line of a field that started
|
|
17
|
+
* verified (`allowChange`). The email shows it elsewhere. */
|
|
18
|
+
changeWhenVerified?: boolean;
|
|
19
|
+
/** Called after "Change" unlocks the field, to focus it. */
|
|
20
|
+
onUnlocked?: () => void;
|
|
21
|
+
/** Called once when the code is right, to put focus back on the field. */
|
|
22
|
+
onVerified: () => void;
|
|
23
|
+
}
|
|
24
|
+
/** What sits under the field: the code box, or the success line. */
|
|
25
|
+
export declare function VerificationPanel({ field, state, canChange, changeWhenVerified, onUnlocked, onVerified, }: VerificationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface ChangeSlotProps {
|
|
27
|
+
field: RegistrationVerifiableField;
|
|
28
|
+
state: UseContactVerificationReturn;
|
|
29
|
+
/** Called after the field is unlocked, to focus it. */
|
|
30
|
+
onUnlocked: () => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* "Change email", in the cell where Confirm email sits. A hidden label
|
|
34
|
+
* line above it keeps the action level with the input beside it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function VerificationChangeSlot({ field, state, onUnlocked, }: ChangeSlotProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=registration-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration-verification.d.ts","sourceRoot":"","sources":["../../../src/patterns/registration-form/registration-verification.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAEV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AAqBpC,wDAAwD;AACxD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,4BAA4B,GAClC,MAAM,GAAG,SAAS,CAGpB;AAED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,4BAA4B,CAAC;IACpC,2DAA2D;IAC3D,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,GACR,EAAE,uBAAuB,kDA4BzB;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,2BAA2B,CAAC;IACnC,KAAK,EAAE,4BAA4B,CAAC;IACpC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;kEAC8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,0EAA0E;IAC1E,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,oEAAoE;AACpE,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,SAAgB,EAChB,kBAA0B,EAC1B,UAAU,EACV,UAAU,GACX,EAAE,sBAAsB,2CA0LxB;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,2BAA2B,CAAC;IACnC,KAAK,EAAE,4BAA4B,CAAC;IACpC,uDAAuD;IACvD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,KAAK,EACL,UAAU,GACX,EAAE,eAAe,2CA+BjB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/** The fields that can be verified by a code. */
|
|
2
|
+
export type RegistrationVerifiableField = 'email' | 'phone';
|
|
3
|
+
/** Why a send or a check failed. */
|
|
4
|
+
export type RegistrationCodeFailure = 'invalid' | 'expired' | 'rate_limited' | 'error';
|
|
5
|
+
/** What the host answers when a code is sent or checked. */
|
|
6
|
+
export interface RegistrationCodeResult {
|
|
7
|
+
ok: boolean;
|
|
8
|
+
/** Already translated by the host. Shown under the field when `ok` is
|
|
9
|
+
* false, instead of the kit's own wording for `reason`. */
|
|
10
|
+
message?: string;
|
|
11
|
+
reason?: RegistrationCodeFailure;
|
|
12
|
+
/** With `rate_limited`: seconds before another send is allowed. */
|
|
13
|
+
retryAfterSeconds?: number;
|
|
14
|
+
/** After a send: seconds before "Send a new code" works. Default 30. */
|
|
15
|
+
resendAfterSeconds?: number;
|
|
16
|
+
/** Development only. The host passes it only when its server says this
|
|
17
|
+
* is a development environment; it shows in an info alert. */
|
|
18
|
+
devCode?: string;
|
|
19
|
+
/** After a check: the value the server verified. Informational. */
|
|
20
|
+
value?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Options both ways of verifying a field share. */
|
|
23
|
+
export interface RegistrationFieldVerificationOptions {
|
|
24
|
+
/** Digits in the code. Default 6. */
|
|
25
|
+
codeLength?: number;
|
|
26
|
+
/** True when the server already holds this value as verified, such as
|
|
27
|
+
* a page that reopens after a refused post. */
|
|
28
|
+
verified?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* With `verified`: the person may still change the value. The field
|
|
31
|
+
* shows as verified with a "Change" action; pressing it unlocks the
|
|
32
|
+
* field. Typing back exactly the value that started verified (trimmed,
|
|
33
|
+
* case ignored) is verified again with no code; any other value needs
|
|
34
|
+
* a code. Without it, `verified` locks the field with no way back.
|
|
35
|
+
* A plain boolean, so it works from JSON.
|
|
36
|
+
*/
|
|
37
|
+
allowChange?: boolean;
|
|
38
|
+
/** Called with `true` once the code is right. */
|
|
39
|
+
onVerifiedChange?: (verified: boolean) => void;
|
|
40
|
+
}
|
|
41
|
+
/** Callbacks: for a React host that calls its own API. */
|
|
42
|
+
export interface RegistrationFieldVerificationCallbacks extends RegistrationFieldVerificationOptions {
|
|
43
|
+
/** Sends a code to the value. Resolve, never reject: a rejection is
|
|
44
|
+
* shown as a failure with reason `error`. */
|
|
45
|
+
onSendCode: (value: string) => Promise<RegistrationCodeResult>;
|
|
46
|
+
/** Checks the code the person typed for the value. */
|
|
47
|
+
onVerifyCode: (value: string, code: string) => Promise<RegistrationCodeResult>;
|
|
48
|
+
sendUrl?: never;
|
|
49
|
+
verifyUrl?: never;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* URLs: data only, for a host that mounts the form from JSON. The kit
|
|
53
|
+
* POSTs JSON to each (same origin, cookies sent). Send body:
|
|
54
|
+
* `{ "value" }`. Verify body: `{ "value", "code" }`. The answer is a
|
|
55
|
+
* `RegistrationCodeResult` as JSON, on success and on failure. A path or
|
|
56
|
+
* an address on this site only.
|
|
57
|
+
*/
|
|
58
|
+
export interface RegistrationFieldVerificationUrls extends RegistrationFieldVerificationOptions {
|
|
59
|
+
sendUrl: string;
|
|
60
|
+
verifyUrl: string;
|
|
61
|
+
onSendCode?: never;
|
|
62
|
+
onVerifyCode?: never;
|
|
63
|
+
}
|
|
64
|
+
/** How one field is verified: both callbacks, or both URLs. */
|
|
65
|
+
export type RegistrationFieldVerification = RegistrationFieldVerificationCallbacks | RegistrationFieldVerificationUrls;
|
|
66
|
+
export type ContactVerificationStatus = 'idle' | 'sending' | 'sent' | 'verifying' | 'verified';
|
|
67
|
+
export interface ContactVerificationFailure {
|
|
68
|
+
reason: RegistrationCodeFailure;
|
|
69
|
+
/** The host's own message, when it gave one. */
|
|
70
|
+
message?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare const DEFAULT_CODE_LENGTH = 6;
|
|
73
|
+
export declare const DEFAULT_RESEND_SECONDS = 30;
|
|
74
|
+
export interface UseContactVerificationOptions {
|
|
75
|
+
/** Undefined: the field is not verified and the hook does nothing. */
|
|
76
|
+
config: RegistrationFieldVerification | undefined;
|
|
77
|
+
/** The value now in the field. */
|
|
78
|
+
value: string;
|
|
79
|
+
}
|
|
80
|
+
export interface UseContactVerificationReturn {
|
|
81
|
+
/** True when the field takes part in verification. */
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
status: ContactVerificationStatus;
|
|
84
|
+
/** True once the server has accepted the value. */
|
|
85
|
+
verified: boolean;
|
|
86
|
+
codeLength: number;
|
|
87
|
+
code: string;
|
|
88
|
+
setCode: (code: string) => void;
|
|
89
|
+
failure: ContactVerificationFailure | null;
|
|
90
|
+
/** Seconds left before a new code may be sent; 0 when it may. */
|
|
91
|
+
cooldown: number;
|
|
92
|
+
devCode: string | undefined;
|
|
93
|
+
/** The value the code went to. */
|
|
94
|
+
sentTo: string;
|
|
95
|
+
send: () => void;
|
|
96
|
+
verify: (code?: string) => void;
|
|
97
|
+
/** Back to idle: the person wants to change the value. */
|
|
98
|
+
reset: () => void;
|
|
99
|
+
/** True when the server's "verified" may be changed (`allowChange`)
|
|
100
|
+
* and the field is verified right now. */
|
|
101
|
+
changeable: boolean;
|
|
102
|
+
/** Unlocks a `changeable` field so the value can be edited. */
|
|
103
|
+
unlock: () => void;
|
|
104
|
+
}
|
|
105
|
+
/** Runs one field's verification step. */
|
|
106
|
+
export declare function useContactVerification({ config, value, }: UseContactVerificationOptions): UseContactVerificationReturn;
|
|
107
|
+
//# sourceMappingURL=use-contact-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-contact-verification.d.ts","sourceRoot":"","sources":["../../../src/patterns/registration-form/use-contact-verification.ts"],"names":[],"mappings":"AAeA,iDAAiD;AACjD,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5D,oCAAoC;AACpC,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,SAAS,GACT,cAAc,GACd,OAAO,CAAC;AAEZ,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,OAAO,CAAC;IACZ;gEAC4D;IAC5D,OAAO,C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CodeResult, RegistrationFieldVerification } from './use-contact-verification';
|
|
2
|
+
/** Posts JSON to a path or same-origin URL. Never rejects. */
|
|
3
|
+
export declare function postVerification(url: string, payload: Record<string, string>): Promise<RegistrationCodeResult>;
|
|
4
|
+
/** The two callbacks for a field, whichever way the host configured it. */
|
|
5
|
+
export declare function verificationHandlers(config: RegistrationFieldVerification): {
|
|
6
|
+
onSendCode: (value: string) => Promise<RegistrationCodeResult>;
|
|
7
|
+
onVerifyCode: (value: string, code: string) => Promise<RegistrationCodeResult>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=verification-requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-requests.d.ts","sourceRoot":"","sources":["../../../src/patterns/registration-form/verification-requests.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,sBAAsB,EACtB,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AA0CpC,8DAA8D;AAC9D,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAwDjC;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,6BAA6B,GAAG;IAC3E,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/D,YAAY,EAAE,CACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,CAkBA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SendRegistrationLinkForm, SEND_REGISTRATION_LINK_FIELDS, } from './send-registration-link-form';
|
|
2
|
+
export type { SendRegistrationLinkFormProps, SendRegistrationLinkField, SendRegistrationLinkFieldNames, SendRegistrationLinkValues, SendRegistrationLinkInitialValues, SendRegistrationLinkErrors, SendRegistrationLinkGuidance, SendRegistrationLinkSent, } from './send-registration-link-form';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/send-registration-link-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,6BAA6B,EAC7B,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,iCAAiC,EACjC,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
/** The fields of the form, in the order they appear. */
|
|
3
|
+
export declare const SEND_REGISTRATION_LINK_FIELDS: readonly ["email", "emailConfirm", "phone", "phoneConfirm", "allowLoginUntil"];
|
|
4
|
+
export type SendRegistrationLinkField = (typeof SEND_REGISTRATION_LINK_FIELDS)[number];
|
|
5
|
+
/** What `onSubmit` receives once every check has passed. */
|
|
6
|
+
export interface SendRegistrationLinkValues {
|
|
7
|
+
email: string;
|
|
8
|
+
/** As typed. It matches `email` apart from case and outer spaces. */
|
|
9
|
+
emailConfirm: string;
|
|
10
|
+
/** In E.164 form, e.g. `+393331234567`. */
|
|
11
|
+
phone: string;
|
|
12
|
+
/** In E.164 form. Equal to `phone`. */
|
|
13
|
+
phoneConfirm: string;
|
|
14
|
+
/** `yyyy-MM-dd`. */
|
|
15
|
+
allowLoginUntil: string;
|
|
16
|
+
}
|
|
17
|
+
/** Values to show when the form opens, e.g. after a refused post.
|
|
18
|
+
* `allowLoginUntil` is `yyyy-MM-dd`. */
|
|
19
|
+
export type SendRegistrationLinkInitialValues = Partial<SendRegistrationLinkValues>;
|
|
20
|
+
/** Messages from the server, already translated by the host: one per
|
|
21
|
+
* field, plus `form` for a message about the whole form. */
|
|
22
|
+
export type SendRegistrationLinkErrors = Partial<Record<SendRegistrationLinkField | 'form', string>>;
|
|
23
|
+
/** The host's own form field names, e.g. `send_registration_link[email]`. */
|
|
24
|
+
export type SendRegistrationLinkFieldNames = Partial<Record<SendRegistrationLinkField, string>>;
|
|
25
|
+
/** Guidance for the person sending, in the host's own words. */
|
|
26
|
+
export interface SendRegistrationLinkGuidance {
|
|
27
|
+
/** The notice's heading. Pass it translated. */
|
|
28
|
+
title: string;
|
|
29
|
+
/** One short point each. Pass them translated. Plain text. */
|
|
30
|
+
points: readonly string[];
|
|
31
|
+
}
|
|
32
|
+
/** The result of a send, shown instead of the form. */
|
|
33
|
+
export interface SendRegistrationLinkSent {
|
|
34
|
+
/** The address the email went to. */
|
|
35
|
+
email: string;
|
|
36
|
+
/** The last day the link allows login, `yyyy-MM-dd`. */
|
|
37
|
+
allowLoginUntil: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SendRegistrationLinkFormProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onSubmit'> {
|
|
40
|
+
/** Replaces the heading "Send a registration link". Pass it translated. */
|
|
41
|
+
title?: string;
|
|
42
|
+
/** The heading's level. Default 2, for a page that has its own `h1`. */
|
|
43
|
+
headingLevel?: 1 | 2 | 3;
|
|
44
|
+
/** A warning-style notice above the form. The kit has no copy for it. */
|
|
45
|
+
guidance?: SendRegistrationLinkGuidance;
|
|
46
|
+
/** The first day that can be chosen, `yyyy-MM-dd`. Default: tomorrow. */
|
|
47
|
+
minDate?: string;
|
|
48
|
+
/** The last day that can be chosen, `yyyy-MM-dd`. Default: no limit.
|
|
49
|
+
* Keep it equal to the server's. */
|
|
50
|
+
maxDate?: string;
|
|
51
|
+
/** Values to show when the form opens. Read once. */
|
|
52
|
+
initialValues?: SendRegistrationLinkInitialValues;
|
|
53
|
+
/** Messages from the server. Each shows on its field until the user
|
|
54
|
+
* changes that field, and the form takes focus when they are present
|
|
55
|
+
* at load. */
|
|
56
|
+
errors?: SendRegistrationLinkErrors;
|
|
57
|
+
/** Fields that refuse paste, so the user types them. Default: none.
|
|
58
|
+
* Refusing a paste in `phoneConfirm` is silent: use it with care. */
|
|
59
|
+
blockPaste?: readonly ('email' | 'emailConfirm' | 'phoneConfirm')[];
|
|
60
|
+
/** Replaces the button's "Send registration link". Translated. */
|
|
61
|
+
submitLabel?: string;
|
|
62
|
+
/** True while a React host sends the values. */
|
|
63
|
+
submitting?: boolean;
|
|
64
|
+
/** Shows the result instead of the form. */
|
|
65
|
+
sent?: SendRegistrationLinkSent;
|
|
66
|
+
/** Where "Send another link" leads. Same-site path or full address. */
|
|
67
|
+
sendAnotherHref?: string;
|
|
68
|
+
/** For a native form post: the host's field names. When set, the
|
|
69
|
+
* browser posts the form. */
|
|
70
|
+
fieldNames?: SendRegistrationLinkFieldNames;
|
|
71
|
+
/** Where the post goes. Default: the current address. Same site only. */
|
|
72
|
+
action?: string;
|
|
73
|
+
/** Extra hidden inputs for a native post, by name: the CSRF token. */
|
|
74
|
+
hiddenFields?: Readonly<Record<string, string>>;
|
|
75
|
+
/** For React hosts: called once every check has passed. Not called when
|
|
76
|
+
* `fieldNames` is set. */
|
|
77
|
+
onSubmit?: (values: SendRegistrationLinkValues) => void;
|
|
78
|
+
}
|
|
79
|
+
export declare const SendRegistrationLinkForm: import("react").ForwardRefExoticComponent<SendRegistrationLinkFormProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
80
|
+
//# sourceMappingURL=send-registration-link-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-registration-link-form.d.ts","sourceRoot":"","sources":["../../../src/patterns/send-registration-link-form/send-registration-link-form.tsx"],"names":[],"mappings":"AAWA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAkCf,wDAAwD;AACxD,eAAO,MAAM,6BAA6B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IACxC,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;yCACqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD;;mBAEe;IACf,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC;0EACsE;IACtE,UAAU,CAAC,EAAE,SAAS,CAAC,OAAO,GAAG,cAAc,GAAG,cAAc,CAAC,EAAE,CAAC;IACpE,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;kCAC8B;IAC9B,UAAU,CAAC,EAAE,8BAA8B,CAAC;IAC5C,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD;+BAC2B;IAC3B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,IAAI,CAAC;CACzD;AA6BD,eAAO,MAAM,wBAAwB,0HAsgBpC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** What the host's server needs to sign the Transcribe URL. */
|
|
2
|
+
export interface AwsTranscribeUrlRequest {
|
|
3
|
+
/** An Amazon Transcribe language code, such as `it-IT`. */
|
|
4
|
+
readonly languageCode: string;
|
|
5
|
+
readonly mediaEncoding: 'pcm';
|
|
6
|
+
/** Hz. One of 8000, 16000, 44100 or 48000, matching the audio sent. */
|
|
7
|
+
readonly sampleRate: number;
|
|
8
|
+
}
|
|
9
|
+
export interface AwsTranscribeDictationOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Fetches a pre-signed `wss://transcribestreaming.<region>.amazonaws.com`
|
|
12
|
+
* URL for this request from the host's server. Honour `signal`: it aborts
|
|
13
|
+
* when the user stops before the stream opens.
|
|
14
|
+
*/
|
|
15
|
+
getUrl: (request: AwsTranscribeUrlRequest, signal: AbortSignal) => Promise<string>;
|
|
16
|
+
/** The Transcribe language code, or a function read at each start. */
|
|
17
|
+
languageCode: string | (() => string);
|
|
18
|
+
}
|
|
19
|
+
/** The kit's dictation seam (`onDictate`). */
|
|
20
|
+
export type DictationSession = (ctx: {
|
|
21
|
+
signal: AbortSignal;
|
|
22
|
+
onPartialTranscript: (text: string) => void;
|
|
23
|
+
onFinalTranscript: (text: string) => void;
|
|
24
|
+
}) => Promise<void>;
|
|
25
|
+
export type AwsTranscribeErrorCode =
|
|
26
|
+
/** The browser cannot capture audio or open the stream. */
|
|
27
|
+
'unsupported'
|
|
28
|
+
/** The user or the browser refused the microphone. */
|
|
29
|
+
| 'permission'
|
|
30
|
+
/** The host could not sign a URL. */
|
|
31
|
+
| 'url'
|
|
32
|
+
/** The WebSocket failed. */
|
|
33
|
+
| 'connection'
|
|
34
|
+
/** Transcribe refused or stopped the stream. */
|
|
35
|
+
| 'service';
|
|
36
|
+
export declare class AwsTranscribeError extends Error {
|
|
37
|
+
readonly code: AwsTranscribeErrorCode;
|
|
38
|
+
constructor(code: AwsTranscribeErrorCode, detail?: string);
|
|
39
|
+
}
|
|
40
|
+
/** `it` or `it-IT` → `it-IT`; null for a language this map does not cover. */
|
|
41
|
+
export declare function awsLanguageCode(uiLanguage: string): string | null;
|
|
42
|
+
/** The PCM rate to send for an audio context running at `contextRate`. */
|
|
43
|
+
export declare function transmitSampleRate(contextRate: number): number;
|
|
44
|
+
/** Linear resampling, enough for speech. */
|
|
45
|
+
export declare function resample(input: Float32Array, fromRate: number, toRate: number): Float32Array;
|
|
46
|
+
/** Float samples to little-endian 16-bit PCM. */
|
|
47
|
+
export declare function toPcm16(input: Float32Array): Uint8Array;
|
|
48
|
+
/** The results inside a TranscriptEvent payload. */
|
|
49
|
+
export declare function transcriptResults(payload: unknown): {
|
|
50
|
+
text: string;
|
|
51
|
+
partial: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
/** Whether this browser can run Transcribe dictation at all. */
|
|
54
|
+
export declare function isAwsTranscribeSupported(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Dictation through Amazon Transcribe, for any of the kit's `onDictate` props.
|
|
57
|
+
*
|
|
58
|
+
* Each call is one session: it resolves when the stream ends (after the user
|
|
59
|
+
* stops and Transcribe has sent its last phrase) and rejects with an
|
|
60
|
+
* `AwsTranscribeError` when it cannot start or fails. Finished phrases arrive
|
|
61
|
+
* through `onFinalTranscript`, including one that completes just after the
|
|
62
|
+
* user stops; the phrase being spoken arrives through `onPartialTranscript`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function createAwsTranscribeDictation(options: AwsTranscribeDictationOptions): DictationSession;
|
|
65
|
+
//# sourceMappingURL=aws-transcribe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-transcribe.d.ts","sourceRoot":"","sources":["../../src/speech/aws-transcribe.ts"],"names":[],"mappings":"AAgBA,+DAA+D;AAC/D,MAAM,WAAW,uBAAuB;IACtC,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,MAAM,EAAE,CACN,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sEAAsE;IACtE,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;CACvC;AAED,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE;IACnC,MAAM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zip), which event-stream uses for both checksums. */
|
|
2
|
+
export declare function crc32(bytes: Uint8Array): number;
|
|
3
|
+
export type EventHeaders = Readonly<Record<string, string>>;
|
|
4
|
+
/** One event-stream message. */
|
|
5
|
+
export declare function encodeMessage(headers: EventHeaders, payload: Uint8Array): Uint8Array;
|
|
6
|
+
/** Reads one message. Throws on a truncated or corrupted frame. */
|
|
7
|
+
export declare function decodeMessage(buffer: ArrayBuffer): {
|
|
8
|
+
headers: EventHeaders;
|
|
9
|
+
payload: Uint8Array;
|
|
10
|
+
};
|
|
11
|
+
/** An AudioEvent carrying 16-bit PCM. An empty one ends the stream. */
|
|
12
|
+
export declare function audioEvent(pcm: Uint8Array): Uint8Array;
|
|
13
|
+
//# sourceMappingURL=event-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-stream.d.ts","sourceRoot":"","sources":["../../src/speech/event-stream.ts"],"names":[],"mappings":"AAsBA,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAM/C;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAoC5D,gCAAgC;AAChC,wBAAgB,aAAa,CAC3B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,UAAU,GAClB,UAAU,CAYZ;AAED,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG;IAClD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,UAAU,CAAC;CACrB,CAoCA;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAStD"}
|