@siteping/widget 0.9.6 → 0.9.8
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/README.md +1 -1
- package/dist/chunk-OTJZRTBK.js +1751 -0
- package/dist/chunk-OTJZRTBK.js.map +1 -0
- package/dist/de-32TXJQIE.js +2 -0
- package/dist/de-32TXJQIE.js.map +1 -0
- package/dist/es-GFAPKPTK.js +2 -0
- package/dist/es-GFAPKPTK.js.map +1 -0
- package/dist/fr-W2JZ3EUC.js +2 -0
- package/dist/fr-W2JZ3EUC.js.map +1 -0
- package/dist/index.global.js +413 -196
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +59 -1617
- package/dist/index.js.map +1 -1
- package/dist/it-GASU527B.js +2 -0
- package/dist/it-GASU527B.js.map +1 -0
- package/dist/panel-HDPPIATU.js +2 -0
- package/dist/panel-HDPPIATU.js.map +1 -0
- package/dist/pt-AYXM6FG4.js +2 -0
- package/dist/pt-AYXM6FG4.js.map +1 -0
- package/dist/react.d.ts +59 -0
- package/dist/react.js +1568 -0
- package/dist/react.js.map +1 -0
- package/dist/ru-5DW2JCKR.js +2 -0
- package/dist/ru-5DW2JCKR.js.map +1 -0
- package/dist/schema.d.ts +19 -0
- package/dist/siteping-core.d.ts +5 -1
- package/dist/types.d.ts +209 -0
- package/package.json +28 -5
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={"panel.title":"\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C","panel.ariaLabel":"\u041F\u0430\u043D\u0435\u043B\u044C \u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0441\u0432\u044F\u0437\u0438 Siteping","panel.feedbackList":"\u0421\u043F\u0438\u0441\u043E\u043A \u043E\u0442\u0437\u044B\u0432\u043E\u0432","panel.loading":"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043E\u0442\u0437\u044B\u0432\u043E\u0432","panel.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C","panel.deleteAll":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0451","panel.deleteAllConfirmTitle":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0451","panel.deleteAllConfirmMessage":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043E\u0442\u0437\u044B\u0432\u044B \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430? \u042D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u043E.","panel.search":"\u041F\u043E\u0438\u0441\u043A...","panel.searchAria":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043E\u0442\u0437\u044B\u0432\u0430\u043C","panel.filterAll":"\u0412\u0441\u0435","panel.loadError":"\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438","panel.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","panel.empty":"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u043E\u0442\u0437\u044B\u0432\u043E\u0432","panel.showMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435","panel.showLess":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435","panel.resolve":"\u0420\u0435\u0448\u0435\u043D\u043E","panel.reopen":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0437\u0430\u043D\u043E\u0432\u043E","panel.delete":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","panel.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","panel.confirmDelete":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","panel.loadMore":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 ({remaining} \u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C)","panel.statusAll":"\u0412\u0441\u0435","panel.statusOpen":"\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435","panel.statusResolved":"\u0420\u0435\u0448\u0451\u043D\u043D\u044B\u0435","type.label":"\u0422\u0438\u043F","type.question":"\u0412\u043E\u043F\u0440\u043E\u0441","type.change":"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435","type.bug":"\u0411\u0430\u0433","type.other":"\u0414\u0440\u0443\u0433\u043E\u0435","status.label":"\u0421\u0442\u0430\u0442\u0443\u0441","scope.label":"\u041E\u0431\u043B\u0430\u0441\u0442\u044C","scope.thisPage":"\u042D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430","scope.thisType":"\u042D\u0442\u043E\u0442 \u0442\u0438\u043F","scope.all":"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B","fab.aria":"Siteping \u2014 \u041C\u0435\u043D\u044E \u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0441\u0432\u044F\u0437\u0438","fab.messages":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F","fab.annotate":"\u0410\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u044F","fab.annotations":"\u0410\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u0438","annotator.instruction":"\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0434\u043B\u044F \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F","annotator.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","popup.ariaLabel":"\u0424\u043E\u0440\u043C\u0430 \u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0441\u0432\u044F\u0437\u0438","popup.placeholder":"\u041E\u043F\u0438\u0448\u0438\u0442\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0443 \u0438\u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435...","popup.textareaAria":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","popup.submitHintMac":"\u2318+Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C","popup.submitHintOther":"Ctrl+Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C","popup.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","popup.submit":"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C","identity.title":"\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044C\u0442\u0435\u0441\u044C","identity.nameLabel":"\u0418\u043C\u044F","identity.namePlaceholder":"\u0412\u0430\u0448\u0435 \u0438\u043C\u044F","identity.emailLabel":"Email","identity.emailPlaceholder":"\u0432\u0430\u0448@email.com","identity.cancel":"\u041E\u0442\u043C\u0435\u043D\u0430","identity.submit":"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C","marker.approximate":"\u041F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F (\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044C: {confidence}%)","marker.aria":"\u041E\u0442\u0437\u044B\u0432 #{number}: {type} \u2014 {message}","marker.count":"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043E \u043C\u0430\u0440\u043A\u0435\u0440\u043E\u0432 \u043E\u0442\u0437\u044B\u0432\u043E\u0432: {count}","fab.badge":"\u041D\u0435\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0445 \u043E\u0442\u0437\u044B\u0432\u043E\u0432: {count}","feedback.sent.confirmation":"\u041E\u0442\u0437\u044B\u0432 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D","feedback.error.message":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0437\u044B\u0432","feedback.deleted.confirmation":"\u041E\u0442\u0437\u044B\u0432 \u0443\u0434\u0430\u043B\u0451\u043D","badge.count":"\u041D\u0435\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0445 \u043E\u0442\u0437\u044B\u0432\u043E\u0432: {count}","bulk.selectAll":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435","bulk.selected":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {count}","bulk.resolve":"\u0420\u0435\u0448\u0438\u0442\u044C","bulk.delete":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","bulk.deselect":"\u0421\u043D\u044F\u0442\u044C \u0432\u044B\u0431\u043E\u0440","sort.newest":"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043D\u043E\u0432\u044B\u0435","sort.oldest":"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u0442\u0430\u0440\u044B\u0435","sort.byType":"\u041F\u043E \u0442\u0438\u043F\u0443","sort.openFirst":"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435","sort.label":"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430","group.byPage":"\u041F\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435","group.feedbacks":"\u041E\u0442\u0437\u044B\u0432\u043E\u0432: {count}","stats.open":"\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435","stats.resolved":"\u0420\u0435\u0448\u0451\u043D\u043D\u044B\u0435","stats.bugs":"\u0411\u0430\u0433\u0438","stats.progress":"\u0420\u0435\u0448\u0435\u043D\u043E: {percent}%","detail.back":"\u041D\u0430\u0437\u0430\u0434","detail.title":"\u041E\u0442\u0437\u044B\u0432 #{number}","detail.status":"\u0421\u0442\u0430\u0442\u0443\u0441","detail.message":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435","detail.screenshot":"\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442","detail.screenshotAlt":"\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438","detail.metadata":"\u0414\u0435\u0442\u0430\u043B\u0438","detail.annotation":"\u0410\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u044F","detail.page":"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430","detail.author":"\u0410\u0432\u0442\u043E\u0440","detail.date":"\u0421\u043E\u0437\u0434\u0430\u043D","detail.viewport":"Viewport","detail.browser":"\u0411\u0440\u0430\u0443\u0437\u0435\u0440","detail.resolvedAt":"\u0420\u0435\u0448\u0451\u043D","detail.goToAnnotation":"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0430\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u0438","detail.element":"\u042D\u043B\u0435\u043C\u0435\u043D\u0442","detail.selector":"\u0421\u0435\u043B\u0435\u043A\u0442\u043E\u0440","detail.position":"\u041F\u043E\u0437\u0438\u0446\u0438\u044F","detail.resolve":"\u0420\u0435\u0448\u0438\u0442\u044C","detail.reopen":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0437\u0430\u043D\u043E\u0432\u043E","detail.delete":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","detail.diagnostics":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430","detail.diagnostics.console":"\u041A\u043E\u043D\u0441\u043E\u043B\u044C","detail.diagnostics.network":"\u0421\u0435\u0442\u0435\u0432\u044B\u0435 \u043E\u0448\u0438\u0431\u043A\u0438","detail.diagnostics.expand":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443","detail.diagnostics.collapse":"\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0443","detail.diagnostics.noEntries":"\u041D\u0435\u0442 \u0437\u0430\u043F\u0438\u0441\u0435\u0439","shortcuts.title":"\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438","shortcuts.navigate":"\u041D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F \u043F\u043E \u043E\u0442\u0437\u044B\u0432\u0430\u043C","shortcuts.resolve":"\u0420\u0435\u0448\u0438\u0442\u044C / \u041F\u0435\u0440\u0435\u043E\u0442\u043A\u0440\u044B\u0442\u044C","shortcuts.delete":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C","shortcuts.search":"\u041F\u043E\u0438\u0441\u043A","shortcuts.select":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440","shortcuts.help":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u043B\u0430\u0432\u0438\u0448\u0438","shortcuts.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","shortcuts.hint":"\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438","export.label":"\u042D\u043A\u0441\u043F\u043E\u0440\u0442","export.csv":"\u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 CSV","export.json":"\u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 JSON"};export{e as ru};//# sourceMappingURL=ru-5DW2JCKR.js.map
|
|
2
|
+
//# sourceMappingURL=ru-5DW2JCKR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/ru.ts"],"names":["ru"],"mappings":"AAEO,IAAMA,CAAAA,CAAmB,CAE9B,aAAA,CAAe,iFAAA,CACf,iBAAA,CAAmB,+HAAA,CACnB,oBAAA,CAAsB,iFAAA,CACtB,eAAA,CAAiB,6FAAA,CACjB,aAAA,CAAe,iFAAA,CACf,iBAAA,CAAmB,gEACnB,6BAAA,CAA+B,+DAAA,CAC/B,+BAAA,CAAiC,iTAAA,CACjC,cAAA,CAAgB,mCAAA,CAChB,kBAAA,CAAoB,wFAAA,CACpB,iBAAA,CAAmB,oBAAA,CACnB,iBAAA,CAAmB,uFAAA,CACnB,aAAA,CAAe,wDAAA,CACf,cAAe,wFAAA,CACf,gBAAA,CAAkB,uFAAA,CAClB,gBAAA,CAAkB,uFAAA,CAClB,eAAA,CAAiB,sCAAA,CACjB,cAAA,CAAgB,iFAAA,CAChB,cAAA,CAAgB,4CAAA,CAChB,cAAA,CAAgB,sCAAA,CAChB,qBAAA,CAAuB,6CACvB,gBAAA,CAAkB,oIAAA,CAGlB,iBAAA,CAAmB,oBAAA,CACnB,kBAAA,CAAoB,kDAAA,CACpB,sBAAA,CAAwB,kDAAA,CAGxB,YAAA,CAAc,oBAAA,CACd,eAAA,CAAiB,sCAAA,CACjB,aAAA,CAAe,wDAAA,CACf,WAAY,oBAAA,CACZ,YAAA,CAAc,sCAAA,CAGd,cAAA,CAAgB,sCAAA,CAGhB,aAAA,CAAe,4CAAA,CACf,gBAAA,CAAkB,qEAAA,CAClB,gBAAA,CAAkB,6CAAA,CAClB,WAAA,CAAa,qEAAA,CAGb,UAAA,CAAY,2HACZ,cAAA,CAAgB,wDAAA,CAChB,cAAA,CAAgB,wDAAA,CAChB,iBAAA,CAAmB,wDAAA,CAGnB,uBAAA,CAAyB,mLAAA,CACzB,kBAAA,CAAoB,sCAAA,CAGpB,iBAAA,CAAmB,gHAAA,CACnB,mBAAA,CAAqB,sLAAA,CACrB,qBAAsB,wDAAA,CACtB,qBAAA,CAAuB,4EAAA,CACvB,uBAAA,CAAyB,0EAAA,CACzB,cAAA,CAAgB,sCAAA,CAChB,cAAA,CAAgB,wDAAA,CAGhB,gBAAA,CAAkB,gFAAA,CAClB,oBAAA,CAAsB,oBAAA,CACtB,0BAAA,CAA4B,8CAC5B,qBAAA,CAAuB,OAAA,CACvB,2BAAA,CAA6B,8BAAA,CAC7B,iBAAA,CAAmB,sCAAA,CACnB,iBAAA,CAAmB,8DAAA,CAGnB,oBAAA,CAAsB,yMAAA,CACtB,aAAA,CAAe,mEAAA,CACf,cAAA,CAAgB,mKAAA,CAGhB,YAAa,kHAAA,CAGb,4BAAA,CAA8B,kIAAA,CAC9B,wBAAA,CAA0B,+IAAA,CAC1B,+BAAA,CAAiC,qEAAA,CAGjC,aAAA,CAAe,kHAAA,CAGf,gBAAA,CAAkB,+DAAA,CAClB,eAAA,CAAiB,qDAAA,CACjB,cAAA,CAAgB,uCAChB,aAAA,CAAe,4CAAA,CACf,eAAA,CAAiB,+DAAA,CAGjB,aAAA,CAAe,2EAAA,CACf,aAAA,CAAe,iFAAA,CACf,aAAA,CAAe,uCAAA,CACf,gBAAA,CAAkB,6FAAA,CAClB,YAAA,CAAc,8DAAA,CACd,eAAgB,+DAAA,CAChB,iBAAA,CAAmB,qDAAA,CAGnB,YAAA,CAAc,kDAAA,CACd,gBAAA,CAAkB,kDAAA,CAClB,YAAA,CAAc,0BAAA,CACd,gBAAA,CAAkB,kDAAA,CAGlB,aAAA,CAAe,gCAAA,CACf,cAAA,CAAgB,2CAChB,eAAA,CAAiB,sCAAA,CACjB,gBAAA,CAAkB,wDAAA,CAClB,mBAAA,CAAqB,kDAAA,CACrB,sBAAA,CAAwB,0JAAA,CACxB,iBAAA,CAAmB,sCAAA,CACnB,mBAAA,CAAqB,wDAAA,CACrB,aAAA,CAAe,kDAAA,CACf,gBAAiB,gCAAA,CACjB,aAAA,CAAe,sCAAA,CACf,iBAAA,CAAmB,UAAA,CACnB,gBAAA,CAAkB,4CAAA,CAClB,mBAAA,CAAqB,gCAAA,CACrB,uBAAA,CAAyB,0GAAA,CACzB,gBAAA,CAAkB,4CAAA,CAClB,iBAAA,CAAmB,mDACnB,iBAAA,CAAmB,4CAAA,CACnB,gBAAA,CAAkB,sCAAA,CAClB,eAAA,CAAiB,iFAAA,CACjB,eAAA,CAAiB,4CAAA,CACjB,oBAAA,CAAsB,oEAAA,CACtB,4BAAA,CAA8B,4CAAA,CAC9B,4BAAA,CAA8B,iFAAA,CAC9B,4BAA6B,qHAAA,CAC7B,6BAAA,CAA+B,yGAAA,CAC/B,8BAAA,CAAgC,+DAAA,CAGhC,iBAAA,CAAmB,uFAAA,CACnB,oBAAA,CAAsB,gHAAA,CACtB,mBAAA,CAAqB,2GAAA,CACrB,kBAAA,CAAoB,4CAAA,CACpB,kBAAA,CAAoB,gCAAA,CACpB,kBAAA,CAAoB,mGAAA,CACpB,gBAAA,CAAkB,6FAAA,CAClB,iBAAA,CAAmB,4CAAA,CACnB,gBAAA,CAAkB,uFAAA,CAGlB,cAAA,CAAgB,4CAAA,CAChB,YAAA,CAAc,uDAAA,CACd,aAAA,CAAe,wDACjB","file":"ru-5DW2JCKR.js","sourcesContent":["import type { Translations } from \"./types.js\";\n\nexport const ru: Translations = {\n // Panel\n \"panel.title\": \"Обратная связь\",\n \"panel.ariaLabel\": \"Панель обратной связи Siteping\",\n \"panel.feedbackList\": \"Список отзывов\",\n \"panel.loading\": \"Загрузка отзывов\",\n \"panel.close\": \"Закрыть панель\",\n \"panel.deleteAll\": \"Удалить всё\",\n \"panel.deleteAllConfirmTitle\": \"Удалить всё\",\n \"panel.deleteAllConfirmMessage\": \"Удалить все отзывы этого проекта? Это действие необратимо.\",\n \"panel.search\": \"Поиск...\",\n \"panel.searchAria\": \"Поиск по отзывам\",\n \"panel.filterAll\": \"Все\",\n \"panel.loadError\": \"Ошибка загрузки\",\n \"panel.retry\": \"Повторить\",\n \"panel.empty\": \"Пока нет отзывов\",\n \"panel.showMore\": \"Показать больше\",\n \"panel.showLess\": \"Показать меньше\",\n \"panel.resolve\": \"Решено\",\n \"panel.reopen\": \"Открыть заново\",\n \"panel.delete\": \"Удалить\",\n \"panel.cancel\": \"Отмена\",\n \"panel.confirmDelete\": \"Удалить\",\n \"panel.loadMore\": \"Показать ещё ({remaining} осталось)\",\n\n // Status filter labels\n \"panel.statusAll\": \"Все\",\n \"panel.statusOpen\": \"Открытые\",\n \"panel.statusResolved\": \"Решённые\",\n\n // Feedback type labels\n \"type.label\": \"Тип\",\n \"type.question\": \"Вопрос\",\n \"type.change\": \"Улучшение\",\n \"type.bug\": \"Баг\",\n \"type.other\": \"Другое\",\n\n // Status segmented control label\n \"status.label\": \"Статус\",\n\n // Page scope segmented control\n \"scope.label\": \"Область\",\n \"scope.thisPage\": \"Эта страница\",\n \"scope.thisType\": \"Этот тип\",\n \"scope.all\": \"Все страницы\",\n\n // FAB menu\n \"fab.aria\": \"Siteping — Меню обратной связи\",\n \"fab.messages\": \"Сообщения\",\n \"fab.annotate\": \"Аннотация\",\n \"fab.annotations\": \"Аннотации\",\n\n // Annotator\n \"annotator.instruction\": \"Выделите область для комментария\",\n \"annotator.cancel\": \"Отмена\",\n\n // Popup\n \"popup.ariaLabel\": \"Форма обратной связи\",\n \"popup.placeholder\": \"Опишите проблему или предложение...\",\n \"popup.textareaAria\": \"Сообщение\",\n \"popup.submitHintMac\": \"⌘+Enter — отправить\",\n \"popup.submitHintOther\": \"Ctrl+Enter — отправить\",\n \"popup.cancel\": \"Отмена\",\n \"popup.submit\": \"Отправить\",\n\n // Identity modal\n \"identity.title\": \"Представьтесь\",\n \"identity.nameLabel\": \"Имя\",\n \"identity.namePlaceholder\": \"Ваше имя\",\n \"identity.emailLabel\": \"Email\",\n \"identity.emailPlaceholder\": \"ваш@email.com\",\n \"identity.cancel\": \"Отмена\",\n \"identity.submit\": \"Продолжить\",\n\n // Markers\n \"marker.approximate\": \"Приблизительная позиция (точность: {confidence}%)\",\n \"marker.aria\": \"Отзыв #{number}: {type} — {message}\",\n \"marker.count\": \"Отображено маркеров отзывов: {count}\",\n\n // FAB badge\n \"fab.badge\": \"Нерешённых отзывов: {count}\",\n\n // Accessibility — screen reader announcements\n \"feedback.sent.confirmation\": \"Отзыв успешно отправлен\",\n \"feedback.error.message\": \"Не удалось отправить отзыв\",\n \"feedback.deleted.confirmation\": \"Отзыв удалён\",\n\n // Badge\n \"badge.count\": \"Нерешённых отзывов: {count}\",\n\n // Bulk actions toolbar\n \"bulk.selectAll\": \"Выбрать все\",\n \"bulk.selected\": \"Выбрано: {count}\",\n \"bulk.resolve\": \"Решить\",\n \"bulk.delete\": \"Удалить\",\n \"bulk.deselect\": \"Снять выбор\",\n\n // Sort and group controls\n \"sort.newest\": \"Сначала новые\",\n \"sort.oldest\": \"Сначала старые\",\n \"sort.byType\": \"По типу\",\n \"sort.openFirst\": \"Сначала открытые\",\n \"sort.label\": \"Сортировка\",\n \"group.byPage\": \"По странице\",\n \"group.feedbacks\": \"Отзывов: {count}\",\n\n // Stats bar\n \"stats.open\": \"Открытые\",\n \"stats.resolved\": \"Решённые\",\n \"stats.bugs\": \"Баги\",\n \"stats.progress\": \"Решено: {percent}%\",\n\n // Detail view\n \"detail.back\": \"Назад\",\n \"detail.title\": \"Отзыв #{number}\",\n \"detail.status\": \"Статус\",\n \"detail.message\": \"Сообщение\",\n \"detail.screenshot\": \"Скриншот\",\n \"detail.screenshotAlt\": \"Скриншот выделенной области\",\n \"detail.metadata\": \"Детали\",\n \"detail.annotation\": \"Аннотация\",\n \"detail.page\": \"Страница\",\n \"detail.author\": \"Автор\",\n \"detail.date\": \"Создан\",\n \"detail.viewport\": \"Viewport\",\n \"detail.browser\": \"Браузер\",\n \"detail.resolvedAt\": \"Решён\",\n \"detail.goToAnnotation\": \"Перейти к аннотации\",\n \"detail.element\": \"Элемент\",\n \"detail.selector\": \"Селектор\",\n \"detail.position\": \"Позиция\",\n \"detail.resolve\": \"Решить\",\n \"detail.reopen\": \"Открыть заново\",\n \"detail.delete\": \"Удалить\",\n \"detail.diagnostics\": \"Диагностика\",\n \"detail.diagnostics.console\": \"Консоль\",\n \"detail.diagnostics.network\": \"Сетевые ошибки\",\n \"detail.diagnostics.expand\": \"Показать диагностику\",\n \"detail.diagnostics.collapse\": \"Скрыть диагностику\",\n \"detail.diagnostics.noEntries\": \"Нет записей\",\n\n // Keyboard shortcuts overlay\n \"shortcuts.title\": \"Горячие клавиши\",\n \"shortcuts.navigate\": \"Навигация по отзывам\",\n \"shortcuts.resolve\": \"Решить / Переоткрыть\",\n \"shortcuts.delete\": \"Удалить\",\n \"shortcuts.search\": \"Поиск\",\n \"shortcuts.select\": \"Переключить выбор\",\n \"shortcuts.help\": \"Показать клавиши\",\n \"shortcuts.close\": \"Закрыть\",\n \"shortcuts.hint\": \"Горячие клавиши\",\n\n // Export controls\n \"export.label\": \"Экспорт\",\n \"export.csv\": \"Экспорт в CSV\",\n \"export.json\": \"Экспорт в JSON\",\n};\n"]}
|
package/dist/schema.d.ts
CHANGED
|
@@ -62,6 +62,19 @@ export declare const SITEPING_MODELS: Readonly<{
|
|
|
62
62
|
readonly url: {
|
|
63
63
|
readonly type: "String";
|
|
64
64
|
};
|
|
65
|
+
readonly urlPattern: {
|
|
66
|
+
readonly type: "String";
|
|
67
|
+
readonly optional: true;
|
|
68
|
+
};
|
|
69
|
+
readonly screenshotUrl: {
|
|
70
|
+
readonly type: "String";
|
|
71
|
+
readonly optional: true;
|
|
72
|
+
readonly nativeType: "Text";
|
|
73
|
+
};
|
|
74
|
+
readonly diagnostics: {
|
|
75
|
+
readonly type: "Json";
|
|
76
|
+
readonly optional: true;
|
|
77
|
+
};
|
|
65
78
|
readonly viewport: {
|
|
66
79
|
readonly type: "String";
|
|
67
80
|
};
|
|
@@ -102,6 +115,8 @@ export declare const SITEPING_MODELS: Readonly<{
|
|
|
102
115
|
readonly fields: ["projectName"];
|
|
103
116
|
}, {
|
|
104
117
|
readonly fields: ["projectName", "status", "createdAt"];
|
|
118
|
+
}, {
|
|
119
|
+
readonly fields: ["projectName", "url"];
|
|
105
120
|
}];
|
|
106
121
|
};
|
|
107
122
|
readonly SitepingAnnotation: {
|
|
@@ -158,6 +173,10 @@ export declare const SITEPING_MODELS: Readonly<{
|
|
|
158
173
|
readonly type: "String";
|
|
159
174
|
readonly nativeType: "Text";
|
|
160
175
|
};
|
|
176
|
+
readonly anchorKey: {
|
|
177
|
+
readonly type: "String";
|
|
178
|
+
readonly optional: true;
|
|
179
|
+
};
|
|
161
180
|
readonly xPct: {
|
|
162
181
|
readonly type: "Float";
|
|
163
182
|
};
|
package/dist/siteping-core.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
export { SitepingAuthError, SitepingError, SitepingNetworkError, SitepingValidationError } from "./errors.js";
|
|
2
|
+
export type { FilterResult } from "./filters.js";
|
|
3
|
+
export { applyFeedbackFilters } from "./filters.js";
|
|
1
4
|
export type { FieldDef, IndexDef, ModelDef } from "./schema.js";
|
|
2
5
|
export { SITEPING_MODELS } from "./schema.js";
|
|
3
|
-
export type {
|
|
6
|
+
export type { ScreenshotStorage } from "./screenshot-storage.js";
|
|
7
|
+
export type { AnchorData, AnnotationCreateInput, AnnotationPayload, AnnotationRecord, AnnotationResponse, ConsoleDiagnosticEntry, DiagnosticsSnapshot, FeedbackCreateInput, FeedbackPayload, FeedbackQuery, FeedbackRecord, FeedbackResponse, FeedbackStatus, FeedbackType, FeedbackUpdateInput, NetworkDiagnosticEntry, PageScope, RectData, SitepingConfig, SitepingInstance, SitepingPublicEvents, SitepingStore, } from "./types.js";
|
|
4
8
|
export { FEEDBACK_STATUSES, FEEDBACK_TYPES, flattenAnnotation, isStoreDuplicate, isStoreNotFound, StoreDuplicateError, StoreNotFoundError, } from "./types.js";
|
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,68 @@ export interface SitepingConfig {
|
|
|
18
18
|
theme?: "light" | "dark" | "auto";
|
|
19
19
|
/** UI locale — defaults to 'en'. Built-in: en, fr, de, es, it, pt (Brazilian), ru. Any other string falls back to English. */
|
|
20
20
|
locale?: "en" | "fr" | "de" | "es" | "it" | "pt" | "ru" | (string & {}) | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the current page scope for annotations and panel filtering.
|
|
23
|
+
* Called on initial markers load and on `instance.refresh()`.
|
|
24
|
+
*
|
|
25
|
+
* Default: `{ url: window.location.pathname, urlPattern: null }` — annotations
|
|
26
|
+
* are scoped strictly to the current pathname.
|
|
27
|
+
*
|
|
28
|
+
* Apps with parameterized routes (e.g. React Router) should return both the
|
|
29
|
+
* concrete URL and the route template (e.g. `/orders/:orderId`) so the panel
|
|
30
|
+
* can offer a "this type of page" filter that groups feedbacks by template.
|
|
31
|
+
*/
|
|
32
|
+
getPageScope?: (() => PageScope) | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* When true (default), the widget filters initial markers and panel results
|
|
35
|
+
* by `feedback.url === scope.url`, so annotations created on one page never
|
|
36
|
+
* leak to other pages — even if their CSS selector accidentally matches.
|
|
37
|
+
* Set to `false` to revert to the legacy project-wide behavior.
|
|
38
|
+
*/
|
|
39
|
+
scopeAnnotationsByUrl?: boolean | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Capture a JPEG screenshot of the annotated area on submit. Defaults to
|
|
42
|
+
* `false` — opt-in because:
|
|
43
|
+
*
|
|
44
|
+
* - it adds runtime weight (~40 KB gzip dynamic chunk for html2canvas,
|
|
45
|
+
* loaded only on first capture),
|
|
46
|
+
* - it embeds page content in the feedback (privacy/GDPR consideration —
|
|
47
|
+
* inform end users in your widget host UI when enabling).
|
|
48
|
+
*
|
|
49
|
+
* `html2canvas` ships as a regular dependency of `@siteping/widget` so the
|
|
50
|
+
* dynamic import always resolves; you don't need to install anything extra.
|
|
51
|
+
*
|
|
52
|
+
* **Masking sensitive elements:** add `data-siteping-ignore="true"` to any
|
|
53
|
+
* element you do NOT want captured (password fields, credit-card forms,
|
|
54
|
+
* API tokens shown in the UI, etc.). The capture predicate skips matching
|
|
55
|
+
* elements *and their descendants*. Do this BEFORE turning on screenshots
|
|
56
|
+
* in production — once a feedback is saved, the screenshot is in your DB
|
|
57
|
+
* (or object storage) regardless of what was on the page.
|
|
58
|
+
*/
|
|
59
|
+
enableScreenshot?: boolean | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Capture the last few `console.*` calls and failed network requests
|
|
62
|
+
* (HTTP >= 400 or network error) at the moment a feedback is submitted.
|
|
63
|
+
*
|
|
64
|
+
* Lets reviewers replay the technical context that led to the report —
|
|
65
|
+
* stack traces, 500 responses, dead third-party scripts. Great for the
|
|
66
|
+
* "the page just doesn't work" feedback that contains zero detail.
|
|
67
|
+
*
|
|
68
|
+
* - `true` — capture with defaults (50 console / 20 network entries).
|
|
69
|
+
* - `false` (default) — no capture, no monkey-patching.
|
|
70
|
+
* - object — per-channel toggles + custom buffer sizes.
|
|
71
|
+
*
|
|
72
|
+
* **Privacy considerations:** console messages may contain anything the
|
|
73
|
+
* host page logs, including user data. Failed network requests record the
|
|
74
|
+
* URL (with query string) but never the response body. Inform end users
|
|
75
|
+
* before enabling in environments where they might log sensitive values.
|
|
76
|
+
*/
|
|
77
|
+
captureDiagnostics?: boolean | {
|
|
78
|
+
console?: boolean;
|
|
79
|
+
network?: boolean;
|
|
80
|
+
maxConsoleEntries?: number;
|
|
81
|
+
maxNetworkEntries?: number;
|
|
82
|
+
} | undefined;
|
|
21
83
|
/** Called when the widget is skipped (production mode, mobile viewport) */
|
|
22
84
|
onSkip?: (reason: "production" | "mobile") => void;
|
|
23
85
|
/** Called when the feedback panel is opened. */
|
|
@@ -25,6 +87,17 @@ export interface SitepingConfig {
|
|
|
25
87
|
/** Called when the feedback panel is closed. */
|
|
26
88
|
onClose?: () => void;
|
|
27
89
|
onFeedbackSent?: (feedback: FeedbackResponse) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Called when a feedback API call fails.
|
|
92
|
+
*
|
|
93
|
+
* The widget always emits a `SitepingError` (or a subclass:
|
|
94
|
+
* `SitepingNetworkError`, `SitepingValidationError`, `SitepingAuthError`)
|
|
95
|
+
* for HTTP-mode failures — host apps can `instanceof` to drive retry
|
|
96
|
+
* logic, or read `error.code` (`"NETWORK" | "VALIDATION" | "AUTH" |
|
|
97
|
+
* "SERVER"`) and `error.retryable`. The type is widened to `Error` so
|
|
98
|
+
* direct-store callers can still surface raw errors without breaking the
|
|
99
|
+
* contract.
|
|
100
|
+
*/
|
|
28
101
|
onError?: (error: Error) => void;
|
|
29
102
|
/** Called when the user starts drawing an annotation. */
|
|
30
103
|
onAnnotationStart?: () => void;
|
|
@@ -59,6 +132,19 @@ export type FeedbackType = (typeof FEEDBACK_TYPES)[number];
|
|
|
59
132
|
/** Single source of truth for feedback statuses. */
|
|
60
133
|
export declare const FEEDBACK_STATUSES: readonly ["open", "resolved"];
|
|
61
134
|
export type FeedbackStatus = (typeof FEEDBACK_STATUSES)[number];
|
|
135
|
+
/**
|
|
136
|
+
* Page scope returned by `SitepingConfig.getPageScope()`.
|
|
137
|
+
*
|
|
138
|
+
* - `url`: concrete page identifier — usually `window.location.pathname`,
|
|
139
|
+
* used as the strict scope for marker rendering.
|
|
140
|
+
* - `urlPattern`: optional parameterized template (e.g. `/orders/:orderId`)
|
|
141
|
+
* used by the panel's "this type of page" filter to group feedbacks across
|
|
142
|
+
* instances of the same page kind.
|
|
143
|
+
*/
|
|
144
|
+
export interface PageScope {
|
|
145
|
+
url: string;
|
|
146
|
+
urlPattern: string | null;
|
|
147
|
+
}
|
|
62
148
|
/** Input for creating a feedback record in the store. */
|
|
63
149
|
export interface FeedbackCreateInput {
|
|
64
150
|
projectName: string;
|
|
@@ -66,12 +152,34 @@ export interface FeedbackCreateInput {
|
|
|
66
152
|
message: string;
|
|
67
153
|
status: FeedbackStatus;
|
|
68
154
|
url: string;
|
|
155
|
+
/**
|
|
156
|
+
* Optional parameterized URL template (e.g. `/orders/:orderId`) for the page
|
|
157
|
+
* where the feedback was created. Allows the panel to filter feedbacks by
|
|
158
|
+
* "this type of page" across different instances. Null when the host did not
|
|
159
|
+
* provide a `getPageScope` callback or the route has no template.
|
|
160
|
+
*/
|
|
161
|
+
urlPattern?: string | null | undefined;
|
|
69
162
|
viewport: string;
|
|
70
163
|
userAgent: string;
|
|
71
164
|
authorName: string;
|
|
72
165
|
authorEmail: string;
|
|
73
166
|
clientId: string;
|
|
74
167
|
annotations: AnnotationCreateInput[];
|
|
168
|
+
/**
|
|
169
|
+
* Base64 JPEG `data:` URL captured by the widget at submit time.
|
|
170
|
+
*
|
|
171
|
+
* Adapters with a configured `ScreenshotStorage` are expected to upload
|
|
172
|
+
* this and persist the returned URL on `FeedbackRecord.screenshotUrl`.
|
|
173
|
+
* Adapters without storage may persist the data URL inline (memory /
|
|
174
|
+
* localStorage / dev) — the widget then renders it directly.
|
|
175
|
+
*/
|
|
176
|
+
screenshotDataUrl?: string | null | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Optional console + failed-network snapshot captured by the widget when
|
|
179
|
+
* `SitepingConfig.captureDiagnostics` is enabled. Stored as JSON on
|
|
180
|
+
* `FeedbackRecord.diagnostics` so reviewers can replay the context.
|
|
181
|
+
*/
|
|
182
|
+
diagnostics?: DiagnosticsSnapshot | null | undefined;
|
|
75
183
|
}
|
|
76
184
|
/** Input for a single annotation when creating a feedback. */
|
|
77
185
|
export interface AnnotationCreateInput {
|
|
@@ -84,6 +192,13 @@ export interface AnnotationCreateInput {
|
|
|
84
192
|
textSuffix: string;
|
|
85
193
|
fingerprint: string;
|
|
86
194
|
neighborText: string;
|
|
195
|
+
/**
|
|
196
|
+
* Semantic anchor identifier from the closest ancestor's `data-feedback-anchor`
|
|
197
|
+
* attribute. When set, this is the most stable re-anchoring signal because
|
|
198
|
+
* hosts deliberately place these on layout/section roots that survive DOM
|
|
199
|
+
* refactors and viewport changes. Null when no semantic ancestor exists.
|
|
200
|
+
*/
|
|
201
|
+
anchorKey?: string | null | undefined;
|
|
87
202
|
xPct: number;
|
|
88
203
|
yPct: number;
|
|
89
204
|
wPct: number;
|
|
@@ -102,6 +217,17 @@ export interface FeedbackQuery {
|
|
|
102
217
|
search?: string | undefined;
|
|
103
218
|
page?: number | undefined;
|
|
104
219
|
limit?: number | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* Filter to feedbacks created on this exact URL (path). Used by the panel's
|
|
222
|
+
* "this page" filter and by the markers loader to keep page scopes isolated.
|
|
223
|
+
*/
|
|
224
|
+
url?: string | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* Filter to feedbacks created on this URL pattern (e.g. `/orders/:orderId`).
|
|
227
|
+
* Used by the panel's "this type of page" filter to group feedbacks across
|
|
228
|
+
* different concrete instances of the same template.
|
|
229
|
+
*/
|
|
230
|
+
urlPattern?: string | undefined;
|
|
105
231
|
}
|
|
106
232
|
/** Update payload for patching a feedback. */
|
|
107
233
|
export interface FeedbackUpdateInput {
|
|
@@ -116,6 +242,11 @@ export interface FeedbackRecord {
|
|
|
116
242
|
status: FeedbackStatus;
|
|
117
243
|
projectName: string;
|
|
118
244
|
url: string;
|
|
245
|
+
/**
|
|
246
|
+
* Parameterized URL template the feedback was created on.
|
|
247
|
+
* Null for legacy records or hosts without `getPageScope`.
|
|
248
|
+
*/
|
|
249
|
+
urlPattern: string | null;
|
|
119
250
|
authorName: string;
|
|
120
251
|
authorEmail: string;
|
|
121
252
|
viewport: string;
|
|
@@ -125,6 +256,18 @@ export interface FeedbackRecord {
|
|
|
125
256
|
createdAt: Date;
|
|
126
257
|
updatedAt: Date;
|
|
127
258
|
annotations: AnnotationRecord[];
|
|
259
|
+
/**
|
|
260
|
+
* URL the widget renders as `<img src>`. Either an `https://...` from a
|
|
261
|
+
* configured `ScreenshotStorage`, or a `data:image/jpeg;base64,...` URL
|
|
262
|
+
* inline-persisted by adapters without storage. Null when no screenshot
|
|
263
|
+
* was captured (legacy records, capture failed, or host disabled it).
|
|
264
|
+
*/
|
|
265
|
+
screenshotUrl: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Console + failed-network snapshot captured at submit time. Null when
|
|
268
|
+
* diagnostics weren't enabled on the widget side.
|
|
269
|
+
*/
|
|
270
|
+
diagnostics: DiagnosticsSnapshot | null;
|
|
128
271
|
}
|
|
129
272
|
/** A persisted annotation record returned by the store. */
|
|
130
273
|
export interface AnnotationRecord {
|
|
@@ -139,6 +282,11 @@ export interface AnnotationRecord {
|
|
|
139
282
|
textSuffix: string;
|
|
140
283
|
fingerprint: string;
|
|
141
284
|
neighborText: string;
|
|
285
|
+
/**
|
|
286
|
+
* Semantic anchor identifier from `data-feedback-anchor`. Null for legacy
|
|
287
|
+
* annotations or those drawn outside any anchored region.
|
|
288
|
+
*/
|
|
289
|
+
anchorKey: string | null;
|
|
142
290
|
xPct: number;
|
|
143
291
|
yPct: number;
|
|
144
292
|
wPct: number;
|
|
@@ -214,6 +362,11 @@ export interface FeedbackPayload {
|
|
|
214
362
|
type: FeedbackType;
|
|
215
363
|
message: string;
|
|
216
364
|
url: string;
|
|
365
|
+
/**
|
|
366
|
+
* Parameterized URL template (e.g. `/orders/:orderId`) supplied by
|
|
367
|
+
* `SitepingConfig.getPageScope()`. Null when the host did not provide one.
|
|
368
|
+
*/
|
|
369
|
+
urlPattern?: string | null | undefined;
|
|
217
370
|
viewport: string;
|
|
218
371
|
userAgent: string;
|
|
219
372
|
authorName: string;
|
|
@@ -221,6 +374,47 @@ export interface FeedbackPayload {
|
|
|
221
374
|
annotations: AnnotationPayload[];
|
|
222
375
|
/** Client-generated UUID for deduplication */
|
|
223
376
|
clientId: string;
|
|
377
|
+
/**
|
|
378
|
+
* Base64 JPEG `data:` URL of the annotated area. Captured by the widget
|
|
379
|
+
* when `enableScreenshot: true` is set in `SitepingConfig`. Null when
|
|
380
|
+
* disabled or when capture failed silently.
|
|
381
|
+
*/
|
|
382
|
+
screenshotDataUrl?: string | null | undefined;
|
|
383
|
+
/**
|
|
384
|
+
* Snapshot of the last few console messages and failed network requests
|
|
385
|
+
* captured at submit time when `captureDiagnostics` is enabled.
|
|
386
|
+
*/
|
|
387
|
+
diagnostics?: DiagnosticsSnapshot | null | undefined;
|
|
388
|
+
}
|
|
389
|
+
/** A single console entry captured by `ConsoleBuffer`. */
|
|
390
|
+
export interface ConsoleDiagnosticEntry {
|
|
391
|
+
level: "log" | "info" | "warn" | "error";
|
|
392
|
+
/** ISO 8601 timestamp captured at log time. */
|
|
393
|
+
timestamp: string;
|
|
394
|
+
/** Best-effort string representation of the original console args. */
|
|
395
|
+
message: string;
|
|
396
|
+
}
|
|
397
|
+
/** A single failed network request captured by `NetworkBuffer`. */
|
|
398
|
+
export interface NetworkDiagnosticEntry {
|
|
399
|
+
url: string;
|
|
400
|
+
method: string;
|
|
401
|
+
/** HTTP status; 0 when the request never reached the server. */
|
|
402
|
+
status: number;
|
|
403
|
+
/** End-to-end duration in ms. */
|
|
404
|
+
durationMs: number;
|
|
405
|
+
/** ISO 8601 timestamp at the moment the request was initiated. */
|
|
406
|
+
timestamp: string;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Diagnostics captured by the widget when `captureDiagnostics` is enabled.
|
|
410
|
+
*
|
|
411
|
+
* Both arrays are bounded (default: 50 console / 20 network). Adapters that
|
|
412
|
+
* support diagnostics should persist this as a JSON blob alongside the
|
|
413
|
+
* feedback so reviewers can replay the context that led to the report.
|
|
414
|
+
*/
|
|
415
|
+
export interface DiagnosticsSnapshot {
|
|
416
|
+
console: ConsoleDiagnosticEntry[];
|
|
417
|
+
network: NetworkDiagnosticEntry[];
|
|
224
418
|
}
|
|
225
419
|
/** DOM anchoring data for re-attaching annotations to page elements. */
|
|
226
420
|
export interface AnchorData {
|
|
@@ -242,6 +436,13 @@ export interface AnchorData {
|
|
|
242
436
|
fingerprint: string;
|
|
243
437
|
/** Text content of adjacent sibling elements (context) */
|
|
244
438
|
neighborText: string;
|
|
439
|
+
/**
|
|
440
|
+
* Semantic anchor identifier from the closest ancestor's `data-feedback-anchor`
|
|
441
|
+
* attribute. When set, this is the highest-priority re-anchoring signal —
|
|
442
|
+
* hosts deliberately place these on layout/section roots that survive
|
|
443
|
+
* viewport changes and DOM refactors.
|
|
444
|
+
*/
|
|
445
|
+
anchorKey?: string | null | undefined;
|
|
245
446
|
}
|
|
246
447
|
/** Drawn rectangle coordinates as percentages relative to the anchor element. */
|
|
247
448
|
export interface RectData {
|
|
@@ -272,6 +473,8 @@ export interface FeedbackResponse {
|
|
|
272
473
|
message: string;
|
|
273
474
|
status: FeedbackStatus;
|
|
274
475
|
url: string;
|
|
476
|
+
/** Parameterized URL template the feedback was created on, or null. */
|
|
477
|
+
urlPattern: string | null;
|
|
275
478
|
viewport: string;
|
|
276
479
|
userAgent: string;
|
|
277
480
|
authorName: string;
|
|
@@ -280,6 +483,10 @@ export interface FeedbackResponse {
|
|
|
280
483
|
createdAt: string;
|
|
281
484
|
updatedAt: string;
|
|
282
485
|
annotations: AnnotationResponse[];
|
|
486
|
+
/** Screenshot URL (data: or http:) — see `FeedbackRecord.screenshotUrl`. */
|
|
487
|
+
screenshotUrl: string | null;
|
|
488
|
+
/** Console + failed-network snapshot, or null when diagnostics weren't captured. */
|
|
489
|
+
diagnostics: DiagnosticsSnapshot | null;
|
|
283
490
|
}
|
|
284
491
|
/** Annotation record as returned by the API. */
|
|
285
492
|
export interface AnnotationResponse {
|
|
@@ -294,6 +501,8 @@ export interface AnnotationResponse {
|
|
|
294
501
|
textSuffix: string;
|
|
295
502
|
fingerprint: string;
|
|
296
503
|
neighborText: string;
|
|
504
|
+
/** Semantic anchor identifier from `data-feedback-anchor`, or null. */
|
|
505
|
+
anchorKey: string | null;
|
|
297
506
|
xPct: number;
|
|
298
507
|
yPct: number;
|
|
299
508
|
wPct: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siteping/widget",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Feedback widget for client review during development — annotations, bugs, questions directly on the site",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.js",
|
|
11
11
|
"script": "./dist/index.global.js"
|
|
12
|
+
},
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./dist/react.d.ts",
|
|
15
|
+
"import": "./dist/react.js"
|
|
12
16
|
}
|
|
13
17
|
},
|
|
14
18
|
"module": "./dist/index.js",
|
|
@@ -19,7 +23,8 @@
|
|
|
19
23
|
"scripts": {
|
|
20
24
|
"build": "tsup && node ../../scripts/fix-dts.mjs dist",
|
|
21
25
|
"check": "tsc --noEmit",
|
|
22
|
-
"clean": "rm -rf dist"
|
|
26
|
+
"clean": "rm -rf dist",
|
|
27
|
+
"size": "NODE_PATH=./node_modules size-limit"
|
|
23
28
|
},
|
|
24
29
|
"keywords": [
|
|
25
30
|
"feedback",
|
|
@@ -51,10 +56,28 @@
|
|
|
51
56
|
"access": "public"
|
|
52
57
|
},
|
|
53
58
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
59
|
+
"node": ">=20"
|
|
55
60
|
},
|
|
56
|
-
"
|
|
61
|
+
"dependencies": {
|
|
57
62
|
"@medv/finder": "^3.2.0",
|
|
58
|
-
"
|
|
63
|
+
"html2canvas": "^1.4.1"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@siteping/core": "workspace:*",
|
|
67
|
+
"@size-limit/preset-small-lib": "^12.1.0",
|
|
68
|
+
"@testing-library/react": "^16.3.2",
|
|
69
|
+
"@types/react": "^19.2.14",
|
|
70
|
+
"@types/react-dom": "^19.2.3",
|
|
71
|
+
"react": "^19.2.6",
|
|
72
|
+
"react-dom": "^19.2.6",
|
|
73
|
+
"size-limit": "^12.1.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"react": ">=18"
|
|
77
|
+
},
|
|
78
|
+
"peerDependenciesMeta": {
|
|
79
|
+
"react": {
|
|
80
|
+
"optional": true
|
|
81
|
+
}
|
|
59
82
|
}
|
|
60
83
|
}
|