@prosopo/puzzle-assets 0.2.0 → 0.2.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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
|
|
2
|
+
10:11:18 AM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* tsconfig.json
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
10:11:19 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
10:11:19 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
10:11:19 AM - Building project '/home/runner/work/captcha/captcha/packages/puzzle-assets/tsconfig.json'...
|
|
11
11
|
|
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @prosopo/puzzle-assets
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- e13d7a8: New captcha type: `iconOrder`. The user is shown a frame of icons and a legend, and clicks the legend's icons in the order given.
|
|
7
|
+
|
|
8
|
+
Icon-order is off by default. Only Prosopo can switch it on for a site, with the `captchaTypeFeatureFlags.iconOrder` feature flag; the site owner cannot. A site without the flag is never served icon-order by any route, and the challenge endpoint refuses it. Once the flag is on, the owner can still keep icon-order out of the frictionless flow with `frictionlessTypes.iconOrder`, the same way as image and puzzle.
|
|
9
|
+
|
|
10
|
+
The answer never leaves the provider. Icon positions are stored on the challenge record, and the widget receives only the rendered frame and legend. Grading checks order as well as position, and each icon's hit radius scales with its size. Verifying a token is single-use under concurrent requests.
|
|
11
|
+
|
|
12
|
+
`@prosopo/icon-order-assets` draws the imagery, and `@prosopo/procaptcha-icon-order` is the widget. Its text is translated into every supported language.
|
|
13
|
+
|
|
14
|
+
Puzzle and icon-order now share their server code: challenge and solution handlers, the verify route, the submit and verify pipeline, and the database record methods. The widget code they have in common moves into `@prosopo/procaptcha-common`: the lazy mount wrapper, manager expiry and dispose, spent-session handling, behavioural data encryption and trusted click coordinates. Puzzle's behaviour is unchanged.
|
|
15
|
+
|
|
16
|
+
The demo playground has icon-order pages, and there is an end-to-end test for it.
|
|
17
|
+
|
|
3
18
|
## 0.2.0
|
|
4
19
|
### Minor Changes
|
|
5
20
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NotchPlacement, PuzzleGeometry, PuzzleRenderSettings, RenderedPuzzle, RgbaImage } from "./types.js";
|
|
2
2
|
export { createPrng, createSeed, SEED_BYTES } from "./prng.js";
|
|
3
|
+
export type { Prng } from "./prng.js";
|
|
3
4
|
export { generateBackground } from "./background.js";
|
|
4
5
|
export { bestPairContrast, contrastRatio, relativeLuminance, simulateVision, worstCaseContrast, VISION_TYPES, type VisionType, } from "./contrast.js";
|
|
5
6
|
export { MIN_PALETTE_CONTRAST, drawPalette, hslToRgb, type Rgb, } from "./palette.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,KAAK,UAAU,GACf,M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,EACN,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,KAAK,GAAG,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACN,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,GACT,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,SAAS,GACT,MAAM,YAAY,CAAC;AAOpB,eAAO,MAAM,gBAAgB,EAAE,cAI9B,CAAC;AAQF,eAAO,MAAM,uBAAuB,EAAE,oBAMrC,CAAC;AAQF,eAAO,MAAM,gBAAgB,cAClB,cAAc,SAClB,MAAM,KACV,SACmE,CAAC;AAOvE,eAAO,MAAM,YAAY,eACZ,SAAS,aACV,cAAc,aACf,cAAc,aACd,oBAAoB,SACxB,MAAM,KACV,OAAO,CAAC,cAAc,CAsCxB,CAAC;AASF,eAAO,MAAM,YAAY,cACb,cAAc,aACf,cAAc,aACd,oBAAoB,mBACd,MAAM,eACV,MAAM,KAChB,OAAO,CAAC,cAAc,CAOvB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AASnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|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