@taggor/component 0.4.0 → 0.5.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 (90) hide show
  1. package/assets.d.ts +2 -2
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/assets.d.ts +2 -2
  4. package/dist/assets.js +2 -2
  5. package/dist/bounded-json.d.ts +3 -3
  6. package/dist/bounded-json.js +3 -3
  7. package/dist/build/check-messages.js +3 -3
  8. package/dist/build/check-messages.js.map +1 -1
  9. package/dist/build/extract-manifest.d.ts +5 -5
  10. package/dist/build/extract-manifest.d.ts.map +1 -1
  11. package/dist/build/extract-manifest.js +4 -4
  12. package/dist/build/extract-styles.js +2 -2
  13. package/dist/build/find-definition.d.ts +2 -2
  14. package/dist/build/find-definition.js +2 -2
  15. package/dist/build/index.d.ts +3 -3
  16. package/dist/build/index.js +3 -3
  17. package/dist/consent.d.ts +8 -9
  18. package/dist/consent.d.ts.map +1 -1
  19. package/dist/consent.js +6 -7
  20. package/dist/consent.js.map +1 -1
  21. package/dist/data-client.d.ts +2 -2
  22. package/dist/data-client.d.ts.map +1 -1
  23. package/dist/data-declaration.d.ts +1 -1
  24. package/dist/data-errors.d.ts +2 -2
  25. package/dist/data-errors.js +3 -3
  26. package/dist/data-errors.js.map +1 -1
  27. package/dist/data-transport.d.ts +5 -5
  28. package/dist/data-transport.d.ts.map +1 -1
  29. package/dist/debug.d.ts +2 -2
  30. package/dist/define-component.d.ts +19 -20
  31. package/dist/define-component.d.ts.map +1 -1
  32. package/dist/define-component.js +10 -10
  33. package/dist/define-component.js.map +1 -1
  34. package/dist/define-library.d.ts +1 -1
  35. package/dist/define-library.d.ts.map +1 -1
  36. package/dist/edge-transport.d.ts +1 -1
  37. package/dist/edge-transport.d.ts.map +1 -1
  38. package/dist/edge-transport.js +2 -2
  39. package/dist/edge-transport.js.map +1 -1
  40. package/dist/events.d.ts +6 -7
  41. package/dist/events.d.ts.map +1 -1
  42. package/dist/form-field.d.ts +1 -1
  43. package/dist/form-field.js +1 -1
  44. package/dist/host.d.ts +5 -5
  45. package/dist/host.js +3 -3
  46. package/dist/index.d.ts +13 -13
  47. package/dist/index.js +13 -13
  48. package/dist/intl-format.d.ts +3 -3
  49. package/dist/intl-format.js +3 -3
  50. package/dist/issued-proofs.d.ts +3 -3
  51. package/dist/issued-proofs.js +3 -3
  52. package/dist/locale.js +1 -1
  53. package/dist/memory-transport.d.ts +3 -3
  54. package/dist/messages.js +1 -1
  55. package/dist/none.d.ts +1 -1
  56. package/dist/none.js +1 -1
  57. package/dist/props.d.ts +6 -6
  58. package/dist/slots.js +2 -2
  59. package/dist/submit-result.js +1 -1
  60. package/dist/testing/form-internals.d.ts +2 -2
  61. package/dist/testing/form-internals.js +2 -2
  62. package/dist/testing/index.d.ts +3 -3
  63. package/dist/testing/index.js +3 -3
  64. package/dist/testing/mount-component.d.ts +7 -7
  65. package/dist/testing/mount-component.d.ts.map +1 -1
  66. package/dist/testing/mount-component.js +17 -17
  67. package/dist/testing/mount-component.js.map +1 -1
  68. package/dist/testing/visitor.d.ts +1 -1
  69. package/dist/testing/visitor.js +1 -1
  70. package/dist/theming.d.ts +1 -1
  71. package/dist/turnstile.d.ts +8 -8
  72. package/dist/turnstile.js +8 -8
  73. package/dist/turnstile.js.map +1 -1
  74. package/dist/use-font.d.ts +1 -1
  75. package/dist/use-font.d.ts.map +1 -1
  76. package/dist/use-font.js +4 -5
  77. package/dist/use-font.js.map +1 -1
  78. package/dist/use-locale.js +1 -1
  79. package/dist/use-taggor-data.d.ts +6 -6
  80. package/dist/use-taggor-data.js +11 -11
  81. package/dist/use-taggor-data.js.map +1 -1
  82. package/dist/use-track.d.ts +1 -1
  83. package/dist/use-track.js +1 -1
  84. package/dist/value-types.d.ts +5 -5
  85. package/dist/value-types.js +3 -3
  86. package/dist/visitor-action.d.ts +5 -5
  87. package/dist/visitor-action.d.ts.map +1 -1
  88. package/dist/visitor-action.js +6 -7
  89. package/dist/visitor-action.js.map +1 -1
  90. package/package.json +3 -3
