@youasked/react 0.5.0 → 0.6.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/dist/YouAsked.d.ts +8 -1
- package/dist/client.d.ts +2 -0
- package/dist/context.d.ts +4 -1
- package/dist/icons.d.ts +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +492 -347
- package/dist/nudge.d.ts +31 -0
- package/dist/styles.d.ts +1 -1
- package/package.json +1 -1
package/dist/YouAsked.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type YouAskedUser } from "./client";
|
|
3
|
+
import { type NudgeSettings } from "./nudge";
|
|
3
4
|
import { type Appearance } from "./theme";
|
|
4
5
|
export declare const DEFAULT_API_URL = "https://api.youasked.dev";
|
|
5
6
|
export type YouAskedProps = {
|
|
@@ -34,7 +35,13 @@ export type YouAskedProps = {
|
|
|
34
35
|
offset?: number;
|
|
35
36
|
/** Show the corner card for replies, shipped requests and what's new. Turn off for previews embedded in a page. */
|
|
36
37
|
cards?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The occasional "Got an idea for <App>?" prompt. Set it up in the dashboard; this overrides it:
|
|
40
|
+
* false turns it off, true turns it on with the dashboard's (or default) settings, an object
|
|
41
|
+
* changes individual settings, e.g. `{ everyDays: 14, activeSeconds: 60 }`.
|
|
42
|
+
*/
|
|
43
|
+
nudge?: boolean | Partial<NudgeSettings>;
|
|
37
44
|
apiUrl?: string;
|
|
38
45
|
children?: ReactNode;
|
|
39
46
|
};
|
|
40
|
-
export declare function YouAsked({ appKey, demo, cards, user, signature, ready, appearance, trigger, position, label, appName, appIcon, greeting, title, offset, apiUrl, children, }: YouAskedProps): import("react").JSX.Element;
|
|
47
|
+
export declare function YouAsked({ appKey, demo, cards, nudge: nudgeProp, user, signature, ready, appearance, trigger, position, label, appName, appIcon, greeting, title, offset, apiUrl, children, }: YouAskedProps): import("react").JSX.Element;
|
package/dist/client.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export type Config = {
|
|
|
69
69
|
unseen: Notice[];
|
|
70
70
|
whatsNew: WhatsNew | null;
|
|
71
71
|
mode?: "test" | "live";
|
|
72
|
+
/** The occasional in-app prompt, as set in the dashboard. null when it's off. */
|
|
73
|
+
nudge?: import("./nudge").NudgeSettings | null;
|
|
72
74
|
};
|
|
73
75
|
export type NewRequest = {
|
|
74
76
|
title: string;
|
package/dist/context.d.ts
CHANGED
|
@@ -23,9 +23,12 @@ export type Route = {
|
|
|
23
23
|
} | {
|
|
24
24
|
view: "board";
|
|
25
25
|
tab?: "top" | "new" | "shipped";
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
|
+
/** `from` is where Back goes: the list they opened it from. */
|
|
28
|
+
| {
|
|
27
29
|
view: "detail";
|
|
28
30
|
id: string;
|
|
31
|
+
from?: "home" | "board" | "mine";
|
|
29
32
|
} | {
|
|
30
33
|
view: "mine";
|
|
31
34
|
};
|
package/dist/icons.d.ts
CHANGED
|
@@ -11,4 +11,7 @@ export declare const IconBulb: () => import("react").JSX.Element;
|
|
|
11
11
|
export declare const IconFrame: () => import("react").JSX.Element;
|
|
12
12
|
export declare const IconSpark: () => import("react").JSX.Element;
|
|
13
13
|
/** YouAsked's own mark for asking: a speech bubble with an up arrow (ask, and vote it up). */
|
|
14
|
-
|
|
14
|
+
/** The ask mark: a speech bubble holding the vote arrow. `ink` colours the arrow; by default the background. */
|
|
15
|
+
export declare const IconIdea: ({ ink }: {
|
|
16
|
+
ink?: string;
|
|
17
|
+
}) => import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED