@taggor/runtime 0.3.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.
- package/README.md +1 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/compat/before-compat.js +1 -1
- package/dist/compat/index.d.ts.map +1 -1
- package/dist/compat/index.js +4 -4
- package/dist/compat/scope.d.ts +2 -2
- package/dist/element/attributes.d.ts +8 -8
- package/dist/element/attributes.d.ts.map +1 -1
- package/dist/element/attributes.js +7 -7
- package/dist/element/component-controller.d.ts +14 -14
- package/dist/element/component-controller.d.ts.map +1 -1
- package/dist/element/component-controller.js +28 -28
- package/dist/element/component-controller.js.map +1 -1
- package/dist/element/contract-gate.d.ts +2 -2
- package/dist/element/contract-gate.js +2 -2
- package/dist/element/create-component-element.d.ts +12 -12
- package/dist/element/create-component-element.js +16 -16
- package/dist/element/create-component-element.js.map +1 -1
- package/dist/element/define-element.d.ts +4 -4
- package/dist/element/define-element.d.ts.map +1 -1
- package/dist/element/define-element.js +1 -1
- package/dist/element/define-element.js.map +1 -1
- package/dist/element/diagnostics.d.ts +2 -2
- package/dist/element/error-boundary.d.ts +2 -2
- package/dist/element/error-boundary.d.ts.map +1 -1
- package/dist/element/error-boundary.js +1 -1
- package/dist/element/error-report.d.ts +1 -1
- package/dist/element/error-report.js +3 -3
- package/dist/element/events.d.ts +5 -6
- package/dist/element/events.d.ts.map +1 -1
- package/dist/element/events.js +5 -6
- package/dist/element/events.js.map +1 -1
- package/dist/element/handler-guard.d.ts +3 -3
- package/dist/element/handler-guard.js +5 -5
- package/dist/element/handler-guard.js.map +1 -1
- package/dist/element/index.d.ts +1 -2
- package/dist/element/index.d.ts.map +1 -1
- package/dist/element/index.js +1 -2
- package/dist/element/index.js.map +1 -1
- package/dist/element/props-script.d.ts +1 -1
- package/dist/element/props-script.js +1 -1
- package/dist/element/styles.d.ts +5 -5
- package/dist/element/styles.d.ts.map +1 -1
- package/dist/element/styles.js +4 -4
- package/dist/element/types.d.ts +22 -22
- package/dist/element/types.d.ts.map +1 -1
- package/dist/host/api.d.ts +3 -3
- package/dist/host/api.d.ts.map +1 -1
- package/dist/host/api.js +9 -10
- package/dist/host/api.js.map +1 -1
- package/dist/host/barrier.d.ts +2 -2
- package/dist/host/barrier.js +3 -3
- package/dist/host/barrier.js.map +1 -1
- package/dist/host/index.d.ts +2 -2
- package/dist/host/index.js +2 -2
- package/dist/host/registry.d.ts +3 -3
- package/dist/host/registry.js +2 -2
- package/dist/host/registry.js.map +1 -1
- package/dist/host/types.d.ts +1 -1
- package/dist/host/types.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/loader/config.d.ts +8 -8
- package/dist/loader/config.d.ts.map +1 -1
- package/dist/loader/config.js +4 -4
- package/dist/loader/config.js.map +1 -1
- package/dist/loader/entry.js +3 -3
- package/dist/loader/entry.js.map +1 -1
- package/dist/loader/lazy-transport.d.ts +1 -1
- package/dist/loader/lazy-transport.js +1 -1
- package/dist/loader/loader-code.d.ts +1 -1
- package/dist/loader/loader-code.js +2 -2
- package/dist/loader/loading.d.ts +1 -1
- package/dist/loader/loading.js +1 -1
- package/dist/loader/page-state.d.ts +2 -2
- package/dist/loader/page-state.js +1 -1
- package/dist/loader/resilient-import.d.ts +2 -2
- package/dist/loader/resilient-import.d.ts.map +1 -1
- package/dist/loader/resilient-import.js +1 -1
- package/dist/loader/run.d.ts +4 -5
- package/dist/loader/run.d.ts.map +1 -1
- package/dist/loader/run.js +12 -13
- package/dist/loader/run.js.map +1 -1
- package/dist/loader/script-url.d.ts +5 -5
- package/dist/loader/script-url.js +6 -6
- package/dist/loader/script-url.js.map +1 -1
- package/dist/loader/script.d.ts +2 -2
- package/dist/loader/script.js +2 -2
- package/dist/server/render-fragment.d.ts +1 -1
- package/dist/server/render-fragment.d.ts.map +1 -1
- package/dist/server/render-fragment.js +1 -1
- package/dist/server/ssr-code.d.ts +1 -1
- package/dist/server/ssr-code.js +3 -3
- package/dist/server/worker.d.ts +2 -2
- package/dist/server/worker.js +1 -1
- package/package.json +2 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Component controller
|
|
2
|
+
* Component controller: mounts one component definition into one host element, keeps its
|
|
3
3
|
* props in sync with the attributes, unmounts it, and contains every failure.
|
|
4
4
|
*
|
|
5
5
|
* The Custom Element class (`create-component-element.ts`) only forwards its callbacks here, so the
|
|
6
|
-
* generic `<taggor-component name="…">` host
|
|
6
|
+
* generic `<taggor-component name="…">` host can drive the same controller. Every entry
|
|
7
7
|
* point catches: a failing component shows its fallback and is reported through the diagnostics
|
|
8
8
|
* port, never thrown at the page (golden rule 2). A failed component stays failed for the life of
|
|
9
9
|
* the element (no retry loop on every attribute change); a new element starts fresh.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* An attribute its prop type refuses gives the default and one `invalid-attribute`
|
|
12
12
|
* warning (debug mode) per refused text, not one per render.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* `disconnect` defers the unmount to a microtask and `connect` cancels it, so moving the
|
|
15
15
|
* element (remove + insert in the same task, as SPAs and carousels do) keeps the mounted tree and
|
|
16
16
|
* its state. A real removal unmounts (effect cleanups disconnect the SDK's observers), aborts the
|
|
17
17
|
* mount's `AbortSignal` (`ComponentHost.signal`, which the SDK's data transport hands to `fetch`)
|
|
18
18
|
* and unregisters the handler guard's root.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
20
|
+
* The host's `emit` dispatches a declared event on the host element (`events.ts`
|
|
21
21
|
* validates and copies the detail), only while the component is mounted: after a real removal (or a
|
|
22
22
|
* failure) an `emit` from a timer or a late promise is dropped with an `event-dropped` warning.
|
|
23
23
|
* The host object outlives one mount, so after a remount the component emits again.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* Props also come from JS properties (`el.items = […]`, through accessors the element
|
|
26
26
|
* class defines and `setProperty`) and from a `<script type="application/json" data-props>` child
|
|
27
27
|
* (`props-script.ts`). Precedence, per prop: property > attribute > script > default. A property
|
|
28
28
|
* set before the element was upgraded (an own property shadowing the accessor) is taken over when
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
* was still loading then (the parser connects an element before parsing its children); changing
|
|
36
36
|
* it later has no effect (set the property instead).
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* The `<tag>` of the events is the element's own `localName`,
|
|
39
39
|
* the tag its class is really registered under, never the manifest's declared tag, which may
|
|
40
40
|
* belong to another script after a collision.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
42
|
+
* A form field component (`formAssociated` in the manifest) gets the element's
|
|
43
43
|
* `ElementInternals`, attached when the controller is created (in the element's constructor, so
|
|
44
44
|
* no page script can take them first) and handed to the component as `host.internals`. A form reset
|
|
45
45
|
* remounts the component's tree (its state back to the initial one, as `form.reset()` does to an
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
* the form: its value and validity are cleared. The shadow root delegates focus when the
|
|
49
49
|
* definition says so (`delegatesFocus`, by default a form field).
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* `field` answers the element's form field API (`el.value`, `el.form`, `el.validity`,
|
|
52
52
|
* `el.checkValidity()`…) from those internals; the value is the last one the component submitted,
|
|
53
53
|
* recorded by wrapping the internals' own `setFormValue`.
|
|
54
|
-
*
|
|
54
|
+
* Browser-restored text is held on the element's internals and exposed by the SDK as
|
|
55
55
|
* `field.restored`.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
57
|
+
* A connected element is tracked in the live component registry (`deps.live`) with the reader
|
|
58
58
|
* of its `ComponentInfo` (tag, name, version, state, current props), which `window.taggor.get` and
|
|
59
59
|
* `components` return; a real unmount untracks it (a move keeps it).
|
|
60
60
|
*/
|
|
@@ -66,9 +66,9 @@ import { emitEvent } from "./events.js";
|
|
|
66
66
|
import { registerComponentRoot } from "./handler-guard.js";
|
|
67
67
|
import { readScriptProps } from "./props-script.js";
|
|
68
68
|
/**
|
|
69
|
-
* Read once, when the runtime loads
|
|
69
|
+
* Read once, when the runtime loads: a page that replaces
|
|
70
70
|
* `Reflect.apply` later cannot receive the internals as its `thisArg`. One that poisoned it before
|
|
71
|
-
* the runtime loaded still can (
|
|
71
|
+
* the runtime loaded still can (a residual risk).
|
|
72
72
|
*/
|
|
73
73
|
const { apply } = Reflect;
|
|
74
74
|
/**
|
|
@@ -77,8 +77,8 @@ const { apply } = Reflect;
|
|
|
77
77
|
* Inputs: the host element and `ComponentControllerDeps`. Output: a `ComponentController`. Errors: none;
|
|
78
78
|
* no method ever throws (failures go to `diagnostics.reportError` with their phase). Side effects:
|
|
79
79
|
* takes over the element's own properties named like a bound prop (set before the upgrade:
|
|
80
|
-
* deleted and kept as properties
|
|
81
|
-
* `ElementInternals` (
|
|
80
|
+
* deleted and kept as properties) and, for a form field, attaches the element's
|
|
81
|
+
* `ElementInternals` (none when the browser lacks them or the page took them first);
|
|
82
82
|
* otherwise none until `connect`, which reads the
|
|
83
83
|
* `<script data-props>` child the first time (and listens once for `DOMContentLoaded` while the
|
|
84
84
|
* document is loading), attaches an open shadow root (once), adopts the styles, creates the
|
|
@@ -87,7 +87,7 @@ const { apply } = Reflect;
|
|
|
87
87
|
export function createComponentController(element, deps) {
|
|
88
88
|
const { definition, bindings, events, styles, diagnostics, fallback, isColor } = deps;
|
|
89
89
|
const { tag, name } = definition.manifest;
|
|
90
|
-
/** The last value given to the internals' `setFormValue
|
|
90
|
+
/** The last value given to the internals' `setFormValue`. */
|
|
91
91
|
let formValue = null;
|
|
92
92
|
const internals = deps.formAssociated
|
|
93
93
|
? attachInternals(element, (value) => {
|
|
@@ -105,9 +105,9 @@ export function createComponentController(element, deps) {
|
|
|
105
105
|
let unmountQueued = false;
|
|
106
106
|
/** The last refused text warned about, per attribute, so a re-render does not warn again. */
|
|
107
107
|
const warned = new Map();
|
|
108
|
-
/** Props set by property
|
|
108
|
+
/** Props set by property; they win over attributes and the script. */
|
|
109
109
|
const properties = new Map();
|
|
110
|
-
/** Props of the `<script data-props>` child, once read
|
|
110
|
+
/** Props of the `<script data-props>` child, once read. */
|
|
111
111
|
let scripted;
|
|
112
112
|
const host = Object.freeze({
|
|
113
113
|
element,
|
|
@@ -181,7 +181,7 @@ export function createComponentController(element, deps) {
|
|
|
181
181
|
const currentProps = () => {
|
|
182
182
|
const { props, problems } = readProps(bindings, (attribute) => element.getAttribute(attribute), isColor);
|
|
183
183
|
warnAbout(problems);
|
|
184
|
-
// Property > attribute > script > default
|
|
184
|
+
// Property > attribute > script > default. `merged` already owns every prop, so the
|
|
185
185
|
// assignments below never reach a setter or a frozen member of Object.prototype.
|
|
186
186
|
const merged = { ...props };
|
|
187
187
|
for (const { prop, attribute } of bindings) {
|
|
@@ -190,7 +190,7 @@ export function createComponentController(element, deps) {
|
|
|
190
190
|
else if (scripted?.has(prop) && element.getAttribute(attribute) === null)
|
|
191
191
|
merged[prop] = scripted.get(prop);
|
|
192
192
|
}
|
|
193
|
-
// Frozen in depth
|
|
193
|
+
// Frozen in depth: the getter hands the page these same objects,
|
|
194
194
|
// and a page mutation (`el.items.push(…)`, `el.link.href = "javascript:…"`) would otherwise
|
|
195
195
|
// reach the component on the next render without passing through the contract. This also
|
|
196
196
|
// freezes a declaration's `default` (shared by every instance) before anyone can mutate it.
|
|
@@ -243,7 +243,7 @@ export function createComponentController(element, deps) {
|
|
|
243
243
|
function attach() {
|
|
244
244
|
const shadow = element.shadowRoot ??
|
|
245
245
|
element.attachShadow({ mode: "open", delegatesFocus: deps.delegatesFocus });
|
|
246
|
-
// SSR
|
|
246
|
+
// SSR: a server may have put a declarative shadow root in the page
|
|
247
247
|
// (`<template shadowrootmode>`), which the first `render` adopts node by node. It is kept only
|
|
248
248
|
// when the host's `ssr` stamp names this exact published version (`SSR_STAMP_ATTRIBUTE` of
|
|
249
249
|
// server/render-fragment.ts); a root from another version, or with no stamp, is emptied, so a
|
|
@@ -264,7 +264,7 @@ export function createComponentController(element, deps) {
|
|
|
264
264
|
catch {
|
|
265
265
|
// Defensive only: `abort()` itself does not throw. A throwing `abort` listener does not land
|
|
266
266
|
// here either: the browser reports it to the page's `window.onerror`, as for any event
|
|
267
|
-
// listener (a known limit
|
|
267
|
+
// listener (a known limit; the SDK never exposes the signal to
|
|
268
268
|
// authors, it only hands it to `fetch`).
|
|
269
269
|
}
|
|
270
270
|
try {
|
|
@@ -277,8 +277,8 @@ export function createComponentController(element, deps) {
|
|
|
277
277
|
unregister = undefined;
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
|
-
* Adds the element to (or removes it from) the live registry
|
|
281
|
-
* broke `Map.prototype` cannot stop a mount or an unmount
|
|
280
|
+
* Adds the element to (or removes it from) the live registry. Accessory: a page that
|
|
281
|
+
* broke `Map.prototype` cannot stop a mount or an unmount. `info()` does not
|
|
282
282
|
* need the shadow root, so tracking before `attach` is safe.
|
|
283
283
|
*/
|
|
284
284
|
const track = (add) => {
|
|
@@ -295,7 +295,7 @@ export function createComponentController(element, deps) {
|
|
|
295
295
|
const controller = {
|
|
296
296
|
connect: () => {
|
|
297
297
|
connected = true;
|
|
298
|
-
// Before the first render
|
|
298
|
+
// Before the first render: `emit` works from here on, so an event
|
|
299
299
|
// emitted while rendering or in a mount layout effect must already pass `taggor.on`'s filter.
|
|
300
300
|
track(true);
|
|
301
301
|
try {
|
|
@@ -423,7 +423,7 @@ export function createComponentController(element, deps) {
|
|
|
423
423
|
paint();
|
|
424
424
|
},
|
|
425
425
|
};
|
|
426
|
-
// The "lazy property" pattern
|
|
426
|
+
// The "lazy property" pattern: `el.items = …` before the bundle defined the element
|
|
427
427
|
// made an own property that shadows the accessor; take it over.
|
|
428
428
|
for (const { prop } of bindings) {
|
|
429
429
|
try {
|
|
@@ -440,9 +440,9 @@ export function createComponentController(element, deps) {
|
|
|
440
440
|
return Object.freeze(controller);
|
|
441
441
|
}
|
|
442
442
|
/**
|
|
443
|
-
* The element's `ElementInternals
|
|
443
|
+
* The element's `ElementInternals`, or `undefined` when the browser has no
|
|
444
444
|
* `attachInternals` or it throws (the page attached them first, or the class is not form-associated
|
|
445
|
-
* in this browser).
|
|
445
|
+
* in this browser). An own `setFormValue` on the internals reports each value
|
|
446
446
|
* the native one accepted to `record` (real internals never give the value back); internals that
|
|
447
447
|
* cannot take it (non-extensible, only from a page that replaced `attachInternals`, or a
|
|
448
448
|
* `setFormValue` getter that throws) count as none.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-controller.js","sourceRoot":"","sources":["../../src/element/component-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAqB,MAAM,2BAA2B,CAAC;AAE1E,OAAO,EACL,aAAa,EACb,SAAS,GAIV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAoB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD;;;;GAIG;AACH,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;AAqF1B;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAoB,EACpB,IAA6B;IAE7B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACtF,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC;IAC1C,uEAAuE;IACvE,IAAI,SAAS,GAAY,IAAI,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc;QAC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CAAC;gBAC7E,IAAI,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC;oBAAE,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACjF,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,iEAAiE;QACnE,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CACtB,OAAoB,EACpB,MAAgC;IAEhC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACtD,4FAA4F;QAC5F,iFAAiF;QACjF,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE;YAC/C,KAAK,EAAE,CAAC,GAAG,IAAkD,EAAE,EAAE;gBAC/D,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,2FAA2F;AAC3F,SAAS,QAAQ;IACf,OAAO,OAAO,eAAe,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC"}
|
|
1
|
+
{"version":3,"file":"component-controller.js","sourceRoot":"","sources":["../../src/element/component-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,QAAQ,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Ac,CAAC,CAAC;QACtD,4FAA4F;QAC5F,iFAAiF;QACjF,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE;YAC/C,KAAK,EAAE,CAAC,GAAG,IAAkD,EAAE,EAAE;gBAC/D,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,2FAA2F;AAC3F,SAAS,QAAQ;IACf,OAAO,OAAO,eAAe,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The contract version gate of the runtime
|
|
2
|
+
* The contract version gate of the runtime: before a component's element is
|
|
3
3
|
* registered, its manifest's `contractVersion` goes through the contract's own
|
|
4
4
|
* `checkContractVersion` with `consumer: "runtime"`. A newer minor mounts with a warning (its
|
|
5
5
|
* additions are unknown declarations, which count as absent or denied); a missing or malformed
|
|
6
6
|
* version, a newer major or an unsupported major is not mounted. It never throws.
|
|
7
7
|
*
|
|
8
|
-
* The visitor's clock never decides that a major's support ended
|
|
8
|
+
* The visitor's clock never decides that a major's support ended:
|
|
9
9
|
* the runtime reads no date. End of support is the edge's: it stops serving a bundle whose major
|
|
10
10
|
* is past `supportedUntil`, or stamps the day it served it, which the loader passes as `servedOn`.
|
|
11
11
|
* Without a stamp the runtime checks against `NO_CLOCK_DAY`, earlier than any `supportedUntil`.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The contract version gate of the runtime
|
|
2
|
+
* The contract version gate of the runtime: before a component's element is
|
|
3
3
|
* registered, its manifest's `contractVersion` goes through the contract's own
|
|
4
4
|
* `checkContractVersion` with `consumer: "runtime"`. A newer minor mounts with a warning (its
|
|
5
5
|
* additions are unknown declarations, which count as absent or denied); a missing or malformed
|
|
6
6
|
* version, a newer major or an unsupported major is not mounted. It never throws.
|
|
7
7
|
*
|
|
8
|
-
* The visitor's clock never decides that a major's support ended
|
|
8
|
+
* The visitor's clock never decides that a major's support ended:
|
|
9
9
|
* the runtime reads no date. End of support is the edge's: it stops serving a bundle whose major
|
|
10
10
|
* is past `supportedUntil`, or stamps the day it served it, which the loader passes as `servedOn`.
|
|
11
11
|
* Without a stamp the runtime checks against `NO_CLOCK_DAY`, earlier than any `supportedUntil`.
|
|
@@ -11,9 +11,9 @@ export interface ComponentElementOptions {
|
|
|
11
11
|
/** The base class (default `globalThis.HTMLElement`); injectable for tests. */
|
|
12
12
|
readonly baseElement?: typeof HTMLElement;
|
|
13
13
|
/**
|
|
14
|
-
* The published manifest's `contractVersion` (the loader reads it from what the edge serves
|
|
15
|
-
*
|
|
16
|
-
* component is not mounted
|
|
14
|
+
* The published manifest's `contractVersion` (the loader reads it from what the edge serves);
|
|
15
|
+
* when absent, `definition.manifest.contractVersion` is used. Missing in both: the
|
|
16
|
+
* component is not mounted.
|
|
17
17
|
*/
|
|
18
18
|
readonly contractVersion?: unknown;
|
|
19
19
|
/**
|
|
@@ -23,28 +23,28 @@ export interface ComponentElementOptions {
|
|
|
23
23
|
readonly servedOn?: string;
|
|
24
24
|
/**
|
|
25
25
|
* The page's CSP nonce, put on the `<style>` elements of browsers without constructable
|
|
26
|
-
* stylesheets
|
|
26
|
+
* stylesheets. The loader reads it from its own script tag; without it, a
|
|
27
27
|
* page whose `style-src` has no `'unsafe-inline'` blocks those styles (adopted sheets are never
|
|
28
28
|
* blocked).
|
|
29
29
|
*/
|
|
30
30
|
readonly styleNonce?: string | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* The published version of the component (the loader reads it from the site manifest
|
|
33
|
-
* only reported by `window.taggor.get
|
|
32
|
+
* The published version of the component (the loader reads it from the site manifest);
|
|
33
|
+
* only reported by `window.taggor.get`. Anything but a string counts as absent.
|
|
34
34
|
*/
|
|
35
35
|
readonly version?: string | undefined;
|
|
36
36
|
/**
|
|
37
|
-
* The delivery origin (the loader's runtime URL) the runtime error report is sent to
|
|
38
|
-
* Passed in, not read from `import.meta`, so the bundle also parses as a classic script
|
|
37
|
+
* The delivery origin (the loader's runtime URL) the runtime error report is sent to.
|
|
38
|
+
* Passed in, not read from `import.meta`, so the bundle also parses as a classic script.
|
|
39
39
|
*/
|
|
40
40
|
readonly origin?: string | undefined;
|
|
41
41
|
/**
|
|
42
|
-
* The data transport handed to every element as `host.transport
|
|
42
|
+
* The data transport handed to every element as `host.transport`; the loader passes a
|
|
43
43
|
* lazy one for components that declare `data`. Opaque here: the SDK's hooks call it.
|
|
44
44
|
*/
|
|
45
45
|
readonly transport?: unknown;
|
|
46
46
|
/**
|
|
47
|
-
* The props the site gives this component (
|
|
47
|
+
* The props the site gives this component (the `defaults` of its manifest entry, which
|
|
48
48
|
* the loader passes on): each one the prop's type accepts replaces the component's own default,
|
|
49
49
|
* below the page's attribute, property and `<script data-props>`. Anything else is ignored.
|
|
50
50
|
*/
|
|
@@ -60,7 +60,7 @@ export type ComponentElementRegistration =
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* `tag` belongs to another script (or `define` failed); the class was not registered and can
|
|
63
|
-
* back the generic host `genericTag
|
|
63
|
+
* back the generic host `genericTag`.
|
|
64
64
|
*/
|
|
65
65
|
| {
|
|
66
66
|
readonly status: "collision" | "define-failed";
|
|
@@ -87,7 +87,7 @@ export type ComponentElementRegistration =
|
|
|
87
87
|
* definition or contract version, missing Custom Elements, a taken tag or a failing `define`
|
|
88
88
|
* become a warning and a status. Side effects: `customElements.define` (unless the tag is taken), Preact's
|
|
89
89
|
* `options.vnode` hook on the first call; each element attaches an open shadow root and renders
|
|
90
|
-
* when connected; a connected element is tracked in `liveComponents
|
|
90
|
+
* when connected; a connected element is tracked in `liveComponents`.
|
|
91
91
|
*/
|
|
92
92
|
export declare function createComponentElement(definition: MountableComponent, options?: ComponentElementOptions): ComponentElementRegistration;
|
|
93
93
|
//# sourceMappingURL=create-component-element.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `createComponentElement
|
|
2
|
+
* `createComponentElement`: turns a component definition into a real Custom Element, an
|
|
3
3
|
* `HTMLElement` subclass registered with `customElements.define`, rendering a Preact component in
|
|
4
4
|
* an open shadow root, observing the attributes of the declared props and containing every
|
|
5
|
-
* failure behind an error boundary (
|
|
5
|
+
* failure behind an error boundary (golden rules 2 and 5).
|
|
6
6
|
*
|
|
7
7
|
* The class is a thin adapter: each callback forwards to a `ComponentController`
|
|
8
8
|
* (`component-controller.ts`) inside a `try`, so a Custom Element callback never throws at the page.
|
|
9
9
|
* Nothing runs at import; the first call installs the event handler guard (`handler-guard.ts`).
|
|
10
10
|
* None of the old prototype's defects can come back: the element is really defined, CSS lives in
|
|
11
11
|
* the shadow root, attributes go through the contract's fixed parsers, and slots are native.
|
|
12
|
-
*
|
|
13
|
-
* debug mode, about props whose type this runtime does not know.
|
|
14
|
-
* once per definition (`events.ts`) for the host's `emit`.
|
|
12
|
+
* The contract version gate (`contract-gate.ts`) runs before registration and warns, in
|
|
13
|
+
* debug mode, about props whose type this runtime does not know. The declared events are read
|
|
14
|
+
* once per definition (`events.ts`) for the host's `emit`. One accessor is defined per bound
|
|
15
15
|
* prop on the class prototype (`el.items = […]`, forwarded to the controller, never throwing), and
|
|
16
16
|
* leaves out, with an `unknown-prop-type` warning, a prop named like a member the element already has
|
|
17
17
|
* (the live `HTMLElement.prototype` chain, or a Custom Element callback such as
|
|
18
18
|
* `connectedCallback`, which is not on that prototype), so the definition, which is unvalidated
|
|
19
|
-
* component code, cannot shadow either.
|
|
19
|
+
* component code, cannot shadow either. A definition whose manifest declares
|
|
20
20
|
* `formAssociated: true` gets a form-associated class (`static formAssociated`, the
|
|
21
21
|
* `formResetCallback`, `formDisabledCallback` and `formStateRestoreCallback` forwarded to the controller, which attaches the
|
|
22
22
|
* element's `ElementInternals`), and the shadow root delegates focus when `delegatesFocus` says so
|
|
23
|
-
* (by default, a form field does).
|
|
23
|
+
* (by default, a form field does). That class also has the form field API of an `<input>`
|
|
24
24
|
* (`value`, `form`, `validationMessage`, `validity`, `checkValidity()`, `reportValidity()`),
|
|
25
25
|
* forwarded to the controller's internals and never throwing.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
27
|
+
* Connected elements are tracked in `liveComponents`, with their published `version` and
|
|
28
28
|
* contract version, for `window.taggor.get` and `components`.
|
|
29
29
|
*/
|
|
30
30
|
import { CUSTOM_ELEMENT_MEMBERS, FORM_FIELD_ACCESSORS, FORM_FIELD_METHODS, } from "@taggor/contract/zod-free";
|
|
@@ -50,12 +50,12 @@ import { createComponentController } from "./component-controller.js";
|
|
|
50
50
|
* definition or contract version, missing Custom Elements, a taken tag or a failing `define`
|
|
51
51
|
* become a warning and a status. Side effects: `customElements.define` (unless the tag is taken), Preact's
|
|
52
52
|
* `options.vnode` hook on the first call; each element attaches an open shadow root and renders
|
|
53
|
-
* when connected; a connected element is tracked in `liveComponents
|
|
53
|
+
* when connected; a connected element is tracked in `liveComponents`.
|
|
54
54
|
*/
|
|
55
55
|
export function createComponentElement(definition, options = {}) {
|
|
56
56
|
const guarded = guardDiagnostics(options.diagnostics ?? silentDiagnostics);
|
|
57
57
|
const { version, origin } = options;
|
|
58
|
-
//
|
|
58
|
+
// A published component's failures are also reported to the edge.
|
|
59
59
|
const diagnostics = typeof version === "string" && typeof origin === "string"
|
|
60
60
|
? {
|
|
61
61
|
warn: guarded.warn,
|
|
@@ -159,9 +159,9 @@ function componentElementClass(Base, definition, diagnostics, { fallback, nonce,
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
const isColor = browserColorCheck();
|
|
162
|
-
// Read once: a manifest changed after this cannot widen what `emit` dispatches
|
|
162
|
+
// Read once: a manifest changed after this cannot widen what `emit` dispatches.
|
|
163
163
|
const events = readEventRoutes(definition.manifest.events);
|
|
164
|
-
// Read once too
|
|
164
|
+
// Read once too: `formAssociated` is read by `define` from the class, never again.
|
|
165
165
|
const formAssociated = definition.manifest.formAssociated === true;
|
|
166
166
|
// Component code, not a validated manifest: anything but a boolean counts as absent.
|
|
167
167
|
const delegates = definition.manifest.delegatesFocus;
|
|
@@ -193,11 +193,11 @@ function componentElementClass(Base, definition, diagnostics, { fallback, nonce,
|
|
|
193
193
|
static get observedAttributes() {
|
|
194
194
|
return attributes;
|
|
195
195
|
}
|
|
196
|
-
/** Read by `customElements.define
|
|
196
|
+
/** Read by `customElements.define`: only a declared form field is associated. */
|
|
197
197
|
static formAssociated = formAssociated;
|
|
198
198
|
static {
|
|
199
199
|
if (formAssociated) {
|
|
200
|
-
// The form field API
|
|
200
|
+
// The form field API, as on an `<input>`, before the props: it wins over a prop
|
|
201
201
|
// of the same name. The getter is the field's; the setter sets the prop of that name, so
|
|
202
202
|
// `el.value = 3` on a field with a `value` prop (its initial value, like `<input value>`)
|
|
203
203
|
// sets the prop as before, and assigning another member is ignored instead of throwing.
|
|
@@ -236,7 +236,7 @@ function componentElementClass(Base, definition, diagnostics, { fallback, nonce,
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
// One accessor per bound prop
|
|
239
|
+
// One accessor per bound prop, except where the field API is. The `try` covers a
|
|
240
240
|
// call on anything that is not an element of this class (the prototype itself, `Reflect.set`
|
|
241
241
|
// with another receiver): the private field read throws there, and an accessor must never
|
|
242
242
|
// throw at the page.
|
|
@@ -279,7 +279,7 @@ function componentElementClass(Base, definition, diagnostics, { fallback, nonce,
|
|
|
279
279
|
this.#controller.attributeChanged(attribute, previous, next);
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
-
// Called by the browser only on a form-associated class
|
|
282
|
+
// Called by the browser only on a form-associated class.
|
|
283
283
|
formResetCallback() {
|
|
284
284
|
contained(() => {
|
|
285
285
|
this.#controller.formReset();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-component-element.js","sourceRoot":"","sources":["../../src/element/create-component-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAwB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EACL,cAAc,GAIf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,yBAAyB,EAA4B,MAAM,2BAA2B,CAAC;AAgFhG;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAA8B,EAC9B,UAAmC,EAAE;IAErC,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,IAAI,iBAAiB,CAAC,CAAC;IAC3E,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACpC,
|
|
1
|
+
{"version":3,"file":"create-component-element.js","sourceRoot":"","sources":["../../src/element/create-component-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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W,CAAC,OAAO,EAAE,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,oBAAoB;YAClB,SAAS,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,wBAAwB,CACtB,SAAiB,EACjB,QAAuB,EACvB,IAAmB;YAEnB,SAAS,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC/D,CAAC,CAAC,CAAC;QACL,CAAC;QAED,yDAAyD;QACzD,iBAAiB;YACf,SAAS,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;YAC/B,CAAC,CAAC,CAAC;QACL,CAAC;QAED,oBAAoB;YAClB,SAAS,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,wBAAwB,CAAC,KAA+B;YACtD,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,OAAO;YACtC,SAAS,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Registering a component's tag without ever overwriting or throwing
|
|
2
|
+
* Registering a component's tag without ever overwriting or throwing.
|
|
3
3
|
*
|
|
4
4
|
* Before `define`, the registry is asked whether the tag exists; if another script (or another
|
|
5
5
|
* copy of the runtime) owns it, the runtime does not call `define`, warns and leaves the elements
|
|
6
6
|
* of that tag alone; the component stays available through the generic host
|
|
7
|
-
* `<taggor-component name="…"
|
|
7
|
+
* `<taggor-component name="…">`. A `define` that throws anyway, because another script
|
|
8
8
|
* defined the tag between `get` and `define` (a race), becomes the same collision warning; any
|
|
9
9
|
* other throw (an invalid name, say) becomes a `define-failed` warning. Nothing reaches the page.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* A tag with the reserved `taggor-` prefix (`taggor-component`
|
|
12
12
|
* included) is refused with `define-failed` before the registry is touched, as defense in depth
|
|
13
13
|
* beyond the contract, which already refuses it: the definition is component code, not a validated
|
|
14
14
|
* manifest.
|
|
@@ -21,7 +21,7 @@ import type { RuntimeDiagnostics } from "./types.js";
|
|
|
21
21
|
* fails the typecheck if the two ever differ.
|
|
22
22
|
*/
|
|
23
23
|
export declare const RESERVED_TAG_PREFIX: typeof Contract.RESERVED_TAG_PREFIX;
|
|
24
|
-
/** The generic host tag that keeps a colliding component available
|
|
24
|
+
/** The generic host tag that keeps a colliding component available. */
|
|
25
25
|
export declare const GENERIC_TAG: string;
|
|
26
26
|
/** The part of `CustomElementRegistry` the runtime uses (injectable for tests). */
|
|
27
27
|
export interface ElementRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-element.d.ts","sourceRoot":"","sources":["../../src/element/define-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,QAAQ,CAAC,mBAA+B,CAAC;AAElF,
|
|
1
|
+
{"version":3,"file":"define-element.d.ts","sourceRoot":"","sources":["../../src/element/define-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,QAAQ,CAAC,mBAA+B,CAAC;AAElF,uEAAuE;AACvE,eAAO,MAAM,WAAW,QAAoC,CAAC;AAE7D,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,wBAAwB,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAChF;AAED,8BAA8B;AAC9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,wBAAwB,EACrC,WAAW,EAAE,kBAAkB,GAC9B,aAAa,CAkCf"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* fails the typecheck if the two ever differ.
|
|
5
5
|
*/
|
|
6
6
|
export const RESERVED_TAG_PREFIX = "taggor-";
|
|
7
|
-
/** The generic host tag that keeps a colliding component available
|
|
7
|
+
/** The generic host tag that keeps a colliding component available. */
|
|
8
8
|
export const GENERIC_TAG = `${RESERVED_TAG_PREFIX}component`;
|
|
9
9
|
/**
|
|
10
10
|
* Defines `tag` with `constructor` unless the tag is taken.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-element.js","sourceRoot":"","sources":["../../src/element/define-element.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwC,SAAS,CAAC;AAElF,
|
|
1
|
+
{"version":3,"file":"define-element.js","sourceRoot":"","sources":["../../src/element/define-element.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwC,SAAS,CAAC;AAElF,uEAAuE;AACvE,MAAM,CAAC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AAC;AAED,0EAA0E;AAC1E,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC;IAC9C,OAAO,OAAO,KAAK,CAAC;AACtB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Diagnostics of the Custom Element wrapper
|
|
2
|
+
* Diagnostics of the Custom Element wrapper: the silent default, the console sink for
|
|
3
3
|
* debug mode and the guard that keeps a throwing sink away from the page.
|
|
4
4
|
*
|
|
5
5
|
* Writing to the console never fires the page's `error` or `unhandledrejection` events, so debug
|
|
6
6
|
* mode can show warnings and caught failures without breaking golden rule 2. Turning debug mode on
|
|
7
|
-
* (`?taggor_debug=1`, `taggor.debug(true)`) is
|
|
7
|
+
* (`?taggor_debug=1`, `taggor.debug(true)`) is handled elsewhere; it passes `enabled`.
|
|
8
8
|
*/
|
|
9
9
|
import type { RuntimeDiagnostics } from "./types.js";
|
|
10
10
|
/** Diagnostics that drop everything: the default outside debug mode. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Error boundary of a mounted component
|
|
2
|
+
* Error boundary of a mounted component: the root component of every shadow root the
|
|
3
3
|
* runtime renders. It catches what Preact routes to boundaries (exceptions in render, in
|
|
4
4
|
* lifecycle methods and in hook effects and their cleanups) and then shows the fallback.
|
|
5
5
|
*
|
|
@@ -18,7 +18,7 @@ export interface ComponentBoundaryProps {
|
|
|
18
18
|
readonly onError: (error: unknown) => void;
|
|
19
19
|
/** CSS rendered as `<style>` elements (only when adoptedStyleSheets is unavailable). */
|
|
20
20
|
readonly inlineStyles: readonly string[];
|
|
21
|
-
/** The page's CSP nonce for those `<style>` elements
|
|
21
|
+
/** The page's CSP nonce for those `<style>` elements. */
|
|
22
22
|
readonly nonce?: string | undefined;
|
|
23
23
|
readonly children?: ComponentChildren;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/element/error-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAK,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,oCAAoC;AACpC,MAAM,WAAW,sBAAsB;IACrC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,wFAAwF;IACxF,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/element/error-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAK,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,oCAAoC;AACpC,MAAM,WAAW,sBAAsB;IACrC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,wFAAwF;IACxF,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,yDAAyD;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,SAAS,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IACrF,KAAK,EAAE,sBAAsB,CAAqB;IAElD,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAOvC,MAAM,IAAI,iBAAiB;CAWrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Error boundary of a mounted component
|
|
2
|
+
* Error boundary of a mounted component: the root component of every shadow root the
|
|
3
3
|
* runtime renders. It catches what Preact routes to boundaries (exceptions in render, in
|
|
4
4
|
* lifecycle methods and in hook effects and their cleanups) and then shows the fallback.
|
|
5
5
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Reports one caught failure.
|
|
3
3
|
* Inputs: the component tag, the published version hash, the failure phase, the caught value and
|
|
4
4
|
* the delivery origin (the loader's runtime URL; never `import.meta.url`, which is a syntax error
|
|
5
|
-
* when a host page loads the bundle as a classic script and made props.e2e.ts fail
|
|
5
|
+
* when a host page loads the bundle as a classic script and made props.e2e.ts fail).
|
|
6
6
|
* Output: none. Errors: never throws. Side effects: at most one beacon and the per-tag counter.
|
|
7
7
|
*/
|
|
8
8
|
export declare function reportFailure(tag: string, version: string, phase: string, error: unknown, origin: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The browser half of the runtime error telemetry
|
|
2
|
+
* The browser half of the runtime error telemetry: a caught component failure becomes one
|
|
3
3
|
* `navigator.sendBeacon` to `POST /e/<siteKey>` of the delivery origin, where the edge validates,
|
|
4
4
|
* scrubs, hashes and records it (apps/edge `domain/error-event.ts` owns the wire format).
|
|
5
5
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* `try`, a page without `sendBeacon` sends nothing, and nothing here can throw at the page. The
|
|
18
18
|
* site key comes from the loader's shared page record (`Symbol.for("taggor.loader")`, claim
|
|
19
19
|
* `"<siteKey>\n<version>"`, `loader/page-state.ts`); a claim of another version or site is not ours
|
|
20
|
-
* to report on. Written tersely: the runtime is at its byte ceiling
|
|
20
|
+
* to report on. Written tersely: the runtime is at its byte ceiling.
|
|
21
21
|
*/
|
|
22
22
|
import { RUNTIME_ERROR_MAX_FRAMES, RUNTIME_ERROR_MESSAGE_MAX, RUNTIME_ERRORS_PER_COMPONENT_PER_PAGE, } from "@taggor/contract/zod-free";
|
|
23
23
|
const sent = new Map();
|
|
@@ -25,7 +25,7 @@ const sent = new Map();
|
|
|
25
25
|
* Reports one caught failure.
|
|
26
26
|
* Inputs: the component tag, the published version hash, the failure phase, the caught value and
|
|
27
27
|
* the delivery origin (the loader's runtime URL; never `import.meta.url`, which is a syntax error
|
|
28
|
-
* when a host page loads the bundle as a classic script and made props.e2e.ts fail
|
|
28
|
+
* when a host page loads the bundle as a classic script and made props.e2e.ts fail).
|
|
29
29
|
* Output: none. Errors: never throws. Side effects: at most one beacon and the per-tag counter.
|
|
30
30
|
*/
|
|
31
31
|
export function reportFailure(tag, version, phase, error, origin) {
|