@siteping/widget 0.11.1 → 0.12.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.
Files changed (126) hide show
  1. package/README.md +5 -5
  2. package/dist/chunk-ISSCC4XP.js +9 -0
  3. package/dist/chunk-ISSCC4XP.js.map +1 -0
  4. package/dist/chunk-QDJDQQ6E.cjs +9 -0
  5. package/dist/chunk-QDJDQQ6E.cjs.map +1 -0
  6. package/dist/de-GCYQ3JCH.cjs +2 -0
  7. package/dist/de-GCYQ3JCH.cjs.map +1 -0
  8. package/dist/de-U3V6TPCZ.js +2 -0
  9. package/dist/de-U3V6TPCZ.js.map +1 -0
  10. package/dist/deep-link.d.cts +10 -0
  11. package/dist/deep-link.d.ts +10 -0
  12. package/dist/errors.d.cts +46 -16
  13. package/dist/errors.d.ts +46 -16
  14. package/dist/es-435K3LIV.cjs +2 -0
  15. package/dist/es-435K3LIV.cjs.map +1 -0
  16. package/dist/es-CSZUS23Z.js +2 -0
  17. package/dist/es-CSZUS23Z.js.map +1 -0
  18. package/dist/fr-DVOFE3WF.js +2 -0
  19. package/dist/fr-DVOFE3WF.js.map +1 -0
  20. package/dist/fr-RKRDGOTP.cjs +2 -0
  21. package/dist/fr-RKRDGOTP.cjs.map +1 -0
  22. package/dist/i18n.d.cts +14 -10
  23. package/dist/i18n.d.ts +14 -10
  24. package/dist/index.cjs +3 -3
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +26 -19
  27. package/dist/index.d.ts +26 -19
  28. package/dist/index.global.js +3 -3
  29. package/dist/index.global.js.map +1 -1
  30. package/dist/index.js +3 -3
  31. package/dist/index.js.map +1 -1
  32. package/dist/it-COLRVG26.cjs +2 -0
  33. package/dist/it-COLRVG26.cjs.map +1 -0
  34. package/dist/it-ZWPEN22A.js +2 -0
  35. package/dist/it-ZWPEN22A.js.map +1 -0
  36. package/dist/ja-HLZ2GVFS.js +2 -0
  37. package/dist/ja-HLZ2GVFS.js.map +1 -0
  38. package/dist/ja-SNVDY7QP.cjs +2 -0
  39. package/dist/ja-SNVDY7QP.cjs.map +1 -0
  40. package/dist/ko-ORUCHGUZ.cjs +2 -0
  41. package/dist/ko-ORUCHGUZ.cjs.map +1 -0
  42. package/dist/ko-ZNF7AMXI.js +2 -0
  43. package/dist/ko-ZNF7AMXI.js.map +1 -0
  44. package/dist/logger.d.cts +30 -0
  45. package/dist/logger.d.ts +30 -0
  46. package/dist/panel-4CIN3Y66.js +2 -0
  47. package/dist/panel-4CIN3Y66.js.map +1 -0
  48. package/dist/panel-TD4UUEZA.cjs +2 -0
  49. package/dist/panel-TD4UUEZA.cjs.map +1 -0
  50. package/dist/pt-QQX5CA7D.cjs +2 -0
  51. package/dist/pt-QQX5CA7D.cjs.map +1 -0
  52. package/dist/pt-WGEJRQFC.js +2 -0
  53. package/dist/pt-WGEJRQFC.js.map +1 -0
  54. package/dist/react.cjs +2 -3
  55. package/dist/react.cjs.map +1 -1
  56. package/dist/react.d.cts +9 -0
  57. package/dist/react.d.ts +9 -0
  58. package/dist/react.js +2 -3
  59. package/dist/react.js.map +1 -1
  60. package/dist/ru-SERDK6PQ.js +2 -0
  61. package/dist/ru-SERDK6PQ.js.map +1 -0
  62. package/dist/ru-YRXPV57R.cjs +2 -0
  63. package/dist/ru-YRXPV57R.cjs.map +1 -0
  64. package/dist/schema.d.cts +31 -0
  65. package/dist/schema.d.ts +31 -0
  66. package/dist/screenshot-storage.d.cts +14 -17
  67. package/dist/screenshot-storage.d.ts +14 -17
  68. package/dist/siteping-core.d.cts +8 -5
  69. package/dist/siteping-core.d.ts +8 -5
  70. package/dist/store-helpers.d.cts +13 -9
  71. package/dist/store-helpers.d.ts +13 -9
  72. package/dist/text.d.cts +28 -0
  73. package/dist/text.d.ts +28 -0
  74. package/dist/types.d.cts +114 -37
  75. package/dist/types.d.ts +114 -37
  76. package/dist/wire.d.cts +6 -1
  77. package/dist/wire.d.ts +6 -1
  78. package/package.json +10 -8
  79. package/dist/chunk-26577FDQ.js +0 -9
  80. package/dist/chunk-26577FDQ.js.map +0 -1
  81. package/dist/chunk-3EHIWTJH.js +0 -9
  82. package/dist/chunk-3EHIWTJH.js.map +0 -1
  83. package/dist/chunk-6MCFOKVG.cjs +0 -9
  84. package/dist/chunk-6MCFOKVG.cjs.map +0 -1
  85. package/dist/chunk-Q34GDCKE.cjs +0 -9
  86. package/dist/chunk-Q34GDCKE.cjs.map +0 -1
  87. package/dist/de-73CTH2E4.cjs +0 -2
  88. package/dist/de-73CTH2E4.cjs.map +0 -1
  89. package/dist/de-GUUJUHYP.js +0 -2
  90. package/dist/de-GUUJUHYP.js.map +0 -1
  91. package/dist/es-3MXMSDUC.js +0 -2
  92. package/dist/es-3MXMSDUC.js.map +0 -1
  93. package/dist/es-WJZ3XARH.cjs +0 -2
  94. package/dist/es-WJZ3XARH.cjs.map +0 -1
  95. package/dist/fr-52F3ZCLQ.js +0 -2
  96. package/dist/fr-52F3ZCLQ.js.map +0 -1
  97. package/dist/fr-ZCRIJWI3.cjs +0 -2
  98. package/dist/fr-ZCRIJWI3.cjs.map +0 -1
  99. package/dist/it-MEUT3RCC.js +0 -2
  100. package/dist/it-MEUT3RCC.js.map +0 -1
  101. package/dist/it-TGUTW6MO.cjs +0 -2
  102. package/dist/it-TGUTW6MO.cjs.map +0 -1
  103. package/dist/ja-DOS7AWLW.cjs +0 -2
  104. package/dist/ja-DOS7AWLW.cjs.map +0 -1
  105. package/dist/ja-U7NRNGPQ.js +0 -2
  106. package/dist/ja-U7NRNGPQ.js.map +0 -1
  107. package/dist/ko-U2CS6XQ4.js +0 -2
  108. package/dist/ko-U2CS6XQ4.js.map +0 -1
  109. package/dist/ko-ZUL567LW.cjs +0 -2
  110. package/dist/ko-ZUL567LW.cjs.map +0 -1
  111. package/dist/panel-3BEMZFIR.cjs +0 -2
  112. package/dist/panel-3BEMZFIR.cjs.map +0 -1
  113. package/dist/panel-HPDIAYLQ.js +0 -2
  114. package/dist/panel-HPDIAYLQ.js.map +0 -1
  115. package/dist/panel-MIWFGD7X.cjs +0 -2
  116. package/dist/panel-MIWFGD7X.cjs.map +0 -1
  117. package/dist/panel-XTNU6XHV.js +0 -2
  118. package/dist/panel-XTNU6XHV.js.map +0 -1
  119. package/dist/pt-BZRBHCYN.cjs +0 -2
  120. package/dist/pt-BZRBHCYN.cjs.map +0 -1
  121. package/dist/pt-MOS5DVOG.js +0 -2
  122. package/dist/pt-MOS5DVOG.js.map +0 -1
  123. package/dist/ru-KDNRHHNZ.cjs +0 -2
  124. package/dist/ru-KDNRHHNZ.cjs.map +0 -1
  125. package/dist/ru-VSWB5NKK.js +0 -2
  126. package/dist/ru-VSWB5NKK.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { SitepingIdentity, SitepingConfig, SitepingInstance } from './siteping-core.cjs';
