@siteping/widget 0.10.7 → 0.10.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/dist/{chunk-7ZBKJ6NW.js → chunk-4CK3N4YE.js} +11 -11
- package/dist/chunk-4CK3N4YE.js.map +1 -0
- package/dist/{chunk-GKRKCSID.cjs → chunk-BJFC7TVL.cjs} +11 -11
- package/dist/chunk-BJFC7TVL.cjs.map +1 -0
- package/dist/{chunk-NVNA5AI2.cjs → chunk-EYISG4OI.js} +11 -11
- package/dist/chunk-EYISG4OI.js.map +1 -0
- package/dist/{chunk-FDQWFGRR.js → chunk-OK2KX3KN.cjs} +11 -11
- package/dist/chunk-OK2KX3KN.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 +46 -46
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +51 -51
- package/dist/index.js.map +1 -1
- package/dist/panel-KCYUMYAI.cjs +2 -0
- package/dist/{panel-M2QKMFYO.cjs.map → panel-KCYUMYAI.cjs.map} +1 -1
- package/dist/panel-KV2AQHC2.js +2 -0
- package/dist/{panel-FUPBUN6F.js.map → panel-KV2AQHC2.js.map} +1 -1
- package/dist/panel-LYS3425X.cjs +2 -0
- package/dist/{panel-XUTDVTAR.cjs.map → panel-LYS3425X.cjs.map} +1 -1
- package/dist/panel-W2LHYGFS.js +2 -0
- package/dist/{panel-7URHNKQH.js.map → panel-W2LHYGFS.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 +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +4 -4
- 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
|
@@ -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
|
@@ -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.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,
|
|
@@ -79,9 +79,9 @@
|
|
|
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"
|