@taggor/runtime 0.4.0 → 0.6.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 (100) hide show
  1. package/README.md +1 -2
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/compat/before-compat.js +1 -1
  4. package/dist/compat/index.d.ts.map +1 -1
  5. package/dist/compat/index.js +3 -3
  6. package/dist/compat/scope.d.ts +2 -2
  7. package/dist/element/attributes.d.ts +7 -7
  8. package/dist/element/attributes.d.ts.map +1 -1
  9. package/dist/element/attributes.js +6 -6
  10. package/dist/element/component-controller.d.ts +14 -14
  11. package/dist/element/component-controller.d.ts.map +1 -1
  12. package/dist/element/component-controller.js +28 -28
  13. package/dist/element/component-controller.js.map +1 -1
  14. package/dist/element/contract-gate.d.ts +2 -2
  15. package/dist/element/contract-gate.js +2 -2
  16. package/dist/element/create-component-element.d.ts +11 -11
  17. package/dist/element/create-component-element.js +15 -15
  18. package/dist/element/create-component-element.js.map +1 -1
  19. package/dist/element/define-element.d.ts +4 -4
  20. package/dist/element/define-element.d.ts.map +1 -1
  21. package/dist/element/define-element.js +1 -1
  22. package/dist/element/define-element.js.map +1 -1
  23. package/dist/element/diagnostics.d.ts +2 -2
  24. package/dist/element/error-boundary.d.ts +2 -2
  25. package/dist/element/error-boundary.d.ts.map +1 -1
  26. package/dist/element/error-boundary.js +1 -1
  27. package/dist/element/error-report.d.ts +2 -2
  28. package/dist/element/error-report.d.ts.map +1 -1
  29. package/dist/element/error-report.js +14 -7
  30. package/dist/element/error-report.js.map +1 -1
  31. package/dist/element/events.d.ts +5 -6
  32. package/dist/element/events.d.ts.map +1 -1
  33. package/dist/element/events.js +5 -6
  34. package/dist/element/events.js.map +1 -1
  35. package/dist/element/handler-guard.d.ts +3 -3
  36. package/dist/element/handler-guard.js +5 -5
  37. package/dist/element/handler-guard.js.map +1 -1
  38. package/dist/element/index.d.ts +1 -2
  39. package/dist/element/index.d.ts.map +1 -1
  40. package/dist/element/index.js +1 -2
  41. package/dist/element/index.js.map +1 -1
  42. package/dist/element/props-script.d.ts +1 -1
  43. package/dist/element/props-script.js +1 -1
  44. package/dist/element/styles.d.ts +11 -9
  45. package/dist/element/styles.d.ts.map +1 -1
  46. package/dist/element/styles.js +10 -8
  47. package/dist/element/styles.js.map +1 -1
  48. package/dist/element/types.d.ts +22 -22
  49. package/dist/element/types.d.ts.map +1 -1
  50. package/dist/host/api.d.ts +3 -3
  51. package/dist/host/api.d.ts.map +1 -1
  52. package/dist/host/api.js +9 -10
  53. package/dist/host/api.js.map +1 -1
  54. package/dist/host/barrier.d.ts +2 -2
  55. package/dist/host/barrier.js +3 -3
  56. package/dist/host/barrier.js.map +1 -1
  57. package/dist/host/index.d.ts +2 -2
  58. package/dist/host/index.js +2 -2
  59. package/dist/host/registry.d.ts +2 -2
  60. package/dist/host/registry.js +2 -2
  61. package/dist/host/registry.js.map +1 -1
  62. package/dist/host/types.d.ts +1 -1
  63. package/dist/host/types.js +1 -1
  64. package/dist/index.d.ts +3 -3
  65. package/dist/index.js +3 -3
  66. package/dist/loader/config.d.ts +7 -7
  67. package/dist/loader/config.d.ts.map +1 -1
  68. package/dist/loader/config.js +4 -4
  69. package/dist/loader/config.js.map +1 -1
  70. package/dist/loader/entry.js +9 -4
  71. package/dist/loader/entry.js.map +1 -1
  72. package/dist/loader/lazy-transport.d.ts +1 -1
  73. package/dist/loader/lazy-transport.js +1 -1
  74. package/dist/loader/loader-code.d.ts +1 -1
  75. package/dist/loader/loader-code.js +2 -2
  76. package/dist/loader/loading.d.ts +1 -1
  77. package/dist/loader/loading.js +1 -1
  78. package/dist/loader/page-state.d.ts +4 -2
  79. package/dist/loader/page-state.d.ts.map +1 -1
  80. package/dist/loader/resilient-import.d.ts +2 -2
  81. package/dist/loader/resilient-import.d.ts.map +1 -1
  82. package/dist/loader/resilient-import.js +1 -1
  83. package/dist/loader/run.d.ts +9 -8
  84. package/dist/loader/run.d.ts.map +1 -1
  85. package/dist/loader/run.js +54 -44
  86. package/dist/loader/run.js.map +1 -1
  87. package/dist/loader/script-url.d.ts +4 -4
  88. package/dist/loader/script-url.js +5 -5
  89. package/dist/loader/script-url.js.map +1 -1
  90. package/dist/loader/script.d.ts +2 -2
  91. package/dist/loader/script.js +2 -2
  92. package/dist/server/render-fragment.d.ts +1 -1
  93. package/dist/server/render-fragment.d.ts.map +1 -1
  94. package/dist/server/render-fragment.js +2 -2
  95. package/dist/server/render-fragment.js.map +1 -1
  96. package/dist/server/ssr-code.d.ts +1 -1
  97. package/dist/server/ssr-code.js +3 -3
  98. package/dist/server/worker.d.ts +2 -2
  99. package/dist/server/worker.js +1 -1
  100. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/host/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAqBhF;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,OAAuB;IACnD,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,IAAI,iBAAiB,CAAC,CAAC;IAC/E,wEAAwE;IACxE,MAAM,MAAM,GAAG,CAAC,IAAY,EAAQ,EAAE;QACpC,WAAW,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,QAAQ;YACb,OAAO,EAAE,UAAU,IAAI,wCAAwC;SAChE,CAAC,CAAC;IACL,CAAC,CAAC;IACF,uFAAuF;IACvF,MAAM,SAAS,GAAG,CAAC,IAA+B,EAAE,EAAE,CACpD,IAAI,EAAE,OAAO,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACxD,MAAM,IAAI,GAAG,CAAC,OAAgB,EAA6B,EAAE;QAC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AAI;YAClB,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * The initial-load barrier behind `window.taggor.ready()` (TAG-214).
