@suveren/gateway 0.17.0 → 0.18.1
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/bin/suveren-gateway.js +26 -1
- package/content/guides/1-interview.md +31 -0
- package/content/guides/2-package.md +30 -0
- package/content/guides/3-mandates.md +35 -0
- package/content/guides/4-brief.md +30 -0
- package/content/guides/5-agent-process.md +39 -0
- package/content/guides/6-risks.md +14 -0
- package/dist/control-plane/index.mjs +132 -12
- package/dist/mcp-server/chunk-JUFH4SKS.mjs +639 -0
- package/dist/mcp-server/http.mjs +1733 -205
- package/dist/mcp-server/report-verify-cli.mjs +171 -0
- package/dist/ui/assets/index-78vuGrVE.js +111 -0
- package/dist/ui/assets/{index-y1OFeYnS.css → index-Dfh38n-b.css} +1 -1
- package/dist/ui/index.html +2 -2
- package/node_modules/dayjs/.editorconfig +7 -0
- package/node_modules/dayjs/CHANGELOG.md +1022 -0
- package/node_modules/dayjs/LICENSE +21 -0
- package/node_modules/dayjs/README.md +186 -0
- package/node_modules/dayjs/dayjs.min.js +1 -0
- package/node_modules/dayjs/esm/constant.js +25 -0
- package/node_modules/dayjs/esm/index.d.ts +429 -0
- package/node_modules/dayjs/esm/index.js +541 -0
- package/node_modules/dayjs/esm/locale/af.js +39 -0
- package/node_modules/dayjs/esm/locale/am.js +40 -0
- package/node_modules/dayjs/esm/locale/ar-dz.js +41 -0
- package/node_modules/dayjs/esm/locale/ar-iq.js +42 -0
- package/node_modules/dayjs/esm/locale/ar-kw.js +41 -0
- package/node_modules/dayjs/esm/locale/ar-ly.js +27 -0
- package/node_modules/dayjs/esm/locale/ar-ma.js +42 -0
- package/node_modules/dayjs/esm/locale/ar-sa.js +41 -0
- package/node_modules/dayjs/esm/locale/ar-tn.js +42 -0
- package/node_modules/dayjs/esm/locale/ar.js +81 -0
- package/node_modules/dayjs/esm/locale/az.js +39 -0
- package/node_modules/dayjs/esm/locale/be.js +102 -0
- package/node_modules/dayjs/esm/locale/bg.js +55 -0
- package/node_modules/dayjs/esm/locale/bi.js +39 -0
- package/node_modules/dayjs/esm/locale/bm.js +39 -0
- package/node_modules/dayjs/esm/locale/bn-bd.js +81 -0
- package/node_modules/dayjs/esm/locale/bn.js +72 -0
- package/node_modules/dayjs/esm/locale/bo.js +38 -0
- package/node_modules/dayjs/esm/locale/br.js +93 -0
- package/node_modules/dayjs/esm/locale/bs.js +24 -0
- package/node_modules/dayjs/esm/locale/ca.js +44 -0
- package/node_modules/dayjs/esm/locale/cs.js +120 -0
- package/node_modules/dayjs/esm/locale/cv.js +24 -0
- package/node_modules/dayjs/esm/locale/cy.js +39 -0
- package/node_modules/dayjs/esm/locale/da.js +40 -0
- package/node_modules/dayjs/esm/locale/de-at.js +63 -0
- package/node_modules/dayjs/esm/locale/de-ch.js +63 -0
- package/node_modules/dayjs/esm/locale/de.js +64 -0
- package/node_modules/dayjs/esm/locale/dv.js +39 -0
- package/node_modules/dayjs/esm/locale/el.js +39 -0
- package/node_modules/dayjs/esm/locale/en-au.js +41 -0
- package/node_modules/dayjs/esm/locale/en-ca.js +38 -0
- package/node_modules/dayjs/esm/locale/en-gb.js +42 -0
- package/node_modules/dayjs/esm/locale/en-ie.js +39 -0
- package/node_modules/dayjs/esm/locale/en-il.js +38 -0
- package/node_modules/dayjs/esm/locale/en-in.js +42 -0
- package/node_modules/dayjs/esm/locale/en-nz.js +41 -0
- package/node_modules/dayjs/esm/locale/en-sg.js +39 -0
- package/node_modules/dayjs/esm/locale/en-tt.js +42 -0
- package/node_modules/dayjs/esm/locale/en.js +12 -0
- package/node_modules/dayjs/esm/locale/eo.js +39 -0
- package/node_modules/dayjs/esm/locale/es-do.js +39 -0
- package/node_modules/dayjs/esm/locale/es-mx.js +38 -0
- package/node_modules/dayjs/esm/locale/es-pr.js +39 -0
- package/node_modules/dayjs/esm/locale/es-us.js +38 -0
- package/node_modules/dayjs/esm/locale/es.js +39 -0
- package/node_modules/dayjs/esm/locale/et.js +65 -0
- package/node_modules/dayjs/esm/locale/eu.js +43 -0
- package/node_modules/dayjs/esm/locale/fa.js +39 -0
- package/node_modules/dayjs/esm/locale/fi.js +88 -0
- package/node_modules/dayjs/esm/locale/fo.js +39 -0
- package/node_modules/dayjs/esm/locale/fr-ca.js +38 -0
- package/node_modules/dayjs/esm/locale/fr-ch.js +39 -0
- package/node_modules/dayjs/esm/locale/fr.js +41 -0
- package/node_modules/dayjs/esm/locale/fy.js +39 -0
- package/node_modules/dayjs/esm/locale/ga.js +39 -0
- package/node_modules/dayjs/esm/locale/gd.js +39 -0
- package/node_modules/dayjs/esm/locale/gl.js +39 -0
- package/node_modules/dayjs/esm/locale/gom-latn.js +25 -0
- package/node_modules/dayjs/esm/locale/gu.js +38 -0
- package/node_modules/dayjs/esm/locale/he.js +78 -0
- package/node_modules/dayjs/esm/locale/hi.js +38 -0
- package/node_modules/dayjs/esm/locale/hr.js +53 -0
- package/node_modules/dayjs/esm/locale/ht.js +38 -0
- package/node_modules/dayjs/esm/locale/hu.js +61 -0
- package/node_modules/dayjs/esm/locale/hy-am.js +39 -0
- package/node_modules/dayjs/esm/locale/id.js +39 -0
- package/node_modules/dayjs/esm/locale/index.d.ts +11 -0
- package/node_modules/dayjs/esm/locale/is.js +68 -0
- package/node_modules/dayjs/esm/locale/it-ch.js +39 -0
- package/node_modules/dayjs/esm/locale/it.js +39 -0
- package/node_modules/dayjs/esm/locale/ja.js +45 -0
- package/node_modules/dayjs/esm/locale/jv.js +39 -0
- package/node_modules/dayjs/esm/locale/ka.js +39 -0
- package/node_modules/dayjs/esm/locale/kk.js +39 -0
- package/node_modules/dayjs/esm/locale/km.js +42 -0
- package/node_modules/dayjs/esm/locale/kn.js +38 -0
- package/node_modules/dayjs/esm/locale/ko.js +45 -0
- package/node_modules/dayjs/esm/locale/ku.js +77 -0
- package/node_modules/dayjs/esm/locale/ky.js +39 -0
- package/node_modules/dayjs/esm/locale/lb.js +24 -0
- package/node_modules/dayjs/esm/locale/lo.js +38 -0
- package/node_modules/dayjs/esm/locale/lt.js +70 -0
- package/node_modules/dayjs/esm/locale/lv.js +39 -0
- package/node_modules/dayjs/esm/locale/me.js +24 -0
- package/node_modules/dayjs/esm/locale/mi.js +39 -0
- package/node_modules/dayjs/esm/locale/mk.js +39 -0
- package/node_modules/dayjs/esm/locale/ml.js +38 -0
- package/node_modules/dayjs/esm/locale/mn.js +38 -0
- package/node_modules/dayjs/esm/locale/mr.js +23 -0
- package/node_modules/dayjs/esm/locale/ms-my.js +39 -0
- package/node_modules/dayjs/esm/locale/ms.js +39 -0
- package/node_modules/dayjs/esm/locale/mt.js +39 -0
- package/node_modules/dayjs/esm/locale/my.js +39 -0
- package/node_modules/dayjs/esm/locale/nb.js +40 -0
- package/node_modules/dayjs/esm/locale/ne.js +40 -0
- package/node_modules/dayjs/esm/locale/nl-be.js +39 -0
- package/node_modules/dayjs/esm/locale/nl.js +40 -0
- package/node_modules/dayjs/esm/locale/nn.js +39 -0
- package/node_modules/dayjs/esm/locale/oc-lnc.js +39 -0
- package/node_modules/dayjs/esm/locale/pa-in.js +38 -0
- package/node_modules/dayjs/esm/locale/pl.js +87 -0
- package/node_modules/dayjs/esm/locale/pt-br.js +38 -0
- package/node_modules/dayjs/esm/locale/pt.js +40 -0
- package/node_modules/dayjs/esm/locale/rn.js +39 -0
- package/node_modules/dayjs/esm/locale/ro.js +39 -0
- package/node_modules/dayjs/esm/locale/ru.js +99 -0
- package/node_modules/dayjs/esm/locale/rw.js +35 -0
- package/node_modules/dayjs/esm/locale/sd.js +39 -0
- package/node_modules/dayjs/esm/locale/se.js +39 -0
- package/node_modules/dayjs/esm/locale/si.js +38 -0
- package/node_modules/dayjs/esm/locale/sk.js +121 -0
- package/node_modules/dayjs/esm/locale/sl.js +141 -0
- package/node_modules/dayjs/esm/locale/sq.js +39 -0
- package/node_modules/dayjs/esm/locale/sr-cyrl.js +74 -0
- package/node_modules/dayjs/esm/locale/sr.js +74 -0
- package/node_modules/dayjs/esm/locale/ss.js +39 -0
- package/node_modules/dayjs/esm/locale/sv-fi.js +46 -0
- package/node_modules/dayjs/esm/locale/sv.js +44 -0
- package/node_modules/dayjs/esm/locale/sw.js +39 -0
- package/node_modules/dayjs/esm/locale/ta.js +38 -0
- package/node_modules/dayjs/esm/locale/te.js +38 -0
- package/node_modules/dayjs/esm/locale/tet.js +39 -0
- package/node_modules/dayjs/esm/locale/tg.js +39 -0
- package/node_modules/dayjs/esm/locale/th.js +38 -0
- package/node_modules/dayjs/esm/locale/tk.js +39 -0
- package/node_modules/dayjs/esm/locale/tl-ph.js +39 -0
- package/node_modules/dayjs/esm/locale/tlh.js +24 -0
- package/node_modules/dayjs/esm/locale/tr.js +39 -0
- package/node_modules/dayjs/esm/locale/types.d.ts +33 -0
- package/node_modules/dayjs/esm/locale/tzl.js +24 -0
- package/node_modules/dayjs/esm/locale/tzm-latn.js +39 -0
- package/node_modules/dayjs/esm/locale/tzm.js +39 -0
- package/node_modules/dayjs/esm/locale/ug-cn.js +39 -0
- package/node_modules/dayjs/esm/locale/uk.js +77 -0
- package/node_modules/dayjs/esm/locale/ur.js +39 -0
- package/node_modules/dayjs/esm/locale/uz-latn.js +39 -0
- package/node_modules/dayjs/esm/locale/uz.js +39 -0
- package/node_modules/dayjs/esm/locale/vi.js +43 -0
- package/node_modules/dayjs/esm/locale/x-pseudo.js +39 -0
- package/node_modules/dayjs/esm/locale/yo.js +39 -0
- package/node_modules/dayjs/esm/locale/zh-cn.js +67 -0
- package/node_modules/dayjs/esm/locale/zh-hk.js +65 -0
- package/node_modules/dayjs/esm/locale/zh-tw.js +65 -0
- package/node_modules/dayjs/esm/locale/zh.js +67 -0
- package/node_modules/dayjs/esm/plugin/advancedFormat/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/advancedFormat/index.js +66 -0
- package/node_modules/dayjs/esm/plugin/arraySupport/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/arraySupport/index.js +33 -0
- package/node_modules/dayjs/esm/plugin/badMutable/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/badMutable/index.js +61 -0
- package/node_modules/dayjs/esm/plugin/bigIntSupport/index.d.ts +11 -0
- package/node_modules/dayjs/esm/plugin/bigIntSupport/index.js +32 -0
- package/node_modules/dayjs/esm/plugin/buddhistEra/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/buddhistEra/index.js +21 -0
- package/node_modules/dayjs/esm/plugin/calendar/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/calendar/index.js +32 -0
- package/node_modules/dayjs/esm/plugin/customParseFormat/index.d.ts +8 -0
- package/node_modules/dayjs/esm/plugin/customParseFormat/index.js +333 -0
- package/node_modules/dayjs/esm/plugin/dayOfYear/index.d.ts +11 -0
- package/node_modules/dayjs/esm/plugin/dayOfYear/index.js +9 -0
- package/node_modules/dayjs/esm/plugin/devHelper/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/devHelper/index.js +50 -0
- package/node_modules/dayjs/esm/plugin/duration/index.d.ts +88 -0
- package/node_modules/dayjs/esm/plugin/duration/index.js +357 -0
- package/node_modules/dayjs/esm/plugin/isBetween/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isBetween/index.js +10 -0
- package/node_modules/dayjs/esm/plugin/isLeapYear/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isLeapYear/index.js +7 -0
- package/node_modules/dayjs/esm/plugin/isMoment/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isMoment/index.js +5 -0
- package/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isSameOrAfter/index.js +5 -0
- package/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isSameOrBefore/index.js +5 -0
- package/node_modules/dayjs/esm/plugin/isToday/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isToday/index.js +9 -0
- package/node_modules/dayjs/esm/plugin/isTomorrow/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isTomorrow/index.js +9 -0
- package/node_modules/dayjs/esm/plugin/isYesterday/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isYesterday/index.js +9 -0
- package/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts +27 -0
- package/node_modules/dayjs/esm/plugin/isoWeek/index.js +57 -0
- package/node_modules/dayjs/esm/plugin/isoWeeksInYear/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/isoWeeksInYear/index.js +15 -0
- package/node_modules/dayjs/esm/plugin/localeData/index.d.ts +44 -0
- package/node_modules/dayjs/esm/plugin/localeData/index.js +114 -0
- package/node_modules/dayjs/esm/plugin/localizedFormat/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/localizedFormat/index.js +20 -0
- package/node_modules/dayjs/esm/plugin/localizedFormat/utils.js +20 -0
- package/node_modules/dayjs/esm/plugin/minMax/index.d.ts +22 -0
- package/node_modules/dayjs/esm/plugin/minMax/index.js +39 -0
- package/node_modules/dayjs/esm/plugin/negativeYear/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/negativeYear/index.js +36 -0
- package/node_modules/dayjs/esm/plugin/objectSupport/index.d.ts +48 -0
- package/node_modules/dayjs/esm/plugin/objectSupport/index.js +97 -0
- package/node_modules/dayjs/esm/plugin/pluralGetSet/index.d.ts +44 -0
- package/node_modules/dayjs/esm/plugin/pluralGetSet/index.js +7 -0
- package/node_modules/dayjs/esm/plugin/preParsePostFormat/index.d.ts +4 -0
- package/node_modules/dayjs/esm/plugin/preParsePostFormat/index.js +40 -0
- package/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts +26 -0
- package/node_modules/dayjs/esm/plugin/quarterOfYear/index.js +41 -0
- package/node_modules/dayjs/esm/plugin/relativeTime/index.d.ts +24 -0
- package/node_modules/dayjs/esm/plugin/relativeTime/index.js +130 -0
- package/node_modules/dayjs/esm/plugin/timezone/index.d.ts +20 -0
- package/node_modules/dayjs/esm/plugin/timezone/index.js +205 -0
- package/node_modules/dayjs/esm/plugin/toArray/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/toArray/index.js +7 -0
- package/node_modules/dayjs/esm/plugin/toObject/index.d.ts +20 -0
- package/node_modules/dayjs/esm/plugin/toObject/index.js +15 -0
- package/node_modules/dayjs/esm/plugin/updateLocale/index.d.ts +8 -0
- package/node_modules/dayjs/esm/plugin/updateLocale/index.js +18 -0
- package/node_modules/dayjs/esm/plugin/utc/index.d.ts +19 -0
- package/node_modules/dayjs/esm/plugin/utc/index.js +188 -0
- package/node_modules/dayjs/esm/plugin/weekOfYear/index.d.ts +12 -0
- package/node_modules/dayjs/esm/plugin/weekOfYear/index.js +44 -0
- package/node_modules/dayjs/esm/plugin/weekYear/index.d.ts +10 -0
- package/node_modules/dayjs/esm/plugin/weekYear/index.js +19 -0
- package/node_modules/dayjs/esm/plugin/weekday/index.d.ts +12 -0
- package/node_modules/dayjs/esm/plugin/weekday/index.js +15 -0
- package/node_modules/dayjs/esm/utils.js +58 -0
- package/node_modules/dayjs/index.d.ts +429 -0
- package/node_modules/dayjs/locale/af.js +1 -0
- package/node_modules/dayjs/locale/am.js +1 -0
- package/node_modules/dayjs/locale/ar-dz.js +1 -0
- package/node_modules/dayjs/locale/ar-iq.js +1 -0
- package/node_modules/dayjs/locale/ar-kw.js +1 -0
- package/node_modules/dayjs/locale/ar-ly.js +1 -0
- package/node_modules/dayjs/locale/ar-ma.js +1 -0
- package/node_modules/dayjs/locale/ar-sa.js +1 -0
- package/node_modules/dayjs/locale/ar-tn.js +1 -0
- package/node_modules/dayjs/locale/ar.js +1 -0
- package/node_modules/dayjs/locale/az.js +1 -0
- package/node_modules/dayjs/locale/be.js +1 -0
- package/node_modules/dayjs/locale/bg.js +1 -0
- package/node_modules/dayjs/locale/bi.js +1 -0
- package/node_modules/dayjs/locale/bm.js +1 -0
- package/node_modules/dayjs/locale/bn-bd.js +1 -0
- package/node_modules/dayjs/locale/bn.js +1 -0
- package/node_modules/dayjs/locale/bo.js +1 -0
- package/node_modules/dayjs/locale/br.js +1 -0
- package/node_modules/dayjs/locale/bs.js +1 -0
- package/node_modules/dayjs/locale/ca.js +1 -0
- package/node_modules/dayjs/locale/cs.js +1 -0
- package/node_modules/dayjs/locale/cv.js +1 -0
- package/node_modules/dayjs/locale/cy.js +1 -0
- package/node_modules/dayjs/locale/da.js +1 -0
- package/node_modules/dayjs/locale/de-at.js +1 -0
- package/node_modules/dayjs/locale/de-ch.js +1 -0
- package/node_modules/dayjs/locale/de.js +1 -0
- package/node_modules/dayjs/locale/dv.js +1 -0
- package/node_modules/dayjs/locale/el.js +1 -0
- package/node_modules/dayjs/locale/en-au.js +1 -0
- package/node_modules/dayjs/locale/en-ca.js +1 -0
- package/node_modules/dayjs/locale/en-gb.js +1 -0
- package/node_modules/dayjs/locale/en-ie.js +1 -0
- package/node_modules/dayjs/locale/en-il.js +1 -0
- package/node_modules/dayjs/locale/en-in.js +1 -0
- package/node_modules/dayjs/locale/en-nz.js +1 -0
- package/node_modules/dayjs/locale/en-sg.js +1 -0
- package/node_modules/dayjs/locale/en-tt.js +1 -0
- package/node_modules/dayjs/locale/en.js +1 -0
- package/node_modules/dayjs/locale/eo.js +1 -0
- package/node_modules/dayjs/locale/es-do.js +1 -0
- package/node_modules/dayjs/locale/es-mx.js +1 -0
- package/node_modules/dayjs/locale/es-pr.js +1 -0
- package/node_modules/dayjs/locale/es-us.js +1 -0
- package/node_modules/dayjs/locale/es.js +1 -0
- package/node_modules/dayjs/locale/et.js +1 -0
- package/node_modules/dayjs/locale/eu.js +1 -0
- package/node_modules/dayjs/locale/fa.js +1 -0
- package/node_modules/dayjs/locale/fi.js +1 -0
- package/node_modules/dayjs/locale/fo.js +1 -0
- package/node_modules/dayjs/locale/fr-ca.js +1 -0
- package/node_modules/dayjs/locale/fr-ch.js +1 -0
- package/node_modules/dayjs/locale/fr.js +1 -0
- package/node_modules/dayjs/locale/fy.js +1 -0
- package/node_modules/dayjs/locale/ga.js +1 -0
- package/node_modules/dayjs/locale/gd.js +1 -0
- package/node_modules/dayjs/locale/gl.js +1 -0
- package/node_modules/dayjs/locale/gom-latn.js +1 -0
- package/node_modules/dayjs/locale/gu.js +1 -0
- package/node_modules/dayjs/locale/he.js +1 -0
- package/node_modules/dayjs/locale/hi.js +1 -0
- package/node_modules/dayjs/locale/hr.js +1 -0
- package/node_modules/dayjs/locale/ht.js +1 -0
- package/node_modules/dayjs/locale/hu.js +1 -0
- package/node_modules/dayjs/locale/hy-am.js +1 -0
- package/node_modules/dayjs/locale/id.js +1 -0
- package/node_modules/dayjs/locale/index.d.ts +11 -0
- package/node_modules/dayjs/locale/is.js +1 -0
- package/node_modules/dayjs/locale/it-ch.js +1 -0
- package/node_modules/dayjs/locale/it.js +1 -0
- package/node_modules/dayjs/locale/ja.js +1 -0
- package/node_modules/dayjs/locale/jv.js +1 -0
- package/node_modules/dayjs/locale/ka.js +1 -0
- package/node_modules/dayjs/locale/kk.js +1 -0
- package/node_modules/dayjs/locale/km.js +1 -0
- package/node_modules/dayjs/locale/kn.js +1 -0
- package/node_modules/dayjs/locale/ko.js +1 -0
- package/node_modules/dayjs/locale/ku.js +1 -0
- package/node_modules/dayjs/locale/ky.js +1 -0
- package/node_modules/dayjs/locale/lb.js +1 -0
- package/node_modules/dayjs/locale/lo.js +1 -0
- package/node_modules/dayjs/locale/lt.js +1 -0
- package/node_modules/dayjs/locale/lv.js +1 -0
- package/node_modules/dayjs/locale/me.js +1 -0
- package/node_modules/dayjs/locale/mi.js +1 -0
- package/node_modules/dayjs/locale/mk.js +1 -0
- package/node_modules/dayjs/locale/ml.js +1 -0
- package/node_modules/dayjs/locale/mn.js +1 -0
- package/node_modules/dayjs/locale/mr.js +1 -0
- package/node_modules/dayjs/locale/ms-my.js +1 -0
- package/node_modules/dayjs/locale/ms.js +1 -0
- package/node_modules/dayjs/locale/mt.js +1 -0
- package/node_modules/dayjs/locale/my.js +1 -0
- package/node_modules/dayjs/locale/nb.js +1 -0
- package/node_modules/dayjs/locale/ne.js +1 -0
- package/node_modules/dayjs/locale/nl-be.js +1 -0
- package/node_modules/dayjs/locale/nl.js +1 -0
- package/node_modules/dayjs/locale/nn.js +1 -0
- package/node_modules/dayjs/locale/oc-lnc.js +1 -0
- package/node_modules/dayjs/locale/pa-in.js +1 -0
- package/node_modules/dayjs/locale/pl.js +1 -0
- package/node_modules/dayjs/locale/pt-br.js +1 -0
- package/node_modules/dayjs/locale/pt.js +1 -0
- package/node_modules/dayjs/locale/rn.js +1 -0
- package/node_modules/dayjs/locale/ro.js +1 -0
- package/node_modules/dayjs/locale/ru.js +1 -0
- package/node_modules/dayjs/locale/rw.js +1 -0
- package/node_modules/dayjs/locale/sd.js +1 -0
- package/node_modules/dayjs/locale/se.js +1 -0
- package/node_modules/dayjs/locale/si.js +1 -0
- package/node_modules/dayjs/locale/sk.js +1 -0
- package/node_modules/dayjs/locale/sl.js +1 -0
- package/node_modules/dayjs/locale/sq.js +1 -0
- package/node_modules/dayjs/locale/sr-cyrl.js +1 -0
- package/node_modules/dayjs/locale/sr.js +1 -0
- package/node_modules/dayjs/locale/ss.js +1 -0
- package/node_modules/dayjs/locale/sv-fi.js +1 -0
- package/node_modules/dayjs/locale/sv.js +1 -0
- package/node_modules/dayjs/locale/sw.js +1 -0
- package/node_modules/dayjs/locale/ta.js +1 -0
- package/node_modules/dayjs/locale/te.js +1 -0
- package/node_modules/dayjs/locale/tet.js +1 -0
- package/node_modules/dayjs/locale/tg.js +1 -0
- package/node_modules/dayjs/locale/th.js +1 -0
- package/node_modules/dayjs/locale/tk.js +1 -0
- package/node_modules/dayjs/locale/tl-ph.js +1 -0
- package/node_modules/dayjs/locale/tlh.js +1 -0
- package/node_modules/dayjs/locale/tr.js +1 -0
- package/node_modules/dayjs/locale/types.d.ts +33 -0
- package/node_modules/dayjs/locale/tzl.js +1 -0
- package/node_modules/dayjs/locale/tzm-latn.js +1 -0
- package/node_modules/dayjs/locale/tzm.js +1 -0
- package/node_modules/dayjs/locale/ug-cn.js +1 -0
- package/node_modules/dayjs/locale/uk.js +1 -0
- package/node_modules/dayjs/locale/ur.js +1 -0
- package/node_modules/dayjs/locale/uz-latn.js +1 -0
- package/node_modules/dayjs/locale/uz.js +1 -0
- package/node_modules/dayjs/locale/vi.js +1 -0
- package/node_modules/dayjs/locale/x-pseudo.js +1 -0
- package/node_modules/dayjs/locale/yo.js +1 -0
- package/node_modules/dayjs/locale/zh-cn.js +1 -0
- package/node_modules/dayjs/locale/zh-hk.js +1 -0
- package/node_modules/dayjs/locale/zh-tw.js +1 -0
- package/node_modules/dayjs/locale/zh.js +1 -0
- package/node_modules/dayjs/locale.json +1 -0
- package/node_modules/dayjs/package.json +86 -0
- package/node_modules/dayjs/plugin/advancedFormat.d.ts +4 -0
- package/node_modules/dayjs/plugin/advancedFormat.js +1 -0
- package/node_modules/dayjs/plugin/arraySupport.d.ts +10 -0
- package/node_modules/dayjs/plugin/arraySupport.js +1 -0
- package/node_modules/dayjs/plugin/badMutable.d.ts +4 -0
- package/node_modules/dayjs/plugin/badMutable.js +1 -0
- package/node_modules/dayjs/plugin/bigIntSupport.d.ts +11 -0
- package/node_modules/dayjs/plugin/bigIntSupport.js +1 -0
- package/node_modules/dayjs/plugin/buddhistEra.d.ts +4 -0
- package/node_modules/dayjs/plugin/buddhistEra.js +1 -0
- package/node_modules/dayjs/plugin/calendar.d.ts +10 -0
- package/node_modules/dayjs/plugin/calendar.js +1 -0
- package/node_modules/dayjs/plugin/customParseFormat.d.ts +8 -0
- package/node_modules/dayjs/plugin/customParseFormat.js +1 -0
- package/node_modules/dayjs/plugin/dayOfYear.d.ts +11 -0
- package/node_modules/dayjs/plugin/dayOfYear.js +1 -0
- package/node_modules/dayjs/plugin/devHelper.d.ts +4 -0
- package/node_modules/dayjs/plugin/devHelper.js +1 -0
- package/node_modules/dayjs/plugin/duration.d.ts +88 -0
- package/node_modules/dayjs/plugin/duration.js +1 -0
- package/node_modules/dayjs/plugin/isBetween.d.ts +10 -0
- package/node_modules/dayjs/plugin/isBetween.js +1 -0
- package/node_modules/dayjs/plugin/isLeapYear.d.ts +10 -0
- package/node_modules/dayjs/plugin/isLeapYear.js +1 -0
- package/node_modules/dayjs/plugin/isMoment.d.ts +10 -0
- package/node_modules/dayjs/plugin/isMoment.js +1 -0
- package/node_modules/dayjs/plugin/isSameOrAfter.d.ts +10 -0
- package/node_modules/dayjs/plugin/isSameOrAfter.js +1 -0
- package/node_modules/dayjs/plugin/isSameOrBefore.d.ts +10 -0
- package/node_modules/dayjs/plugin/isSameOrBefore.js +1 -0
- package/node_modules/dayjs/plugin/isToday.d.ts +10 -0
- package/node_modules/dayjs/plugin/isToday.js +1 -0
- package/node_modules/dayjs/plugin/isTomorrow.d.ts +10 -0
- package/node_modules/dayjs/plugin/isTomorrow.js +1 -0
- package/node_modules/dayjs/plugin/isYesterday.d.ts +10 -0
- package/node_modules/dayjs/plugin/isYesterday.js +1 -0
- package/node_modules/dayjs/plugin/isoWeek.d.ts +27 -0
- package/node_modules/dayjs/plugin/isoWeek.js +1 -0
- package/node_modules/dayjs/plugin/isoWeeksInYear.d.ts +10 -0
- package/node_modules/dayjs/plugin/isoWeeksInYear.js +1 -0
- package/node_modules/dayjs/plugin/localeData.d.ts +44 -0
- package/node_modules/dayjs/plugin/localeData.js +1 -0
- package/node_modules/dayjs/plugin/localizedFormat.d.ts +4 -0
- package/node_modules/dayjs/plugin/localizedFormat.js +1 -0
- package/node_modules/dayjs/plugin/minMax.d.ts +22 -0
- package/node_modules/dayjs/plugin/minMax.js +1 -0
- package/node_modules/dayjs/plugin/negativeYear.d.ts +4 -0
- package/node_modules/dayjs/plugin/negativeYear.js +1 -0
- package/node_modules/dayjs/plugin/objectSupport.d.ts +48 -0
- package/node_modules/dayjs/plugin/objectSupport.js +1 -0
- package/node_modules/dayjs/plugin/pluralGetSet.d.ts +44 -0
- package/node_modules/dayjs/plugin/pluralGetSet.js +1 -0
- package/node_modules/dayjs/plugin/preParsePostFormat.d.ts +4 -0
- package/node_modules/dayjs/plugin/preParsePostFormat.js +1 -0
- package/node_modules/dayjs/plugin/quarterOfYear.d.ts +26 -0
- package/node_modules/dayjs/plugin/quarterOfYear.js +1 -0
- package/node_modules/dayjs/plugin/relativeTime.d.ts +24 -0
- package/node_modules/dayjs/plugin/relativeTime.js +1 -0
- package/node_modules/dayjs/plugin/timezone.d.ts +20 -0
- package/node_modules/dayjs/plugin/timezone.js +1 -0
- package/node_modules/dayjs/plugin/toArray.d.ts +10 -0
- package/node_modules/dayjs/plugin/toArray.js +1 -0
- package/node_modules/dayjs/plugin/toObject.d.ts +20 -0
- package/node_modules/dayjs/plugin/toObject.js +1 -0
- package/node_modules/dayjs/plugin/updateLocale.d.ts +8 -0
- package/node_modules/dayjs/plugin/updateLocale.js +1 -0
- package/node_modules/dayjs/plugin/utc.d.ts +19 -0
- package/node_modules/dayjs/plugin/utc.js +1 -0
- package/node_modules/dayjs/plugin/weekOfYear.d.ts +12 -0
- package/node_modules/dayjs/plugin/weekOfYear.js +1 -0
- package/node_modules/dayjs/plugin/weekYear.d.ts +10 -0
- package/node_modules/dayjs/plugin/weekYear.js +1 -0
- package/node_modules/dayjs/plugin/weekday.d.ts +12 -0
- package/node_modules/dayjs/plugin/weekday.js +1 -0
- package/node_modules/deepmerge/.editorconfig +7 -0
- package/node_modules/deepmerge/.eslintcache +1 -0
- package/node_modules/deepmerge/changelog.md +167 -0
- package/node_modules/deepmerge/dist/cjs.js +133 -0
- package/node_modules/deepmerge/dist/umd.js +139 -0
- package/node_modules/deepmerge/index.d.ts +20 -0
- package/node_modules/deepmerge/index.js +106 -0
- package/node_modules/deepmerge/license.txt +21 -0
- package/node_modules/deepmerge/package.json +42 -0
- package/node_modules/deepmerge/readme.md +264 -0
- package/node_modules/deepmerge/rollup.config.js +22 -0
- package/node_modules/dom-serializer/LICENSE +7 -0
- package/node_modules/dom-serializer/README.md +115 -0
- package/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
- package/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
- package/node_modules/dom-serializer/dist/foreign-names.js +15 -0
- package/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
- package/node_modules/dom-serializer/dist/index.d.ts +72 -0
- package/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
- package/node_modules/dom-serializer/dist/index.js +173 -0
- package/node_modules/dom-serializer/dist/index.js.map +1 -0
- package/node_modules/dom-serializer/package.json +69 -0
- package/node_modules/dom-serializer/src/foreign-names.ts +19 -0
- package/node_modules/dom-serializer/src/index.ts +315 -0
- package/node_modules/domelementtype/LICENSE +11 -0
- package/node_modules/domelementtype/dist/index.d.ts +48 -0
- package/node_modules/domelementtype/dist/index.d.ts.map +1 -0
- package/node_modules/domelementtype/dist/index.js +60 -0
- package/node_modules/domelementtype/package.json +59 -0
- package/node_modules/domelementtype/readme.md +1 -0
- package/node_modules/domhandler/LICENSE +11 -0
- package/node_modules/domhandler/dist/index.d.ts +79 -0
- package/node_modules/domhandler/dist/index.d.ts.map +1 -0
- package/node_modules/domhandler/dist/index.js +155 -0
- package/node_modules/domhandler/dist/node.d.ts +264 -0
- package/node_modules/domhandler/dist/node.d.ts.map +1 -0
- package/node_modules/domhandler/dist/node.js +359 -0
- package/node_modules/domhandler/package.json +65 -0
- package/node_modules/domhandler/readme.md +86 -0
- package/node_modules/domutils/LICENSE +11 -0
- package/node_modules/domutils/dist/feeds.d.ts +71 -0
- package/node_modules/domutils/dist/feeds.d.ts.map +1 -0
- package/node_modules/domutils/dist/feeds.js +180 -0
- package/node_modules/domutils/dist/feeds.js.map +1 -0
- package/node_modules/domutils/dist/helpers.d.ts +59 -0
- package/node_modules/domutils/dist/helpers.d.ts.map +1 -0
- package/node_modules/domutils/dist/helpers.js +136 -0
- package/node_modules/domutils/dist/helpers.js.map +1 -0
- package/node_modules/domutils/dist/index.d.ts +8 -0
- package/node_modules/domutils/dist/index.d.ts.map +1 -0
- package/node_modules/domutils/dist/index.js +8 -0
- package/node_modules/domutils/dist/index.js.map +1 -0
- package/node_modules/domutils/dist/legacy.d.ts +79 -0
- package/node_modules/domutils/dist/legacy.d.ts.map +1 -0
- package/node_modules/domutils/dist/legacy.js +152 -0
- package/node_modules/domutils/dist/legacy.js.map +1 -0
- package/node_modules/domutils/dist/manipulation.d.ts +49 -0
- package/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
- package/node_modules/domutils/dist/manipulation.js +138 -0
- package/node_modules/domutils/dist/manipulation.js.map +1 -0
- package/node_modules/domutils/dist/querying.d.ts +54 -0
- package/node_modules/domutils/dist/querying.d.ts.map +1 -0
- package/node_modules/domutils/dist/querying.js +129 -0
- package/node_modules/domutils/dist/querying.js.map +1 -0
- package/node_modules/domutils/dist/stringify.d.ts +46 -0
- package/node_modules/domutils/dist/stringify.d.ts.map +1 -0
- package/node_modules/domutils/dist/stringify.js +81 -0
- package/node_modules/domutils/dist/stringify.js.map +1 -0
- package/node_modules/domutils/dist/traversal.d.ts +74 -0
- package/node_modules/domutils/dist/traversal.d.ts.map +1 -0
- package/node_modules/domutils/dist/traversal.js +105 -0
- package/node_modules/domutils/dist/traversal.js.map +1 -0
- package/node_modules/domutils/package.json +69 -0
- package/node_modules/domutils/readme.md +25 -0
- package/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
- package/node_modules/domutils/src/feeds.ts +301 -0
- package/node_modules/domutils/src/helpers.ts +154 -0
- package/node_modules/domutils/src/index.ts +7 -0
- package/node_modules/domutils/src/legacy.ts +224 -0
- package/node_modules/domutils/src/manipulation.ts +156 -0
- package/node_modules/domutils/src/querying.ts +172 -0
- package/node_modules/domutils/src/stringify.ts +90 -0
- package/node_modules/domutils/src/traversal.ts +132 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
- package/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/entities/dist/decode-codepoint.js +61 -0
- package/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/entities/dist/decode.d.ts +227 -0
- package/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/entities/dist/decode.js +1132 -0
- package/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/entities/dist/encode.d.ts +26 -0
- package/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/entities/dist/encode.js +295 -0
- package/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/entities/dist/escape.d.ts +60 -0
- package/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/entities/dist/escape.js +172 -0
- package/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
- package/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/dist/generated/encode-html.js +3 -0
- package/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/entities/dist/index.d.ts +89 -0
- package/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/entities/dist/index.js +87 -0
- package/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
- package/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
- package/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/entities/dist/internal/decode-shared.js +195 -0
- package/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/entities/package.json +83 -0
- package/node_modules/entities/readme.md +131 -0
- package/node_modules/entities/src/decode-codepoint.ts +69 -0
- package/node_modules/entities/src/decode.ts +1368 -0
- package/node_modules/entities/src/encode.ts +337 -0
- package/node_modules/entities/src/escape.ts +187 -0
- package/node_modules/entities/src/generated/decode-data-html.ts +12 -0
- package/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/entities/src/generated/encode-html.ts +3 -0
- package/node_modules/entities/src/index.ts +160 -0
- package/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
- package/node_modules/entities/src/internal/decode-shared.ts +209 -0
- package/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/node_modules/escape-string-regexp/index.js +13 -0
- package/node_modules/escape-string-regexp/license +9 -0
- package/node_modules/escape-string-regexp/package.json +38 -0
- package/node_modules/escape-string-regexp/readme.md +34 -0
- package/node_modules/express-rate-limit/dist/index.cjs +9 -7
- package/node_modules/express-rate-limit/dist/index.mjs +9 -7
- package/node_modules/express-rate-limit/package.json +9 -9
- package/node_modules/htmlparser2/LICENSE +18 -0
- package/node_modules/htmlparser2/README.md +257 -0
- package/node_modules/htmlparser2/dist/Parser.d.ts +257 -0
- package/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/Parser.js +644 -0
- package/node_modules/htmlparser2/dist/Parser.js.map +1 -0
- package/node_modules/htmlparser2/dist/Tokenizer.d.ts +194 -0
- package/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/Tokenizer.js +1056 -0
- package/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
- package/node_modules/htmlparser2/dist/WritableStream.d.ts +14 -0
- package/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/WritableStream.js +32 -0
- package/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
- package/node_modules/htmlparser2/dist/index.d.ts +34 -0
- package/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/index.js +46 -0
- package/node_modules/htmlparser2/dist/index.js.map +1 -0
- package/node_modules/htmlparser2/package.json +86 -0
- package/node_modules/htmlparser2/src/Parser.ts +823 -0
- package/node_modules/htmlparser2/src/Tokenizer.ts +1150 -0
- package/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
- package/node_modules/htmlparser2/src/WritableStream.ts +42 -0
- package/node_modules/htmlparser2/src/index.ts +86 -0
- package/node_modules/launder/.travis.yml +4 -0
- package/node_modules/launder/CHANGELOG.md +80 -0
- package/node_modules/launder/LICENSE.md +7 -0
- package/node_modules/launder/README.md +177 -0
- package/node_modules/launder/eslint.config.js +6 -0
- package/node_modules/launder/index.js +538 -0
- package/node_modules/launder/logos/logo-box-madefor.png +0 -0
- package/node_modules/launder/package.json +38 -0
- package/node_modules/launder/test/test.js +775 -0
- package/node_modules/nanoid/LICENSE +20 -0
- package/node_modules/nanoid/README.md +39 -0
- package/node_modules/nanoid/async/index.browser.cjs +43 -0
- package/node_modules/nanoid/async/index.browser.js +43 -0
- package/node_modules/nanoid/async/index.cjs +47 -0
- package/node_modules/nanoid/async/index.d.cts +56 -0
- package/node_modules/nanoid/async/index.d.ts +56 -0
- package/node_modules/nanoid/async/index.js +47 -0
- package/node_modules/nanoid/async/index.native.js +38 -0
- package/node_modules/nanoid/async/package.json +12 -0
- package/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/node_modules/nanoid/index.browser.cjs +45 -0
- package/node_modules/nanoid/index.browser.js +45 -0
- package/node_modules/nanoid/index.cjs +63 -0
- package/node_modules/nanoid/index.d.cts +91 -0
- package/node_modules/nanoid/index.d.ts +91 -0
- package/node_modules/nanoid/index.js +63 -0
- package/node_modules/nanoid/nanoid.js +1 -0
- package/node_modules/nanoid/non-secure/index.cjs +24 -0
- package/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/node_modules/nanoid/non-secure/index.js +24 -0
- package/node_modules/nanoid/non-secure/package.json +6 -0
- package/node_modules/nanoid/package.json +89 -0
- package/node_modules/nanoid/url-alphabet/index.cjs +4 -0
- package/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/node_modules/parse-srcset/.jscs.json +83 -0
- package/node_modules/parse-srcset/.jshintrc +15 -0
- package/node_modules/parse-srcset/.npmignore +8 -0
- package/node_modules/parse-srcset/LICENSE +22 -0
- package/node_modules/parse-srcset/README.md +19 -0
- package/node_modules/parse-srcset/package.json +25 -0
- package/node_modules/parse-srcset/src/parse-srcset.js +330 -0
- package/node_modules/parse-srcset/tests/he.js +329 -0
- package/node_modules/parse-srcset/tests/intern.js +74 -0
- package/node_modules/parse-srcset/tests/unit/ps.js +345 -0
- package/node_modules/picocolors/LICENSE +15 -0
- package/node_modules/picocolors/README.md +21 -0
- package/node_modules/picocolors/package.json +25 -0
- package/node_modules/picocolors/picocolors.browser.js +4 -0
- package/node_modules/picocolors/picocolors.d.ts +5 -0
- package/node_modules/picocolors/picocolors.js +75 -0
- package/node_modules/picocolors/types.d.ts +51 -0
- package/node_modules/postcss/LICENSE +20 -0
- package/node_modules/postcss/README.md +27 -0
- package/node_modules/postcss/lib/at-rule.d.ts +139 -0
- package/node_modules/postcss/lib/at-rule.js +25 -0
- package/node_modules/postcss/lib/comment.d.ts +67 -0
- package/node_modules/postcss/lib/comment.js +13 -0
- package/node_modules/postcss/lib/container.d.ts +474 -0
- package/node_modules/postcss/lib/container.js +494 -0
- package/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
- package/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/node_modules/postcss/lib/declaration.d.ts +150 -0
- package/node_modules/postcss/lib/declaration.js +24 -0
- package/node_modules/postcss/lib/document.d.ts +68 -0
- package/node_modules/postcss/lib/document.js +33 -0
- package/node_modules/postcss/lib/fromJSON.d.ts +9 -0
- package/node_modules/postcss/lib/fromJSON.js +107 -0
- package/node_modules/postcss/lib/input.d.ts +226 -0
- package/node_modules/postcss/lib/input.js +282 -0
- package/node_modules/postcss/lib/lazy-result.d.ts +189 -0
- package/node_modules/postcss/lib/lazy-result.js +626 -0
- package/node_modules/postcss/lib/list.d.ts +60 -0
- package/node_modules/postcss/lib/list.js +79 -0
- package/node_modules/postcss/lib/map-generator.js +383 -0
- package/node_modules/postcss/lib/no-work-result.d.ts +45 -0
- package/node_modules/postcss/lib/no-work-result.js +137 -0
- package/node_modules/postcss/lib/node.d.ts +555 -0
- package/node_modules/postcss/lib/node.js +494 -0
- package/node_modules/postcss/lib/parse.d.ts +9 -0
- package/node_modules/postcss/lib/parse.js +42 -0
- package/node_modules/postcss/lib/parser.js +626 -0
- package/node_modules/postcss/lib/postcss.d.mts +66 -0
- package/node_modules/postcss/lib/postcss.d.ts +464 -0
- package/node_modules/postcss/lib/postcss.js +101 -0
- package/node_modules/postcss/lib/postcss.mjs +30 -0
- package/node_modules/postcss/lib/previous-map.d.ts +80 -0
- package/node_modules/postcss/lib/previous-map.js +176 -0
- package/node_modules/postcss/lib/processor.d.ts +114 -0
- package/node_modules/postcss/lib/processor.js +67 -0
- package/node_modules/postcss/lib/result.d.ts +204 -0
- package/node_modules/postcss/lib/result.js +42 -0
- package/node_modules/postcss/lib/root.d.ts +86 -0
- package/node_modules/postcss/lib/root.js +76 -0
- package/node_modules/postcss/lib/rule.d.ts +126 -0
- package/node_modules/postcss/lib/rule.js +27 -0
- package/node_modules/postcss/lib/stringifier.d.ts +45 -0
- package/node_modules/postcss/lib/stringifier.js +457 -0
- package/node_modules/postcss/lib/stringify.d.ts +9 -0
- package/node_modules/postcss/lib/stringify.js +69 -0
- package/node_modules/postcss/lib/symbols.js +5 -0
- package/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/node_modules/postcss/lib/tokenize.js +270 -0
- package/node_modules/postcss/lib/warn-once.js +13 -0
- package/node_modules/postcss/lib/warning.d.ts +146 -0
- package/node_modules/postcss/lib/warning.js +47 -0
- package/node_modules/postcss/package.json +88 -0
- package/node_modules/sanitize-html/LICENSE +7 -0
- package/node_modules/sanitize-html/README.md +877 -0
- package/node_modules/sanitize-html/index.js +1255 -0
- package/node_modules/sanitize-html/package.json +49 -0
- package/node_modules/source-map-js/LICENSE +28 -0
- package/node_modules/source-map-js/README.md +765 -0
- package/node_modules/source-map-js/lib/array-set.js +121 -0
- package/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/node_modules/source-map-js/lib/base64.js +67 -0
- package/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/node_modules/source-map-js/lib/quick-sort.js +141 -0
- package/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
- package/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
- package/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
- package/node_modules/source-map-js/lib/source-map-generator.js +446 -0
- package/node_modules/source-map-js/lib/source-node.d.ts +1 -0
- package/node_modules/source-map-js/lib/source-node.js +420 -0
- package/node_modules/source-map-js/lib/util.js +594 -0
- package/node_modules/source-map-js/package.json +71 -0
- package/node_modules/source-map-js/source-map.d.ts +104 -0
- package/node_modules/source-map-js/source-map.js +8 -0
- package/package.json +5 -1
- package/server.js +3 -0
- package/dist/ui/assets/index-BKgX8_Zh.js +0 -111
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,YAAY,CAAC;AAIpB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6BD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAiBR;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as ElementType from "domelementtype";
|
|
2
|
+
import { encodeXML, escapeAttribute, escapeText } from "entities";
|
|
3
|
+
import { attributeNames, elementNames } from "./foreign-names.js";
|
|
4
|
+
// ── Constants ────────────────────────────────────────────────────────
|
|
5
|
+
/** Elements whose text content is never entity-encoded. */
|
|
6
|
+
const unencodedElements = new Set("style script xmp iframe noembed noframes plaintext noscript".split(" "));
|
|
7
|
+
/** HTML void elements — they cannot have children. */
|
|
8
|
+
const voidElements = new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" "));
|
|
9
|
+
/** Elements that switch the parser into foreign (XML-like) mode. */
|
|
10
|
+
const foreignElements = new Set(["svg", "math"]);
|
|
11
|
+
/**
|
|
12
|
+
* Foreign-mode integration points: children of these elements are parsed
|
|
13
|
+
* as HTML again, not as foreign content.
|
|
14
|
+
*/
|
|
15
|
+
const foreignModeIntegrationPoints = new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));
|
|
16
|
+
// ── Public API ───────────────────────────────────────────────────────
|
|
17
|
+
/**
|
|
18
|
+
* Renders a DOM node or an array of DOM nodes to a string.
|
|
19
|
+
*
|
|
20
|
+
* Can be thought of as the equivalent of the `outerHTML` of the passed
|
|
21
|
+
* node(s).
|
|
22
|
+
* @param node Node to be rendered.
|
|
23
|
+
* @param options Changes serialization behavior
|
|
24
|
+
*/
|
|
25
|
+
export function render(node, options = {}) {
|
|
26
|
+
const nodes = "length" in node ? node : [node];
|
|
27
|
+
/*
|
|
28
|
+
* `xmlMode` is threaded as a separate argument through the internal
|
|
29
|
+
* functions so that foreign-mode transitions (svg/mathml ↔ html) can
|
|
30
|
+
* adjust it without copying the options object on every element.
|
|
31
|
+
*/
|
|
32
|
+
const xmlMode = options.xmlMode ?? false;
|
|
33
|
+
let output = "";
|
|
34
|
+
// eslint-disable-next-line unicorn/no-for-loop
|
|
35
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
36
|
+
output += renderNode(nodes[index], options, xmlMode);
|
|
37
|
+
}
|
|
38
|
+
return output;
|
|
39
|
+
}
|
|
40
|
+
export default render;
|
|
41
|
+
// ── Internal rendering ───────────────────────────────────────────────
|
|
42
|
+
/**
|
|
43
|
+
* Render an array of child nodes (skips the single-node wrapping in `render`).
|
|
44
|
+
* @param children The child nodes to render.
|
|
45
|
+
* @param options The serialization options.
|
|
46
|
+
* @param xmlMode The XML mode to use.
|
|
47
|
+
*/
|
|
48
|
+
function renderChildren(children, options, xmlMode) {
|
|
49
|
+
let output = "";
|
|
50
|
+
// eslint-disable-next-line unicorn/no-for-loop
|
|
51
|
+
for (let index = 0; index < children.length; index++) {
|
|
52
|
+
output += renderNode(children[index], options, xmlMode);
|
|
53
|
+
}
|
|
54
|
+
return output;
|
|
55
|
+
}
|
|
56
|
+
function renderNode(node, options, xmlMode) {
|
|
57
|
+
switch (node.type) {
|
|
58
|
+
case ElementType.Root: {
|
|
59
|
+
return renderChildren(node.children, options, xmlMode);
|
|
60
|
+
}
|
|
61
|
+
case ElementType.Directive: {
|
|
62
|
+
return `<${node.data}>`;
|
|
63
|
+
}
|
|
64
|
+
case ElementType.Comment: {
|
|
65
|
+
return `<!--${node.data}-->`;
|
|
66
|
+
}
|
|
67
|
+
case ElementType.CDATA: {
|
|
68
|
+
return `<![CDATA[${node.children[0].data}]]>`;
|
|
69
|
+
}
|
|
70
|
+
case ElementType.Script:
|
|
71
|
+
case ElementType.Style:
|
|
72
|
+
case ElementType.Tag: {
|
|
73
|
+
return renderTag(node, options, xmlMode);
|
|
74
|
+
}
|
|
75
|
+
case ElementType.Text: {
|
|
76
|
+
const element = node;
|
|
77
|
+
const data = element.data || "";
|
|
78
|
+
/*
|
|
79
|
+
* Skip encoding when entities weren't decoded on input, or when
|
|
80
|
+
* inside a raw-text element (script, style, etc.) in HTML mode.
|
|
81
|
+
*/
|
|
82
|
+
if ((options.encodeEntities ?? options.decodeEntities) !== false &&
|
|
83
|
+
!(!xmlMode &&
|
|
84
|
+
element.parent &&
|
|
85
|
+
unencodedElements.has(element.parent.name))) {
|
|
86
|
+
// `xmlMode: "foreign"` is truthy
|
|
87
|
+
return xmlMode || options.encodeEntities !== "utf8"
|
|
88
|
+
? encodeXML(data)
|
|
89
|
+
: escapeText(data);
|
|
90
|
+
}
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function renderTag(element, options, xmlMode) {
|
|
96
|
+
if (xmlMode === "foreign") {
|
|
97
|
+
// Correct lowercase element names back to their canonical mixed-case form
|
|
98
|
+
element.name = elementNames.get(element.name) ?? element.name;
|
|
99
|
+
// Integration points exit foreign mode: their children are HTML
|
|
100
|
+
if (element.parent &&
|
|
101
|
+
foreignModeIntegrationPoints.has(element.parent.name)) {
|
|
102
|
+
xmlMode = false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (!xmlMode && foreignElements.has(element.name)) {
|
|
106
|
+
xmlMode = "foreign";
|
|
107
|
+
}
|
|
108
|
+
const { name, children } = element;
|
|
109
|
+
// Cache the void-element check — used for both self-closing and closing-tag logic
|
|
110
|
+
const isVoid = !xmlMode && voidElements.has(name);
|
|
111
|
+
let tag = `<${name}${formatAttributes(element.attribs, options, xmlMode)}`;
|
|
112
|
+
if (children.length === 0 &&
|
|
113
|
+
(xmlMode
|
|
114
|
+
? options.selfClosingTags !== false
|
|
115
|
+
: options.selfClosingTags && isVoid)) {
|
|
116
|
+
// XML: `<br/>`, HTML: `<br />`
|
|
117
|
+
tag += xmlMode ? "/>" : " />";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
tag += ">";
|
|
121
|
+
if (children.length > 0) {
|
|
122
|
+
tag += renderChildren(children, options, xmlMode);
|
|
123
|
+
}
|
|
124
|
+
if (!isVoid) {
|
|
125
|
+
tag += `</${name}>`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return tag;
|
|
129
|
+
}
|
|
130
|
+
// ── Attribute formatting ─────────────────────────────────────────────
|
|
131
|
+
function replaceQuotes(value) {
|
|
132
|
+
return value.replaceAll('"', """);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Serialize an element's attribute map to a string.
|
|
136
|
+
*
|
|
137
|
+
* Returns a string with a leading space before each attribute, or an
|
|
138
|
+
* empty string if there are no attributes. This convention lets the
|
|
139
|
+
* caller unconditionally concatenate the result onto the tag name.
|
|
140
|
+
* @param attributes
|
|
141
|
+
* @param options
|
|
142
|
+
* @param xmlMode
|
|
143
|
+
*/
|
|
144
|
+
function formatAttributes(attributes, options, xmlMode) {
|
|
145
|
+
if (!attributes)
|
|
146
|
+
return "";
|
|
147
|
+
/*
|
|
148
|
+
* Pick the right encoder:
|
|
149
|
+
* - Encoding disabled → only escape double-quotes (for valid attributes)
|
|
150
|
+
* - XML / non-utf8 → full numeric entity encoding (encodeXML)
|
|
151
|
+
* - HTML + utf8 → minimal escaping (escapeAttribute)
|
|
152
|
+
*/
|
|
153
|
+
const encode = (options.encodeEntities ?? options.decodeEntities) === false
|
|
154
|
+
? replaceQuotes
|
|
155
|
+
: xmlMode || options.encodeEntities !== "utf8"
|
|
156
|
+
? encodeXML
|
|
157
|
+
: escapeAttribute;
|
|
158
|
+
const isForeign = xmlMode === "foreign";
|
|
159
|
+
const showEmpty = !!(options.emptyAttrs ?? xmlMode);
|
|
160
|
+
let result = "";
|
|
161
|
+
for (const key in attributes) {
|
|
162
|
+
if (!Object.hasOwn(attributes, key))
|
|
163
|
+
continue;
|
|
164
|
+
const value = attributes[key];
|
|
165
|
+
const k = isForeign ? (attributeNames.get(key) ?? key) : key;
|
|
166
|
+
result +=
|
|
167
|
+
!showEmpty && (value == null || value === "")
|
|
168
|
+
? ` ${k}`
|
|
169
|
+
: ` ${k}="${encode(value == null ? "" : String(value))}"`;
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAS9C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+DlE,wEAAwE;AAExE,2DAA2D;AAC3D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,6DAA6D,CAAC,KAAK,CAAC,GAAG,CAAC,CACzE,CAAC;AAEF,sDAAsD;AACtD,MAAM,YAAY,GAAG,IAAI,GAAG,CAC1B,4GAA4G,CAAC,KAAK,CAChH,GAAG,CACJ,CACF,CAAC;AAEF,oEAAoE;AACpE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAC1C,2DAA2D,CAAC,KAAK,CAAC,GAAG,CAAC,CACvE,CAAC;AAEF,wEAAwE;AAExE;;;;;;;GAOG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AAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;IAChE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "dom-serializer",
|
|
4
|
+
"version": "3.1.1",
|
|
5
|
+
"description": "render domhandler DOM nodes to a string",
|
|
6
|
+
"author": "Felix Boehm <me@feedic.com>",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"keywords": [
|
|
9
|
+
"html",
|
|
10
|
+
"xml",
|
|
11
|
+
"render"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git://github.com/cheeriojs/dom-serializer.git"
|
|
16
|
+
},
|
|
17
|
+
"main": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"src",
|
|
28
|
+
"!**/*.spec.ts",
|
|
29
|
+
"!**/*.bench.ts"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"domelementtype": "^3.0.0",
|
|
33
|
+
"domhandler": "^6.0.0",
|
|
34
|
+
"entities": "^8.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@biomejs/biome": "^2.4.14",
|
|
38
|
+
"@eslint/compat": "^2.0.5",
|
|
39
|
+
"@feedic/eslint-config": "^0.4.1",
|
|
40
|
+
"@types/node": "^25.6.0",
|
|
41
|
+
"cheerio": "^1.2.0",
|
|
42
|
+
"eslint": "^10.3.0",
|
|
43
|
+
"eslint-config-biome": "^2.1.3",
|
|
44
|
+
"typescript": "^6.0.2",
|
|
45
|
+
"typescript-eslint": "^8.59.1",
|
|
46
|
+
"vitest": "^4.1.5"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=20.19.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc",
|
|
53
|
+
"format": "npm run format:es && npm run format:biome",
|
|
54
|
+
"format:biome": "biome check --write .",
|
|
55
|
+
"format:es": "npm run lint:es -- --fix",
|
|
56
|
+
"lint": "npm run lint:es && npm run lint:ts && npm run lint:biome",
|
|
57
|
+
"lint:biome": "biome check .",
|
|
58
|
+
"lint:es": "eslint .",
|
|
59
|
+
"lint:ts": "tsc --noEmit -p tsconfig.eslint.json",
|
|
60
|
+
"prepare": "npm run build",
|
|
61
|
+
"test": "npm run test:vi && npm run lint",
|
|
62
|
+
"test:vi": "vitest run"
|
|
63
|
+
},
|
|
64
|
+
"funding": {
|
|
65
|
+
"type": "github",
|
|
66
|
+
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
|
67
|
+
},
|
|
68
|
+
"license": "MIT"
|
|
69
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mixed-case SVG and MathML element names recognized in foreign content.
|
|
3
|
+
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
|
|
4
|
+
*/
|
|
5
|
+
export const elementNames = new Map<string, string>(
|
|
6
|
+
"altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath"
|
|
7
|
+
.split(" ")
|
|
8
|
+
.map((name) => [name.toLowerCase(), name]),
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Mixed-case SVG and MathML attribute names recognized in foreign content.
|
|
13
|
+
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
|
|
14
|
+
*/
|
|
15
|
+
export const attributeNames = new Map<string, string>(
|
|
16
|
+
"definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan"
|
|
17
|
+
.split(" ")
|
|
18
|
+
.map((name) => [name.toLowerCase(), name]),
|
|
19
|
+
);
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import * as ElementType from "domelementtype";
|
|
2
|
+
import type {
|
|
3
|
+
AnyNode,
|
|
4
|
+
CDATA,
|
|
5
|
+
Comment,
|
|
6
|
+
Element,
|
|
7
|
+
ProcessingInstruction,
|
|
8
|
+
Text,
|
|
9
|
+
} from "domhandler";
|
|
10
|
+
import { encodeXML, escapeAttribute, escapeText } from "entities";
|
|
11
|
+
import { attributeNames, elementNames } from "./foreign-names.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Options for DOM serialization.
|
|
15
|
+
*/
|
|
16
|
+
export interface DomSerializerOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Print an empty attribute's value.
|
|
19
|
+
* @default xmlMode
|
|
20
|
+
* @example With <code>emptyAttrs: false</code>: <code><input checked></code>
|
|
21
|
+
* @example With <code>emptyAttrs: true</code>: <code><input checked=""></code>
|
|
22
|
+
*/
|
|
23
|
+
emptyAttrs?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Print self-closing tags for tags without contents. If `xmlMode` is set,
|
|
26
|
+
* this will apply to all tags. Otherwise, only tags that are defined as
|
|
27
|
+
* self-closing in the HTML specification will be printed as such.
|
|
28
|
+
* @default xmlMode
|
|
29
|
+
* @example With <code>selfClosingTags: false</code>: <code><foo></foo><br></br></code>
|
|
30
|
+
* @example With <code>xmlMode: true</code> and <code>selfClosingTags: true</code>: <code><foo/><br/></code>
|
|
31
|
+
* @example With <code>xmlMode: false</code> and <code>selfClosingTags: true</code>: <code><foo></foo><br /></code>
|
|
32
|
+
*/
|
|
33
|
+
selfClosingTags?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Treat the input as an XML document; enables the `emptyAttrs` and
|
|
36
|
+
* `selfClosingTags` options.
|
|
37
|
+
*
|
|
38
|
+
* If the value is `"foreign"`, it will try to correct mixed-case attribute
|
|
39
|
+
* names.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
xmlMode?: boolean | "foreign";
|
|
43
|
+
/**
|
|
44
|
+
* Encode characters reserved in HTML or XML in text and attribute values.
|
|
45
|
+
*
|
|
46
|
+
* If `xmlMode` is set or the value is not `'utf8'`, characters outside the
|
|
47
|
+
* ASCII range will also be encoded as numeric entities.
|
|
48
|
+
*
|
|
49
|
+
* **Security:** Setting this to `false` disables encoding of `<`, `>`, `&`,
|
|
50
|
+
* and (in attribute values) `'` — only `"` in attribute values is escaped.
|
|
51
|
+
* This is safe for the round-trip case (DOM was parsed with
|
|
52
|
+
* `decodeEntities: false`, so any markup characters in text or attribute
|
|
53
|
+
* values exist only as entity references), and unsafe otherwise. If text
|
|
54
|
+
* or attribute values in the DOM contain raw `<`, `>`, or `&`, those
|
|
55
|
+
* characters will appear literally in the output.
|
|
56
|
+
* @default `decodeEntities`
|
|
57
|
+
*/
|
|
58
|
+
encodeEntities?: boolean | "utf8";
|
|
59
|
+
/**
|
|
60
|
+
* Default for `encodeEntities`. Named to match the parser option of the
|
|
61
|
+
* same name so a single options object can be threaded through parse and
|
|
62
|
+
* serialize for a faithful round-trip — for example, cheerio parses with
|
|
63
|
+
* `decodeEntities: false` to preserve entity references and passes the
|
|
64
|
+
* same option here so they are not re-encoded.
|
|
65
|
+
*
|
|
66
|
+
* Despite the name, on the serializer this option controls *encoding*.
|
|
67
|
+
* Setting it to `false` carries the same caveat as `encodeEntities: false`
|
|
68
|
+
* — see that option.
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
decodeEntities?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ── Constants ────────────────────────────────────────────────────────
|
|
75
|
+
|
|
76
|
+
/** Elements whose text content is never entity-encoded. */
|
|
77
|
+
const unencodedElements = new Set(
|
|
78
|
+
"style script xmp iframe noembed noframes plaintext noscript".split(" "),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
/** HTML void elements — they cannot have children. */
|
|
82
|
+
const voidElements = new Set(
|
|
83
|
+
"area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(
|
|
84
|
+
" ",
|
|
85
|
+
),
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/** Elements that switch the parser into foreign (XML-like) mode. */
|
|
89
|
+
const foreignElements = new Set(["svg", "math"]);
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Foreign-mode integration points: children of these elements are parsed
|
|
93
|
+
* as HTML again, not as foreign content.
|
|
94
|
+
*/
|
|
95
|
+
const foreignModeIntegrationPoints = new Set(
|
|
96
|
+
"mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "),
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
// ── Public API ───────────────────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Renders a DOM node or an array of DOM nodes to a string.
|
|
103
|
+
*
|
|
104
|
+
* Can be thought of as the equivalent of the `outerHTML` of the passed
|
|
105
|
+
* node(s).
|
|
106
|
+
* @param node Node to be rendered.
|
|
107
|
+
* @param options Changes serialization behavior
|
|
108
|
+
*/
|
|
109
|
+
export function render(
|
|
110
|
+
node: AnyNode | ArrayLike<AnyNode>,
|
|
111
|
+
options: DomSerializerOptions = {},
|
|
112
|
+
): string {
|
|
113
|
+
const nodes = "length" in node ? node : [node];
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* `xmlMode` is threaded as a separate argument through the internal
|
|
117
|
+
* functions so that foreign-mode transitions (svg/mathml ↔ html) can
|
|
118
|
+
* adjust it without copying the options object on every element.
|
|
119
|
+
*/
|
|
120
|
+
const xmlMode = options.xmlMode ?? false;
|
|
121
|
+
|
|
122
|
+
let output = "";
|
|
123
|
+
// eslint-disable-next-line unicorn/no-for-loop
|
|
124
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
125
|
+
output += renderNode(nodes[index], options, xmlMode);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return output;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export default render;
|
|
132
|
+
|
|
133
|
+
// ── Internal rendering ───────────────────────────────────────────────
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Render an array of child nodes (skips the single-node wrapping in `render`).
|
|
137
|
+
* @param children The child nodes to render.
|
|
138
|
+
* @param options The serialization options.
|
|
139
|
+
* @param xmlMode The XML mode to use.
|
|
140
|
+
*/
|
|
141
|
+
function renderChildren(
|
|
142
|
+
children: ArrayLike<AnyNode>,
|
|
143
|
+
options: DomSerializerOptions,
|
|
144
|
+
xmlMode: boolean | "foreign",
|
|
145
|
+
): string {
|
|
146
|
+
let output = "";
|
|
147
|
+
// eslint-disable-next-line unicorn/no-for-loop
|
|
148
|
+
for (let index = 0; index < children.length; index++) {
|
|
149
|
+
output += renderNode(children[index], options, xmlMode);
|
|
150
|
+
}
|
|
151
|
+
return output;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function renderNode(
|
|
155
|
+
node: AnyNode,
|
|
156
|
+
options: DomSerializerOptions,
|
|
157
|
+
xmlMode: boolean | "foreign",
|
|
158
|
+
): string {
|
|
159
|
+
switch (node.type) {
|
|
160
|
+
case ElementType.Root: {
|
|
161
|
+
return renderChildren(node.children, options, xmlMode);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
case ElementType.Directive: {
|
|
165
|
+
return `<${(node as ProcessingInstruction).data}>`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
case ElementType.Comment: {
|
|
169
|
+
return `<!--${(node as Comment).data}-->`;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
case ElementType.CDATA: {
|
|
173
|
+
return `<![CDATA[${((node as CDATA).children[0] as Text).data}]]>`;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
case ElementType.Script:
|
|
177
|
+
case ElementType.Style:
|
|
178
|
+
case ElementType.Tag: {
|
|
179
|
+
return renderTag(node as Element, options, xmlMode);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
case ElementType.Text: {
|
|
183
|
+
const element = node as Text;
|
|
184
|
+
const data = element.data || "";
|
|
185
|
+
|
|
186
|
+
/*
|
|
187
|
+
* Skip encoding when entities weren't decoded on input, or when
|
|
188
|
+
* inside a raw-text element (script, style, etc.) in HTML mode.
|
|
189
|
+
*/
|
|
190
|
+
if (
|
|
191
|
+
(options.encodeEntities ?? options.decodeEntities) !== false &&
|
|
192
|
+
!(
|
|
193
|
+
!xmlMode &&
|
|
194
|
+
element.parent &&
|
|
195
|
+
unencodedElements.has((element.parent as Element).name)
|
|
196
|
+
)
|
|
197
|
+
) {
|
|
198
|
+
// `xmlMode: "foreign"` is truthy
|
|
199
|
+
return xmlMode || options.encodeEntities !== "utf8"
|
|
200
|
+
? encodeXML(data)
|
|
201
|
+
: escapeText(data);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return data;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function renderTag(
|
|
210
|
+
element: Element,
|
|
211
|
+
options: DomSerializerOptions,
|
|
212
|
+
xmlMode: boolean | "foreign",
|
|
213
|
+
) {
|
|
214
|
+
if (xmlMode === "foreign") {
|
|
215
|
+
// Correct lowercase element names back to their canonical mixed-case form
|
|
216
|
+
element.name = elementNames.get(element.name) ?? element.name;
|
|
217
|
+
|
|
218
|
+
// Integration points exit foreign mode: their children are HTML
|
|
219
|
+
if (
|
|
220
|
+
element.parent &&
|
|
221
|
+
foreignModeIntegrationPoints.has((element.parent as Element).name)
|
|
222
|
+
) {
|
|
223
|
+
xmlMode = false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (!xmlMode && foreignElements.has(element.name)) {
|
|
228
|
+
xmlMode = "foreign";
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const { name, children } = element;
|
|
232
|
+
|
|
233
|
+
// Cache the void-element check — used for both self-closing and closing-tag logic
|
|
234
|
+
const isVoid = !xmlMode && voidElements.has(name);
|
|
235
|
+
|
|
236
|
+
let tag = `<${name}${formatAttributes(element.attribs, options, xmlMode)}`;
|
|
237
|
+
|
|
238
|
+
if (
|
|
239
|
+
children.length === 0 &&
|
|
240
|
+
(xmlMode
|
|
241
|
+
? options.selfClosingTags !== false
|
|
242
|
+
: options.selfClosingTags && isVoid)
|
|
243
|
+
) {
|
|
244
|
+
// XML: `<br/>`, HTML: `<br />`
|
|
245
|
+
tag += xmlMode ? "/>" : " />";
|
|
246
|
+
} else {
|
|
247
|
+
tag += ">";
|
|
248
|
+
|
|
249
|
+
if (children.length > 0) {
|
|
250
|
+
tag += renderChildren(children, options, xmlMode);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if (!isVoid) {
|
|
254
|
+
tag += `</${name}>`;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return tag;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// ── Attribute formatting ─────────────────────────────────────────────
|
|
262
|
+
|
|
263
|
+
function replaceQuotes(value: string): string {
|
|
264
|
+
return value.replaceAll('"', """);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Serialize an element's attribute map to a string.
|
|
269
|
+
*
|
|
270
|
+
* Returns a string with a leading space before each attribute, or an
|
|
271
|
+
* empty string if there are no attributes. This convention lets the
|
|
272
|
+
* caller unconditionally concatenate the result onto the tag name.
|
|
273
|
+
* @param attributes
|
|
274
|
+
* @param options
|
|
275
|
+
* @param xmlMode
|
|
276
|
+
*/
|
|
277
|
+
function formatAttributes(
|
|
278
|
+
attributes: Record<string, unknown> | undefined,
|
|
279
|
+
options: DomSerializerOptions,
|
|
280
|
+
xmlMode: boolean | "foreign",
|
|
281
|
+
) {
|
|
282
|
+
if (!attributes) return "";
|
|
283
|
+
|
|
284
|
+
/*
|
|
285
|
+
* Pick the right encoder:
|
|
286
|
+
* - Encoding disabled → only escape double-quotes (for valid attributes)
|
|
287
|
+
* - XML / non-utf8 → full numeric entity encoding (encodeXML)
|
|
288
|
+
* - HTML + utf8 → minimal escaping (escapeAttribute)
|
|
289
|
+
*/
|
|
290
|
+
const encode =
|
|
291
|
+
(options.encodeEntities ?? options.decodeEntities) === false
|
|
292
|
+
? replaceQuotes
|
|
293
|
+
: xmlMode || options.encodeEntities !== "utf8"
|
|
294
|
+
? encodeXML
|
|
295
|
+
: escapeAttribute;
|
|
296
|
+
|
|
297
|
+
const isForeign = xmlMode === "foreign";
|
|
298
|
+
const showEmpty = !!(options.emptyAttrs ?? xmlMode);
|
|
299
|
+
|
|
300
|
+
let result = "";
|
|
301
|
+
|
|
302
|
+
for (const key in attributes) {
|
|
303
|
+
if (!Object.hasOwn(attributes, key)) continue;
|
|
304
|
+
|
|
305
|
+
const value = attributes[key];
|
|
306
|
+
const k = isForeign ? (attributeNames.get(key) ?? key) : key;
|
|
307
|
+
|
|
308
|
+
result +=
|
|
309
|
+
!showEmpty && (value == null || value === "")
|
|
310
|
+
? ` ${k}`
|
|
311
|
+
: ` ${k}="${encode(value == null ? "" : String(value))}"`;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return result;
|
|
315
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright (c) Felix Böhm
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
+
|
|
8
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
+
|
|
10
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
11
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Types of elements found in htmlparser2's DOM */
|
|
2
|
+
export declare enum ElementType {
|
|
3
|
+
/** Type for the root element of a document */
|
|
4
|
+
Root = "root",
|
|
5
|
+
/** Type for Text */
|
|
6
|
+
Text = "text",
|
|
7
|
+
/** Type for <? ... ?> */
|
|
8
|
+
Directive = "directive",
|
|
9
|
+
/** Type for <!-- ... --> */
|
|
10
|
+
Comment = "comment",
|
|
11
|
+
/** Type for <script> tags */
|
|
12
|
+
Script = "script",
|
|
13
|
+
/** Type for <style> tags */
|
|
14
|
+
Style = "style",
|
|
15
|
+
/** Type for Any tag */
|
|
16
|
+
Tag = "tag",
|
|
17
|
+
/** Type for <![CDATA[ ... ]]> */
|
|
18
|
+
CDATA = "cdata",
|
|
19
|
+
/** Type for <!doctype ...> */
|
|
20
|
+
Doctype = "doctype"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Tests whether an element is a tag or not.
|
|
24
|
+
* @param element Element to test
|
|
25
|
+
* @param element.type Node type discriminator to check.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isTag(element: {
|
|
28
|
+
type: ElementType;
|
|
29
|
+
}): boolean;
|
|
30
|
+
/** Type for the root element of a document */
|
|
31
|
+
export declare const Root: ElementType.Root;
|
|
32
|
+
/** Type for Text */
|
|
33
|
+
export declare const Text: ElementType.Text;
|
|
34
|
+
/** Type for <? ... ?> */
|
|
35
|
+
export declare const Directive: ElementType.Directive;
|
|
36
|
+
/** Type for <!-- ... --> */
|
|
37
|
+
export declare const Comment: ElementType.Comment;
|
|
38
|
+
/** Type for <script> tags */
|
|
39
|
+
export declare const Script: ElementType.Script;
|
|
40
|
+
/** Type for <style> tags */
|
|
41
|
+
export declare const Style: ElementType.Style;
|
|
42
|
+
/** Type for Any tag */
|
|
43
|
+
export declare const Tag: ElementType.Tag;
|
|
44
|
+
/** Type for <![CDATA[ ... ]]> */
|
|
45
|
+
export declare const CDATA: ElementType.CDATA;
|
|
46
|
+
/** Type for <!doctype ...> */
|
|
47
|
+
export declare const Doctype: ElementType.Doctype;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceR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