@siteping/widget 0.10.7 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GKRKCSID.cjs → chunk-AFLWWD6M.cjs} +11 -11
- package/dist/chunk-AFLWWD6M.cjs.map +1 -0
- package/dist/{chunk-7ZBKJ6NW.js → chunk-ATTI2TS4.js} +11 -11
- package/dist/chunk-ATTI2TS4.js.map +1 -0
- package/dist/{chunk-NVNA5AI2.cjs → chunk-BP5TH2CD.js} +11 -11
- package/dist/chunk-BP5TH2CD.js.map +1 -0
- package/dist/{chunk-FDQWFGRR.js → chunk-OSADAHGS.cjs} +11 -11
- package/dist/chunk-OSADAHGS.cjs.map +1 -0
- package/dist/email.d.cts +19 -0
- package/dist/email.d.ts +19 -0
- package/dist/filters.d.cts +29 -4
- package/dist/filters.d.ts +29 -4
- package/dist/index.cjs +50 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +107 -119
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +51 -51
- package/dist/index.js.map +1 -1
- package/dist/panel-2FEECS2N.cjs +2 -0
- package/dist/{panel-M2QKMFYO.cjs.map → panel-2FEECS2N.cjs.map} +1 -1
- package/dist/panel-CSFFA5FF.cjs +2 -0
- package/dist/{panel-XUTDVTAR.cjs.map → panel-CSFFA5FF.cjs.map} +1 -1
- package/dist/panel-S2UR5BSD.js +2 -0
- package/dist/{panel-7URHNKQH.js.map → panel-S2UR5BSD.js.map} +1 -1
- package/dist/panel-SGSUHR7V.js +2 -0
- package/dist/{panel-FUPBUN6F.js.map → panel-SGSUHR7V.js.map} +1 -1
- package/dist/react.cjs +42 -42
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +46 -46
- package/dist/react.js.map +1 -1
- package/dist/siteping-core.d.cts +3 -2
- package/dist/siteping-core.d.ts +3 -2
- package/dist/store-helpers.d.cts +13 -4
- package/dist/store-helpers.d.ts +13 -4
- package/dist/types.d.cts +4 -4
- package/dist/types.d.ts +4 -4
- package/package.json +5 -5
- package/dist/chunk-7ZBKJ6NW.js.map +0 -1
- package/dist/chunk-FDQWFGRR.js.map +0 -1
- package/dist/chunk-GKRKCSID.cjs.map +0 -1
- package/dist/chunk-NVNA5AI2.cjs.map +0 -1
- package/dist/panel-7URHNKQH.js +0 -2
- package/dist/panel-FUPBUN6F.js +0 -2
- package/dist/panel-M2QKMFYO.cjs +0 -2
- package/dist/panel-XUTDVTAR.cjs +0 -2
package/dist/siteping-core.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { EMAIL_PATTERN, isValidEmail } from "./email.cjs";
|
|
1
2
|
export type { SitepingErrorCode } from "./errors.cjs";
|
|
2
3
|
export { SitepingAuthError, SitepingError, SitepingNetworkError, SitepingValidationError } from "./errors.cjs";
|
|
3
|
-
export type { FilterResult } from "./filters.cjs";
|
|
4
|
-
export { applyFeedbackFilters } from "./filters.cjs";
|
|
4
|
+
export type { FilterResult, Pagination } from "./filters.cjs";
|
|
5
|
+
export { applyFeedbackFilters, clampPagination, DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT } from "./filters.cjs";
|
|
5
6
|
export type { I18n, LocaleLoaders, TranslateFunction } from "./i18n.cjs";
|
|
6
7
|
export { createI18n, interpolate, tWithParams } from "./i18n.cjs";
|
|
7
8
|
export type { FieldDef, IndexDef, ModelDef, PrismaNativeType, PrismaScalarType, RelationDef, RelationKind, RelationOnDelete, SitepingModelFieldName, SitepingModelName, } from "./schema.cjs";
|
package/dist/siteping-core.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { EMAIL_PATTERN, isValidEmail } from "./email.js";
|
|
1
2
|
export type { SitepingErrorCode } from "./errors.js";
|
|
2
3
|
export { SitepingAuthError, SitepingError, SitepingNetworkError, SitepingValidationError } from "./errors.js";
|
|
3
|
-
export type { FilterResult } from "./filters.js";
|
|
4
|
-
export { applyFeedbackFilters } from "./filters.js";
|
|
4
|
+
export type { FilterResult, Pagination } from "./filters.js";
|
|
5
|
+
export { applyFeedbackFilters, clampPagination, DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT } from "./filters.js";
|
|
5
6
|
export type { I18n, LocaleLoaders, TranslateFunction } from "./i18n.js";
|
|
6
7
|
export { createI18n, interpolate, tWithParams } from "./i18n.js";
|
|
7
8
|
export type { FieldDef, IndexDef, ModelDef, PrismaNativeType, PrismaScalarType, RelationDef, RelationKind, RelationOnDelete, SitepingModelFieldName, SitepingModelName, } from "./schema.js";
|
package/dist/store-helpers.d.cts
CHANGED
|
@@ -41,11 +41,18 @@ export declare function buildFeedbackRecord(input: FeedbackCreateInput, ctx: {
|
|
|
41
41
|
* and async KV stores all fit the same three functions.
|
|
42
42
|
*/
|
|
43
43
|
export interface CollectionStoreBackend {
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Return the current full snapshot of feedback records. The engine never
|
|
46
|
+
* mutates this array — handing out a live cache is safe.
|
|
47
|
+
*/
|
|
45
48
|
load(): FeedbackRecord[] | Promise<FeedbackRecord[]>;
|
|
46
49
|
/**
|
|
47
|
-
* Persist the full snapshot
|
|
48
|
-
*
|
|
50
|
+
* Persist the full snapshot — always a new array, never the one `load()`
|
|
51
|
+
* returned. Throw `StorePersistenceError` when the write is lost (quota,
|
|
52
|
+
* storage disabled, …) — never swallow the failure. Because the loaded
|
|
53
|
+
* snapshot is left untouched, a throw here leaves a cached `load()` result
|
|
54
|
+
* consistent with durable storage: no phantom record, no half-applied
|
|
55
|
+
* update.
|
|
49
56
|
*/
|
|
50
57
|
persist(feedbacks: FeedbackRecord[]): void | Promise<void>;
|
|
51
58
|
/** Generate a unique id for a new feedback or annotation record. */
|
|
@@ -62,7 +69,9 @@ export type CollectionStore = SitepingStore & Required<Pick<SitepingStore, "veri
|
|
|
62
69
|
* The engine implements the whole store contract: clientId dedup (idempotent
|
|
63
70
|
* create), newest-first ordering, the standard filter/pagination pipeline,
|
|
64
71
|
* `StoreNotFoundError` on missing update/delete, project-scoped bulk delete,
|
|
65
|
-
* and `verifyProjectOwnership`.
|
|
72
|
+
* and `verifyProjectOwnership`. The snapshot returned by `load` is never
|
|
73
|
+
* mutated: every write hands `persist` a new array, so a failed write leaves
|
|
74
|
+
* a cached snapshot exactly as it was. When `persist` fails during `createFeedback`
|
|
66
75
|
* and the record carries an inline screenshot, the engine retries once
|
|
67
76
|
* without the screenshot (by far the heaviest field) so the text feedback
|
|
68
77
|
* survives a storage-quota hit; if that also fails, the error propagates —
|
package/dist/store-helpers.d.ts
CHANGED
|
@@ -41,11 +41,18 @@ export declare function buildFeedbackRecord(input: FeedbackCreateInput, ctx: {
|
|
|
41
41
|
* and async KV stores all fit the same three functions.
|
|
42
42
|
*/
|
|
43
43
|
export interface CollectionStoreBackend {
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Return the current full snapshot of feedback records. The engine never
|
|
46
|
+
* mutates this array — handing out a live cache is safe.
|
|
47
|
+
*/
|
|
45
48
|
load(): FeedbackRecord[] | Promise<FeedbackRecord[]>;
|
|
46
49
|
/**
|
|
47
|
-
* Persist the full snapshot
|
|
48
|
-
*
|
|
50
|
+
* Persist the full snapshot — always a new array, never the one `load()`
|
|
51
|
+
* returned. Throw `StorePersistenceError` when the write is lost (quota,
|
|
52
|
+
* storage disabled, …) — never swallow the failure. Because the loaded
|
|
53
|
+
* snapshot is left untouched, a throw here leaves a cached `load()` result
|
|
54
|
+
* consistent with durable storage: no phantom record, no half-applied
|
|
55
|
+
* update.
|
|
49
56
|
*/
|
|
50
57
|
persist(feedbacks: FeedbackRecord[]): void | Promise<void>;
|
|
51
58
|
/** Generate a unique id for a new feedback or annotation record. */
|
|
@@ -62,7 +69,9 @@ export type CollectionStore = SitepingStore & Required<Pick<SitepingStore, "veri
|
|
|
62
69
|
* The engine implements the whole store contract: clientId dedup (idempotent
|
|
63
70
|
* create), newest-first ordering, the standard filter/pagination pipeline,
|
|
64
71
|
* `StoreNotFoundError` on missing update/delete, project-scoped bulk delete,
|
|
65
|
-
* and `verifyProjectOwnership`.
|
|
72
|
+
* and `verifyProjectOwnership`. The snapshot returned by `load` is never
|
|
73
|
+
* mutated: every write hands `persist` a new array, so a failed write leaves
|
|
74
|
+
* a cached snapshot exactly as it was. When `persist` fails during `createFeedback`
|
|
66
75
|
* and the record carries an inline screenshot, the engine retries once
|
|
67
76
|
* without the screenshot (by far the heaviest field) so the text feedback
|
|
68
77
|
* survives a storage-quota hit; if that also fails, the error propagates —
|
package/dist/types.d.cts
CHANGED
|
@@ -113,12 +113,12 @@ export interface SitepingBaseConfig {
|
|
|
113
113
|
* Capture a JPEG screenshot of the annotated area on submit. Defaults to
|
|
114
114
|
* `false` — opt-in because:
|
|
115
115
|
*
|
|
116
|
-
* - it adds runtime weight (~
|
|
116
|
+
* - it adds runtime weight (~60 KB gzip dynamic chunk for html2canvas-pro,
|
|
117
117
|
* loaded only on first capture),
|
|
118
118
|
* - it embeds page content in the feedback (privacy/GDPR consideration —
|
|
119
119
|
* inform end users in your widget host UI when enabling).
|
|
120
120
|
*
|
|
121
|
-
* `html2canvas` ships as a regular dependency of `@siteping/widget` so the
|
|
121
|
+
* `html2canvas-pro` ships as a regular dependency of `@siteping/widget` so the
|
|
122
122
|
* dynamic import always resolves; you don't need to install anything extra.
|
|
123
123
|
*
|
|
124
124
|
* **Masking sensitive elements:** add `data-siteping-ignore="true"` to any
|
|
@@ -595,7 +595,7 @@ export interface AnnotationRecord {
|
|
|
595
595
|
*/
|
|
596
596
|
export declare class StoreNotFoundError extends Error {
|
|
597
597
|
readonly code: "STORE_NOT_FOUND";
|
|
598
|
-
constructor(message?: string);
|
|
598
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
601
601
|
* Thrown when a unique constraint is violated (e.g. duplicate `clientId`).
|
|
@@ -604,7 +604,7 @@ export declare class StoreNotFoundError extends Error {
|
|
|
604
604
|
*/
|
|
605
605
|
export declare class StoreDuplicateError extends Error {
|
|
606
606
|
readonly code: "STORE_DUPLICATE";
|
|
607
|
-
constructor(message?: string);
|
|
607
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
610
610
|
* Thrown when a store accepts a mutation but cannot persist it — e.g.
|
package/dist/types.d.ts
CHANGED
|
@@ -113,12 +113,12 @@ export interface SitepingBaseConfig {
|
|
|
113
113
|
* Capture a JPEG screenshot of the annotated area on submit. Defaults to
|
|
114
114
|
* `false` — opt-in because:
|
|
115
115
|
*
|
|
116
|
-
* - it adds runtime weight (~
|
|
116
|
+
* - it adds runtime weight (~60 KB gzip dynamic chunk for html2canvas-pro,
|
|
117
117
|
* loaded only on first capture),
|
|
118
118
|
* - it embeds page content in the feedback (privacy/GDPR consideration —
|
|
119
119
|
* inform end users in your widget host UI when enabling).
|
|
120
120
|
*
|
|
121
|
-
* `html2canvas` ships as a regular dependency of `@siteping/widget` so the
|
|
121
|
+
* `html2canvas-pro` ships as a regular dependency of `@siteping/widget` so the
|
|
122
122
|
* dynamic import always resolves; you don't need to install anything extra.
|
|
123
123
|
*
|
|
124
124
|
* **Masking sensitive elements:** add `data-siteping-ignore="true"` to any
|
|
@@ -595,7 +595,7 @@ export interface AnnotationRecord {
|
|
|
595
595
|
*/
|
|
596
596
|
export declare class StoreNotFoundError extends Error {
|
|
597
597
|
readonly code: "STORE_NOT_FOUND";
|
|
598
|
-
constructor(message?: string);
|
|
598
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
601
601
|
* Thrown when a unique constraint is violated (e.g. duplicate `clientId`).
|
|
@@ -604,7 +604,7 @@ export declare class StoreNotFoundError extends Error {
|
|
|
604
604
|
*/
|
|
605
605
|
export declare class StoreDuplicateError extends Error {
|
|
606
606
|
readonly code: "STORE_DUPLICATE";
|
|
607
|
-
constructor(message?: string);
|
|
607
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
610
610
|
* Thrown when a store accepts a mutation but cannot persist it — e.g.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siteping/widget",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9",
|
|
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,
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@medv/finder": "^4.0.2",
|
|
76
|
-
"html2canvas": "^
|
|
76
|
+
"html2canvas-pro": "^2.4.2"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@siteping/core": "workspace:*",
|
|
80
80
|
"@size-limit/preset-small-lib": "^12.1.0",
|
|
81
81
|
"@testing-library/react": "^16.3.2",
|
|
82
|
-
"@types/react": "^19.2.
|
|
83
|
-
"@types/react-dom": "^19.2.
|
|
84
|
-
"esbuild": "^0.28.
|
|
82
|
+
"@types/react": "^19.2.18",
|
|
83
|
+
"@types/react-dom": "^19.2.5",
|
|
84
|
+
"esbuild": "^0.28.2",
|
|
85
85
|
"react": "^19.2.7",
|
|
86
86
|
"react-dom": "^19.2.7",
|
|
87
87
|
"size-limit": "^12.1.0"
|