2
- export { AnchorData, AnnotationPayload, AnnotationResponse, CommentResponse, FeedbackPayload, FeedbackPermissions, FeedbackResponse, FeedbackStatus, FeedbackType, RectData, SitepingConfig, SitepingHeadersOption, SitepingHttpConfig, SitepingInstance, SitepingLocale, SitepingPanelAction, SitepingPanelActionContext, SitepingPanelActionFeedback, SitepingPanelButtonAction, SitepingPanelLinkAction, SitepingPublicEvents, SitepingStore, SitepingStoreConfig } from './siteping-core.cjs';
1
+ import { SitepingConfig, SitepingInstance } from './siteping-core.cjs';
2
+ export { AnchorData, AnnotationPayload, AnnotationResponse, BuiltinLocale, CommentPermissions, CommentResponse, DiagnosticsCaptureOptions, DiagnosticsSnapshot, FeedbackPayload, FeedbackPermissions, FeedbackResponse, FeedbackStatus, FeedbackType, PageScope, RectData, ScreenshotRegion, SitepingClientError, SitepingConfig, SitepingDeepLinkOptions, SitepingErrorCode, SitepingHeadersOption, SitepingHttpConfig, SitepingIdentity, SitepingInstance, SitepingLocale, SitepingPanelAction, SitepingPanelActionContext, SitepingPanelActionFeedback, SitepingPanelButtonAction, SitepingPanelLinkAction, SitepingPosition, SitepingPublicEventListener, SitepingPublicEvents, SitepingSkipReason, SitepingStore, SitepingStoreConfig, SitepingTheme, SitepingUnsubscribe, isSitepingError } from './siteping-core.cjs';
3
3
 
