feedtack 1.1.0 → 1.3.0
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 +49 -40
- package/dist/{types-Cu4Oahg4.d.ts → adapter-Cn59URIG.d.ts} +68 -59
- package/dist/{chunk-3INDOI4N.js → chunk-GD2SY64K.js} +74 -1
- package/dist/feedtack.inject.js +199 -0
- package/dist/index.d.ts +30 -21
- package/dist/index.js +46 -83
- package/dist/node/index.d.ts +27 -0
- package/dist/node/index.js +169 -0
- package/dist/react/index.d.ts +61 -2
- package/dist/react/index.js +830 -232
- package/dist/types-CHrWe7xT.d.ts +61 -0
- package/package.json +5 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { F as FeedtackAdapter, s as FeedtackUser, e as FeedbackItem, p as FeedtackPin, r as FeedtackSentiment } from './adapter-Cn59URIG.js';
|
|
2
|
+
|
|
3
|
+
interface FeedtackTheme {
|
|
4
|
+
/** Accent color — pin button active state, focus rings, selected states */
|
|
5
|
+
primary?: string;
|
|
6
|
+
/** Panel and picker background */
|
|
7
|
+
background?: string;
|
|
8
|
+
/** Input and card surface background */
|
|
9
|
+
surface?: string;
|
|
10
|
+
/** Primary text color */
|
|
11
|
+
text?: string;
|
|
12
|
+
/** Secondary/placeholder text color */
|
|
13
|
+
textMuted?: string;
|
|
14
|
+
/** Panel and input border color */
|
|
15
|
+
border?: string;
|
|
16
|
+
/** Border radius applied to panels and inputs */
|
|
17
|
+
radius?: string;
|
|
18
|
+
/** Notification badge color */
|
|
19
|
+
badge?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Maps FeedtackTheme fields to CSS custom properties on #feedtack-root */
|
|
22
|
+
declare function themeToCSS(theme: FeedtackTheme): Record<string, string>;
|
|
23
|
+
|
|
24
|
+
declare function generateId(): string;
|
|
25
|
+
interface FeedtackFlushEvent {
|
|
26
|
+
pathname: string;
|
|
27
|
+
items: FeedbackItem[];
|
|
28
|
+
}
|
|
29
|
+
interface FeedtackEngineOpts {
|
|
30
|
+
adapter: FeedtackAdapter;
|
|
31
|
+
currentUser: FeedtackUser;
|
|
32
|
+
hotkey?: string;
|
|
33
|
+
theme?: FeedtackTheme;
|
|
34
|
+
onError?: (err: Error) => void;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
onFlush?: (event: FeedtackFlushEvent) => void;
|
|
37
|
+
flushIdleMs?: number;
|
|
38
|
+
rescopeRoles?: string[];
|
|
39
|
+
}
|
|
40
|
+
interface FeedtackEngineState {
|
|
41
|
+
isPinModeActive: boolean;
|
|
42
|
+
pendingPins: Array<Omit<FeedtackPin, 'index'>>;
|
|
43
|
+
selectedColor: string;
|
|
44
|
+
showForm: boolean;
|
|
45
|
+
comment: string;
|
|
46
|
+
sentiment: FeedtackSentiment;
|
|
47
|
+
commentError: boolean;
|
|
48
|
+
submitting: boolean;
|
|
49
|
+
feedbackItems: FeedbackItem[];
|
|
50
|
+
siteFeedback: FeedbackItem[];
|
|
51
|
+
pageFeedback: FeedbackItem[];
|
|
52
|
+
loading: boolean;
|
|
53
|
+
openThreadId: string | null;
|
|
54
|
+
replyBody: string;
|
|
55
|
+
isModalOpen: boolean;
|
|
56
|
+
composeScope: 'site' | 'page';
|
|
57
|
+
pathname: string;
|
|
58
|
+
}
|
|
59
|
+
type FeedtackStateListener = (state: FeedtackEngineState, changedKeys: Array<keyof FeedtackEngineState>) => void;
|
|
60
|
+
|
|
61
|
+
export { type FeedtackEngineOpts as F, type FeedtackEngineState as a, type FeedtackStateListener as b, type FeedtackFlushEvent as c, type FeedtackTheme as d, generateId as g, themeToCSS as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feedtack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Click anywhere. Drop a pin. Get a payload a developer can act on.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
16
|
},
|
|
17
|
+
"./node": {
|
|
18
|
+
"types": "./dist/node/index.d.ts",
|
|
19
|
+
"default": "./dist/node/index.js"
|
|
20
|
+
},
|
|
17
21
|
"./react": {
|
|
18
22
|
"types": "./dist/react/index.d.ts",
|
|
19
23
|
"default": "./dist/react/index.js"
|