@sentry/feedback 10.70.0 → 11.0.0-alpha.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 (39) hide show
  1. package/build/npm/cjs/index.js.map +1 -1
  2. package/build/npm/esm/index.js.map +1 -1
  3. package/build/npm/esm/package.json +1 -1
  4. package/build/npm/types/core/TestClient.d.ts.map +1 -1
  5. package/build/npm/types/core/integration.d.ts +2 -2
  6. package/build/npm/types/core/integration.d.ts.map +1 -1
  7. package/build/npm/types/screenshot/components/Toolbar.d.ts +2 -2
  8. package/build/npm/types/screenshot/components/Toolbar.d.ts.map +1 -1
  9. package/package.json +6 -15
  10. package/build/npm/types-ts3.8/constants/index.d.ts +0 -34
  11. package/build/npm/types-ts3.8/core/TestClient.d.ts +0 -27
  12. package/build/npm/types-ts3.8/core/components/Actor.css.d.ts +0 -5
  13. package/build/npm/types-ts3.8/core/components/Actor.d.ts +0 -18
  14. package/build/npm/types-ts3.8/core/components/FeedbackIcon.d.ts +0 -5
  15. package/build/npm/types-ts3.8/core/createMainStyles.d.ts +0 -6
  16. package/build/npm/types-ts3.8/core/getFeedback.d.ts +0 -8
  17. package/build/npm/types-ts3.8/core/integration.d.ts +0 -25
  18. package/build/npm/types-ts3.8/core/sendFeedback.d.ts +0 -6
  19. package/build/npm/types-ts3.8/core/types.d.ts +0 -17
  20. package/build/npm/types-ts3.8/index.d.ts +0 -6
  21. package/build/npm/types-ts3.8/modal/components/Dialog.css.d.ts +0 -5
  22. package/build/npm/types-ts3.8/modal/components/Dialog.d.ts +0 -13
  23. package/build/npm/types-ts3.8/modal/components/DialogHeader.d.ts +0 -8
  24. package/build/npm/types-ts3.8/modal/components/Form.d.ts +0 -15
  25. package/build/npm/types-ts3.8/modal/components/SentryLogo.d.ts +0 -5
  26. package/build/npm/types-ts3.8/modal/components/SuccessIcon.d.ts +0 -5
  27. package/build/npm/types-ts3.8/modal/integration.d.ts +0 -3
  28. package/build/npm/types-ts3.8/screenshot/components/IconClose.d.ts +0 -9
  29. package/build/npm/types-ts3.8/screenshot/components/ScreenshotEditor.d.ts +0 -30
  30. package/build/npm/types-ts3.8/screenshot/components/ScreenshotInput.css.d.ts +0 -5
  31. package/build/npm/types-ts3.8/screenshot/components/Toolbar.d.ts +0 -15
  32. package/build/npm/types-ts3.8/screenshot/components/useTakeScreenshot.d.ts +0 -14
  33. package/build/npm/types-ts3.8/screenshot/integration.d.ts +0 -3
  34. package/build/npm/types-ts3.8/util/createFeedbackError.d.ts +0 -4
  35. package/build/npm/types-ts3.8/util/debug-build.d.ts +0 -7
  36. package/build/npm/types-ts3.8/util/isScreenshotSupported.d.ts +0 -15
  37. package/build/npm/types-ts3.8/util/mergeOptions.d.ts +0 -7
  38. package/build/npm/types-ts3.8/util/setAttributesNS.d.ts +0 -5
  39. package/build/npm/types-ts3.8/util/validate.d.ts +0 -7