2
+ * The initial-load barrier behind `window.taggor.ready()`.
3
3
  *
4
4
  * The loader announces the tags it found in the page at the initial load (`expect`) and settles
5
5
  * each one when `createComponentElement` returned for it (defined, collision, refused) or when it
6
- * gave up on the tag's bundle (network error, timeout, a bundle that throws; TAG-307). `ready()`
6
+ * gave up on the tag's bundle (network error, timeout, a bundle that throws). `ready()`
7
7
  * resolves once the announcement happened and nothing announced is pending; it never rejects, and
8
8
  * each call gets its own promise. A
9
9
  * tag settled before it is announced counts as settled, so the order of the loader's calls does
@@ -1,9 +1,9 @@
1
1
  /**
2
- * The initial-load barrier behind `window.taggor.ready()` (TAG-214).
2
+ * The initial-load barrier behind `window.taggor.ready()`.
3
3
  *
4
4
  * The loader announces the tags it found in the page at the initial load (`expect`) and settles
5
5
  * each one when `createComponentElement` returned for it (defined, collision, refused) or when it
6
- * gave up on the tag's bundle (network error, timeout, a bundle that throws; TAG-307). `ready()`
6
+ * gave up on the tag's bundle (network error, timeout, a bundle that throws). `ready()`
7
7
  * resolves once the announcement happened and nothing announced is pending; it never rejects, and
8
8
  * each call gets its own promise. A
9
9
  * tag settled before it is announced counts as settled, so the order of the loader's calls does
@@ -39,7 +39,7 @@ export function createInitialLoadBarrier() {
39
39
  pending?.delete(tag);
40
40
  check();
41
41
  },
42
- // A new promise per call (TAG-214 review, A3): the shared one never leaves this closure, so
42
+ // A new promise per call: the shared one never leaves this closure, so
43
43
  // no caller can poison its `then` for the others.
44
44
  ready: () => barrier.then(() => undefined),
45
45
  });
@@ -1 +1 @@
1
- {"version":3,"file":"barrier.js","sourceRoot":"","sources":["../../src/host/barrier.ts"],"names":[],"mappings":"AAAA;;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AU,CAAC;IAClC,6DAA6D;IAC7D,IAAI,OAAgC,CAAC;IACrC,IAAI,IAAI,GAAe,GAAG,EAAE,CAAC,SAAS,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5C,IAAI,GAAG,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,IAAI,OAAO,EAAE,IAAI,KAAK,CAAC;YAAE,IAAI,EAAE,CAAC;IAClC,CAAC,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE;YACjC,OAAO,KAAK,IAAI,GAAG,EAAE,CAAC;YACtB,KAAK,MAAM,GAAG,IAAI,IAAI;gBAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;oBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAChE,KAAK,EAAE,CAAC;QACV,CAAC;QACD,MAAM,EAAE,CAAC,GAAW,EAAE,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;YACrB,KAAK,EAAE,CAAC;QACV,CAAC;QACD,uEAAuE;QACvE,kDAAkD;QAClD,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;KAC3C,CAAC,CAAC;AACL,CAAC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * The host page API (TAG-214): `window.taggor` (`createHostApi`, `installHostApi`) and
2
+ * The host page API: `window.taggor` (`createHostApi`, `installHostApi`) and
3
3
  * the initial-load barrier behind its `ready()` (`createInitialLoadBarrier`). The loader bundles
4
4
  * this entry (`@taggor/runtime/host`); the runtime bundle only has the live component registry
5
- * (`liveComponents`, exported by the main entry). See docs/agentes/runtime.md §2.18.
5
+ * (`liveComponents`, exported by the main entry).
6
6
  */
7
7
  export { createHostApi, installHostApi, type HostApiOptions } from "./api.js";
8
8
  export { createInitialLoadBarrier, type InitialLoadBarrier } from "./barrier.js";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * The host page API (TAG-214): `window.taggor` (`createHostApi`, `installHostApi`) and
2
+ * The host page API: `window.taggor` (`createHostApi`, `installHostApi`) and
3
3
  * the initial-load barrier behind its `ready()` (`createInitialLoadBarrier`). The loader bundles
4
4
  * this entry (`@taggor/runtime/host`); the runtime bundle only has the live component registry
5
- * (`liveComponents`, exported by the main entry). See docs/agentes/runtime.md §2.18.
5
+ * (`liveComponents`, exported by the main entry).
6
6
  */
7
7
  export { createHostApi, installHostApi } from "./api.js";
8
8
  export { createInitialLoadBarrier } from "./barrier.js";
@@ -1,12 +1,12 @@
1
1
  /**
2
- * The live component registry (TAG-214): the connected component elements of the page's runtime copies,
2
+ * The live component registry: the connected component elements of the page's runtime copies,
3
3
  * each with the reader of its `ComponentInfo`. It is the only part of the host page API inside the
4
4
  * runtime bundle: the Custom Element wrapper keeps it, and `window.taggor`
5
5
  * (`createHostApi`, which the loader bundles) reads it through the runtime module the loader
6
6
  * imported.
7
7
  *
8
8
  * Holds strong references only to connected elements: the controller deletes an element when it
9
- * really unmounts (TAG-317), so a removed element is not kept alive here; a move keeps it.
9
+ * really unmounts, so a removed element is not kept alive here; a move keeps it.
10
10
  */
11
11
  import type { ComponentInfo } from "./types.js";
12
12
  /** Reads the current info of one element; never throws (the controller catches). */
@@ -1,7 +1,7 @@
1
- /** The page-global key the registry lives under (a symbol: invisible to `Object.keys`, TAG-610). */
1
+ /** The page-global key the registry lives under (a symbol: invisible to `Object.keys`). */
2
2
  const KEY = Symbol.for("taggor.live");
