@opengovsg/confetti 0.1.8 → 0.2.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/RecordingReplayer-9_E5sMQo.js +73 -0
- package/build/confetti.css +4 -585
- package/build/html2canvas-pro.esm-BSw77ylm.js +10 -0
- package/build/index.d.ts +20 -20
- package/build/index.js +4 -4
- package/build/internals-ZuuqmWaa.js +1 -0
- package/build/internals.d.ts +11 -2
- package/build/internals.js +1 -1
- package/build/record-CQ3hStii.js +53 -0
- package/build/{types-DvzzMSv8.d.ts → types-Co_jcoW0.d.ts} +62 -1
- package/package.json +13 -4
- package/build/routing-ZHrE7mgA.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengovsg/confetti",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "Widgets for Confetti",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"./build/**/*.css"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@rrweb/record": "2.0.0-alpha.20",
|
|
32
|
+
"@rrweb/replay": "2.0.0-alpha.20",
|
|
31
33
|
"clsx": "^2.1.1",
|
|
34
|
+
"html2canvas-pro": "^2.0.2",
|
|
32
35
|
"ky": "^1.14.2",
|
|
33
36
|
"react-error-boundary": "^6.1.1",
|
|
34
37
|
"usehooks-ts": "^3.1.1",
|
|
@@ -39,21 +42,27 @@
|
|
|
39
42
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
40
43
|
},
|
|
41
44
|
"devDependencies": {
|
|
45
|
+
"@csstools/postcss-minify": "^3.0.0",
|
|
46
|
+
"@rrweb/types": "2.0.0-alpha.20",
|
|
42
47
|
"@types/react": "^19.2.14",
|
|
43
48
|
"esbuild": "^0.27.2",
|
|
44
49
|
"eslint": "^9.39.2",
|
|
50
|
+
"postcss": "^8.5.9",
|
|
51
|
+
"postcss-cli": "^11.0.1",
|
|
52
|
+
"postcss-nesting": "^14.0.0",
|
|
45
53
|
"prettier": "^3.7.4",
|
|
46
|
-
"react-aria-components": "1.
|
|
54
|
+
"react-aria-components": "1.16.0",
|
|
47
55
|
"tsdown": "0.19.0",
|
|
48
56
|
"typescript": "^5.9.3",
|
|
57
|
+
"@confetti/eslint-config": "0.0.0",
|
|
49
58
|
"@confetti/prettier-config": "0.0.0",
|
|
50
59
|
"@confetti/tsconfig": "0.0.0",
|
|
51
|
-
"@confetti/eslint-config": "0.0.0",
|
|
52
60
|
"@confetti/validators": "0.0.0"
|
|
53
61
|
},
|
|
54
62
|
"prettier": "@confetti/prettier-config",
|
|
55
63
|
"scripts": {
|
|
56
|
-
"build": "
|
|
64
|
+
"build:css": "postcss ./src/confetti.css -o ./build/confetti.css",
|
|
65
|
+
"build": "tsdown && pnpm run build:css",
|
|
57
66
|
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
|
58
67
|
"dev": "tsc",
|
|
59
68
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=({index:e,questions:r,answers:i})=>{if(e===0)return!0;for(let a=0;a<e;a++){let o=r[a],s=o?i[o.id]:void 0;if(!o||!o.visible)continue;let c=o.routingLogic;if(c.type===`always`){if(t({position:a,value:c.target})===e)return!0;continue}if(s==null&&o.required)continue;let l=c.cases,u=s===null?void 0:l.find(e=>n({answer:s,condition:e}));if(!u){if(t({position:a,value:c.default})===e)return!0;continue}if(t({position:a,value:u.target})===e)return!0}return!1},t=({position:e,value:t})=>{switch(t.type){case`next`:return e+1;case`jump`:return t.target;case`end`:return null}},n=({answer:e,condition:t})=>{let n=r(t.value);switch(t.operator){case`equal`:return e===n;case`not-equal`:return e!==n;case`greater`:return typeof e==`number`&&typeof n==`number`&&e>n;case`greater-or-equal`:return typeof e==`number`&&typeof n==`number`&&e>=n;case`less`:return typeof e==`number`&&typeof n==`number`&&e<n;case`less-or-equal`:return typeof e==`number`&&typeof n==`number`&&e<=n;case`contains`:return Array.isArray(e)&&typeof n==`string`&&e.includes(n);case`not-contains`:return Array.isArray(e)&&typeof n==`string`&&!e.includes(n)}},r=e=>e.value;export{e as n,n as t};
|