@prosopo/procaptcha-audio 0.0.0-stage → 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.
Files changed (68) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +52 -0
  2. package/.turbo/turbo-build$colon$tsc.log +53 -0
  3. package/.turbo/turbo-build.log +54 -0
  4. package/CHANGELOG.md +25 -0
  5. package/LICENSE +201 -0
  6. package/dist/_virtual/_rolldown/runtime.js +3 -0
  7. package/dist/cjs/components/audioPlayer.cjs +275 -0
  8. package/dist/cjs/components/procaptchaAudio.cjs +7 -0
  9. package/dist/cjs/components/procaptchaWidget.cjs +195 -0
  10. package/dist/cjs/index.cjs +8 -0
  11. package/dist/cjs/services/Manager.cjs +218 -0
  12. package/dist/components/audioPlayer.d.ts +18 -0
  13. package/dist/components/audioPlayer.d.ts.map +1 -0
  14. package/dist/components/audioPlayer.js +275 -0
  15. package/dist/components/audioPlayer.js.map +1 -0
  16. package/dist/components/procaptchaAudio.d.ts +7 -0
  17. package/dist/components/procaptchaAudio.d.ts.map +1 -0
  18. package/dist/components/procaptchaAudio.js +6 -0
  19. package/dist/components/procaptchaAudio.js.map +1 -0
  20. package/dist/components/procaptchaWidget.d.ts +7 -0
  21. package/dist/components/procaptchaWidget.d.ts.map +1 -0
  22. package/dist/components/procaptchaWidget.js +195 -0
  23. package/dist/components/procaptchaWidget.js.map +1 -0
  24. package/dist/index.d.ts +4 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +5 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/services/Manager.d.ts +10 -0
  29. package/dist/services/Manager.d.ts.map +1 -0
  30. package/dist/services/Manager.js +217 -0
  31. package/dist/services/Manager.js.map +1 -0
  32. package/dist/tests/audioPlayer.unit.test.d.ts +2 -0
  33. package/dist/tests/audioPlayer.unit.test.d.ts.map +1 -0
  34. package/dist/tests/audioPlayer.unit.test.js +341 -0
  35. package/dist/tests/audioPlayer.unit.test.js.map +1 -0
  36. package/dist/tests/domHarness.d.ts +20 -0
  37. package/dist/tests/domHarness.d.ts.map +1 -0
  38. package/dist/tests/domHarness.js +56 -0
  39. package/dist/tests/domHarness.js.map +1 -0
  40. package/dist/tests/manager.unit.test.d.ts +2 -0
  41. package/dist/tests/manager.unit.test.d.ts.map +1 -0
  42. package/dist/tests/manager.unit.test.js +627 -0
  43. package/dist/tests/manager.unit.test.js.map +1 -0
  44. package/dist/tests/managerHarness.d.ts +21 -0
  45. package/dist/tests/managerHarness.d.ts.map +1 -0
  46. package/dist/tests/managerHarness.js +67 -0
  47. package/dist/tests/managerHarness.js.map +1 -0
  48. package/dist/tests/procaptchaAudio.test-d.d.ts +2 -0
  49. package/dist/tests/procaptchaAudio.test-d.d.ts.map +1 -0
  50. package/dist/tests/procaptchaAudio.test-d.js +103 -0
  51. package/dist/tests/procaptchaAudio.test-d.js.map +1 -0
  52. package/dist/tests/procaptchaAudio.unit.test.d.ts +2 -0
  53. package/dist/tests/procaptchaAudio.unit.test.d.ts.map +1 -0
  54. package/dist/tests/procaptchaAudio.unit.test.js +93 -0
  55. package/dist/tests/procaptchaAudio.unit.test.js.map +1 -0
  56. package/dist/tests/procaptchaWidget.unit.test.d.ts +2 -0
  57. package/dist/tests/procaptchaWidget.unit.test.d.ts.map +1 -0
  58. package/dist/tests/procaptchaWidget.unit.test.js +597 -0
  59. package/dist/tests/procaptchaWidget.unit.test.js.map +1 -0
  60. package/dist/tests/setup.d.ts +2 -0
  61. package/dist/tests/setup.d.ts.map +1 -0
  62. package/dist/tests/setup.js +12 -0
  63. package/dist/tests/setup.js.map +1 -0
  64. package/package.json +70 -3
  65. package/vite.cjs.config.ts +22 -0
  66. package/vite.esm.config.ts +20 -0
  67. package/vite.test.config.ts +26 -0
  68. package/README.md +0 -3
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-audio",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "author": "PROSOPO LIMITED <info@prosopo.io>",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/index.js",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "engines": {
10
+ "node": "^24"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/cjs/index.cjs"
17
+ }
18
+ },
19
+ "types": "dist/index.d.ts",
20
+ "source": "./src/index.ts",
21
+ "browserslist": [
22
+ "> 0.5%, last 2 versions, not dead"
23
+ ],
24
+ "dependencies": {
25
+ "@polkadot/util": "14.0.3",
26
+ "@prosopo/api": "4.5.0",
27
+ "@prosopo/common": "3.1.63",
28
+ "@prosopo/locale": "3.8.0",
29
+ "@prosopo/procaptcha-common": "2.20.0",
30
+ "@prosopo/types": "5.14.0",
31
+ "@prosopo/util": "3.3.14",
32
+ "@prosopo/util-crypto": "13.6.0",
33
+ "@prosopo/widget-skeleton": "2.10.1"
34
+ },
35
+ "devDependencies": {
36
+ "@prosopo/config": "3.4.3",
37
+ "@types/node": "22.5.5",
38
+ "@vitest/coverage-v8": "4.1.11",
39
+ "concurrently": "9.0.1",
40
+ "del-cli": "6.0.0",
41
+ "jsdom": "26.1.0",
42
+ "npm-run-all": "4.1.5",
43
+ "tslib": "2.7.0",
44
+ "tsx": "4.20.3",
45
+ "typescript": "5.6.2",
46
+ "vite": "8.1.5",
47
+ "vitest": "4.1.11"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/prosopo/captcha.git",
52
+ "directory": "packages/procaptcha-audio"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/prosopo/captcha/issues"
56
+ },
57
+ "homepage": "https://github.com/prosopo/captcha#readme",
58
+ "description": "",
59
+ "publishConfig": {
60
+ "registry": "https://registry.npmjs.org"
61
+ },
62
+ "scripts": {
63
+ "clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
64
+ "build": "pnpm run build:cross-env --mode ${NODE_ENV:-development}",
65
+ "build:cross-env": "vite build --config vite.esm.config.ts",
66
+ "build:tsc": "tsc --build --verbose",
67
+ "build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
68
+ "typecheck": "tsc --project tsconfig.types.json",
69
+ "test": "NODE_ENV=${NODE_ENV:-test}; pnpm exec vitest run --config ./vite.test.config.ts",
70
+ "test:watch": "NODE_ENV=${NODE_ENV:-test}; pnpm exec vitest --config ./vite.test.config.ts",
71
+ "test:coverage": "NODE_ENV=${NODE_ENV:-test}; pnpm exec vitest run --coverage --config ./vite.test.config.ts"
72
+ }
6
73
  }
@@ -0,0 +1,22 @@
1
+ import path from "node:path";
2
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ import { ViteCommonJSConfig } from "@prosopo/config";
16
+
17
+ export default function () {
18
+ return ViteCommonJSConfig(
19
+ path.basename("."),
20
+ path.resolve("./tsconfig.json"),
21
+ );
22
+ }
@@ -0,0 +1,20 @@
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import path from "node:path";
16
+ import { ViteEsmConfig } from "@prosopo/config";
17
+
18
+ export default function () {
19
+ return ViteEsmConfig(path.basename("."), path.resolve("./tsconfig.json"));
20
+ }
@@ -0,0 +1,26 @@
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { ViteTestConfig } from "@prosopo/config";
15
+ import { defineConfig, mergeConfig } from "vitest/config";
16
+
17
+ process.env.NODE_ENV = "test";
18
+
19
+ // The widget builds real DOM and the manager clears its timeouts through
20
+ // `window`, so jsdom is required.
21
+ export default mergeConfig(
22
+ ViteTestConfig(),
23
+ defineConfig({
24
+ test: { environment: "jsdom", setupFiles: ["./src/tests/setup.ts"] },
25
+ }),
26
+ );
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.