@@ -1,20 +1,20 @@
1
1
  /**
2
- * The Turnstile client (TAG-709): loads Cloudflare's script on demand and solves one challenge
2
+ * The Turnstile client: loads Cloudflare's script on demand and solves one challenge
3
3
  * per submission, in the invisible way, for the data transport (`data-client.ts`). Nothing here
4
4
  * runs at import and nothing is loaded until the first `token()` call: a page whose components never
5
5
  * submit never contacts `challenges.cloudflare.com` (golden rule 6), and the base loader never
6
- * pulls this module (it is the lazy data module, `docs/agentes/runtime.md` §2.19).
6
+ * pulls this module (it is the lazy data module).
7
7
  *
8
- * Where the challenge lives (the spike's decision, runtime.md §2.19): in a dedicated `<div>` the
8
+ * Where the challenge lives : in a dedicated `<div>` the
9
9
  * client appends to `<body>`, out of every component, with its own closed shadow root holding the
10
10
  * container Turnstile renders into. `appearance: "interaction-only"` makes a managed key behave
11
11
  * as invisible until Cloudflare needs the visitor, and only then (`before-interactive-callback`)
12
12
  * is the box shown, fixed at the bottom right; an invisible-type key never shows it. The host is
13
13
  * removed as soon as the token (or a failure) is known, so nothing stays in the page.
14
14
  *
15
- * TAG-310: under a strict CSP the injected script carries the page's nonce and, when the page
16
- * requires Trusted Types, a `TrustedScriptURL` from the loader's `taggor` policy (see
17
- * `docs/testing/compatibility.md`).
15
+ * Under a strict CSP the injected script carries the page's nonce and, when the page
16
+ * requires Trusted Types, a `TrustedScriptURL` from the loader's `taggor` policy (see the
17
+ * compatibility notes).
18
18
  *
19
19
  * Golden rule 2: `token()` never rejects and never throws; a script that does not load, a
20
20
  * Turnstile error, a timeout, a missing `turnstile` global or an abort all resolve to `undefined`
@@ -29,12 +29,12 @@ export interface TurnstileOptions {
29
29
  /** Milliseconds before a load or a challenge is given up on (default 30 s). */
30
30
  readonly timeoutMs?: number | undefined;
31
31
  /**
32
- * The page's CSP nonce (TAG-310): set on the injected `<script>`, so a page whose `script-src`
32
+ * The page's CSP nonce: set on the injected `<script>`, so a page whose `script-src`
33
33
  * is a nonce (with or without `'strict-dynamic'`) lets it run without listing Cloudflare.
34
34
  */
35
35
  readonly nonce?: string | undefined;
36
36
  /**
37
- * Turns the script URL into what `script.src` takes (TAG-310): the loader's `taggor` Trusted
37
+ * Turns the script URL into what `script.src` takes: the loader's `taggor` Trusted
38
38
  * Types policy, so a page with `require-trusted-types-for 'script'` accepts the assignment.
39
39
  * Default: the URL itself. May throw; the load then fails like any other.
40
40
  */
package/dist/turnstile.js CHANGED
@@ -1,20 +1,20 @@
1
1
  /**
2
- * The Turnstile client (TAG-709): loads Cloudflare's script on demand and solves one challenge
2
+ * The Turnstile client: loads Cloudflare's script on demand and solves one challenge
3
3
  * per submission, in the invisible way, for the data transport (`data-client.ts`). Nothing here
4
4
  * runs at import and nothing is loaded until the first `token()` call: a page whose components never
5
5
  * submit never contacts `challenges.cloudflare.com` (golden rule 6), and the base loader never
6
- * pulls this module (it is the lazy data module, `docs/agentes/runtime.md` §2.19).
6
+ * pulls this module (it is the lazy data module).
7
7
  *
8
- * Where the challenge lives (the spike's decision, runtime.md §2.19): in a dedicated `<div>` the
8
+ * Where the challenge lives : in a dedicated `<div>` the
9
9
  * client appends to `<body>`, out of every component, with its own closed shadow root holding the
10
10
  * container Turnstile renders into. `appearance: "interaction-only"` makes a managed key behave
11
11
  * as invisible until Cloudflare needs the visitor, and only then (`before-interactive-callback`)
12
12
  * is the box shown, fixed at the bottom right; an invisible-type key never shows it. The host is
13
13
  * removed as soon as the token (or a failure) is known, so nothing stays in the page.
14
14
  *
15
- * TAG-310: under a strict CSP the injected script carries the page's nonce and, when the page
16
- * requires Trusted Types, a `TrustedScriptURL` from the loader's `taggor` policy (see
17
- * `docs/testing/compatibility.md`).
15
+ * Under a strict CSP the injected script carries the page's nonce and, when the page
16
+ * requires Trusted Types, a `TrustedScriptURL` from the loader's `taggor` policy (see the
17
+ * compatibility notes).
18
18
  *
19
19
  * Golden rule 2: `token()` never rejects and never throws; a script that does not load, a
20
20
  * Turnstile error, a timeout, a missing `turnstile` global or an abort all resolve to `undefined`
@@ -22,7 +22,7 @@
22
22
  */