4
4
  /** All translatable string keys used by the widget. */
5
5
  interface Translations {
@@ -18,6 +18,8 @@ interface Translations {
18
18
  "panel.retry": string;
19
19
  "panel.empty": string;
20
20
  "panel.showMore": string;
21
+ /** A feedback of this page whose pin can't be placed (its element is gone or hidden). */
22
+ "panel.notOnPage": string;
21
23
  "panel.showLess": string;
22
24
  "panel.resolve": string;
23
25
  "panel.reopen": string;
@@ -30,6 +32,7 @@ interface Translations {
30
32
  "panel.statusResolved": string;
31
33
  "panel.statusInProgress": string;
32
34
  "panel.statusWontFix": string;
35
+ "panel.statusClosed": string;
33
36
  "type.label": string;
34
37
  "type.question": string;
35
38
  "type.change": string;
@@ -70,9 +73,14 @@ interface Translations {
70
73
  "fab.badge": string;
71
74
  "feedback.sent.confirmation": string;
72
75
  "feedback.error.message": string;
76
+ /** A failed send saved on the device for the next page load. */
77
+ "feedback.queued": string;
73
78
  "feedback.deleted.confirmation": string;
74
79
  "badge.count": string;
80
+ "bulk.aria": string;
75
81
  "bulk.selectAll": string;
82
+ /** A card's selection checkbox; `{label}` is the card's accessible name. */
83
+ "bulk.selectFeedback": string;
76
84
  "bulk.selected": string;
77
85
  "bulk.resolve": string;
78
86
  "bulk.delete": string;
@@ -84,11 +92,13 @@ interface Translations {
84
92
  "sort.label": string;
85
93
  "group.byPage": string;
86
94
  "group.feedbacks": string;
95
+ "stats.aria": string;
87
96
  "stats.open": string;
88
- "stats.resolved": string;
97
+ "stats.closed": string;
89
98
  "stats.bugs": string;
90
99
  "stats.progress": string;
91
100
  "detail.back": string;
101
+ "detail.aria": string;
92
102
  "detail.title": string;
93
103
  "detail.status": string;
94
104
  "detail.message": string;
@@ -140,29 +150,25 @@ interface Translations {
140
150
  }
141
151
  /** Every valid key of `Translations` as a string-literal union. */
142
152
  type TranslationKey = keyof Translations;
143
- /** A translate function that returns the string for a given key. */
144
- type TFunction = (key: TranslationKey) => string;
145
153
 
146
154
  /**
147
- * Register a custom locale at runtime. Partial dictionaries are welcome —
148
- * missing keys fall back to English per key, so overriding a single string
149
- * never requires copying the whole catalog.
155
+ * Register translations at runtime, for a new locale or over a built-in one —
156
+ * call it before `initSiteping`. Partial dictionaries are welcome: under a
157
+ * built-in code (`registerLocale("fr", { "fab.annotate": "Commenter" })`) the
158
+ * keys given override the built-in dictionary and every other key keeps its
159
+ * built-in value; elsewhere missing keys fall back to English per key. So
160
+ * overriding a single string never requires copying the whole catalog.
161
+ * Calls for the same code accumulate.
150
162
  */
151
163
  declare const registerLocale: (code: string, translations: Partial<Translations>) => void;
152
164
  /**
153
- * Dynamically import a built-in locale and register it. Returns the loaded
154
- * translations or `null` if the locale isn't a known built-in. Custom
155
- * locales registered via {@link registerLocale} bypass this loader.
165
+ * Dynamically import a built-in locale (once) and register it. Returns the
166
+ * locale as the widget resolves it — the built-in dictionary with any
167
+ * {@link registerLocale} overrides on top — or `null` for a code that is
168
+ * neither built in nor registered. A custom code never hits a loader.
156
169
  */
157
170
  declare const loadLocale: (locale: string) => Promise<Partial<Translations> | null>;
158
171
 
159
- /**
160
- * Author identity persisted by the widget — alias of core's
161
- * `SitepingIdentity` (one concept, one shape; the alias keeps the widget's
162
- * historical export name working).
163
- */
164
- type Identity = SitepingIdentity;
165
-
166
172
  /**
167
173
  * Initialize the Siteping feedback widget.
168
174
  *
@@ -178,4 +184,5 @@ type Identity = SitepingIdentity;
178
184
  */
179
185
  declare function initSiteping(config: SitepingConfig): SitepingInstance;
180
186
 
181
- export { type Identity, type TFunction, type TranslationKey, type Translations, initSiteping, loadLocale, registerLocale };
187
+ export { initSiteping, loadLocale, registerLocale };
188
+ export type { TranslationKey, Translations };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { SitepingIdentity, SitepingConfig, SitepingInstance } from './siteping-core.js';
2
- export { AnchorData, AnnotationPayload, AnnotationResponse, CommentResponse, FeedbackPayload, FeedbackPermissions, FeedbackResponse, FeedbackStatus, FeedbackType, RectData, SitepingConfig, SitepingHeadersOption, SitepingHttpConfig, SitepingInstance, SitepingLocale, SitepingPanelAction, SitepingPanelActionContext, SitepingPanelActionFeedback, SitepingPanelButtonAction, SitepingPanelLinkAction, SitepingPublicEvents, SitepingStore, SitepingStoreConfig } from './siteping-core.js';
1
+ import { SitepingConfig, SitepingInstance } from './siteping-core.js';
2
+ export { AnchorData, AnnotationPayload, AnnotationResponse, BuiltinLocale, CommentPermissions, CommentResponse, DiagnosticsCaptureOptions, DiagnosticsSnapshot, FeedbackPayload, FeedbackPermissions, FeedbackResponse, FeedbackStatus, FeedbackType, PageScope, RectData, ScreenshotRegion, SitepingClientError, SitepingConfig, SitepingDeepLinkOptions, SitepingErrorCode, SitepingHeadersOption, SitepingHttpConfig, SitepingIdentity, SitepingInstance, SitepingLocale, SitepingPanelAction, SitepingPanelActionContext, SitepingPanelActionFeedback, SitepingPanelButtonAction, SitepingPanelLinkAction, SitepingPosition, SitepingPublicEventListener, SitepingPublicEvents, SitepingSkipReason, SitepingStore, SitepingStoreConfig, SitepingTheme, SitepingUnsubscribe, isSitepingError } from './siteping-core.js';
3
3
 
4
4
  /** All translatable string keys used by the widget. */
5
5
  interface Translations {
@@ -18,6 +18,8 @@ interface Translations {
18
18
  "panel.retry": string;
19
19
  "panel.empty": string;
20
20
  "panel.showMore": string;
21
+ /** A feedback of this page whose pin can't be placed (its element is gone or hidden). */
22
+ "panel.notOnPage": string;
21
23
  "panel.showLess": string;
22
24
  "panel.resolve": string;
23
25
  "panel.reopen": string;
@@ -30,6 +32,7 @@ interface Translations {
30
32
  "panel.statusResolved": string;
31
33
  "panel.statusInProgress": string;
32
34
  "panel.statusWontFix": string;
35
+ "panel.statusClosed": string;
33
36
  "type.label": string;
34
37
  "type.question": string;
35
38
  "type.change": string;
@@ -70,9 +73,14 @@ interface Translations {
70
73
  "fab.badge": string;
71
74
  "feedback.sent.confirmation": string;
72
75
  "feedback.error.message": string;
76
+ /** A failed send saved on the device for the next page load. */
77
+ "feedback.queued": string;
73
78
  "feedback.deleted.confirmation": string;
74
79
  "badge.count": string;
80
+ "bulk.aria": string;
75
81
  "bulk.selectAll": string;
82
+ /** A card's selection checkbox; `{label}` is the card's accessible name. */
83
+ "bulk.selectFeedback": string;
76
84
  "bulk.selected": string;
77
85
  "bulk.resolve": string;
78
86
  "bulk.delete": string;
@@ -84,11 +92,13 @@ interface Translations {
84
92
  "sort.label": string;
85
93
  "group.byPage": string;
86
94
  "group.feedbacks": string;
95
+ "stats.aria": string;
87
96
  "stats.open": string;
88
- "stats.resolved": string;
97
+ "stats.closed": string;
89
98
  "stats.bugs": string;
90
99
  "stats.progress": string;
91
100
  "detail.back": string;
101
+ "detail.aria": string;
92
102
  "detail.title": string;
93
103
  "detail.status": string;
94
104
  "detail.message": string;
@@ -140,29 +150,25 @@ interface Translations {
140
150
  }
141
151
  /** Every valid key of `Translations` as a string-literal union. */
142
152
  type TranslationKey = keyof Translations;
143
- /** A translate function that returns the string for a given key. */
144
- type TFunction = (key: TranslationKey) => string;
145
153
 
146
154
  /**
147
- * Register a custom locale at runtime. Partial dictionaries are welcome —
148
- * missing keys fall back to English per key, so overriding a single string
149
- * never requires copying the whole catalog.
155
+ * Register translations at runtime, for a new locale or over a built-in one —
156
+ * call it before `initSiteping`. Partial dictionaries are welcome: under a
157
+ * built-in code (`registerLocale("fr", { "fab.annotate": "Commenter" })`) the
158
+ * keys given override the built-in dictionary and every other key keeps its
159
+ * built-in value; elsewhere missing keys fall back to English per key. So
160
+ * overriding a single string never requires copying the whole catalog.
161
+ * Calls for the same code accumulate.
150
162
  */
151
163
  declare const registerLocale: (code: string, translations: Partial<Translations>) => void;
152
164
  /**
153
- * Dynamically import a built-in locale and register it. Returns the loaded
154
- * translations or `null` if the locale isn't a known built-in. Custom
155
- * locales registered via {@link registerLocale} bypass this loader.
165
+ * Dynamically import a built-in locale (once) and register it. Returns the
166
+ * locale as the widget resolves it — the built-in dictionary with any
167
+ * {@link registerLocale} overrides on top — or `null` for a code that is
168
+ * neither built in nor registered. A custom code never hits a loader.
156
169
  */
157
170
  declare const loadLocale: (locale: string) => Promise<Partial<Translations> | null>;
158
171
 
159
- /**
160
- * Author identity persisted by the widget — alias of core's
161
- * `SitepingIdentity` (one concept, one shape; the alias keeps the widget's
162
- * historical export name working).
163
- */
164
- type Identity = SitepingIdentity;
165
-
166
172
  /**
167
173
  * Initialize the Siteping feedback widget.
168
174
  *
@@ -178,4 +184,5 @@ type Identity = SitepingIdentity;
178
184
  */
179
185
  declare function initSiteping(config: SitepingConfig): SitepingInstance;
180
186
 
181
- export { type Identity, type TFunction, type TranslationKey, type Translations, initSiteping, loadLocale, registerLocale };
187
+ export { initSiteping, loadLocale, registerLocale };
188
+ export type { TranslationKey, Translations };