@@ -1 +1 @@
1
- {"type":"module","version":"10.70.0","sideEffects":false}
1
+ {"type":"module","version":"11.0.0-alpha.1","sideEffects":false}
@@ -1 +1 @@
1
- {"version":3,"file":"TestClient.d.ts","sourceRoot":"","sources":["../../../../src/core/TestClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,MAAM,EAAqD,MAAM,cAAc,CAAC;AAEzF,MAAM,WAAW,iBAAkB,SAAQ,aAAa,EAAE,0BAA0B;CAAG;AAEvF;;GAEG;AACH,qBAAa,UAAW,SAAQ,MAAM,CAAC,iBAAiB,CAAC;gBACpC,OAAO,EAAE,iBAAiB;IAI7C;;OAEG;IAEI,kBAAkB,CAAC,SAAS,EAAE,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC;IAe7D;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,aAAsB,GAAG,WAAW,CAAC,KAAK,CAAC;CAG5F;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAQ3F"}
1
+ {"version":3,"file":"TestClient.d.ts","sourceRoot":"","sources":["../../../../src/core/TestClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,MAAM,EAAqD,MAAM,cAAc,CAAC;AAEzF,MAAM,WAAW,iBAAkB,SAAQ,aAAa,EAAE,0BAA0B;CAAG;AAEvF;;GAEG;AACH,qBAAa,UAAW,SAAQ,MAAM,CAAC,iBAAiB,CAAC;IACvD,YAAmB,OAAO,EAAE,iBAAiB,EAE5C;IAED;;OAEG;IAEI,kBAAkB,CAAC,SAAS,EAAE,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAa5D;IAED;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,aAAsB,GAAG,WAAW,CAAC,KAAK,CAAC,CAE1F;CACF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAQ3F"}
@@ -16,9 +16,9 @@ type BuilderOptions = {
16
16
  };
17
17
  export declare const buildFeedbackIntegration: ({ lazyLoadIntegration, getModalIntegration, getScreenshotIntegration, }: BuilderOptions) => IntegrationFn<Integration & {
18
18
  attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;
19
- createForm(optionOverrides?: OverrideFeedbackConfiguration): Promise<ReturnType<FeedbackModalIntegration["createDialog"]>>;
19
+ createForm(optionOverrides?: OverrideFeedbackConfiguration): Promise<ReturnType<FeedbackModalIntegration['createDialog']>>;
20
20
  createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;
21
- setTheme(colorScheme: "light" | "dark" | "system"): void;
21
+ setTheme(colorScheme: 'light' | 'dark' | 'system'): void;
22
22
  remove(): void;
23
23
  }>;
24
24
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/core/integration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,wBAAwB,EAExB,WAAW,EACX,aAAa,EAEd,MAAM,cAAc,CAAC;AA+BtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,KAAK,EAAiC,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE5F,KAAK,WAAW,GAAG,MAAM,IAAI,CAAC;AAE9B;;GAEG;AAEH,KAAK,cAAc,GACf;IACE,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,mBAAmB,EAAE,MAAM,aAAa,CAAC;IACzC,wBAAwB,EAAE,MAAM,aAAa,CAAC;CAC/C,GACD;IAGE,mBAAmB,EAAE,CACnB,IAAI,EAAE,0BAA0B,GAAG,+BAA+B,EAClE,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,wBAAwB,CAAC,EAAE,KAAK,CAAC;CAClC,CAAC;AAEN,eAAO,MAAM,wBAAwB,GAAI,yEAItC,cAAc,KAAG,aAAa,CAC/B,WAAW,GAAG;IACZ,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,EAAE,eAAe,CAAC,EAAE,6BAA6B,GAAG,WAAW,CAAC;IAC7F,UAAU,CACR,eAAe,CAAC,EAAE,6BAA6B,GAC9C,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACjE,YAAY,CAAC,eAAe,CAAC,EAAE,6BAA6B,GAAG,cAAc,CAAC;IAC9E,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACzD,MAAM,IAAI,IAAI,CAAC;CAChB,CA0UF,CAAC"}
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/core/integration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,wBAAwB,EAExB,WAAW,EACX,aAAa,EAEd,MAAM,cAAc,CAAC;AA+BtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,KAAK,EAAiC,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE5F,KAAK,WAAW,GAAG,MAAM,IAAI,CAAC;AAE9B;;GAEG;AAEH,KAAK,cAAc,GACf;IACE,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,mBAAmB,EAAE,MAAM,aAAa,CAAC;IACzC,wBAAwB,EAAE,MAAM,aAAa,CAAC;CAC/C,GACD;IAGE,mBAAmB,EAAE,CACnB,IAAI,EAAE,0BAA0B,GAAG,+BAA+B,EAClE,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,wBAAwB,CAAC,EAAE,KAAK,CAAC;CAClC,CAAC;AAEN,eAAO,MAAM,wBAAwB,4EAIlC,cAAc,KAAG,aAAa,CAC/B,WAAW,GAAG;IACZ,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,EAAE,eAAe,CAAC,EAAE,6BAA6B,GAAG,WAAW,CAAC;IAC7F,UAAU,CACR,eAAe,CAAC,EAAE,6BAA6B,GAC9C,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACjE,YAAY,CAAC,eAAe,CAAC,EAAE,6BAA6B,GAAG,cAAc,CAAC;IAC9E,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACzD,MAAM,IAAI,IAAI,CAAC;CAChB,CA0UF,CAAC"}
@@ -5,8 +5,8 @@ interface FactoryParams {
5
5
  h: typeof hType;
6
6
  }
7
7
  export default function ToolbarFactory({ h, }: FactoryParams): ({ action, setAction, options, }: {
8
- action: "highlight" | "hide" | "";
9
- setAction: Hooks.StateUpdater<"highlight" | "hide" | "">;
8
+ action: 'highlight' | 'hide' | '';
9
+ setAction: Hooks.StateUpdater<'highlight' | 'hide' | ''>;
10
10
  options: FeedbackInternalOptions;
11
11
  }) => VNode;
12
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/screenshot/components/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,CAAC,IAAI,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,UAAU,aAAa;IACrB,CAAC,EAAE,OAAO,KAAK,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,CAAC,GACF,EAAE,aAAa,IACU,iCAIrB;IACD,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,GAAG,MAAM,GAAG,EAAE,CAAC,CAAC;IACzD,OAAO,EAAE,uBAAuB,CAAC;CAClC,KAAG,KAAK,CA0BV"}
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/screenshot/components/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,CAAC,IAAI,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,UAAU,aAAa;IACrB,CAAC,EAAE,OAAO,KAAK,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,CAAC,GACF,EAAE,aAAa,qCAKX;IACD,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,GAAG,MAAM,GAAG,EAAE,CAAC,CAAC;IACzD,OAAO,EAAE,uBAAuB,CAAC;CAClC,KAAG,KAAK,CA0BV"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sentry/feedback",
3
- "version": "10.70.0",
3
+ "version": "11.0.0-alpha.1",
4
4
  "description": "Sentry SDK integration for user feedback",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/feedback",
7
7
  "author": "Sentry",
8
8
  "license": "MIT",
9
9
  "engines": {
10
- "node": ">=18"
10
+ "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0"
11
11
  },
12
12
  "files": [
13
13
  "/build/npm"
@@ -29,18 +29,11 @@
29
29
  }
30
30
  }
31
31
  },