23
23
  /** Cloudflare's script, in explicit render mode (no implicit `.cf-turnstile` scan of the page). */
24
24
  const SCRIPT_URL = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";
25
- /** The origin of `SCRIPT_URL`, what the Trusted Types policy checks the URL against (TAG-310). */
25
+ /** The origin of `SCRIPT_URL`, what the Trusted Types policy checks the URL against. */
26
26
  const SCRIPT_ORIGIN = "https://challenges.cloudflare.com";
27
27
  /** Longest a script load or one challenge may take before it counts as failed. */
28
28
  const TIMEOUT_MS = 30_000;
@@ -78,7 +78,7 @@ export function createTurnstile(options) {
78
78
  script.src = (options.scriptUrl?.(SCRIPT_URL, SCRIPT_ORIGIN) ?? SCRIPT_URL);
79
79
  }
80
80
  catch {
81
- // The page's Trusted Types policy refused the URL (TAG-610): settle now; the cache
81
+ // The page's Trusted Types policy refused the URL: settle now; the cache
82
82
  // entry below is dropped as soon as a load resolves without an API.
83
83
  finish();
84
84
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"turnstile.js","sourceRoot":"","sources":["../src/turnstile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,mGAAmG;AACnG,MAAM,UAAU,GAAG,uEAAuE,CAAC;AAE3F,kGAAkG;AAClG,MAAM,aAAa,GAAG,mCAAmC,CAAC;AAE1D,kFAAkF;AAClF,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,2FAA2F;AAC3F,MAAM,KAAK,GAAG,IAAI,OAAO,EAA+C,CAAC;AAuCzE,4DAA4D;AAC5D,SAAS,KAAK,CAAC,GAAa;IAC1B,MAAM,IAAI,GAAG,GAAG,CAAC,WAA6D,CAAC;IAC/E,MAAM,GAAG,GAAG,IAAI,EAAE,SAAS,CAAC;IAC5B,OAAO,OAAO,GAAG,EAAE,MAAM,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,C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,IAAI,CAAC,SAAS,CAAC,CAAC;gBAClB,CAAC;gBACD,6BAA6B,EAAE,GAAG,EAAE;oBAClC,IAAI,CAAC,KAAK,CAAC,OAAO;wBAChB,iFAAiF,CAAC;gBACtF,CAAC;aACF,CAAC,CAAC;YACH,IAAI,WAAW,KAAK,SAAS;gBAAE,IAAI,CAAC,SAAS,CAAC,CAAC;;gBAC1C,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC,SAAS,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO;QACL,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACtB,IAAI,CAAC;gBACH,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC;gBAC1B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;oBACtB,OAAO,GAAG,SAAS,CAAC;oBACpB,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YAClC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,GAAG,SAAS,CAAC;gBACpB,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -45,7 +45,7 @@ export interface FontTarget {
45
45
  * and a font that fails to load (the rejection is handled, so the page never sees it); a declaration
46
46
  * whose getter throws is warned about too. The first face registered under a name wins: an equal
47
47
  * one already in `document.fonts` (put there by the page or another script of the realm, maybe
48
- * with another file) is kept, since its `src` cannot be read back (threat T-113, accepted).
48
+ * with another file) is kept, since its `src` cannot be read back (accepted).
49
49
  */
50
50
  export declare function registerFont(target: FontTarget, font: FontDeclaration, bundleUrl: unknown, warn: (message: string) => void): void;
51
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"use-font.d.ts","sourceRoot":"","sources":["../src/use-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OAAO,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9C,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CAClD;AAgCD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAGxD;AAED,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,QAAQ,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,eAAe,EACrB,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC9B,IAAI,CAwCN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAkBrD"}
package/dist/use-font.js CHANGED
@@ -1,11 +1,10 @@
1
1
  /**
2
- * `useFont` (TAG-213): the hook a component uses to render text in its own typeface. A `@font-face`
2
+ * `useFont`: the hook a component uses to render text in its own typeface. A `@font-face`
3
3
  * inside a shadow root is ignored (Chrome) or not applied in every browser, so the font has to be
4
4
  * known to the document; the hook adds it to `document.fonts` with the CSS Font Loading API
5
5
  * (`new FontFace(…)`), which every shadow root of the page uses.
6
6
  *
7
- * This is the one exception to "no component CSS in the document" (TAG-308, docs/agentes/runtime.md
8
- * rule 16), and it is kept minimal on purpose:
7
+ * This is the one exception to "no component CSS in the document" (a rule of the runtime), and it is kept minimal on purpose:
9
8
  * - no `<style>`, no CSS text and no selector reach the document: a `FontFace` object only
10
9
  * describes a font, so it cannot style anything, and the page's CSP `style-src` does not apply
11
10
  * (only `font-src`, for the CDN origin);
@@ -75,12 +74,12 @@ export function fontFamily(font) {
75
74
  * and a font that fails to load (the rejection is handled, so the page never sees it); a declaration
76
75
  * whose getter throws is warned about too. The first face registered under a name wins: an equal
77
76
  * one already in `document.fonts` (put there by the page or another script of the realm, maybe
78
- * with another file) is kept, since its `src` cannot be read back (threat T-113, accepted).
77
+ * with another file) is kept, since its `src` cannot be read back (accepted).
79
78
  */
80
79
  export function registerFont(target, font, bundleUrl, warn) {
81
80
  const { fonts, FontFace: Face } = target;
82
81
  try {
83
- // One read of each field (security review of TAG-213, L1): a getter that answered differently
82
+ // One read of each field: a getter that answered differently
84
83
  // on a second read could name the font after one file and load another.
85
84
  const { family, src, weight = "normal", style = "normal" } = font;
86
85
  const name = registeredName({ family, src, weight, style });
@@ -1 +1 @@
1
- {"version":3,"file":"use-font.js","sourceRoot":"","sources":["../src/use-font.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAsB,MAAM,WAAW,CAAC;AAqB5D,sFAAsF;AACtF,MAAM,cAAc,GAAG,oDAAoD,CAAC;AAC5E,uEAAuE;AACvE,MAAM,cAAc,GAAG,oEAAoE,CAAC;AAC5F,8FAA8F;AAC9F,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,yFAAyF;AACzF,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEhD,6EAA6E;AAC7E,SAAS,cAAc,CAAC,IAAqB;IAC3C,+EAA+E;IAC/E,MAAM,EACJ,MAAM,EACN,GAAG,EACH,MAAM,GAAG,QAAQ,EACjB,KAAK,GAAG,QAAQ,GACjB,GAA+C,IAAI,CAAC;IACrD,8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C,MAAM,QAAQ,GAAoB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACjE,OAAO,CAAC,GAAG,EAAE;QACX,YAAY,CACV,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,EAC3D,QAAQ,EACR,MAAM,CAAC,IAAI,CAAC,GAAG,EACf,CAAC,OAAO,EAAE,EAAE;YACV,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,CAAC,CACF,CAAC;QACF,iGAAiG;IACnG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACvC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `useLocale` (TAG-211): the hook a component uses to speak the visitor's language. It picks one of
2
+ * `useLocale`: the hook a component uses to speak the visitor's language. It picks one of
3
3
  * the languages of the component's catalogs (`locale.ts`, in the contract's order: `locale`
4
4
  * attribute, nearest `lang` and `<html lang>`, `navigator.language`, the declared default) and
5
5
  * returns it with `t`. The `Intl` helpers (`intl-format.ts`) are separate exports that take the
@@ -14,13 +14,13 @@ export interface SubmitError {
14
14
  export interface SubmitOptions {
15
15
  /**
16
16
  * A Turnstile token of this submission, if the component has one. Normally absent: the data module
17
- * (`data-client.ts`, TAG-709) solves a challenge for every attempt itself.
17
+ * (`data-client.ts`) solves a challenge for every attempt itself.
18
18
  */
19
19
  readonly turnstileToken?: string | undefined;
20
20
  /** The value of a hidden honeypot field: humans leave it empty, bots fill it. */
21
21
  readonly honeypot?: string | undefined;
22
22
  /**
23
- * The visitor's consent (TAG-212): `useConsent(...).proof`. Required when the manifest declares
23
+ * The visitor's consent: `useConsent(...).proof`. Required when the manifest declares
24
24
  * `data.personal`; without it, nothing is sent and the outcome is `consent_required`.
25
25
  */
26
26
  readonly consent?: ConsentProof | undefined;
@@ -55,15 +55,15 @@ export interface TaggorData<V> {
55
55
  * (required ones mandatory). Errors: none; every failure is an outcome: `unavailable` without a
56
56
  * transport, `collection_not_found` (sent nowhere, debug warning) for a collection the manifest
57
57
  * does not declare, `consent_required` (sent nowhere) for a component with `data.personal` when
58
- * `options.consent` is not a proof `useConsent` issued for this component (TAG-212; a proof built by
59
- * hand is refused, TAG-237), `network_error`, or the server's code with
58
+ * `options.consent` is not a proof `useConsent` issued for this component (a proof built by
59
+ * hand is refused), `network_error`, or the server's code with
60
60
  * its field messages; a given `consent` travels in the body. A `consent_required` answer that blames
61
61
  * a `consent.*` field (the site has no privacy policy URL saved, or the page's differs from it) comes
62
- * out as `consent_unverifiable` (TAG-728): the visitor is told the form is not available, the debug
62
+ * out as `consent_unverifiable`: the visitor is told the form is not available, the debug
63
63
  * console says how to fix it. Side effects:
64
64
  * one transport `submit` per accepted call; the idempotency key is kept only to retry the same
65
65
  * values after a `network_error` (the server may have received them) and dropped once the server
66
- * answers or the values change. TAG-317: the host's `signal` goes to the transport, so unmounting
66
+ * answers or the values change. The host's `signal` goes to the transport, so unmounting
67
67
  * the component cancels a submission in flight; it resolves to `network_error` and, the component
68
68
  * being gone, no state is shown. Whatever the transport resolves to is normalized (unknown codes
69
69
  * and malformed results become `network_error`).
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `useTaggorData` (TAG-203): the hook a component uses to submit a form to one of its declared
2
+ * `useTaggorData`: the hook a component uses to submit a form to one of its declared
3
3
  * collections. It builds the contract's `SubmitRequest` (an idempotency key, the time since
4
4
  * render for the bot filter, the optional Turnstile token and honeypot), sends it through the
5
5
  * host's `DataTransport` and exposes the status, a friendly message (pt-BR or en) and the
@@ -9,8 +9,8 @@
9
9
  * promise, nothing is sent twice); `submit` never rejects and nothing throws to the page (golden
10
10
  * rule 2); nothing is written to cookies or storage, and the idempotency key is a random value of
11
11
  * one submission, never a visitor identifier (golden rule 6). No Zod: the server validates.
12
- * TAG-212: a component whose manifest declares `data.personal` sends nothing without the visitor's
13
- * consent (`useConsent`), and sends the consent proof with each submission. TAG-237: only a
12
+ * A component whose manifest declares `data.personal` sends nothing without the visitor's
13
+ * consent (`useConsent`), and sends the consent proof with each submission; only a
14
14
  * proof `useConsent` issued counts (`issued-proofs.ts`); one built by hand is refused.
15
15
  */
16
16
  import { useContext, useRef, useState } from "preact/hooks";
@@ -67,15 +67,15 @@ function localFailure(code) {
67
67
  * (required ones mandatory). Errors: none; every failure is an outcome: `unavailable` without a
68
68
  * transport, `collection_not_found` (sent nowhere, debug warning) for a collection the manifest
69
69
  * does not declare, `consent_required` (sent nowhere) for a component with `data.personal` when
70
- * `options.consent` is not a proof `useConsent` issued for this component (TAG-212; a proof built by
71
- * hand is refused, TAG-237), `network_error`, or the server's code with
70
+ * `options.consent` is not a proof `useConsent` issued for this component (a proof built by
71
+ * hand is refused), `network_error`, or the server's code with
72
72
  * its field messages; a given `consent` travels in the body. A `consent_required` answer that blames
73
73
  * a `consent.*` field (the site has no privacy policy URL saved, or the page's differs from it) comes
74
- * out as `consent_unverifiable` (TAG-728): the visitor is told the form is not available, the debug
74
+ * out as `consent_unverifiable`: the visitor is told the form is not available, the debug
75
75
  * console says how to fix it. Side effects:
76
76
  * one transport `submit` per accepted call; the idempotency key is kept only to retry the same
77
77
  * values after a `network_error` (the server may have received them) and dropped once the server
78
- * answers or the values change. TAG-317: the host's `signal` goes to the transport, so unmounting
78
+ * answers or the values change. The host's `signal` goes to the transport, so unmounting
79
79
  * the component cancels a submission in flight; it resolves to `network_error` and, the component
80
80
  * being gone, no state is shown. Whatever the transport resolves to is normalized (unknown codes
81
81
  * and malformed results become `network_error`).
@@ -85,7 +85,7 @@ export function useTaggorData(context, collection) {
85
85
  const [state, setState] = useState(IDLE);
86
86
  // The first render's time: `_t` is measured from when the visitor could first see the form, and
87
87
  // starts over when the Preact component mounts again. The server only marks a submission with a
88
- // small `_t` as suspect (TAG-730), so a re-mounted multi-step form loses nothing by it.
88
+ // small `_t` as suspect, so a re-mounted multi-step form loses nothing by it.
89
89
  const [renderedAt] = useState(Date.now);
90
90
  const inFlight = useRef(undefined);
91
91
  // The key of a submission that ended in network_error, and the values it carried.
@@ -98,8 +98,8 @@ export function useTaggorData(context, collection) {
98
98
  return localFailure("collection_not_found");
99
99
  }
100
100
  const { turnstileToken, honeypot, consent } = options;
101
- // Personal data never leaves the page without the visitor's consent (TAG-212), proven by a
102
- // proof `useConsent` issued, never one the component wrote itself (TAG-237).
101
+ // Personal data never leaves the page without the visitor's consent, proven by a
102
+ // proof `useConsent` issued, never one the component wrote itself.
103
103
  if (data?.personal === true && !issuedProofs.has(consent))
104
104
  return localFailure("consent_required");
105
105
  const transport = host?.transport;
@@ -143,7 +143,7 @@ export function useTaggorData(context, collection) {
143
143
  return { ok: true };
144
144
  }
145
145
  // `consent_required` with a `consent.*` field is the site's setup (no privacy policy URL saved,
146
- // or one that differs from the page's), not the visitor's box: say "not available" (TAG-728).
146
+ // or one that differs from the page's), not the visitor's box: say "not available".
147
147
  const code = result.code === "consent_required" &&
148
148
  result.fields.some((field) => field.path.startsWith("consent."))
149
149
  ? "consent_unverifiable"
@@ -1 +1 @@
1
- {"version":3,"file":"use-taggor-data.js","sourceRoot":"","sources":["../src/use-taggor-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI5D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAsD3D,MAAM,eAAe,GAAgB,MAAM,CAAC,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compile; the same function for the same host and manifest across renders.
10
10
  * Errors: none, ever: an undeclared name or an undeclared or invalid prop is dropped (warned in
11
11
  * debug mode), and a component without a transport tracks nothing. Side effects: at most one
12
- * transport `track` call per accepted call (TAG-820: the transport samples it by
12
+ * transport `track` call per accepted call (the transport samples it by
13
13
  * `eventSampleRate` and caps it per page; the beacon holds only the kind, the version hash and the
14
14
  * declared name, props stay in the page).
15
15
  */
package/dist/use-track.js CHANGED
@@ -37,7 +37,7 @@ function trackRequest(host, manifest, name, props) {
37
37
  * declared props compile; the same function for the same host and manifest across renders.
38
38
  * Errors: none, ever: an undeclared name or an undeclared or invalid prop is dropped (warned in
39
39
  * debug mode), and a component without a transport tracks nothing. Side effects: at most one
40
- * transport `track` call per accepted call (TAG-820: the transport samples it by
40
+ * transport `track` call per accepted call (the transport samples it by
41
41
  * `eventSampleRate` and caps it per page; the beacon holds only the kind, the version hash and the
42
42
  * declared name, props stay in the page).
43
43
  */
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Type-level reading of declarative value schemas (TAG-202): `ValueOf<S>` is the TypeScript type
2
+ * Type-level reading of declarative value schemas: `ValueOf<S>` is the TypeScript type
3
3
  * of the values the contract's `checkValue` accepts for the schema `S` (`@taggor/contract`,
4
4
  * value-check.ts). Props of type `array`/`object` and event `detail`s are typed with it, so the
5
5
  * types an author sees are derived from the same declaration the runtime validates against,
6
6
  * never from a separate analysis of the author's code (the old prototype's defect).
7
7
  *
8
- * TAG-227: `DeepReadonly` is what `PropsOf` wraps every prop value in, because the runtime hands
9
- * props to `render` frozen in depth (TAG-304); `ValueOf` itself stays mutable, since event
8
+ * `DeepReadonly` is what `PropsOf` wraps every prop value in, because the runtime hands
9
+ * props to `render` frozen in depth; `ValueOf` itself stays mutable, since event
10
10
  * `detail`s and submitted values are objects the component builds.
11
11
  *
12
12
  * Types only: nothing here exists at runtime.
@@ -58,8 +58,8 @@ export type ValueOf<S> = S extends {
58
58
  * `T` read-only at every level: arrays become `readonly` arrays of read-only items and every
59
59
  * object field becomes `readonly` (optional fields stay optional). Primitives are unchanged.
60
60
  *
61
- * It mirrors the contract's `deepFreeze`, which the runtime applies to the props it renders with
62
- * (TAG-304): writing to a frozen prop (`props.items.push(…)`, `props.link.label = …`) throws a
61
+ * It mirrors the contract's `deepFreeze`, which the runtime applies to the props it renders with:
62
+ * writing to a frozen prop (`props.items.push(…)`, `props.link.label = …`) throws a
63
63
  * `TypeError` in the browser and sends the component to its fallback, so the compiler refuses it.
64
64
  */
65
65
  export type DeepReadonly<T> = T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Type-level reading of declarative value schemas (TAG-202): `ValueOf<S>` is the TypeScript type
2
+ * Type-level reading of declarative value schemas: `ValueOf<S>` is the TypeScript type
3
3
  * of the values the contract's `checkValue` accepts for the schema `S` (`@taggor/contract`,
4
4
  * value-check.ts). Props of type `array`/`object` and event `detail`s are typed with it, so the
5
5
  * types an author sees are derived from the same declaration the runtime validates against,
6
6
  * never from a separate analysis of the author's code (the old prototype's defect).
7
7
  *
8
- * TAG-227: `DeepReadonly` is what `PropsOf` wraps every prop value in, because the runtime hands
9
- * props to `render` frozen in depth (TAG-304); `ValueOf` itself stays mutable, since event
8
+ * `DeepReadonly` is what `PropsOf` wraps every prop value in, because the runtime hands
9
+ * props to `render` frozen in depth; `ValueOf` itself stays mutable, since event
10
10
  * `detail`s and submitted values are objects the component builds.
11
11
  *
12
12
  * Types only: nothing here exists at runtime.
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Whether code runs inside a visitor's own action in the component (TAG-237): `useConsent` records
2
+ * Whether code runs inside a visitor's own action in the component: `useConsent` records
3
3
  * the consent only then, so a component cannot tick it by itself with `el.click()`, `dispatchEvent`,
4
- * a timer or an effect (threat model T-62 and §6, the synthetic click the static gate of TAG-1706
4
+ * a timer or an effect (the synthetic click the static gate
5
5
  * lets through).
6
6
  *
7
7
  * `window.event` is deprecated and not set inside a shadow root in every engine, so the component's
@@ -19,14 +19,14 @@
19
19
  * window only has to cover one task (a click and the `change` it fires, a key and the text it
20
20
  * types); a later trusted consequence is no stronger than calling `setGiven` in that cause.
21
21
  *
22
- * Scope (re-review of TAG-237): this stops the naive use (a synthetic click, a timer, an
22
+ * Scope: this stops the naive use (a synthetic click, a timer, an
23
23
  * effect), not a component that subverts its own realm on purpose. It runs inside the untrusted
24
24
  * bundle: replacing `Function.prototype.call` at any time, `EventTarget.prototype.addEventListener`
25
25
  * before the first render, or the `eventPhase` getter and `Date.now` before this module loads, or
26
26
  * reaching Preact's hook state, gets past it. Against that, the gate, the AUP and the server-side
27
- * check of the proof (TAG-703) apply; threat model §6, residual 3.
27
+ * check of the proof apply; threat model §6, residual 3.
28
28
  *
29
- * Accepted residual (security review B3 of TAG-237): the listeners end with the host's signal,
29
+ * Accepted residual: the listeners end with the host's signal,
30
30
  * when the component unmounts, not with the component. A component that calls `useConsent` and is
31
31
  * unmounted and mounted again while the component stays on the page (a conditional consent step)
32
32
  * adds seven more listeners each time; the old ones only keep recording into their own closure.
@@ -1 +1 @@
1
- {"version":3,"file":"visitor-action.d.ts","sourceRoot":"","sources":["../src/visitor-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAwBH,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,MAAM,OAAO,CAYf"}
1
+ {"version":3,"file":"visitor-action.d.ts","sourceRoot":"","sources":["../src/visitor-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAuBH,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,MAAM,OAAO,CAYf"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Whether code runs inside a visitor's own action in the component (TAG-237): `useConsent` records
2
+ * Whether code runs inside a visitor's own action in the component: `useConsent` records
3
3
  * the consent only then, so a component cannot tick it by itself with `el.click()`, `dispatchEvent`,
4
- * a timer or an effect (threat model T-62 and §6, the synthetic click the static gate of TAG-1706
4
+ * a timer or an effect (the synthetic click the static gate
5
5
  * lets through).
6
6
  *
7
7
  * `window.event` is deprecated and not set inside a shadow root in every engine, so the component's
@@ -19,14 +19,14 @@
19
19
  * window only has to cover one task (a click and the `change` it fires, a key and the text it
20
20
  * types); a later trusted consequence is no stronger than calling `setGiven` in that cause.
21
21
  *
22
- * Scope (re-review of TAG-237): this stops the naive use (a synthetic click, a timer, an
22
+ * Scope: this stops the naive use (a synthetic click, a timer, an
23
23
  * effect), not a component that subverts its own realm on purpose. It runs inside the untrusted
24
24
  * bundle: replacing `Function.prototype.call` at any time, `EventTarget.prototype.addEventListener`
25
25
  * before the first render, or the `eventPhase` getter and `Date.now` before this module loads, or
26
26
  * reaching Preact's hook state, gets past it. Against that, the gate, the AUP and the server-side
27
- * check of the proof (TAG-703) apply; threat model §6, residual 3.
27
+ * check of the proof apply; threat model §6, residual 3.
28
28
  *
29
- * Accepted residual (security review B3 of TAG-237): the listeners end with the host's signal,
29
+ * Accepted residual: the listeners end with the host's signal,
30
30
  * when the component unmounts, not with the component. A component that calls `useConsent` and is
31
31
  * unmounted and mounted again while the component stays on the page (a conditional consent step)
32
32
  * adds seven more listeners each time; the old ones only keep recording into their own closure.
@@ -38,8 +38,7 @@ const VISITOR_ACTIONS = ["click", "keydown", "keyup", "pointerup", "input", "cha
38
38
  /** How many of `VISITOR_ACTIONS`, from the start, are causes. */
39
39
  const CAUSES = 4;
40
40
  /**
41
- * The browser's own `eventPhase` getter, read when the module loads (security review B1 of
42
- * TAG-237): a getter put on `Event.prototype` later cannot make an old event look dispatched.
41
+ * The browser's own `eventPhase` getter, read when the module loads: a getter put on `Event.prototype` later cannot make an old event look dispatched.
43
42
  * Missing (a DOM without it): every check is false.
44
43
  */
45
44
  const eventPhase = Object.getOwnPropertyDescriptor(Event.prototype, "eventPhase")?.get;
@@ -1 +1 @@
1
- {"version":3,"file":"visitor-action.js","sourceRoot":"","sources":["../src/visitor-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,oFAAoF;AACpF,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEhG,iEAAiE;AACjE,MAAM,MAAM,GAAG,CAAC,CAAC;AAEjB;;;;GAIG;AACH,MAAM,UAAU,GACd,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAE9D,EAAE,GAAG,CAAC;AAEP;;;GAGG;AACH,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhC,iGAAiG;AACjG,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAA6B,EAC7B,MAA+B;IAE/B,sFAAsF;IACtF,IAAI,OAAO,GAAG,CAAC,QAAQ,CAAC;IACxB,IAAI,OAA0B,CAAC;IAC/B,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QACtD,MAAM,MAAM,GAAG,CAAC,KAAY,EAAE,EAAE;YAC9B,IAAI,KAAK,GAAG,MAAM;gBAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CA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OAAO,EAAE,EAAE,CAAC;QACtD,MAAM,MAAM,GAAG,CAAC,KAAY,EAAE,EAAE;YAC9B,IAAI,KAAK,GAAG,MAAM;gBAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YAClE,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,GAAG,EAAE,GAAG,OAAO,GAAG,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3F,CAAC,CAAC;QACF,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAA6B,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACxD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taggor/component",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Authoring SDK: defineTaggorComponent, defineLibrary, typed props and events, useHost, useSlot, the data hooks useTaggorData and useTrack with their transports, useConsent and <Consent>, useLocale with message catalogs and Intl helpers, useFont and the asset import types (@taggor/component/assets); extractManifest for the builder; mountComponent for authors' tests (@taggor/component/testing).",
5
5
  "keywords": [
6
6
  "taggor",
@@ -46,8 +46,8 @@
46
46
  "assets.d.ts"
47
47
  ],
48
48
  "dependencies": {
49
- "@taggor/contract": "0.4.0",
50
- "@taggor/runtime": "0.4.0"
49
+ "@taggor/contract": "0.5.0",
50
+ "@taggor/runtime": "0.5.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "preact": "10.29.8"