@wodira/browser 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,6 @@
1
1
  import { LitElement, type PropertyValues } from 'lit';
2
+ import type { WodiraLegalSignatureInput } from '../index.js';
3
+ type Strokes = WodiraLegalSignatureInput['strokes'];
2
4
  /** Normalized, bounded trace; uses the same limits as the web registration signature pad. */
3
5
  export declare class WodiraSignaturePad extends LitElement {
4
6
  static properties: {
@@ -8,10 +10,14 @@ export declare class WodiraSignaturePad extends LitElement {
8
10
  resetKey: {
9
11
  type: StringConstructor;
10
12
  };
13
+ value: {
14
+ attribute: boolean;
15
+ };
11
16
  };
12
17
  static styles: import("lit").CSSResult;
13
18
  locale: string;
14
19
  resetKey: string;
20
+ value: Strokes | undefined;
15
21
  private strokes;
16
22
  private active;
17
23
  private startedAt;
@@ -20,10 +26,13 @@ export declare class WodiraSignaturePad extends LitElement {
20
26
  render(): import("lit").TemplateResult<1>;
21
27
  private start;
22
28
  private move;
29
+ private drawSegment;
23
30
  private end;
24
31
  private cancel;
25
32
  private clear;
33
+ private redraw;
26
34
  private point;
27
35
  private emit;
28
36
  }
37
+ export {};
29
38
  //# sourceMappingURL=signature-pad.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signature-pad.d.ts","sourceRoot":"","sources":["../../src/ui/signature-pad.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAOjE,6FAA6F;AAC7F,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,OAAgB,UAAU;QAAK,MAAM;YAAI,IAAI;;QAAY,QAAQ;YAAI,IAAI;;MAAa;IACtF,OAAgB,MAAM,0BAuBpB;IACM,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAwB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AAI;QACJ,SAAS;QACT,MAAM;QACN,OAAO;;;QAGP,WAAW;QACX,OAAO;QACP,eAAe;QACf,MAAM;QACN,cAAc;QACd,OAAO;QACP,KAAK;QACL,MAAM;QACN,IAAI;QACJ,SAAS;QACT,MAAM;QACN,OAAO;;CAE4B,CAAC;AAExC,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAO/E;AAGD,eAAO,MAAM,aAAa,QA8Ff,CAAC;AAEZ,eAAO,MAAM,cAAc,QAsDhB,CAAC"}
@@ -10,6 +10,7 @@ export declare function isBlank(value: unknown): boolean;
10
10
  export declare function isEmail(value: string): boolean;
11
11
  export declare function isHttpUrl(value: string): boolean;
12
12
  export declare function validateRequiredText(value: unknown): WodiraUiValidationResult;
13
+ export declare function validateRegistrationFullName(value: string): WodiraUiValidationResult;
13
14
  export declare function validateEmail(value: string, required: boolean): WodiraUiValidationResult;
14
15
  export declare function parseRegistrationPhone(value: string, country?: CountryCode): import("libphonenumber-js/min").PhoneNumber | undefined;
15
16
  export declare function validateInternationalPhone(value: string, country?: CountryCode): WodiraUiValidationResult;
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/ui/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;AAEjE,MAAM,MAAM,wBAAwB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAI1F,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO/C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED,wBAAgB,SAAS,CAAC,K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AE,EAC1B,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CAI1B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAE5F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAEtE;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CAQ1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnF"}
@@ -1,5 +1,5 @@
1
- // ../../node_modules/.pnpm/dompurify@3.5.0/node_modules/dompurify/dist/purify.es.mjs
2
- /*! @license DOMPurify 3.5.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.5.0/LICENSE */
1
+ // ../../node_modules/.pnpm/dompurify@3.5.1/node_modules/dompurify/dist/purify.es.mjs
2
+ /*! @license DOMPurify 3.5.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.5.1/LICENSE */
3
3
  function _OverloadYield(e, d) {
4
4
  this.v = e, this.k = d;
5
5
  }
@@ -9,34 +9,32 @@ function _arrayLikeToArray(r, a) {
9
9
  n[e] = r[e];
10
10
  return n;
11
11
  }
12
- function _arrayWithHoles(r) {
13
- if (Array.isArray(r))
12
+ function _iterableToArrayLimit(r, t) {
13
+ var e = r == null ? null : typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
14
+ if (Array.isArray(r) && (e == null || e === (typeof Symbol != "undefined" && [][Symbol.iterator]) || e === []["@@iterator"]))
14
15
  return r;
15
- }
16
- function _iterableToArrayLimit(r, l) {
17
- var t = r == null ? null : typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
18
- if (t != null) {
19
- var e, n, i, u, a = [], f = true, o = false;
16
+ if (e != null) {
17
+ var l, n, i, a, u = [], o = true, f = false;
20
18
  try {
21
- if (i = (t = t.call(r)).next, l === 0) {
22
- if (Object(t) !== t)
19
+ if (i = (e = e.call(r)).next, t === 0) {
20
+ if (Object(e) !== e)
23
21
  return;
24
- f = false;
22
+ o = false;
25
23
  } else
26
- for (;!(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
24
+ for (;!(o = (l = i.call(e)).done) && (u.push(l.value), u.length !== t); o = true)
27
25
  ;
28
26
  } catch (r) {
29
- o = true, n = r;
27
+ f = true, n = r;
30
28
  } finally {
31
29
  try {
32
- if (!f && t.return != null && (u = t.return(), Object(u) !== u))
30
+ if (!o && e.return != null && (a = e.return(), Object(a) !== a))
33
31
  return;
34
32
  } finally {
35
- if (o)
33
+ if (f)
36
34
  throw n;
37
35
  }
38
36
  }
39
- return a;
37
+ return u;
40
38
  }
41
39
  }
42
40
  function _nonIterableRest() {
@@ -45,7 +43,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
45
43
  }
46
44
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
47
45
  function _slicedToArray(r, e) {
48
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
46
+ return _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
49
47
  }
50
48
  function _unsupportedIterableToArray(r, a) {
51
49
  if (r) {
@@ -1050,18 +1048,17 @@ var _resolveObjectOption = function _resolveObjectOption(cfg, key, fallback) {
1050
1048
  function createDOMPurify() {
1051
1049
  let window2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
1052
1050
  const DOMPurify = (root) => createDOMPurify(root);
1053
- DOMPurify.version = "3.5.0";
1051
+ DOMPurify.version = "3.5.1";
1054
1052
  DOMPurify.removed = [];
1055
1053
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
1056
1054
  DOMPurify.isSupported = false;
1057
1055
  return DOMPurify;
1058
1056
  }
1059
- let document = window2.document;
1060
- const originalDocument = document;
1057
+ let document2 = window2.document;
1058
+ const originalDocument = document2;
1061
1059
  const currentScript = originalDocument.currentScript;
1062
- const { HTMLTemplateElement, Node, Element, NodeFilter, DOMParser, trustedTypes } = window2;
1060
+ const { HTMLTemplateElement, Node, Element, NodeFilter, DOMParser, MutationObserver, trustedTypes } = window2;
1063
1061
  const ElementPrototype = Element.prototype;
1064
- const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
1065
1062
  const remove = lookupGetter(ElementPrototype, "remove");
1066
1063
  const removeChild = lookupGetter(ElementPrototype, "removeChild");
1067
1064
  const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
@@ -1087,9 +1084,9 @@ function createDOMPurify() {
1087
1084
  return _readNodeType(node) === NODE_TYPE.element ? getAttributes(node) : null;
1088
1085
  };
1089
1086
  if (typeof HTMLTemplateElement === "function") {
1090
- const template = document.createElement("template");
1087
+ const template = document2.createElement("template");
1091
1088
  if (template.content && template.content.ownerDocument)
1092
- document = template.content.ownerDocument;
1089
+ document2 = template.content.ownerDocument;
1093
1090
  }
1094
1091
  let trustedTypesPolicy;
1095
1092
  let emptyHTML = "";
@@ -1128,7 +1125,7 @@ function createDOMPurify() {
1128
1125
  }
1129
1126
  return defaultTrustedTypesPolicy;
1130
1127
  };
1131
- const _document = document, { implementation, createNodeIterator, createDocumentFragment, getElementsByTagName } = _document;
1128
+ const _document = document2, { implementation, createNodeIterator, createDocumentFragment, getElementsByTagName } = _document;
1132
1129
  const importNode = originalDocument.importNode;
1133
1130
  let hooks = _createHooksMap();
1134
1131
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== undefined;
@@ -1278,7 +1275,7 @@ function createDOMPurify() {
1278
1275
  let transformCaseFunc = null;
1279
1276
  let CONFIG = null;
1280
1277
  let ACTIVE_CONFIG = null;
1281
- const formElement = document.createElement("form");
1278
+ const formElement = document2.createElement("form");
1282
1279
  const isRegexOrFunction = function isRegexOrFunction(testValue) {
1283
1280
  return testValue instanceof RegExp || testValue instanceof Function;
1284
1281
  };
@@ -1571,6 +1568,27 @@ function createDOMPurify() {
1571
1568
  }, true);
1572
1569
  return nodes;
1573
1570
  };
1571
+ const _observeMirrorTargets = function _observeMirrorTargets(before) {
1572
+ let observer = null;
1573
+ if (!MutationObserver)
1574
+ return observer;
1575
+ arrayForEach(before, (node) => {
1576
+ if (_readNodeType(node) === NODE_TYPE.element && transformCaseFunc(_readNodeName(node)) === "selectedcontent") {
1577
+ observer = observer || new MutationObserver(() => {
1578
+ return;
1579
+ });
1580
+ observer.observe(node, { childList: true });
1581
+ }
1582
+ });
1583
+ return observer;
1584
+ };
1585
+ const _neutralizeMirrorCopies = function _neutralizeMirrorCopies(observer) {
1586
+ arrayForEach(observer.takeRecords(), (record) => {
1587
+ arrayForEach(record.addedNodes, _neutralizeSubtree);
1588
+ arrayForEach(record.removedNodes, _neutralizeSubtree);
1589
+ });
1590
+ observer.disconnect();
1591
+ };
1574
1592
  const _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {
1575
1593
  const reachable = setCreate();
1576
1594
  arrayForEach(_collectLiveNodes(root), (node) => {
@@ -1713,7 +1731,7 @@ function createDOMPurify() {
1713
1731
  }
1714
1732
  const body = doc.body || doc.documentElement;
1715
1733
  if (dirty && leadingWhitespace)
1716
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1734
+ body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1717
1735
  if (NAMESPACE === HTML_NAMESPACE)
1718
1736
  return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
1719
1737
  return WHOLE_DOCUMENT ? doc.documentElement : body;
@@ -1849,8 +1867,8 @@ function createDOMPurify() {
1849
1867
  return true;
1850
1868
  return literal && typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent);
1851
1869
  };
1852
- const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName, nodeType) {
1853
- if (SAFE_FOR_XML && nodeType === NODE_TYPE.element && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML))
1870
+ const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName, nodeType, root) {
1871
+ if (SAFE_FOR_XML && nodeType === NODE_TYPE.element && !(tagName === "body" && getParentNode(currentNode) === root) && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML))
1854
1872
  return true;
1855
1873
  if (SAFE_FOR_XML && nodeType === NODE_TYPE.element && _isMalformedElement(currentNode, tagName))
1856
1874
  return true;
@@ -1876,12 +1894,10 @@ function createDOMPurify() {
1876
1894
  if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
1877
1895
  const parentNode = getParentNode(currentNode);
1878
1896
  const childNodes = getChildNodes(currentNode);
1879
- if (childNodes && parentNode) {
1897
+ if (childNodes && parentNode && currentNode !== root) {
1880
1898
  const childCount = childNodes.length;
1881
- for (let i = childCount - 1;i >= 0; --i) {
1882
- const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];
1883
- parentNode.insertBefore(hoisted, getNextSibling(currentNode));
1884
- }
1899
+ for (let i = childCount - 1;i >= 0; --i)
1900
+ parentNode.insertBefore(childNodes[i], getNextSibling(currentNode));
1885
1901
  }
1886
1902
  }
1887
1903
  _forceRemove(currentNode);
@@ -1918,7 +1934,7 @@ function createDOMPurify() {
1918
1934
  });
1919
1935
  if (_handleHookDetachedNode(currentNode, root))
1920
1936
  return true;
1921
- if (_isUnsafeNode(currentNode, tagName, nodeType)) {
1937
+ if (_isUnsafeNode(currentNode, tagName, nodeType, root)) {
1922
1938
  _forceRemove(currentNode);
1923
1939
  return true;
1924
1940
  }
@@ -1948,7 +1964,7 @@ function createDOMPurify() {
1948
1964
  return false;
1949
1965
  if (_isPatchLinkageAttribute(lcName, lcTag))
1950
1966
  return false;
1951
- if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && ((value in document) || (value in formElement)))
1967
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && ((value in document2) || (value in formElement)))
1952
1968
  return false;
1953
1969
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
1954
1970
  if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName))
@@ -2193,12 +2209,16 @@ function createDOMPurify() {
2193
2209
  IN_PLACE_RETURNS = mapCreate();
2194
2210
  } else if (_isNode(dirty)) {
2195
2211
  body = _initDocument("<!---->");
2196
- importedNode = body.ownerDocument.importNode(dirty, true);
2197
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY")
2212
+ const scratchDocument = body.ownerDocument;
2213
+ importedNode = scratchDocument.importNode(dirty, true);
2214
+ const isHtmlElement = importedNode.nodeType === NODE_TYPE.element && _readNamespaceURI(importedNode) === HTML_NAMESPACE;
2215
+ if (isHtmlElement && scratchDocument.body && importedNode.nodeName === "BODY") {
2216
+ scratchDocument.documentElement.replaceChild(importedNode, scratchDocument.body);
2198
2217
  body = importedNode;
2199
- else if (importedNode.nodeName === "HTML")
2218
+ } else if (isHtmlElement && importedNode.nodeName === "HTML") {
2219
+ scratchDocument.replaceChild(importedNode, scratchDocument.documentElement);
2200
2220
  body = importedNode;
2201
- else
2221
+ } else
2202
2222
  body.appendChild(importedNode);
2203
2223
  _sanitizeAttachedShadowRoots(body);
2204
2224
  } else {
@@ -2211,9 +2231,12 @@ function createDOMPurify() {
2211
2231
  if (body && FORCE_BODY)
2212
2232
  _forceRemove(body.firstChild);
2213
2233
  const walkRoot = inPlace ? dirty : body;
2234
+ let mirrorObserver = null;
2214
2235
  try {
2215
- if (inPlace)
2236
+ if (inPlace) {
2237
+ mirrorObserver = _observeMirrorTargets(inPlaceNodes);
2216
2238
  _sanitizeAttachedShadowRoots(dirty);
2239
+ }
2217
2240
  const nodeIterator = _createNodeIterator(walkRoot);
2218
2241
  while (currentNode = nodeIterator.nextNode())
2219
2242
  _sanitizeNode(currentNode, walkRoot);
@@ -2224,6 +2247,8 @@ function createDOMPurify() {
2224
2247
  _failClosed(dirty, inPlaceNodes);
2225
2248
  throw error;
2226
2249
  } finally {
2250
+ if (mirrorObserver)
2251
+ _neutralizeMirrorCopies(mirrorObserver);
2227
2252
  IN_PLACE_VISITED = outerVisited;
2228
2253
  IN_PLACE_RETURNS = outerReturns;
2229
2254
  }
@@ -4108,7 +4133,7 @@ function renderWaiverDocumentBody(markdown) {
4108
4133
  ALLOWED_ATTR: ["href", "start", "title"],
4109
4134
  ALLOW_ARIA_ATTR: false,
4110
4135
  ALLOW_DATA_ATTR: false
4111
- });
4136
+ }) ?? document.createDocumentFragment();
4112
4137
  for (const link of fragment.querySelectorAll("a[href]")) {
4113
4138
  link.target = "_blank";
4114
4139
  link.rel = "noopener noreferrer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wodira/browser",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Browser SDK for WODira publishable keys and external Stripe Checkout registration sessions.",
5
5
  "keywords": [
6
6
  "browser",
@@ -65,21 +65,13 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@types/three": "^0.187.0",
68
- "dompurify": "3.5.0",
69
- "libphonenumber-js": "1.13.17",
68
+ "dompurify": "3.5.1",
69
+ "libphonenumber-js": "1.13.18",
70
70
  "lit": "3.3.3",
71
- "maplibre-gl": "^6.19.0",
71
+ "maplibre-gl": "^6.20.0",
72
72
  "marked": "18.4.0",
73
73
  "three": "^0.187.0"
74
74
  },
75
- "devDependencies": {
76
- "@types/bun": "1.4.5",
77
- "@typescript/native": "npm:typescript@^7.0.2",
78
- "@wodira/common": "0.1.0",
79
- "@wodira/db": "0.0.0",
80
- "happy-dom": "21.0.4",
81
- "typescript": "npm:@typescript/typescript6@^6.0.2"
82
- },
83
75
  "engines": {
84
76
  "bun": ">=1.3.1",
85
77
  "node": ">=20"
package/CHANGELOG.md DELETED
@@ -1,87 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.3.2 — 2026-12-03
4
-
5
- - Show country flags and calling codes in the phone selector and stack the controls in narrow columns.
6
-
7
- ## 1.3.1 — 2026-12-03
8
-
9
- - Add an international phone country selector and normalize numbers before checkout.
10
- - Show checkout validation next to the affected fields and clarify the buyer name label.
11
-
12
- ## 1.2.3 — 2026-12-03
13
-
14
- ### Fixed
15
-
16
- - Show conditional questions once per team slot and allow eligible teammates to complete them through their invitation.
17
- - Keep pending slots selected when a quote fails and let buyers complete them immediately after the invitation deadline.
18
- - Clear a signature when the signer, participant details or covered slots change.
19
-
20
- ## 1.2.2 — 2026-12-02
21
-
22
- ### Fixed
23
-
24
- - Registration widgets respect event-wide and per-category capacity, including reserved places and guests.
25
- - A closed category stays unavailable in the registration form even when its event and pricing responses disagree.
26
-
27
- ## 1.2.1 — 2026-12-02
28
-
29
- ### Fixed
30
-
31
- - Mixed-team registration shows each participant's assigned gender in the selector, including on mobile.
32
-
33
- ## 1.2.0 — 2026-12-02
34
-
35
- ### Added
36
-
37
- - `<wodira-route-3d>` (`@wodira/browser/ui/route-3d`): interactive 3D course map over real terrain and satellite imagery, with a glowing route, start/finish, aid stations, kilometre marks, an elevation profile linked to the map, a camera flythrough, 2D/3D, full screen and course tabs. Reads WODira event routes (`event-id` + `publishable-key`) or a GPX file; MapLibre GL loads only when the element is on the page.
38
- - `WodiraBrowserClient.getEventRoutes()`, `eventRouteGpxUrl()` and the `WodiraEventRoute` types.
39
-
40
- - Guest sponsorship client methods request and verify an email code, create an idempotent Stripe checkout, and read its server-confirmed status. One verified email can bid repeatedly across spaces and increase its own leading bid. Requires the corresponding API deployment.
41
- - Opt-in `bid-mode="host"` emits `wodira:shirt:bid-requested` with campaign ID, slot ID/name and amount, so hosts can implement guest checkout without opening a sign-in popup. The default WODira flow is unchanged.
42
-
43
- - `getEventShirtSponsorCampaign(eventId, signal)` reads a nullable campaign envelope from the browser API using only the event ID. It omits cookies and bypasses stale pending responses.
44
- - `<wodira-shirt-auction model-url="/models/shirt.glb">` can load a host-owned public model without changing the WODira sign-in or payment destination. Existing integrations keep the default model URL.
45
-
46
- ### Fixed
47
-
48
- - The split route viewer ESM build includes its MapLibre styles, so Vite consumers can render the map without a CSS default-export error.
49
-
50
- ## 1.1.0 — 2026-11-11
51
-
52
- ### Added
53
-
54
- - Host-owned registration review with `checkout-step="details"`, `prepareReview()` and the `wodira:review-requested` event. Validation and a fresh quote complete before checkout creation; edited drafts require another review. The default `direct` mode preserves existing integrations.
55
-
56
- ### Fixed
57
-
58
- - Registration checkout does not redirect after the form has been disconnected. Validation and quote errors receive focus in the review flow.
59
-
60
- ## 1.0.0 — 2026-11-11
61
-
62
- ### Changed
63
-
64
- - `<wodira-shirt-auction>` now renders natively instead of in an iframe: the 3D shirt, slots, current leaders and outbid amount live in the page and use the shared `--wodira-*` tokens and `::part()` names, including the colours painted on the 3D shirt. Sign-in, the sponsor logo and Stripe payment open in a WODira window. **Breaking:** the element now requires `publishable-key`; `base-url` sets the API.
65
-
66
- ### Added
67
-
68
- - `WodiraBrowserClient.getShirtSponsorCampaign()` and the `WodiraShirtCampaign` types.
69
- - `@wodira/browser/ui/shirt-sponsors/render`, the three.js shirt renderer shared with the WODira web app. three.js loads only when a shirt is on the page.
70
- - `wodira:shirt:slot-selected` and `wodira:shirt:bid-started` events.
71
-
72
- ### Fixed
73
-
74
- - The public shirt renderer includes its Three.js declaration dependency, so strict TypeScript consumers can import the render entry without installing extra types.
75
-
76
- ## 0.3.0 — 2026-11-11
77
-
78
- ### Added
79
-
80
- - Lit components for event discovery, registration, signature capture and registration receipts, with theme tokens and customization through slots and CSS parts.
81
- - Boxes widgets for calendars, plans and trial classes, with a versioned CDN bundle and integrity verification.
82
- - Registration support for category availability, supplements, custom fields, signatures and promotional codes.
83
-
84
- ### Fixed
85
-
86
- - Published TypeScript declarations resolve correctly in strict NodeNext projects as well as frontend bundlers.
87
- - Registration components preserve API validation messages and recover when a promotional code is removed.