3
3
  /**
4
- * The registry of this page (TAG-309): one map shared by every copy of the runtime, so sites on
4
+ * The registry of this page: one map shared by every copy of the runtime, so sites on
5
5
  * different runtime majors, each importing its own copy, appear in the one `window.taggor`.
6
6
  *
7
7
  * Output: the map kept on the page's global, created by the first copy; a private map when the
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/host/registry.ts"],"names":[],"mappings":"AAkBA,oGAAoG;AACpG,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAEtC;;;;;;;;GAQG;AACH,SAAS,YAAY;IACnB,MAAM,IAAI,GAAG,UAAqC,CAAC;IACnD,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAmB,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/host/registry.ts"],"names":[],"mappings":"AAkBA,2FAA2F;AAC3F,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAEtC;;;;;;;;GAQG;AACH,SAAS,YAAY;IACnB,MAAM,IAAI,GAAG,UAAqC,CAAC;IACnD,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAmB,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB,YAAY,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Types of the host page API (TAG-214): what `window.taggor` offers the customer's site
2
+ * Types of the host page API: what `window.taggor` offers the customer's site
3
3
  * (`TaggorHostApi`) and what it says about one component element (`ComponentInfo`).
4
4
  *
5
5
  * These are the untyped shapes the runtime implements. The per-component declaration files the
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Types of the host page API (TAG-214): what `window.taggor` offers the customer's site
2
+ * Types of the host page API: what `window.taggor` offers the customer's site
3
3
  * (`TaggorHostApi`) and what it says about one component element (`ComponentInfo`).
4
4
  *
5
5
  * These are the untyped shapes the runtime implements. The per-component declaration files the
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @taggor/runtime: the browser side of Taggor. Created as a placeholder by TAG-001; TAG-302 added
3
- * the Custom Element wrapper (`./element`); TAG-214 the host page API (`./host`, `window.taggor`).
4
- * The site loader is TAG-301.
2
+ * @taggor/runtime: the browser side of Taggor. The Custom Element
3
+ * wrapper (`./element`) and the host page API (`./host`, `window.taggor`).
4
+ * The site loader is a separate bundle.
5
5
  *
6
6
  * Importing this module has no side effects (no `customElements.define`, no global, no Preact
7
7
  * hook): everything happens when `createComponentElement` is called, and `window.taggor` exists only
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @taggor/runtime: the browser side of Taggor. Created as a placeholder by TAG-001; TAG-302 added
3
- * the Custom Element wrapper (`./element`); TAG-214 the host page API (`./host`, `window.taggor`).
4
- * The site loader is TAG-301.
2
+ * @taggor/runtime: the browser side of Taggor. The Custom Element
3
+ * wrapper (`./element`) and the host page API (`./host`, `window.taggor`).
4
+ * The site loader is a separate bundle.
5
5
  *
6
6
  * Importing this module has no side effects (no `customElements.define`, no global, no Preact
7
7
  * hook): everything happens when `createComponentElement` is called, and `window.taggor` exists only
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Reads the configuration the edge embeds in the site loader (TAG-301): the site manifest as
2
+ * Reads the configuration the edge embeds in the site loader: the site manifest as
3
3
  * served (`/m/<siteKey>.json` shape, plus the `servedOn` day) and two origins' worth of URLs.
4
4
  * The loader treats it as untrusted-shaped input anyway (golden rule 5): a wrong type, a bundle
5
5
  * outside the loader's own origin or a malformed tag drops that entry, never the page.
@@ -9,7 +9,7 @@
9
9
  * and `liveComponents`); `manifest.components[]` are the `SiteManifestComponent` entries of
10
10
  * `@taggor/contract`. No dependency on the contract package here: this file is in the 3 KB gate.
11
11
  *
12
- * TAG-709: the embed may also carry `data`: `{ moduleUrl, siteKey, turnstileSiteKey? }`, what a
12
+ * The embed may also carry `data`: `{ moduleUrl, siteKey, turnstileSiteKey? }`, what a
13
13
  * component that declares `data` needs to submit (the lazy data module of `@taggor/component`, the
14
14
  * site key, Turnstile's public key). Absent or malformed, such components mount without a transport
15
15
  * and their submissions end in the SDK's `unavailable` error.
@@ -23,12 +23,12 @@ export interface LoaderComponent {
23
23
  readonly contractVersion: string;
24
24
  /** The content address of the published version, reported by `window.taggor.get`. */
25
25
  readonly version: string;
26
- /** The props the site gives the component (TAG-613), unchecked: the runtime checks each one. */
26
+ /** The props the site gives the component, unchecked: the runtime checks each one. */
27
27
  readonly defaults: unknown;
28
- /** The manifest's `loading` as found; only `idle` means something (TAG-335). */
28
+ /** The manifest's `loading` as found; only `idle` means something. */
29
29
  readonly loading: string | undefined;
30
30
  }
