@opengovsg/confetti 0.0.12 → 0.1.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/build/index.d.ts +17 -17
- package/build/index.js +1 -1
- package/package.json +4 -4
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as MultiSelectQuestionProperties, c as StatementQuestionProperties, i as PublicGetSurveyOutput, l as TextQuestionProperties, n as ConfettiState, o as RatingQuestionProperties, r as Question, s as SingleSelectQuestionProperties, t as Answer } from "./types-COft9SvA.js";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
import { HTMLAttributes, PropsWithChildren } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/core/ConfettiController.d.ts
|
|
7
7
|
interface ConfettiControllerProps {
|
|
@@ -19,7 +19,7 @@ declare const ConfettiController: ({
|
|
|
19
19
|
shouldAutoSubmit,
|
|
20
20
|
onFinished,
|
|
21
21
|
children
|
|
22
|
-
}: ConfettiControllerProps) =>
|
|
22
|
+
}: ConfettiControllerProps) => react_jsx_runtime2.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/core/ConfettiProvider.d.ts
|
|
25
25
|
interface ConfettiContextValue {
|
|
@@ -54,7 +54,7 @@ declare const ConfettiProvider: ({
|
|
|
54
54
|
metadata,
|
|
55
55
|
isSurveyVisible: isSurveyVisibleInput,
|
|
56
56
|
apiBaseUrl
|
|
57
|
-
}: ConfettiProviderProps) =>
|
|
57
|
+
}: ConfettiProviderProps) => react_jsx_runtime2.JSX.Element | null;
|
|
58
58
|
declare const useConfetti: () => ConfettiContextValue;
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/components/Confetti.d.ts
|
|
@@ -64,7 +64,7 @@ declare const Confetti: ({
|
|
|
64
64
|
onFinished,
|
|
65
65
|
shouldAutoSubmit,
|
|
66
66
|
...props
|
|
67
|
-
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) =>
|
|
67
|
+
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) => react_jsx_runtime2.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/components/ThankYouMessage.d.ts
|
|
70
70
|
interface ThankYouMessageProps {
|
|
@@ -81,7 +81,7 @@ declare const ThankYouMessage: ({
|
|
|
81
81
|
title,
|
|
82
82
|
description,
|
|
83
83
|
classNames
|
|
84
|
-
}: ThankYouMessageProps) =>
|
|
84
|
+
}: ThankYouMessageProps) => react_jsx_runtime2.JSX.Element | null;
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/components/container/PopoverContainer.d.ts
|
|
87
87
|
interface PopoverContainerProps {
|
|
@@ -103,7 +103,7 @@ declare const PopoverContainer: ({
|
|
|
103
103
|
containerProps,
|
|
104
104
|
onDismiss,
|
|
105
105
|
closeOnFinishMs
|
|
106
|
-
}: PopoverContainerProps) =>
|
|
106
|
+
}: PopoverContainerProps) => react_jsx_runtime2.JSX.Element;
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/components/questions/types.d.ts
|
|
109
109
|
type Question$1 = PublicGetSurveyOutput['questions'][number];
|
|
@@ -126,7 +126,7 @@ declare const SurveyQuestionFactory: ({
|
|
|
126
126
|
question,
|
|
127
127
|
onChange,
|
|
128
128
|
error
|
|
129
|
-
}: SurveyQuestionFactoryProps) =>
|
|
129
|
+
}: SurveyQuestionFactoryProps) => react_jsx_runtime2.JSX.Element;
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region src/components/questions/Rating.d.ts
|
|
132
132
|
interface RatingProps extends BaseFieldProps {
|
|
@@ -161,7 +161,7 @@ declare const Rating: ({
|
|
|
161
161
|
id,
|
|
162
162
|
error,
|
|
163
163
|
required
|
|
164
|
-
}: RatingProps) =>
|
|
164
|
+
}: RatingProps) => react_jsx_runtime2.JSX.Element;
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region src/components/questions/FreeText.d.ts
|
|
167
167
|
interface FreeTextProps extends BaseFieldProps {
|
|
@@ -185,7 +185,7 @@ declare const FreeText: ({
|
|
|
185
185
|
classNames,
|
|
186
186
|
required,
|
|
187
187
|
error
|
|
188
|
-
}: FreeTextProps) =>
|
|
188
|
+
}: FreeTextProps) => react_jsx_runtime2.JSX.Element;
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region src/components/questions/SingleChoice.d.ts
|
|
191
191
|
interface SingleChoiceProps extends BaseFieldProps {
|
|
@@ -215,7 +215,7 @@ declare const SingleChoice: ({
|
|
|
215
215
|
id,
|
|
216
216
|
required,
|
|
217
217
|
error
|
|
218
|
-
}: SingleChoiceProps) =>
|
|
218
|
+
}: SingleChoiceProps) => react_jsx_runtime2.JSX.Element;
|
|
219
219
|
//#endregion
|
|
220
220
|
//#region src/components/questions/MultiChoice.d.ts
|
|
221
221
|
interface MultiChoiceProps extends BaseFieldProps {
|
|
@@ -248,7 +248,7 @@ declare const MultiChoice: ({
|
|
|
248
248
|
id,
|
|
249
249
|
required,
|
|
250
250
|
error
|
|
251
|
-
}: MultiChoiceProps) =>
|
|
251
|
+
}: MultiChoiceProps) => react_jsx_runtime2.JSX.Element;
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/components/questions/Statement.d.ts
|
|
254
254
|
interface StatementProps extends BaseFieldProps {
|
|
@@ -266,7 +266,7 @@ declare const Statement: ({
|
|
|
266
266
|
title,
|
|
267
267
|
description,
|
|
268
268
|
classNames
|
|
269
|
-
}: StatementProps) =>
|
|
269
|
+
}: StatementProps) => react_jsx_runtime2.JSX.Element;
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/components/presentation/Flow.d.ts
|
|
272
272
|
type ChildField = (_: {
|
|
@@ -285,7 +285,7 @@ declare const Flow: ({
|
|
|
285
285
|
children,
|
|
286
286
|
question,
|
|
287
287
|
isLastQuestion
|
|
288
|
-
}: FlowProps) =>
|
|
288
|
+
}: FlowProps) => react_jsx_runtime2.JSX.Element;
|
|
289
289
|
//#endregion
|
|
290
290
|
//#region src/components/presentation/Embed.d.ts
|
|
291
291
|
declare const Embed: ({
|
|
@@ -295,10 +295,10 @@ declare const Embed: ({
|
|
|
295
295
|
}: PropsWithChildren<{
|
|
296
296
|
isCompleted: boolean;
|
|
297
297
|
onSubmit: () => void;
|
|
298
|
-
}>) =>
|
|
298
|
+
}>) => react_jsx_runtime2.JSX.Element;
|
|
299
299
|
//#endregion
|
|
300
300
|
//#region src/templates/EmbeddedConfetti.d.ts
|
|
301
|
-
declare const EmbeddedConfetti: (props: ConfettiProps) =>
|
|
301
|
+
declare const EmbeddedConfetti: (props: ConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
302
302
|
//#endregion
|
|
303
303
|
//#region src/templates/PopoverConfetti.d.ts
|
|
304
304
|
interface PopoverConfettiProps extends ConfettiProps {
|
|
@@ -318,10 +318,10 @@ declare const PopoverConfetti: ({
|
|
|
318
318
|
onDismiss,
|
|
319
319
|
closeOnFinishMs,
|
|
320
320
|
...props
|
|
321
|
-
}: PopoverConfettiProps) =>
|
|
321
|
+
}: PopoverConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
322
322
|
//#endregion
|
|
323
323
|
//#region src/templates/StepperConfetti.d.ts
|
|
324
|
-
declare const StepperConfetti: (props: ConfettiProps) =>
|
|
324
|
+
declare const StepperConfetti: (props: ConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
325
325
|
//#endregion
|
|
326
326
|
//#region src/hooks/useVisibleAfterDelay.d.ts
|
|
327
327
|
interface UseVisibleAfterDelayOptions {
|
package/build/index.js
CHANGED
|
@@ -186,7 +186,7 @@ const publicPostRespondentEventInputSchema = z.object({ type: z.enum(["view", "d
|
|
|
186
186
|
|
|
187
187
|
//#endregion
|
|
188
188
|
//#region src/core/logic/api.ts
|
|
189
|
-
const API_HOST = "https://confetti.
|
|
189
|
+
const API_HOST = "https://confetti.gov.sg/api";
|
|
190
190
|
const client = ky.create({
|
|
191
191
|
prefixUrl: API_HOST,
|
|
192
192
|
retry: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengovsg/confetti",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "Widgets for Confetti",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"react": "^18.2.0 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/react": "^19.2.
|
|
42
|
+
"@types/react": "^19.2.14",
|
|
43
43
|
"esbuild": "^0.27.2",
|
|
44
44
|
"eslint": "^9.39.2",
|
|
45
45
|
"prettier": "^3.7.4",
|
|
46
46
|
"tsdown": "0.19.0",
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"@confetti/eslint-config": "0.0.0",
|
|
49
|
-
"@confetti/
|
|
49
|
+
"@confetti/validators": "0.0.0",
|
|
50
50
|
"@confetti/tsconfig": "0.0.0",
|
|
51
|
-
"@confetti/
|
|
51
|
+
"@confetti/prettier-config": "0.0.0"
|
|
52
52
|
},
|
|
53
53
|
"prettier": "@confetti/prettier-config",
|
|
54
54
|
"scripts": {
|