32
- "typesVersions": {
33
- "<5.0": {
34
- "build/npm/types/index.d.ts": [
35
- "build/npm/types-ts3.8/index.d.ts"
36
- ]
37
- }
38
- },
39
32
  "publishConfig": {
40
33
  "access": "public"
41
34
  },
42
35
  "dependencies": {
43
- "@sentry/core": "10.70.0"
36
+ "@sentry/core": "11.0.0-alpha.1"
44
37
  },
45
38
  "devDependencies": {
46
39
  "preact": "^10.19.4"
@@ -50,9 +43,7 @@
50
43
  "build:transpile": "rollup -c rollup.npm.config.mjs",
51
44
  "build:bundle": "rollup -c rollup.bundle.config.mjs",
52
45
  "build:dev": "run-p build:transpile build:types",
53
- "build:types": "run-s build:types:core build:types:downlevel",
54
- "build:types:core": "tsc -p tsconfig.types.json",
55
- "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8 && yarn node ./scripts/shim-preact-export.js",
46
+ "build:types": "tsc -p tsconfig.types.json",
56
47
  "build:watch": "run-p build:transpile:watch build:bundle:watch",
57
48
  "build:dev:watch": "run-p build:transpile:watch",
58
49
  "build:transpile:watch": "yarn build:transpile --watch",
@@ -60,8 +51,8 @@
60
51
  "build:tarball": "npm pack",
61
52
  "circularDepCheck": "madge --circular src/index.ts",
62
53
  "clean": "rimraf build sentry-feedback-*.tgz",
63
- "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware",
64
- "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware",
54
+ "lint:fix": "oxlint . --fix --type-aware",
55
+ "lint": "oxlint . --type-aware",
65
56
  "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module",
66
57
  "test": "vitest run",
67
58
  "test:watch": "vitest --watch",
@@ -1,34 +0,0 @@
1
- import { GLOBAL_OBJ } from '@sentry/core';
2
- export declare const WINDOW: typeof GLOBAL_OBJ & Window;
3
- export declare const DOCUMENT: Document;
4
- export declare const NAVIGATOR: {
5
- userAgent?: string;
6
- maxTouchPoints?: number;
7
- } & Navigator;
8
- export declare const TRIGGER_LABEL = "Report a Bug";
9
- export declare const CANCEL_BUTTON_LABEL = "Cancel";
10
- export declare const SUBMIT_BUTTON_LABEL = "Send Bug Report";
11
- export declare const CONFIRM_BUTTON_LABEL = "Confirm";
12
- export declare const FORM_TITLE = "Report a Bug";
13
- export declare const EMAIL_PLACEHOLDER = "your.email@example.org";
14
- export declare const EMAIL_LABEL = "Email";
15
- export declare const MESSAGE_PLACEHOLDER = "What's the bug? What did you expect?";
16
- export declare const MESSAGE_LABEL = "Description";
17
- export declare const NAME_PLACEHOLDER = "Your Name";
18
- export declare const NAME_LABEL = "Name";
19
- export declare const SUCCESS_MESSAGE_TEXT = "Thank you for your report!";
20
- export declare const IS_REQUIRED_LABEL = "(required)";
21
- export declare const ADD_SCREENSHOT_LABEL = "Add a screenshot";
22
- export declare const REMOVE_SCREENSHOT_LABEL = "Remove screenshot";
23
- export declare const HIGHLIGHT_TOOL_TEXT = "Highlight";
24
- export declare const HIDE_TOOL_TEXT = "Hide";
25
- export declare const REMOVE_HIGHLIGHT_TEXT = "Remove";
26
- export declare const ERROR_EMPTY_MESSAGE_TEXT = "Unable to submit feedback with empty message";
27
- export declare const ERROR_NO_CLIENT_TEXT = "No client setup, cannot send feedback.";
28
- export declare const ERROR_TIMEOUT_TEXT = "Unable to determine if Feedback was correctly sent.";
29
- export declare const ERROR_FORBIDDEN_TEXT = "Unable to send feedback. This could be because this domain is not in your list of allowed domains.";
30
- export declare const ERROR_GENERIC_TEXT = "Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.";
31
- export declare const FEEDBACK_WIDGET_SOURCE = "widget";
32
- export declare const FEEDBACK_API_SOURCE = "api";
33
- export declare const SUCCESS_MESSAGE_TIMEOUT = 5000;
34
- //# sourceMappingURL=index.d.ts.map
@@ -1,27 +0,0 @@
1
- import { BrowserClientReplayOptions, ClientOptions, Event, SeverityLevel } from '@sentry/core';
2
- import { Client } from '@sentry/core';
3
- export interface TestClientOptions extends ClientOptions, BrowserClientReplayOptions {
4
- }
5
- /**
6
- *
7
- */
8
- export declare class TestClient extends Client<TestClientOptions> {
9
- constructor(options: TestClientOptions);
10
- /**
11
- *
12
- */
13
- eventFromException(exception: any): PromiseLike<Event>;
14
- /**
15
- *
16
- */
17
- eventFromMessage(message: string, level?: SeverityLevel): PromiseLike<Event>;
18
- }
19
- /**
20
- *
21
- */
22
- export declare function init(options: TestClientOptions): void;
23
- /**
24
- *
25
- */
26
- export declare function getDefaultClientOptions(options?: Partial<ClientOptions>): ClientOptions;
27
- //# sourceMappingURL=TestClient.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Creates <style> element for widget actor (button that opens the dialog)
3
- */
4
- export declare function createActorStyles(styleNonce?: string): HTMLStyleElement;
5
- //# sourceMappingURL=Actor.css.d.ts.map
@@ -1,18 +0,0 @@
1
- export interface ActorProps {
2
- triggerLabel: string;
3
- triggerAriaLabel: string;
4
- shadow: ShadowRoot;
5
- styleNonce?: string;
6
- }
7
- export interface ActorComponent {
8
- el: HTMLElement;
9
- appendToDom: () => void;
10
- removeFromDom: () => void;
11
- show: () => void;
12
- hide: () => void;
13
- }
14
- /**
15
- * The sentry-provided button to open the feedback modal
16
- */
17
- export declare function Actor({ triggerLabel, triggerAriaLabel, shadow, styleNonce }: ActorProps): ActorComponent;
18
- //# sourceMappingURL=Actor.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Feedback Icon
3
- */
4
- export declare function FeedbackIcon(): SVGElement;
5
- //# sourceMappingURL=FeedbackIcon.d.ts.map
@@ -1,6 +0,0 @@
1
- import { FeedbackInternalOptions } from '@sentry/core';
2
- /**
3
- * Creates <style> element for widget actor (button that opens the dialog)
4
- */
5
- export declare function createMainStyles({ colorScheme, themeDark, themeLight, styleNonce, }: FeedbackInternalOptions): HTMLStyleElement;
6
- //# sourceMappingURL=createMainStyles.d.ts.map
@@ -1,8 +0,0 @@
1
- import { buildFeedbackIntegration } from './integration';
2
- type FeedbackIntegration = ReturnType<typeof buildFeedbackIntegration>;
3
- /**
4
- * This is a small utility to get a type-safe instance of the Feedback integration.
5
- */
6
- export declare function getFeedback(): ReturnType<FeedbackIntegration> | undefined;
7
- export {};
8
- //# sourceMappingURL=getFeedback.d.ts.map
@@ -1,25 +0,0 @@
1
- import { FeedbackModalIntegration, Integration, IntegrationFn } from '@sentry/core';
2
- import { ActorComponent } from './components/Actor';
3
- import { OverrideFeedbackConfiguration } from './types';
4
- type Unsubscribe = () => void;
5
- /**
6
- * Allow users to capture user feedback and send it to Sentry.
7
- */
8
- type BuilderOptions = {
9
- lazyLoadIntegration?: never;
10
- getModalIntegration: () => IntegrationFn;
11
- getScreenshotIntegration: () => IntegrationFn;
12
- } | {
13
- lazyLoadIntegration: (name: 'feedbackModalIntegration' | 'feedbackScreenshotIntegration', scriptNonce?: string) => Promise<IntegrationFn>;
14
- getModalIntegration?: never;
15
- getScreenshotIntegration?: never;
16
- };
17
- export declare const buildFeedbackIntegration: ({ lazyLoadIntegration, getModalIntegration, getScreenshotIntegration, }: BuilderOptions) => IntegrationFn<Integration & {
18
- attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;
19
- createForm(optionOverrides?: OverrideFeedbackConfiguration): Promise<ReturnType<FeedbackModalIntegration["createDialog"]>>;
20
- createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;
21
- setTheme(colorScheme: "light" | "dark" | "system"): void;
22
- remove(): void;
23
- }>;
24
- export {};
25
- //# sourceMappingURL=integration.d.ts.map
@@ -1,6 +0,0 @@
1
- import { SendFeedback } from '@sentry/core';
2
- /**
3
- * Public API to send a Feedback item to Sentry
4
- */
5
- export declare const sendFeedback: SendFeedback;
6
- //# sourceMappingURL=sendFeedback.d.ts.map
@@ -1,17 +0,0 @@
1
- import { FeedbackInternalOptions } from '@sentry/core';
2
- /**
3
- * Partial configuration that overrides default configuration values
4
- *
5
- * This is the config that gets passed into the integration constructor
6
- */
7
- export interface OptionalFeedbackConfiguration extends Pick<Partial<FeedbackInternalOptions>, Exclude<keyof Partial<FeedbackInternalOptions>, 'themeLight' | 'themeDark'>> {
8
- themeLight?: Partial<FeedbackInternalOptions['themeLight']>;
9
- themeDark?: Partial<FeedbackInternalOptions['themeLight']>;
10
- }
11
- /**
12
- * Partial configuration that overrides default configuration values
13
- *
14
- * This is the config that gets passed into the integration constructor
15
- */
16
- export type OverrideFeedbackConfiguration = Pick<Partial<FeedbackInternalOptions>, Exclude<keyof Partial<FeedbackInternalOptions>, 'themeLight' | 'themeDark'>>;
17
- //# sourceMappingURL=types.d.ts.map
@@ -1,6 +0,0 @@
1
- export { sendFeedback } from './core/sendFeedback';
2
- export { buildFeedbackIntegration } from './core/integration';
3
- export { getFeedback } from './core/getFeedback';
4
- export { feedbackModalIntegration } from './modal/integration';
5
- export { feedbackScreenshotIntegration } from './screenshot/integration';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Creates <style> element for widget dialog
3
- */
4
- export declare function createDialogStyles(styleNonce?: string): HTMLStyleElement;
5
- //# sourceMappingURL=Dialog.css.d.ts.map
@@ -1,13 +0,0 @@
1
- type VNode = any;
2
- import { FeedbackInternalOptions } from '@sentry/core';
3
- // replaced import from preact
4
- import { Props as HeaderProps } from './DialogHeader';
5
- import { Props as FormProps } from './Form';
6
- interface Props extends HeaderProps, FormProps {
7
- onFormSubmitted: () => void;
8
- open: boolean;
9
- options: FeedbackInternalOptions;
10
- }
11
- export declare function Dialog({ open, onFormSubmitted, ...props }: Props): VNode;
12
- export {};
13
- //# sourceMappingURL=Dialog.d.ts.map
@@ -1,8 +0,0 @@
1
- type VNode = any;
2
- import { FeedbackInternalOptions } from '@sentry/core';
3
- // replaced import from preact
4
- export interface Props {
5
- options: FeedbackInternalOptions;
6
- }
7
- export declare function DialogHeader({ options }: Props): VNode;
8
- //# sourceMappingURL=DialogHeader.d.ts.map
@@ -1,15 +0,0 @@
1
- type VNode = any;
2
- import { FeedbackFormData, FeedbackInternalOptions, FeedbackScreenshotIntegration, SendFeedback } from '@sentry/core';
3
- // replaced import from preact
4
- export interface Props extends Pick<FeedbackInternalOptions, 'showEmail' | 'showName'> {
5
- options: FeedbackInternalOptions;
6
- defaultEmail: string;
7
- defaultName: string;
8
- onFormClose: () => void;
9
- onSubmit: SendFeedback;
10
- onSubmitSuccess: (data: FeedbackFormData, eventId: string) => void;
11
- onSubmitError: (error: Error) => void;
12
- screenshotInput: ReturnType<FeedbackScreenshotIntegration['createInput']> | undefined;
13
- }
14
- export declare function Form({ options, defaultEmail, defaultName, onFormClose, onSubmit, onSubmitSuccess, onSubmitError, showEmail, showName, screenshotInput, }: Props): VNode;
15
- //# sourceMappingURL=Form.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Sentry Logo
3
- */
4
- export declare function SentryLogo(): SVGElement;
5
- //# sourceMappingURL=SentryLogo.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Success Icon (checkmark)
3
- */
4
- export declare function SuccessIcon(): SVGElement;
5
- //# sourceMappingURL=SuccessIcon.d.ts.map
@@ -1,3 +0,0 @@
1
- import { FeedbackModalIntegration } from '@sentry/core';
2
- export declare const feedbackModalIntegration: () => FeedbackModalIntegration;
3
- //# sourceMappingURL=integration.d.ts.map
@@ -1,9 +0,0 @@
1
- declare const hType: any;
2
- type VNode = any;
3
- // replaced import from preact
4
- interface FactoryParams {
5
- h: typeof hType;
6
- }
7
- export default function IconCloseFactory({ h, }: FactoryParams): () => VNode;
8
- export {};
9
- //# sourceMappingURL=IconClose.d.ts.map
@@ -1,30 +0,0 @@
1
- type ComponentType<T> = any;
2
- declare const hType: any;
3
- import { FeedbackInternalOptions, FeedbackModalIntegration } from '@sentry/core';
4
- // replaced import from preact
5
- import * as Hooks from 'preact/hooks';
6
- interface FactoryParams {
7
- h: typeof hType;
8
- hooks: typeof Hooks;
9
- /**
10
- * A ref to a Canvas Element that serves as our "value" or image output.
11
- */
12
- outputBuffer: HTMLCanvasElement;
13
- /**
14
- * A reference to the whole dialog (the parent of this component) so that we
15
- * can show/hide it and take a clean screenshot of the webpage.
16
- */
17
- dialog: ReturnType<FeedbackModalIntegration['createDialog']>;
18
- /**
19
- * The whole options object.
20
- *
21
- * Needed to set nonce and id values for editor specific styles
22
- */
23
- options: FeedbackInternalOptions;
24
- }
25
- interface Props {
26
- onError: (error: Error) => void;
27
- }
28
- export declare function ScreenshotEditorFactory({ h, hooks, outputBuffer, dialog, options, }: FactoryParams): ComponentType<Props>;
29
- export {};
30
- //# sourceMappingURL=ScreenshotEditor.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Creates <style> element for widget dialog
3
- */
4
- export declare function createScreenshotInputStyles(styleNonce?: string): HTMLStyleElement;
5
- //# sourceMappingURL=ScreenshotInput.css.d.ts.map
@@ -1,15 +0,0 @@
1
- declare const hType: any;
2
- type VNode = any;
3
- import { FeedbackInternalOptions } from '@sentry/core';
4
- // replaced import from preact
5
- import * as Hooks from 'preact/hooks';
6
- interface FactoryParams {
7
- h: typeof hType;
8
- }
9
- export default function ToolbarFactory({ h, }: FactoryParams): ({ action, setAction, options, }: {
10
- action: "highlight" | "hide" | "";
11
- setAction: Hooks.StateUpdater<"highlight" | "hide" | "">;
12
- options: FeedbackInternalOptions;
13
- }) => VNode;
14
- export {};
15
- //# sourceMappingURL=Toolbar.d.ts.map
@@ -1,14 +0,0 @@
1
- import * as Hooks from 'preact/hooks';
2
- interface FactoryParams {
3
- hooks: typeof Hooks;
4
- }
5
- interface Props {
6
- onBeforeScreenshot: () => void;
7
- onScreenshot: (imageSource: HTMLVideoElement, dpi: number) => void;
8
- onAfterScreenshot: () => void;
9
- onError: (error: Error) => void;
10
- }
11
- type UseTakeScreenshot = ({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) => void;
12
- export declare function useTakeScreenshotFactory({ hooks }: FactoryParams): UseTakeScreenshot;
13
- export {};
14
- //# sourceMappingURL=useTakeScreenshot.d.ts.map
@@ -1,3 +0,0 @@
1
- import { FeedbackScreenshotIntegration } from '@sentry/core';
2
- export declare const feedbackScreenshotIntegration: () => FeedbackScreenshotIntegration;
3
- //# sourceMappingURL=integration.d.ts.map
@@ -1,4 +0,0 @@
1
- import { FeedbackErrorCode, FeedbackErrorMessages } from '@sentry/core';
2
- export declare function resolveFeedbackErrorMessage(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): string;
3
- export declare function createFeedbackError(code: FeedbackErrorCode, messages?: FeedbackErrorMessages): Error;
4
- //# sourceMappingURL=createFeedbackError.d.ts.map
@@ -1,7 +0,0 @@
1
- /**
2
- * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
3
- *
4
- * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
5
- */
6
- export declare const DEBUG_BUILD: boolean;
7
- //# sourceMappingURL=debug-build.d.ts.map
@@ -1,15 +0,0 @@
1
- /**
2
- * Mobile browsers do not support `mediaDevices.getDisplayMedia` even though they have the api implemented
3
- * Instead they return things like `NotAllowedError` when called.
4
- *
5
- * It's simpler for us to browser sniff first, and avoid loading the integration if we can.
6
- *
7
- * https://stackoverflow.com/a/58879212
8
- * https://stackoverflow.com/a/3540295
9
- *
10
- * `mediaDevices.getDisplayMedia` is also only supported in secure contexts, and return a `mediaDevices is not supported` error, so we should also avoid loading the integration if we can.
11
- *
12
- * https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
13
- */
14
- export declare function isScreenshotSupported(): boolean;
15
- //# sourceMappingURL=isScreenshotSupported.d.ts.map
@@ -1,7 +0,0 @@
1
- import { FeedbackInternalOptions } from '@sentry/core';
2
- import { OptionalFeedbackConfiguration } from '../core/types';
3
- /**
4
- * Quick and dirty deep merge for the Feedback integration options
5
- */
6
- export declare function mergeOptions(defaultOptions: FeedbackInternalOptions, optionOverrides: OptionalFeedbackConfiguration): FeedbackInternalOptions;
7
- //# sourceMappingURL=mergeOptions.d.ts.map
@@ -1,5 +0,0 @@
1
- /**
2
- * Helper function to set a dict of attributes on element (w/ specified namespace)
3
- */
4
- export declare function setAttributesNS<T extends SVGElement>(el: T, attributes: Record<string, string>): T;
5
- //# sourceMappingURL=setAttributesNS.d.ts.map
@@ -1,7 +0,0 @@
1
- import { FeedbackFormData, FeedbackInternalOptions } from '@sentry/core';
2
- export type Props = Pick<FeedbackInternalOptions, 'emailLabel' | 'isEmailRequired' | 'isNameRequired' | 'messageLabel' | 'nameLabel'>;
3
- /**
4
- * Validate that a given feedback submission has the required fields
5
- */
6
- export declare function getMissingFields(feedback: FeedbackFormData, props: Props): string[];
7
- //# sourceMappingURL=validate.d.ts.map