31
- /** Where and how components with data reach the edge (TAG-709), already checked. */
31
+ /** Where and how components with data reach the edge, already checked. */
32
32
  export interface LoaderData {
33
33
  /** Absolute URL of the lazy data module, on the loader's own origin. */
34
34
  readonly moduleUrl: string;
@@ -42,13 +42,13 @@ export interface LoaderData {
42
42
  export interface LoaderConfig {
43
43
  /** Absolute URL of the runtime module, on the loader's own origin. */
44
44
  readonly runtimeUrl: string;
45
- /** The site's public key, when the manifest carries a well-formed one (TAG-610: dedupe key). */
45
+ /** The site's public key, when the manifest carries a well-formed one (dedupe key). */
46
46
  readonly siteKey: string | undefined;
47
47
  /** The ISO day the edge served the manifest, when it stamped one. */
48
48
  readonly servedOn: string | undefined;
49
49
  /** Active components by tag (the first entry of a tag wins). */
50
50
  readonly components: ReadonlyMap<string, LoaderComponent>;
51
- /** The data module and keys; absent when the embed has none or they are unusable (TAG-709). */
51
+ /** The data module and keys; absent when the embed has none or they are unusable. */
52
52
  readonly data: LoaderData | undefined;
53
53
  }
54
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/loader/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAYH,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gGAAgG;IAChG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C;AAED,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,CAA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,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,gEAAgE;IAChE,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC1D,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;CACvC;AAuCD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CA8CvE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Reads the configuration the edge embeds in the site loader (TAG-301): the site manifest as
2
+ * Reads the configuration the edge embeds in the site loader: the site manifest as
3
3
  * served (`/m/<siteKey>.json` shape, plus the `servedOn` day) and two origins' worth of URLs.
4
4
  * The loader treats it as untrusted-shaped input anyway (golden rule 5): a wrong type, a bundle
5
5
  * outside the loader's own origin or a malformed tag drops that entry, never the page.
@@ -9,7 +9,7 @@
9
9
  * and `liveComponents`); `manifest.components[]` are the `SiteManifestComponent` entries of
10
10
  * `@taggor/contract`. No dependency on the contract package here: this file is in the 3 KB gate.
11
11
  *
12
- * TAG-709: the embed may also carry `data`: `{ moduleUrl, siteKey, turnstileSiteKey? }`, what a
12
+ * The embed may also carry `data`: `{ moduleUrl, siteKey, turnstileSiteKey? }`, what a
13
13
  * component that declares `data` needs to submit (the lazy data module of `@taggor/component`, the
14
14
  * site key, Turnstile's public key). Absent or malformed, such components mount without a transport
15
15
  * and their submissions end in the SDK's `unavailable` error.
@@ -18,7 +18,7 @@
18
18
  const TAG_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/;
19
19
  /**
20
20
  * Most components honored: the contract's `SITE_MANIFEST_MAX_COMPONENTS`, the platform ceiling
21
- * (the highest plan's `componentsPerSite`, TAG-1623), not a plan's own limit. Repeated here because
21
+ * (the highest plan's `componentsPerSite`), not a plan's own limit. Repeated here because
22
22
  * the loader cannot import the contract (3 KB gate); a test keeps the two equal.
23
23
  */
24
24
  const MAX_COMPONENTS = 800;
@@ -89,7 +89,7 @@ export function readLoaderConfig(raw) {
89
89
  continue;
90
90
  }
91
91
  // Passed on as found: the runtime reads it with `?.[prop]` and checks each value with its
92
- // prop's type, so a shape that is not an object only means no site values (TAG-613).
92
+ // prop's type, so a shape that is not an object only means no site values.
93
93
  components.set(tag, {
94
94
  tag,
95
95
  bundleUrl,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/loader/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iGAAiG;AACjG,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,cAAc,GAAG,GAAG,CAAC;AA0C3B,uEAAuE;AACvE,SAAS,MAAM,CAAC,KAAc,EAAE,MAAc;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,IAAI;QAAE,OAAO,SAAS,CAAC;IACvE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,2CAA2C;AAC3C,SAAS,IAAI,CAAC,MAAe,EAAE,KAAa;IAC1C,MAAM,KAAK,GAAI,MAAyC,EAAE,CAAC,KAAK,CAAC,CAAC;IAClE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;YACpC,UAAU,EAAE,UAAU;YACtB,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;SAC5B,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The loader's browser entry (TAG-301), the only file of the loader with side effects. It is the
2
+ * The loader's browser entry, the only file of the loader with side effects. It is the
3
3
  * body of the script the edge serves at `/s/<siteKey>.js`: `script.ts` wraps the built bundle in a
4
4
  * function that receives the embedded configuration as `__TAGGOR_LOADER_CONFIG__`, so the loader
5
5
  * creates no global of its own (the only one is `window.taggor`, installed by `startLoader`).
@@ -16,18 +16,23 @@ try {
16
16
  // `import()` reads a TrustedScriptURL as its string; the specifier type is string only in TS.
17
17
  // (the lint exception is per file, in this workspace's eslint.config.js)
18
18
  importModule: (url) => import(/* @vite-ignore */ url),
19
- // TAG-310: the `taggor` Trusted Types policy for those URLs, where the browser has Trusted Types.
19
+ // The `taggor` Trusted Types policy for those URLs, where the browser has Trusted Types.
20
20
  scriptUrl: createScriptUrls(globalThis.trustedTypes, (message) => {
21
21
  console.warn(message);
22
22
  },
23
- // TAG-610: one policy per page, shared by every snippet.
23
+ // One policy per page, shared by every snippet.
24
24
  pageState().policy),
25
25
  observe: (callback, target) => {
26
26
  const observer = new MutationObserver(callback);
27
27
  observer.observe(target, { childList: true, subtree: true });
28
28
  return observer;
29
29
  },
30
- beacon: (url, body) => navigator.sendBeacon(url, body),
30
+ // A CORS request, so its `Origin` is the page's whatever the page's Referrer-Policy (a
31
+ // `sendBeacon` sent `Origin: null` under `no-referrer` or `same-origin` in Firefox and WebKit,
32
+ // which the edge refuses); a failure is swallowed, never an unhandled rejection on the page.
33
+ beacon: (url, body) => {
34
+ fetch(url, { method: "POST", body, keepalive: true }).catch(() => undefined);
35
+ },
31
36
  nonce: script instanceof HTMLScriptElement && script.nonce !== "" ? script.nonce : undefined,
32
37
  });
33
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IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC/E,CAAC;QACD,KAAK,EAAE,MAAM,YAAY,iBAAiB,IAAI,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;KAC7F,CAAC,CAAC;AACL,CAAC;AAAC,MAAM,CAAC;IACP,iBAAiB;AACnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The lazy data transport (TAG-709): what the loader hands to a component that declares `data`, so
2
+ * The lazy data transport: what the loader hands to a component that declares `data`, so
3
3
  * the heavy part (the data module of `@taggor/component`: edge transport, retry, Turnstile client)
4
4
  * is downloaded only when the component first submits or tracks, never at page load and never for a
5
5
  * page without such a component. The Turnstile script itself is fetched later still, by the data
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The lazy data transport (TAG-709): what the loader hands to a component that declares `data`, so
2
+ * The lazy data transport: what the loader hands to a component that declares `data`, so
3
3
  * the heavy part (the data module of `@taggor/component`: edge transport, retry, Turnstile client)
4
4
  * is downloaded only when the component first submits or tracks, never at page load and never for a
5
5
  * page without such a component. The Turnstile script itself is fetched later still, by the data
@@ -1,2 +1,2 @@
1
- /** The built site loader, a script body that reads `__TAGGOR_LOADER_CONFIG__` (TAG-301). */
1
+ /** The built site loader, a script body that reads `__TAGGOR_LOADER_CONFIG__`. */
2
2
  export declare const LOADER_CODE: string;
@@ -1,2 +1,2 @@
1
- // Generated by scripts/build-loader.ts (TAG-301); do not edit.
2
- export const LOADER_CODE = "\"use strict\";(()=>{function N(){let n=new Set,e,t=()=>{},o=new Promise(r=>{t=r}),i=()=>{e?.size===0&&t()};return Object.freeze({expect:r=>{e??=new Set;for(let d of r)n.has(d)||e.add(d);i()},settle:r=>{n.add(r),e?.delete(r),i()},ready:()=>o.then(()=>{})})}var L=Symbol.for(\"taggor.loader\");function M(){return{sites:new Set,tags:new Map,barrier:N(),runtime:void 0,policy:{}}}function $(n){let e=n;return typeof e==\"object\"&&e!==null&&e.sites instanceof Set&&e.tags instanceof Map&&typeof e.barrier==\"object\"&&typeof e.policy==\"object\"}function _(n=globalThis){try{let e=n[L];if($(e))return e;let t=M();return Object.defineProperty(n,L,{value:t,configurable:!0}),t}catch{return M()}}function P(n,e){return e===void 0?!0:n.sites.has(e)?!1:(n.sites.add(e),!0)}function I(n,e,t,o){let i=`${o??\"\"}\n${t}`,r=n.tags.get(e);return r===void 0?(n.tags.set(e,i),\"mine\"):r===i?\"same\":\"other\"}var R=`${String(1)}.${String(11)}.0`;var H=Object.freeze({major:1,minor:11,majors:Object.freeze([Object.freeze({major:1})])}),E=\"(0|[1-9]\\\\d{0,5})\",ee=new RegExp(`^${E}\\\\.${E}\\\\.${E}$`);var b=Object.freeze({warn:()=>{},reportError:()=>{}});function h(n){return Object.freeze({warn:e=>{try{n.warn(e)}catch{}},reportError:e=>{try{n.reportError(e)}catch{}}})}function U(n){let e=h(n.diagnostics??b),t=r=>{e.warn({code:\"host-api\",tag:\"taggor\",message:`taggor.${r}: invalid argument, returned undefined`})},o=r=>r?.element.isConnected===!0?r:void 0,i=r=>{try{return o(n.live()?.get(r)?.())}catch{return}};return Object.freeze({version:R,ready:()=>n.barrier.ready(),get:r=>{let d=i(r);return d===void 0&&t(\"get\"),d},on:(r,d,s)=>{if(typeof r!=\"string\"||typeof d!=\"string\"||typeof s!=\"function\"){t(\"on\");return}try{let a=n.document??document,p=`${r}:${d}`,g=f=>{let T=!1;try{T=i(f.composedPath()[0])!==void 0}catch{}T&&s(f)};return a.addEventListener(p,g,!0),()=>{try{a.removeEventListener(p,g,!0)}catch{}}}catch{t(\"on\");return}},components:()=>{let r=[];try{for(let d of n.live()?.values()??[])try{let s=o(d());s!==void 0&&r.push(s)}catch{}}catch{}return Object.freeze(r)}})}function w(n,e=globalThis){try{return Object.hasOwn(e,\"taggor\")?!1:(Object.defineProperty(e,\"taggor\",{value:n,writable:!0,configurable:!0,enumerable:!1}),!0)}catch{return!1}}var F=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/;function A(n,e){if(!(typeof n!=\"string\"||n.length>2048))try{let t=new URL(n,e);return t.origin===e&&t.protocol.startsWith(\"http\")?t.href:void 0}catch{return}}function u(n,e){let t=n?.[e];return typeof t==\"string\"?t:void 0}var O=/^[A-Za-z0-9_-]{1,100}$/;function G(n,e){let t=n?.data,o=A(u(t,\"moduleUrl\"),e),i=u(t,\"siteKey\"),r=u(t,\"turnstileSiteKey\");if(!(o===void 0||i===void 0||!O.test(i)))return{moduleUrl:o,baseUrl:e,siteKey:i,turnstileSiteKey:r!==void 0&&O.test(r)?r:void 0}}function v(n){try{let e=new URL(u(n,\"origin\")??\"\").origin,t=A(u(n,\"runtimeUrl\"),e),o=n.manifest,i=o?.components;if(t===void 0||!Array.isArray(i))return;let r=new Map;for(let s of i.slice(0,800)){let a=u(s,\"tag\"),p=A(u(s,\"bundleUrl\"),e),g=u(s,\"contractVersion\"),f=u(s,\"versionHash\");a===void 0||!F.test(a)||r.has(a)||u(s,\"status\")!==\"active\"||p===void 0||g===void 0||f===void 0||r.set(a,{tag:a,bundleUrl:p,contractVersion:g,version:f,defaults:s.defaults,loading:u(s,\"loading\")})}let d=u(o,\"siteKey\");return{runtimeUrl:t,siteKey:d!==void 0&&O.test(d)?d:void 0,servedOn:u(o,\"servedOn\"),components:r,data:G(n,e)}}catch{return}}var x=Object.freeze({ok:!1,code:\"network_error\",fields:Object.freeze([])});function D(n){let e,t=()=>{let o=e??=n();return o.catch(()=>{e===o&&(e=void 0)}),o};return{submit:(o,i,r)=>{try{return t().then(d=>d.submit(o,i,r),()=>x)}catch{return Promise.resolve(x)}},track:o=>{try{t().then(i=>{i.track(o)}).catch(()=>{})}catch{}}}}function k(n,e){let t=o=>new Promise((i,r)=>{let d=e.setTimeout(()=>{r(new Error(\"timeout\"))},1e4),s=()=>{e.clearTimeout(d)};n(o).then(a=>{s(),i(a)},a=>{s(),r(a instanceof Error?a:new Error(\"import failed\"))})});return o=>t(o).catch(()=>new Promise(i=>e.setTimeout(i,1e3)).then(()=>t(o)))}var z={setTimeout:(n,e)=>setTimeout(n,e),clearTimeout:n=>{clearTimeout(n)}};function B(n){return n?.default??void 0}function Y(n,e,t){return D(async()=>(await e(n.moduleUrl)).createDataTransport({baseUrl:n.baseUrl,siteKey:n.siteKey,turnstileSiteKey:n.turnstileSiteKey,nonce:t.nonce,scriptUrl:t.scriptUrl}))}function W(n,e){try{n?.warn({code:\"tag-collision\",tag:e,message:`<${e}> is already loaded by another snippet; the first stays.`})}catch{}}function X(n,e){let t=n?.manifest;return t?.tag===e.tag&&(t.contractVersion===void 0||t.contractVersion===e.contractVersion)}function j(n,e){try{let t={...e,importModule:k(e.importModule,e.timers??z)},o=_(t.target),{barrier:i}=o;w(U({live:()=>o.runtime?.liveComponents,barrier:i,...t.diagnostics===void 0?{}:{diagnostics:t.diagnostics}}),t.target);let r=v(n);if(r===void 0){o.sites.size===0&&i.expect([]);return}if(!P(o,r.siteKey))return;let d=e.scriptUrl??(c=>c),s=async c=>t.importModule(d(c,new URL(r.runtimeUrl).origin)),a=new Map(r.components),p,g=()=>p??=s(r.runtimeUrl).then(c=>(o.runtime=c,o.runtime)),f=async c=>{try{c.loading===\"idle\"&&await s(new URL(\"loading.js\",r.runtimeUrl).href).then(S=>S.idle(),()=>{});let[y,l]=await Promise.all([g(),s(c.bundleUrl)]),m=B(l);m!==void 0&&X(m,c)&&(y.createComponentElement(m,{contractVersion:c.contractVersion,version:c.version,origin:r.runtimeUrl,siteDefaults:c.defaults,...r.servedOn===void 0?{}:{servedOn:r.servedOn},...t.diagnostics===void 0?{}:{diagnostics:t.diagnostics},...t.nonce?{styleNonce:t.nonce}:{},...r.data!==void 0?{transport:Y(r.data,s,t)}:{}}),r.siteKey&&t.beacon?.(new URL(`/e/${r.siteKey}`,r.runtimeUrl),c.version))}catch{}finally{i.settle(c.tag)}},T=()=>{let c=[];if(a.size===0)return c;let y=t.document.querySelectorAll([...a.keys()].join(\",\"));for(let l of y){let m=a.get(l.localName);if(m===void 0)continue;a.delete(l.localName);let S=I(o,m.tag,m.version,r.siteKey);S===\"mine\"?c.push(m):S===\"other\"&&W(t.diagnostics,m.tag)}return c},C=()=>{try{let c=T();i.expect(c.map(l=>l.tag));for(let l of c)f(l);if(a.size===0)return;let y=t.observe(()=>{try{for(let l of T())f(l);a.size===0&&y.disconnect()}catch{}},t.document.documentElement)}catch{i.expect([])}};t.document.readyState===\"loading\"?t.document.addEventListener(\"DOMContentLoaded\",C,{once:!0}):C()}catch{}}var J=\"https://challenges.cloudflare.com\";function K(n,e){let t=new URL(n);if(t.origin!==e||!t.protocol.startsWith(\"http\"))throw new TypeError(\"module URL outside the loader origin\");return t.href}function V(n,e,t={}){return(o,i)=>{let r=K(o,i);if(t.tried!==!0&&n!==void 0){t.tried=!0;try{let d=[i,J];t.policy=n.createPolicy(\"taggor\",{createScriptURL:s=>{let{origin:a}=new URL(s);return K(s,d.includes(a)?a:\"\")}})}catch{e(\"Taggor: the page's trusted-types directive does not list 'taggor'; loading without it.\")}}if(t.policy===void 0)return r;try{return t.policy.createScriptURL(r,i)}catch{return r}}}try{let n=document.currentScript;j(__TAGGOR_LOADER_CONFIG__,{document,importModule:e=>import(e),scriptUrl:V(globalThis.trustedTypes,e=>{console.warn(e)},_().policy),observe:(e,t)=>{let o=new MutationObserver(e);return o.observe(t,{childList:!0,subtree:!0}),o},beacon:(e,t)=>navigator.sendBeacon(e,t),nonce:n instanceof HTMLScriptElement&&n.nonce!==\"\"?n.nonce:void 0})}catch{}})();";
1
+ // Generated by scripts/build-loader.ts; do not edit.
2
+ export const LOADER_CODE = "\"use strict\";(()=>{function P(){let n=new Set,e,t=()=>{},o=new Promise(r=>{t=r}),i=()=>{e?.size===0&&t()};return Object.freeze({expect:r=>{e??=new Set;for(let d of r)n.has(d)||e.add(d);i()},settle:r=>{n.add(r),e?.delete(r),i()},ready:()=>o.then(()=>{})})}var M=Symbol.for(\"taggor.loader\");function I(){return{sites:new Set,tags:new Map,barrier:P(),runtime:void 0,policy:{}}}function H(n){let e=n;return typeof e==\"object\"&&e!==null&&e.sites instanceof Set&&e.tags instanceof Map&&typeof e.barrier==\"object\"&&typeof e.policy==\"object\"}function S(n=globalThis){try{let e=n[M];if(H(e))return e;let t=I();return Object.defineProperty(n,M,{value:t,configurable:!0}),t}catch{return I()}}function L(n,e){return e===void 0?!0:n.sites.has(e)?!1:(n.sites.add(e),!0)}function b(n,e,t,o){let i=`${o??\"\"}\n${t}`,r=n.tags.get(e);return r===void 0?(n.tags.set(e,i),\"mine\"):r===i?\"same\":\"other\"}var R=`${String(1)}.${String(14)}.0`;var h=Object.freeze({warn:()=>{},reportError:()=>{}});function w(n){return Object.freeze({warn:e=>{try{n.warn(e)}catch{}},reportError:e=>{try{n.reportError(e)}catch{}}})}function U(n){let e=w(n.diagnostics??h),t=r=>{e.warn({code:\"host-api\",tag:\"taggor\",message:`taggor.${r}: invalid argument, returned undefined`})},o=r=>r?.element.isConnected===!0?r:void 0,i=r=>{try{return o(n.live()?.get(r)?.())}catch{return}};return Object.freeze({version:R,ready:()=>n.barrier.ready(),get:r=>{let d=i(r);return d===void 0&&t(\"get\"),d},on:(r,d,s)=>{if(typeof r!=\"string\"||typeof d!=\"string\"||typeof s!=\"function\"){t(\"on\");return}try{let a=n.document??document,m=`${r}:${d}`,g=f=>{let E=!1;try{E=i(f.composedPath()[0])!==void 0}catch{}E&&s(f)};return a.addEventListener(m,g,!0),()=>{try{a.removeEventListener(m,g,!0)}catch{}}}catch{t(\"on\");return}},components:()=>{let r=[];try{for(let d of n.live()?.values()??[])try{let s=o(d());s!==void 0&&r.push(s)}catch{}}catch{}return Object.freeze(r)}})}function v(n,e=globalThis){try{return Object.hasOwn(e,\"taggor\")?!1:(Object.defineProperty(e,\"taggor\",{value:n,writable:!0,configurable:!0,enumerable:!1}),!0)}catch{return!1}}var F=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/;function A(n,e){if(!(typeof n!=\"string\"||n.length>2048))try{let t=new URL(n,e);return t.origin===e&&t.protocol.startsWith(\"http\")?t.href:void 0}catch{return}}function u(n,e){let t=n?.[e];return typeof t==\"string\"?t:void 0}var O=/^[A-Za-z0-9_-]{1,100}$/;function G(n,e){let t=n?.data,o=A(u(t,\"moduleUrl\"),e),i=u(t,\"siteKey\"),r=u(t,\"turnstileSiteKey\");if(!(o===void 0||i===void 0||!O.test(i)))return{moduleUrl:o,baseUrl:e,siteKey:i,turnstileSiteKey:r!==void 0&&O.test(r)?r:void 0}}function D(n){try{let e=new URL(u(n,\"origin\")??\"\").origin,t=A(u(n,\"runtimeUrl\"),e),o=n.manifest,i=o?.components;if(t===void 0||!Array.isArray(i))return;let r=new Map;for(let s of i.slice(0,800)){let a=u(s,\"tag\"),m=A(u(s,\"bundleUrl\"),e),g=u(s,\"contractVersion\"),f=u(s,\"versionHash\");a===void 0||!F.test(a)||r.has(a)||u(s,\"status\")!==\"active\"||m===void 0||g===void 0||f===void 0||r.set(a,{tag:a,bundleUrl:m,contractVersion:g,version:f,defaults:s.defaults,loading:u(s,\"loading\")})}let d=u(o,\"siteKey\");return{runtimeUrl:t,siteKey:d!==void 0&&O.test(d)?d:void 0,servedOn:u(o,\"servedOn\"),components:r,data:G(n,e)}}catch{return}}var x=Object.freeze({ok:!1,code:\"network_error\",fields:Object.freeze([])});function k(n){let e,t=()=>{let o=e??=n();return o.catch(()=>{e===o&&(e=void 0)}),o};return{submit:(o,i,r)=>{try{return t().then(d=>d.submit(o,i,r),()=>x)}catch{return Promise.resolve(x)}},track:o=>{try{t().then(i=>{i.track(o)}).catch(()=>{})}catch{}}}}function j(n,e){let t=o=>new Promise((i,r)=>{let d=e.setTimeout(()=>{r(new Error(\"timeout\"))},1e4),s=()=>{e.clearTimeout(d)};n(o).then(a=>{s(),i(a)},a=>{s(),r(a instanceof Error?a:new Error(\"import failed\"))})});return o=>t(o).catch(()=>new Promise(i=>e.setTimeout(i,1e3)).then(()=>t(o)))}var z={setTimeout:(n,e)=>setTimeout(n,e),clearTimeout:n=>{clearTimeout(n)}};function B(n){return n?.default??void 0}function Y(n,e,t){return k(async()=>(await e(n.moduleUrl)).createDataTransport({baseUrl:n.baseUrl,siteKey:n.siteKey,turnstileSiteKey:n.turnstileSiteKey,nonce:t.nonce,scriptUrl:t.scriptUrl}))}function W(n,e){try{n?.warn({code:\"tag-collision\",tag:e,message:`<${e}> is already loaded by another snippet; the first stays.`})}catch{}}function X(n,e){let t=n?.manifest;return t?.tag===e.tag&&(t.contractVersion===void 0||t.contractVersion===e.contractVersion)}function K(n,e){try{let t={...e,importModule:j(e.importModule,e.timers??z)},o=S(t.target),{barrier:i}=o;v(U({live:()=>o.runtime?.liveComponents,barrier:i,...t.diagnostics===void 0?{}:{diagnostics:t.diagnostics}}),t.target);let r=D(n);if(r===void 0){o.sites.size===0&&i.expect([]);return}if(!L(o,r.siteKey))return;let d=e.scriptUrl??(c=>c),s=async c=>t.importModule(d(c,new URL(r.runtimeUrl).origin)),a=new Map(r.components),m,g=()=>m??=s(r.runtimeUrl).then(c=>o.runtime=c,c=>{throw m=void 0,c}),f=async c=>{try{c.loading===\"idle\"&&await s(new URL(\"loading.js\",r.runtimeUrl).href).then(_=>_.idle(),()=>{});let[T,l]=await Promise.all([g(),s(c.bundleUrl)]),p=B(l);p!==void 0&&X(p,c)&&T.createComponentElement(p,{contractVersion:c.contractVersion,version:c.version,origin:r.runtimeUrl,siteDefaults:c.defaults,...r.servedOn===void 0?{}:{servedOn:r.servedOn},...t.diagnostics===void 0?{}:{diagnostics:t.diagnostics},...t.nonce?{styleNonce:t.nonce}:{},...r.data!==void 0?{transport:Y(r.data,s,t)}:{}}).status===\"defined\"&&r.siteKey&&t.beacon?.(new URL(`/e/${r.siteKey}`,r.runtimeUrl),c.version)}catch{}finally{i.settle(c.tag)}},E=c=>{let T=[];if(a.size===0)return T;let l=[...a.keys()].join(\",\");for(let p of c)for(let _ of[p,...p.querySelectorAll?.(l)??[]]){let y=a.get(_.localName);if(y===void 0)continue;a.delete(_.localName);let C=b(o,y.tag,y.version,r.siteKey);C===\"mine\"?T.push(y):C===\"other\"&&W(t.diagnostics,y.tag)}return T},N=()=>{try{let c=E([t.document]);i.expect(c.map(l=>l.tag));for(let l of c)f(l);if(a.size===0)return;let T=t.observe(l=>{try{for(let p of l)for(let _ of E(p.addedNodes))f(_);a.size===0&&T.disconnect()}catch{}},t.document.documentElement)}catch{i.expect([])}};t.document.readyState===\"loading\"?t.document.addEventListener(\"DOMContentLoaded\",N,{once:!0}):N()}catch{}}var J=\"https://challenges.cloudflare.com\";function V(n,e){let t=new URL(n);if(t.origin!==e||!t.protocol.startsWith(\"http\"))throw new TypeError(\"module URL outside the loader origin\");return t.href}function $(n,e,t={}){return(o,i)=>{let r=V(o,i);if(t.tried!==!0&&n!==void 0){t.tried=!0;try{let d=[i,J];t.policy=n.createPolicy(\"taggor\",{createScriptURL:s=>{let{origin:a}=new URL(s);return V(s,d.includes(a)?a:\"\")}})}catch{e(\"Taggor: the page's trusted-types directive does not list 'taggor'; loading without it.\")}}if(t.policy===void 0)return r;try{return t.policy.createScriptURL(r,i)}catch{return r}}}try{let n=document.currentScript;K(__TAGGOR_LOADER_CONFIG__,{document,importModule:e=>import(e),scriptUrl:$(globalThis.trustedTypes,e=>{console.warn(e)},S().policy),observe:(e,t)=>{let o=new MutationObserver(e);return o.observe(t,{childList:!0,subtree:!0}),o},beacon:(e,t)=>{fetch(e,{method:\"POST\",body:t,keepalive:!0}).catch(()=>{})},nonce:n instanceof HTMLScriptElement&&n.nonce!==\"\"?n.nonce:void 0})}catch{}})();";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The lazy `loading.js` module of the runtime release (TAG-335): the waiting a component
2
+ * The lazy `loading.js` module of the runtime release: the waiting a component
3
3
  * with `loading: "idle"` does before the loader imports its bundle. It is fetched only by a page
4
4
  * that has such a component, so its bytes count against neither the loader nor the runtime budget.
5
5
  * Built by `scripts/runtime-release/build.ts` into `rt/<version>/loading.js` (self-contained, no import).
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The lazy `loading.js` module of the runtime release (TAG-335): the waiting a component
2
+ * The lazy `loading.js` module of the runtime release: the waiting a component
3
3
  * with `loading: "idle"` does before the loader imports its bundle. It is fetched only by a page
4
4
  * that has such a component, so its bytes count against neither the loader nor the runtime budget.
5
5
  * Built by `scripts/runtime-release/build.ts` into `rt/<version>/loading.js` (self-contained, no import).
@@ -1,5 +1,5 @@
1
1
  /**
2
- * What every loader on one page shares (TAG-610). A host page can run the snippet more than once
2
+ * What every loader on one page shares. A host page can run the snippet more than once
3
3
  * (a cache plugin that duplicates scripts, a theme that injects it twice) and can carry the
4
4
  * snippets of two sites (two agencies). Each run is a separate closure of the same code, so the
5
5
  * runs meet in one record kept on the page's global under `Symbol.for("taggor.loader")`: a symbol
@@ -21,7 +21,9 @@ import type { LiveComponents } from "../host/registry.js";
21
21
  import type { PolicyState } from "./script-url.js";
22
22
  /** The parts of the runtime module the loader calls. */
23
23
  export interface RuntimeModule {
24
- readonly createComponentElement: (definition: MountableComponent, options?: ComponentElementOptions) => unknown;
24
+ readonly createComponentElement: (definition: MountableComponent, options?: ComponentElementOptions) => {
25
+ readonly status: string;
26
+ };
25
27
  readonly liveComponents: LiveComponents;
26
28
  }
27
29
  /** The record shared by every loader of the page. */
@@ -1 +1 @@
1
- {"version":3,"file":"page-state.d.ts","sourceRoot":"","sources":["../../src/loader/page-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MA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AAM,GAAG,SAAS,GAC1B,QAAQ,CAQV"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The time limit and the single retry around the loader's module imports (TAG-307). A dynamic
2
+ * The time limit and the single retry around the loader's module imports. A dynamic
3
3
  * `import()` cannot be aborted and a hung CDN connection never settles it, so each attempt races a
4
4
  * timer; a failure is tried once more after a short backoff. The retry only refetches on a
5
5
  * network or HTTP failure (404, 5xx, refused); a hung connection re-enters the same module map
@@ -8,7 +8,7 @@
8
8
  * handles; nothing here reaches the host page.
9
9
  */
10
10
  import type { TrustedScriptUrl } from "./script-url.js";
11
- /** What `import()` takes: a plain URL or, under Trusted Types, a `TrustedScriptURL` (TAG-310). */
11
+ /** What `import()` takes: a plain URL or, under Trusted Types, a `TrustedScriptURL`. */
12
12
  export type ModuleUrl = string | TrustedScriptUrl;
13
13
  /** How long one attempt may take before it is abandoned. */
14
14
  export declare const IMPORT_TIMEOUT_MS = 10000;
@@ -1 +1 @@
1
- {"version":3,"file":"resilient-import.d.ts","sourceRoot":"","sources":["../../src/loader/resilient-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,kGAAkG;AAClG,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAElD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AAEtC,kFAAkF;AAClF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACnE,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,EAClD,MAAM,EAAE,MAAM,GACb,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CA2BtC"}
1
+ {"version":3,"file":"resilient-import.d.ts","sourceRoot":"","sources":["../../src/loader/resilient-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,wFAAwF;AACxF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAElD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AAEtC,kFAAkF;AAClF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACnE,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,EAClD,MAAM,EAAE,MAAM,GACb,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CA2BtC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The time limit and the single retry around the loader's module imports (TAG-307). A dynamic
2
+ * The time limit and the single retry around the loader's module imports. A dynamic
3
3
  * `import()` cannot be aborted and a hung CDN connection never settles it, so each attempt races a
4
4
  * timer; a failure is tried once more after a short backoff. The retry only refetches on a
5
5
  * network or HTTP failure (404, 5xx, refused); a hung connection re-enters the same module map
@@ -10,27 +10,28 @@ export interface LoaderPorts {
10
10
  /** `import(url)`; rejects when the module does not load. */
11
11
  readonly importModule: (url: ModuleUrl) => Promise<unknown>;
12
12
  /**
13
- * Turns a module URL into what `importModule` receives, given the delivery origin (TAG-310:
14
- * the `taggor` Trusted Types policy of `script-url.ts`). Throws for a URL outside the origin,
13
+ * Turns a module URL into what `importModule` receives, given the delivery origin (the `taggor` Trusted Types policy of `script-url.ts`). Throws for a URL outside the origin,
15
14
  * which skips that module. Default: the URL itself.
16
15
  */
17
16
  readonly scriptUrl?: (url: string, origin: string) => string | TrustedScriptUrl;
18
- /** A `MutationObserver` factory. */
19
- readonly observe: (callback: () => void, target: Node) => {
17
+ /** A `MutationObserver` factory; the callback gets the batch's records (only `addedNodes` is read). */
18
+ readonly observe: (callback: (records: readonly {
19
+ readonly addedNodes: Iterable<Node>;
20
+ }[]) => void, target: Node) => {
20
21
  disconnect(): void;
21
22
  };
22
- /** Where warnings go (default: silent; debug mode, TAG-315, passes the console). */
23
+ /** Where warnings go (default: silent; debug mode passes the console). */
23
24
  readonly diagnostics?: RuntimeDiagnostics | undefined;
24
25
  /** The page's CSP nonce, read from the loader's own script tag. */
25
26
  readonly nonce?: string | undefined;
26
27
  /** Where `window.taggor` is installed (default `globalThis`). */
27
28
  readonly target?: object;
28
29
  /**
29
- * Sends the render signal of a mounted component (TAG-816): `navigator.sendBeacon` in the
30
- * browser. Absent: nothing is sent.
30
+ * Sends the render signal of a mounted component: a keepalive `fetch` in the browser
31
+ * (`entry.ts`). Absent: nothing is sent.
31
32
  */
32
33
  readonly beacon?: (url: URL, body: string) => void;
33
- /** The timers of the download time limit and retry backoff (TAG-307; default the page's). */
34
+ /** The timers of the download time limit and retry backoff (default the page's). */
34
35
  readonly timers?: Timers;
35
36
  }
36
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/loader/run.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,u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