@siteping/widget 0.10.3 → 0.10.5
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-33HB3HZI.js → chunk-D2AVRF24.js} +2 -2
- package/dist/chunk-D2AVRF24.js.map +1 -0
- package/dist/chunk-GRKBXAGP.cjs +1796 -0
- package/dist/chunk-GRKBXAGP.cjs.map +1 -0
- package/dist/de-AZUOIGF2.cjs +2 -0
- package/dist/de-AZUOIGF2.cjs.map +1 -0
- package/dist/errors.d.cts +41 -0
- package/dist/errors.d.ts +41 -0
- package/dist/es-5XQA3TPT.cjs +2 -0
- package/dist/es-5XQA3TPT.cjs.map +1 -0
- package/dist/filters.d.cts +31 -0
- package/dist/filters.d.ts +31 -0
- package/dist/fr-ERYSAH32.cjs +2 -0
- package/dist/fr-ERYSAH32.cjs.map +1 -0
- package/dist/index.cjs +1589 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +24 -0
- package/dist/index.global.js +22 -22
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/it-NXAZR4K6.cjs +2 -0
- package/dist/it-NXAZR4K6.cjs.map +1 -0
- package/dist/panel-LMVRKAQH.cjs +2 -0
- package/dist/panel-LMVRKAQH.cjs.map +1 -0
- package/dist/{panel-BSNEQHAQ.js → panel-OXUE7PJY.js} +2 -2
- package/dist/{panel-BSNEQHAQ.js.map → panel-OXUE7PJY.js.map} +1 -1
- package/dist/pt-CODDT6VY.cjs +2 -0
- package/dist/pt-CODDT6VY.cjs.map +1 -0
- package/dist/react.cjs +1589 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +59 -0
- package/dist/react.js +10 -10
- package/dist/react.js.map +1 -1
- package/dist/ru-72WUEADV.cjs +2 -0
- package/dist/ru-72WUEADV.cjs.map +1 -0
- package/dist/schema.d.cts +263 -0
- package/dist/screenshot-storage.d.cts +56 -0
- package/dist/screenshot-storage.d.ts +56 -0
- package/dist/siteping-core.d.cts +11 -0
- package/dist/type-utils.d.cts +89 -0
- package/dist/type-utils.d.ts +89 -0
- package/dist/types.d.cts +803 -0
- package/dist/types.d.ts +4 -0
- package/package.json +19 -6
- package/dist/chunk-33HB3HZI.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';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","panel.statusResolved":"\u0420\u0435\u0448\u0451\u043D","panel.statusInProgress":"\u0412 \u0440\u0430\u0431\u043E\u0442\u0435","panel.statusWontFix":"\u041D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E","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":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C","fab.annotate":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0430\u043D\u043D\u043E\u0442\u0430\u0446\u0438\u044E","fab.annotations":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0441\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u0442\u043A\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 \u2014 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Enter, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442","annotator.instantInstruction":"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0442\u043E\u0447\u043A\u0435","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.closedAt":"\u0417\u0430\u043A\u0440\u044B\u0442","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"};exports.ru=e;//# sourceMappingURL=ru-72WUEADV.cjs.map
|
|
2
|
+
//# sourceMappingURL=ru-72WUEADV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/i18n/ru.ts"],"names":["ru"],"mappings":"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","file":"ru-72WUEADV.cjs","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 \"panel.statusInProgress\": \"В работе\",\n \"panel.statusWontFix\": \"Не будет исправлено\",\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 \"Выделите область для комментария — или нажмите Enter, чтобы прокомментировать последний активный элемент\",\n \"annotator.instantInstruction\": \"Комментарий к выбранной точке\",\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.closedAt\": \"Закрыт\",\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"]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Siteping database models — single source of truth.
|
|
3
|
+
*
|
|
4
|
+
* Used by:
|
|
5
|
+
* - CLI to generate Prisma schema (via prisma-ast)
|
|
6
|
+
* - Adapter for Zod validation
|
|
7
|
+
* - Type exports
|
|
8
|
+
*
|
|
9
|
+
* This is a TS representation, NOT a .prisma file.
|
|
10
|
+
* The CLI generates the actual Prisma schema from this definition.
|
|
11
|
+
*/
|
|
12
|
+
/** Prisma scalar types supported by Siteping field definitions. */
|
|
13
|
+
export type PrismaScalarType = "String" | "Boolean" | "Int" | "BigInt" | "Float" | "Decimal" | "DateTime" | "Json" | "Bytes";
|
|
14
|
+
/** Prisma native column hints applied via `@db.<NativeType>`. */
|
|
15
|
+
export type PrismaNativeType = "Text" | "VarChar" | "Char" | "MediumText" | "LongText" | (string & {});
|
|
16
|
+
/** Relation cardinality between two Siteping models. */
|
|
17
|
+
export type RelationKind = "1-to-many" | "many-to-1";
|
|
18
|
+
/** Prisma `onDelete` referential action. */
|
|
19
|
+
export type RelationOnDelete = "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
|
|
20
|
+
/**
|
|
21
|
+
* Relation metadata attached to a {@link FieldDef}.
|
|
22
|
+
*
|
|
23
|
+
* - `1-to-many` fields point at the related model and require no inverse
|
|
24
|
+
* column on this side (`fields`/`references` are inferred by Prisma).
|
|
25
|
+
* - `many-to-1` fields own the foreign key — Prisma needs `fields` and
|
|
26
|
+
* `references` to wire it up.
|
|
27
|
+
*/
|
|
28
|
+
export interface RelationDef {
|
|
29
|
+
kind: RelationKind;
|
|
30
|
+
model: string;
|
|
31
|
+
fields?: readonly string[];
|
|
32
|
+
references?: readonly string[];
|
|
33
|
+
onDelete?: RelationOnDelete;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Definition of a single field in a Siteping database model.
|
|
37
|
+
*
|
|
38
|
+
* The interface intentionally keeps a wide structural shape so it stays
|
|
39
|
+
* easy to extend, but consumers can narrow via {@link isRelationField} /
|
|
40
|
+
* {@link isScalarField} when relation vs. scalar logic diverges.
|
|
41
|
+
*/
|
|
42
|
+
export interface FieldDef {
|
|
43
|
+
/** Prisma type (e.g. "String", "Int") for scalars, model name for relations. */
|
|
44
|
+
type: PrismaScalarType | (string & {});
|
|
45
|
+
/** Default literal (`"open"`) or function call (`now()`, `cuid()`). */
|
|
46
|
+
default?: string;
|
|
47
|
+
/** Whether the column is nullable. */
|
|
48
|
+
optional?: boolean;
|
|
49
|
+
/** Set on relation fields — absent on scalars. */
|
|
50
|
+
relation?: RelationDef;
|
|
51
|
+
isId?: boolean;
|
|
52
|
+
isUnique?: boolean;
|
|
53
|
+
/** Prisma native type attribute (e.g. "Text" for @db.Text) — used for MySQL compatibility on long strings */
|
|
54
|
+
nativeType?: PrismaNativeType;
|
|
55
|
+
/** Prisma @updatedAt attribute */
|
|
56
|
+
isUpdatedAt?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Narrowing predicate: returns `true` when `field` declares a Prisma relation. */
|
|
59
|
+
export declare function isRelationField(field: FieldDef): field is FieldDef & {
|
|
60
|
+
relation: RelationDef;
|
|
61
|
+
};
|
|
62
|
+
/** Narrowing predicate: returns `true` when `field` is a Prisma scalar (no relation metadata). */
|
|
63
|
+
export declare function isScalarField(field: FieldDef): field is FieldDef & {
|
|
64
|
+
relation?: undefined;
|
|
65
|
+
};
|
|
66
|
+
/** Definition of a composite index on a Siteping database model. */
|
|
67
|
+
export interface IndexDef {
|
|
68
|
+
fields: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
/** Definition of a single Siteping database model (fields + indexes). */
|
|
71
|
+
export interface ModelDef {
|
|
72
|
+
fields: Record<string, FieldDef>;
|
|
73
|
+
indexes?: readonly IndexDef[];
|
|
74
|
+
}
|
|
75
|
+
declare const _SITEPING_MODELS: {
|
|
76
|
+
readonly SitepingFeedback: {
|
|
77
|
+
readonly fields: {
|
|
78
|
+
readonly id: {
|
|
79
|
+
readonly type: "String";
|
|
80
|
+
readonly isId: true;
|
|
81
|
+
readonly default: "cuid()";
|
|
82
|
+
};
|
|
83
|
+
readonly projectName: {
|
|
84
|
+
readonly type: "String";
|
|
85
|
+
};
|
|
86
|
+
readonly type: {
|
|
87
|
+
readonly type: "String";
|
|
88
|
+
};
|
|
89
|
+
readonly message: {
|
|
90
|
+
readonly type: "String";
|
|
91
|
+
readonly nativeType: "Text";
|
|
92
|
+
};
|
|
93
|
+
readonly status: {
|
|
94
|
+
readonly type: "String";
|
|
95
|
+
readonly default: "\"open\"";
|
|
96
|
+
};
|
|
97
|
+
readonly url: {
|
|
98
|
+
readonly type: "String";
|
|
99
|
+
};
|
|
100
|
+
readonly urlPattern: {
|
|
101
|
+
readonly type: "String";
|
|
102
|
+
readonly optional: true;
|
|
103
|
+
};
|
|
104
|
+
readonly screenshotUrl: {
|
|
105
|
+
readonly type: "String";
|
|
106
|
+
readonly optional: true;
|
|
107
|
+
readonly nativeType: "Text";
|
|
108
|
+
};
|
|
109
|
+
readonly screenshotRegion: {
|
|
110
|
+
readonly type: "Json";
|
|
111
|
+
readonly optional: true;
|
|
112
|
+
};
|
|
113
|
+
readonly diagnostics: {
|
|
114
|
+
readonly type: "Json";
|
|
115
|
+
readonly optional: true;
|
|
116
|
+
};
|
|
117
|
+
readonly viewport: {
|
|
118
|
+
readonly type: "String";
|
|
119
|
+
};
|
|
120
|
+
readonly userAgent: {
|
|
121
|
+
readonly type: "String";
|
|
122
|
+
};
|
|
123
|
+
readonly authorName: {
|
|
124
|
+
readonly type: "String";
|
|
125
|
+
};
|
|
126
|
+
readonly authorEmail: {
|
|
127
|
+
readonly type: "String";
|
|
128
|
+
};
|
|
129
|
+
readonly clientId: {
|
|
130
|
+
readonly type: "String";
|
|
131
|
+
readonly isUnique: true;
|
|
132
|
+
};
|
|
133
|
+
readonly resolvedAt: {
|
|
134
|
+
readonly type: "DateTime";
|
|
135
|
+
readonly optional: true;
|
|
136
|
+
};
|
|
137
|
+
readonly createdAt: {
|
|
138
|
+
readonly type: "DateTime";
|
|
139
|
+
readonly default: "now()";
|
|
140
|
+
};
|
|
141
|
+
readonly updatedAt: {
|
|
142
|
+
readonly type: "DateTime";
|
|
143
|
+
readonly isUpdatedAt: true;
|
|
144
|
+
};
|
|
145
|
+
readonly annotations: {
|
|
146
|
+
readonly type: "SitepingAnnotation";
|
|
147
|
+
readonly relation: {
|
|
148
|
+
readonly kind: "1-to-many";
|
|
149
|
+
readonly model: "SitepingAnnotation";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly indexes: readonly [{
|
|
154
|
+
readonly fields: readonly ["projectName"];
|
|
155
|
+
}, {
|
|
156
|
+
readonly fields: readonly ["projectName", "status", "createdAt"];
|
|
157
|
+
}, {
|
|
158
|
+
readonly fields: readonly ["projectName", "url"];
|
|
159
|
+
}];
|
|
160
|
+
};
|
|
161
|
+
readonly SitepingAnnotation: {
|
|
162
|
+
readonly fields: {
|
|
163
|
+
readonly id: {
|
|
164
|
+
readonly type: "String";
|
|
165
|
+
readonly isId: true;
|
|
166
|
+
readonly default: "cuid()";
|
|
167
|
+
};
|
|
168
|
+
readonly feedbackId: {
|
|
169
|
+
readonly type: "String";
|
|
170
|
+
};
|
|
171
|
+
readonly feedback: {
|
|
172
|
+
readonly type: "SitepingFeedback";
|
|
173
|
+
readonly relation: {
|
|
174
|
+
readonly kind: "many-to-1";
|
|
175
|
+
readonly model: "SitepingFeedback";
|
|
176
|
+
readonly fields: readonly ["feedbackId"];
|
|
177
|
+
readonly references: readonly ["id"];
|
|
178
|
+
readonly onDelete: "Cascade";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
readonly cssSelector: {
|
|
182
|
+
readonly type: "String";
|
|
183
|
+
readonly nativeType: "Text";
|
|
184
|
+
};
|
|
185
|
+
readonly xpath: {
|
|
186
|
+
readonly type: "String";
|
|
187
|
+
readonly nativeType: "Text";
|
|
188
|
+
};
|
|
189
|
+
readonly textSnippet: {
|
|
190
|
+
readonly type: "String";
|
|
191
|
+
readonly nativeType: "Text";
|
|
192
|
+
};
|
|
193
|
+
readonly elementTag: {
|
|
194
|
+
readonly type: "String";
|
|
195
|
+
};
|
|
196
|
+
readonly elementId: {
|
|
197
|
+
readonly type: "String";
|
|
198
|
+
readonly optional: true;
|
|
199
|
+
};
|
|
200
|
+
readonly textPrefix: {
|
|
201
|
+
readonly type: "String";
|
|
202
|
+
readonly nativeType: "Text";
|
|
203
|
+
};
|
|
204
|
+
readonly textSuffix: {
|
|
205
|
+
readonly type: "String";
|
|
206
|
+
readonly nativeType: "Text";
|
|
207
|
+
};
|
|
208
|
+
readonly fingerprint: {
|
|
209
|
+
readonly type: "String";
|
|
210
|
+
};
|
|
211
|
+
readonly neighborText: {
|
|
212
|
+
readonly type: "String";
|
|
213
|
+
readonly nativeType: "Text";
|
|
214
|
+
};
|
|
215
|
+
readonly anchorKey: {
|
|
216
|
+
readonly type: "String";
|
|
217
|
+
readonly optional: true;
|
|
218
|
+
};
|
|
219
|
+
readonly xPct: {
|
|
220
|
+
readonly type: "Float";
|
|
221
|
+
};
|
|
222
|
+
readonly yPct: {
|
|
223
|
+
readonly type: "Float";
|
|
224
|
+
};
|
|
225
|
+
readonly wPct: {
|
|
226
|
+
readonly type: "Float";
|
|
227
|
+
};
|
|
228
|
+
readonly hPct: {
|
|
229
|
+
readonly type: "Float";
|
|
230
|
+
};
|
|
231
|
+
readonly scrollX: {
|
|
232
|
+
readonly type: "Float";
|
|
233
|
+
};
|
|
234
|
+
readonly scrollY: {
|
|
235
|
+
readonly type: "Float";
|
|
236
|
+
};
|
|
237
|
+
readonly viewportW: {
|
|
238
|
+
readonly type: "Int";
|
|
239
|
+
};
|
|
240
|
+
readonly viewportH: {
|
|
241
|
+
readonly type: "Int";
|
|
242
|
+
};
|
|
243
|
+
readonly devicePixelRatio: {
|
|
244
|
+
readonly type: "Float";
|
|
245
|
+
readonly default: "1";
|
|
246
|
+
};
|
|
247
|
+
readonly createdAt: {
|
|
248
|
+
readonly type: "DateTime";
|
|
249
|
+
readonly default: "now()";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
readonly indexes: readonly [{
|
|
253
|
+
readonly fields: readonly ["feedbackId"];
|
|
254
|
+
}];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/** Map of Siteping models keyed by model name — frozen at runtime. */
|
|
258
|
+
export declare const SITEPING_MODELS: typeof _SITEPING_MODELS;
|
|
259
|
+
/** Union of every Siteping model name as a string literal. */
|
|
260
|
+
export type SitepingModelName = keyof typeof SITEPING_MODELS;
|
|
261
|
+
/** Field names declared on a specific Siteping model. */
|
|
262
|
+
export type SitepingModelFieldName<M extends SitepingModelName> = keyof (typeof SITEPING_MODELS)[M]["fields"];
|
|
263
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pluggable storage for feedback screenshots.
|
|
3
|
+
*
|
|
4
|
+
* `adapter-prisma` accepts an optional `screenshotStorage` config. When
|
|
5
|
+
* provided, the adapter forwards the widget-supplied data URL to `upload()`
|
|
6
|
+
* and persists the returned URL on `Feedback.screenshotUrl`. When not
|
|
7
|
+
* provided, the adapter falls back to inline base64 (with a one-time warn) —
|
|
8
|
+
* fine for dev and small deployments, a footgun for production Postgres.
|
|
9
|
+
*
|
|
10
|
+
* Implementations typically wrap an object store: S3, Cloudflare R2,
|
|
11
|
+
* Backblaze B2, Cloudflare Images, local filesystem, etc. They are
|
|
12
|
+
* intentionally not shipped from this package — wire your own based on
|
|
13
|
+
* existing infra.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Minimal S3 implementation
|
|
18
|
+
* import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
|
|
19
|
+
*
|
|
20
|
+
* const s3 = new S3Client({ region: "eu-west-3" });
|
|
21
|
+
* const screenshotStorage: ScreenshotStorage = {
|
|
22
|
+
* async upload(dataUrl, ctx) {
|
|
23
|
+
* const buf = Buffer.from(dataUrl.split(",")[1], "base64");
|
|
24
|
+
* const key = `feedback/${ctx.feedbackId}.jpg`;
|
|
25
|
+
* await s3.send(new PutObjectCommand({
|
|
26
|
+
* Bucket: "my-bucket", Key: key, Body: buf, ContentType: ctx.mimeType,
|
|
27
|
+
* }));
|
|
28
|
+
* return { url: `https://cdn.example.com/${key}` };
|
|
29
|
+
* },
|
|
30
|
+
* };
|
|
31
|
+
*
|
|
32
|
+
* createSitepingHandler({ prisma, screenshotStorage });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export interface ScreenshotStorage {
|
|
36
|
+
/**
|
|
37
|
+
* Persist a base64 data URL and return the URL the widget will use as
|
|
38
|
+
* `<img src>`. Implementations decide the underlying storage and any
|
|
39
|
+
* post-processing (resize, virus scan, content-type sniff).
|
|
40
|
+
*
|
|
41
|
+
* Adapters call this synchronously inside `createFeedback` — keep it
|
|
42
|
+
* fast or move to a queue if needed.
|
|
43
|
+
*/
|
|
44
|
+
upload(dataUrl: string, ctx: {
|
|
45
|
+
feedbackId: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
}): Promise<{
|
|
48
|
+
url: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Optional cleanup hook called when the feedback is deleted. Adapters
|
|
52
|
+
* call this best-effort and swallow errors — orphaned objects are
|
|
53
|
+
* preferred over failed deletes.
|
|
54
|
+
*/
|
|
55
|
+
delete?: (url: string) => Promise<void>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pluggable storage for feedback screenshots.
|
|
3
|
+
*
|
|
4
|
+
* `adapter-prisma` accepts an optional `screenshotStorage` config. When
|
|
5
|
+
* provided, the adapter forwards the widget-supplied data URL to `upload()`
|
|
6
|
+
* and persists the returned URL on `Feedback.screenshotUrl`. When not
|
|
7
|
+
* provided, the adapter falls back to inline base64 (with a one-time warn) —
|
|
8
|
+
* fine for dev and small deployments, a footgun for production Postgres.
|
|
9
|
+
*
|
|
10
|
+
* Implementations typically wrap an object store: S3, Cloudflare R2,
|
|
11
|
+
* Backblaze B2, Cloudflare Images, local filesystem, etc. They are
|
|
12
|
+
* intentionally not shipped from this package — wire your own based on
|
|
13
|
+
* existing infra.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Minimal S3 implementation
|
|
18
|
+
* import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
|
|
19
|
+
*
|
|
20
|
+
* const s3 = new S3Client({ region: "eu-west-3" });
|
|
21
|
+
* const screenshotStorage: ScreenshotStorage = {
|
|
22
|
+
* async upload(dataUrl, ctx) {
|
|
23
|
+
* const buf = Buffer.from(dataUrl.split(",")[1], "base64");
|
|
24
|
+
* const key = `feedback/${ctx.feedbackId}.jpg`;
|
|
25
|
+
* await s3.send(new PutObjectCommand({
|
|
26
|
+
* Bucket: "my-bucket", Key: key, Body: buf, ContentType: ctx.mimeType,
|
|
27
|
+
* }));
|
|
28
|
+
* return { url: `https://cdn.example.com/${key}` };
|
|
29
|
+
* },
|
|
30
|
+
* };
|
|
31
|
+
*
|
|
32
|
+
* createSitepingHandler({ prisma, screenshotStorage });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export interface ScreenshotStorage {
|
|
36
|
+
/**
|
|
37
|
+
* Persist a base64 data URL and return the URL the widget will use as
|
|
38
|
+
* `<img src>`. Implementations decide the underlying storage and any
|
|
39
|
+
* post-processing (resize, virus scan, content-type sniff).
|
|
40
|
+
*
|
|
41
|
+
* Adapters call this synchronously inside `createFeedback` — keep it
|
|
42
|
+
* fast or move to a queue if needed.
|
|
43
|
+
*/
|
|
44
|
+
upload(dataUrl: string, ctx: {
|
|
45
|
+
feedbackId: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
}): Promise<{
|
|
48
|
+
url: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Optional cleanup hook called when the feedback is deleted. Adapters
|
|
52
|
+
* call this best-effort and swallow errors — orphaned objects are
|
|
53
|
+
* preferred over failed deletes.
|
|
54
|
+
*/
|
|
55
|
+
delete?: (url: string) => Promise<void>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { SitepingErrorCode } from "./errors.cjs";
|
|
2
|
+
export { SitepingAuthError, SitepingError, SitepingNetworkError, SitepingValidationError } from "./errors.cjs";
|
|
3
|
+
export type { FilterResult } from "./filters.cjs";
|
|
4
|
+
export { applyFeedbackFilters } from "./filters.cjs";
|
|
5
|
+
export type { FieldDef, IndexDef, ModelDef, PrismaNativeType, PrismaScalarType, RelationDef, RelationKind, RelationOnDelete, SitepingModelFieldName, SitepingModelName, } from "./schema.cjs";
|
|
6
|
+
export { isRelationField, isScalarField, SITEPING_MODELS } from "./schema.cjs";
|
|
7
|
+
export type { ScreenshotStorage } from "./screenshot-storage.cjs";
|
|
8
|
+
export type { AssertEqual, Brand, DeepReadonly, IfEquals, KeysOfType, NonEmptyArray, Prettify, Replace, RequiredNonNull, } from "./type-utils.cjs";
|
|
9
|
+
export { hasOwn, isRecord } from "./type-utils.cjs";
|
|
10
|
+
export type { AnchorData, AnnotationCreateInput, AnnotationPayload, AnnotationRecord, AnnotationResponse, BuiltinLocale, ConsoleDiagnosticEntry, ConsoleDiagnosticLevel, DiagnosticsCaptureOptions, DiagnosticsSnapshot, FeedbackCreateInput, FeedbackPage, FeedbackPayload, FeedbackQuery, FeedbackRecord, FeedbackResponse, FeedbackResponseList, FeedbackStatus, FeedbackType, FeedbackUpdateInput, NetworkDiagnosticEntry, PageScope, RectData, ScreenshotRegion, SitepingConfig, SitepingDeepLinkOptions, SitepingHeadersOption, SitepingIdentity, SitepingInstance, SitepingLocale, SitepingPosition, SitepingPublicEventListener, SitepingPublicEvents, SitepingSkipReason, SitepingStore, SitepingTheme, SitepingUnsubscribe, } from "./types.cjs";
|
|
11
|
+
export { BUILTIN_LOCALES, CLOSED_FEEDBACK_STATUSES, FEEDBACK_STATUSES, FEEDBACK_TYPES, flattenAnnotation, isClosedStatus, isStoreDuplicate, isStoreNotFound, isStorePersistence, StoreDuplicateError, StoreNotFoundError, StorePersistenceError, } from "./types.cjs";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General-purpose TypeScript utility types used across `@siteping/*`.
|
|
3
|
+
*
|
|
4
|
+
* These are kept dependency-free and re-exported from the package entry
|
|
5
|
+
* so adapters and integrators can rely on the same primitives the core
|
|
6
|
+
* uses internally.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Force TypeScript to expand a computed type into a flat object literal in
|
|
10
|
+
* tooltips and error messages. Purely cosmetic — same structural type, just
|
|
11
|
+
* easier to read.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* type Raw = Omit<FeedbackRecord, "annotations"> & { annotations: number };
|
|
15
|
+
* type Pretty = Prettify<Raw>; // displayed as a flat object
|
|
16
|
+
*/
|
|
17
|
+
export type Prettify<T> = {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} & {};
|
|
20
|
+
/**
|
|
21
|
+
* Branded primitive — opaque alias safer than a raw `string` for IDs and
|
|
22
|
+
* other opaque tokens. Cast through `as` at the construction boundary.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* type FeedbackId = Brand<string, "FeedbackId">;
|
|
26
|
+
* const id = "abc" as FeedbackId;
|
|
27
|
+
*/
|
|
28
|
+
export type Brand<T, B extends string> = T & {
|
|
29
|
+
readonly __brand: B;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Tuple type for arrays guaranteed to contain at least one element. Useful
|
|
33
|
+
* for invariants enforced at the type system level.
|
|
34
|
+
*/
|
|
35
|
+
export type NonEmptyArray<T> = readonly [T, ...T[]];
|
|
36
|
+
/**
|
|
37
|
+
* Returns `Y` when `A` is exactly assignable to `B` and vice-versa,
|
|
38
|
+
* otherwise `N`. Powers compile-time equality assertions.
|
|
39
|
+
*/
|
|
40
|
+
export type IfEquals<A, B, Y = true, N = false> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? Y : N;
|
|
41
|
+
/**
|
|
42
|
+
* Compile-time exact-type guard — throws a type error when `Actual` and
|
|
43
|
+
* `Expected` drift apart. Use inside dead-code `void` statements to lock
|
|
44
|
+
* inferred types against manually-written interfaces.
|
|
45
|
+
*/
|
|
46
|
+
export type AssertEqual<Actual, Expected> = IfEquals<Actual, Expected, true, never>;
|
|
47
|
+
/**
|
|
48
|
+
* Extract literal keys whose values match the predicate type `V`.
|
|
49
|
+
* Useful to derive enums or maps from a config record.
|
|
50
|
+
*/
|
|
51
|
+
export type KeysOfType<T, V> = {
|
|
52
|
+
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
53
|
+
}[keyof T];
|
|
54
|
+
/**
|
|
55
|
+
* Mark every property of `T` as required AND non-nullable. Stricter than
|
|
56
|
+
* `Required<T>` because it also strips `null`.
|
|
57
|
+
*/
|
|
58
|
+
export type RequiredNonNull<T> = {
|
|
59
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Replace properties of `T` whose names are in `K` with the shape `R[K]`.
|
|
63
|
+
* Preserves the rest. Cheaper than chaining `Omit` + `Pick`.
|
|
64
|
+
*/
|
|
65
|
+
export type Replace<T, K extends keyof T, R extends {
|
|
66
|
+
[P in K]: unknown;
|
|
67
|
+
}> = Prettify<Omit<T, K> & R>;
|
|
68
|
+
/**
|
|
69
|
+
* Deep readonly — recurses through arrays and plain objects, leaves
|
|
70
|
+
* primitives, classes, and built-ins (Date, Map, Set, …) untouched.
|
|
71
|
+
*/
|
|
72
|
+
export type DeepReadonly<T> = T extends (infer U)[] ? ReadonlyArray<DeepReadonly<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepReadonly<U>> : T extends object ? T extends (...args: never[]) => unknown ? T : T extends Date | RegExp | Map<unknown, unknown> | Set<unknown> | Promise<unknown> ? T : {
|
|
73
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
74
|
+
} : T;
|
|
75
|
+
/**
|
|
76
|
+
* Type guard that narrows `value` to a non-null `Record<PropertyKey, unknown>`.
|
|
77
|
+
* Useful when validating arbitrary inputs before reading fields.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isRecord(value: unknown): value is Record<PropertyKey, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns true when `value` is an object that exposes the requested key.
|
|
82
|
+
* Type-narrows `value` so the property can be accessed without further
|
|
83
|
+
* casting — a strictly typed replacement for `"k" in obj`.
|
|
84
|
+
*
|
|
85
|
+
* Named after the standardised `Object.hasOwn` helper rather than the
|
|
86
|
+
* legacy `Object.prototype.hasOwnProperty`, which the linter forbids
|
|
87
|
+
* shadowing.
|
|
88
|
+
*/
|
|
89
|
+
export declare function hasOwn<K extends PropertyKey>(value: unknown, key: K): value is Record<K, unknown>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General-purpose TypeScript utility types used across `@siteping/*`.
|
|
3
|
+
*
|
|
4
|
+
* These are kept dependency-free and re-exported from the package entry
|
|
5
|
+
* so adapters and integrators can rely on the same primitives the core
|
|
6
|
+
* uses internally.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Force TypeScript to expand a computed type into a flat object literal in
|
|
10
|
+
* tooltips and error messages. Purely cosmetic — same structural type, just
|
|
11
|
+
* easier to read.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* type Raw = Omit<FeedbackRecord, "annotations"> & { annotations: number };
|
|
15
|
+
* type Pretty = Prettify<Raw>; // displayed as a flat object
|
|
16
|
+
*/
|
|
17
|
+
export type Prettify<T> = {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} & {};
|
|
20
|
+
/**
|
|
21
|
+
* Branded primitive — opaque alias safer than a raw `string` for IDs and
|
|
22
|
+
* other opaque tokens. Cast through `as` at the construction boundary.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* type FeedbackId = Brand<string, "FeedbackId">;
|
|
26
|
+
* const id = "abc" as FeedbackId;
|
|
27
|
+
*/
|
|
28
|
+
export type Brand<T, B extends string> = T & {
|
|
29
|
+
readonly __brand: B;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Tuple type for arrays guaranteed to contain at least one element. Useful
|
|
33
|
+
* for invariants enforced at the type system level.
|
|
34
|
+
*/
|
|
35
|
+
export type NonEmptyArray<T> = readonly [T, ...T[]];
|
|
36
|
+
/**
|
|
37
|
+
* Returns `Y` when `A` is exactly assignable to `B` and vice-versa,
|
|
38
|
+
* otherwise `N`. Powers compile-time equality assertions.
|
|
39
|
+
*/
|
|
40
|
+
export type IfEquals<A, B, Y = true, N = false> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? Y : N;
|
|
41
|
+
/**
|
|
42
|
+
* Compile-time exact-type guard — throws a type error when `Actual` and
|
|
43
|
+
* `Expected` drift apart. Use inside dead-code `void` statements to lock
|
|
44
|
+
* inferred types against manually-written interfaces.
|
|
45
|
+
*/
|
|
46
|
+
export type AssertEqual<Actual, Expected> = IfEquals<Actual, Expected, true, never>;
|
|
47
|
+
/**
|
|
48
|
+
* Extract literal keys whose values match the predicate type `V`.
|
|
49
|
+
* Useful to derive enums or maps from a config record.
|
|
50
|
+
*/
|
|
51
|
+
export type KeysOfType<T, V> = {
|
|
52
|
+
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
53
|
+
}[keyof T];
|
|
54
|
+
/**
|
|
55
|
+
* Mark every property of `T` as required AND non-nullable. Stricter than
|
|
56
|
+
* `Required<T>` because it also strips `null`.
|
|
57
|
+
*/
|
|
58
|
+
export type RequiredNonNull<T> = {
|
|
59
|
+
[K in keyof T]-?: NonNullable<T[K]>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Replace properties of `T` whose names are in `K` with the shape `R[K]`.
|
|
63
|
+
* Preserves the rest. Cheaper than chaining `Omit` + `Pick`.
|
|
64
|
+
*/
|
|
65
|
+
export type Replace<T, K extends keyof T, R extends {
|
|
66
|
+
[P in K]: unknown;
|
|
67
|
+
}> = Prettify<Omit<T, K> & R>;
|
|
68
|
+
/**
|
|
69
|
+
* Deep readonly — recurses through arrays and plain objects, leaves
|
|
70
|
+
* primitives, classes, and built-ins (Date, Map, Set, …) untouched.
|
|
71
|
+
*/
|
|
72
|
+
export type DeepReadonly<T> = T extends (infer U)[] ? ReadonlyArray<DeepReadonly<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepReadonly<U>> : T extends object ? T extends (...args: never[]) => unknown ? T : T extends Date | RegExp | Map<unknown, unknown> | Set<unknown> | Promise<unknown> ? T : {
|
|
73
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
74
|
+
} : T;
|
|
75
|
+
/**
|
|
76
|
+
* Type guard that narrows `value` to a non-null `Record<PropertyKey, unknown>`.
|
|
77
|
+
* Useful when validating arbitrary inputs before reading fields.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isRecord(value: unknown): value is Record<PropertyKey, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns true when `value` is an object that exposes the requested key.
|
|
82
|
+
* Type-narrows `value` so the property can be accessed without further
|
|
83
|
+
* casting — a strictly typed replacement for `"k" in obj`.
|
|
84
|
+
*
|
|
85
|
+
* Named after the standardised `Object.hasOwn` helper rather than the
|
|
86
|
+
* legacy `Object.prototype.hasOwnProperty`, which the linter forbids
|
|
87
|
+
* shadowing.
|
|
88
|
+
*/
|
|
89
|
+
export declare function hasOwn<K extends PropertyKey>(value: unknown, key: K): value is Record<K, unknown>;
|