@zoreal/oauth2-js 0.1.22 → 0.1.23

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/dist/index.d.cts CHANGED
@@ -328,7 +328,7 @@ declare function mountPairingModal(state: PairingState, options: PairingModalOpt
328
328
  * auth-code mode leaves it to the RP backend.
329
329
  */
330
330
  declare const WIRE_VERSION = 1;
331
- declare const SDK_VERSION = "0.1.22";
331
+ declare const SDK_VERSION = "0.1.23";
332
332
  declare const SDK_NAME = "@zoreal/oauth2-js";
333
333
  declare const DEFAULT_ISSUER = "https://id.zoreal.com";
334
334
  /** Pending TTL is short. Poll gently; over-polling cancels the request. */
package/dist/index.d.ts CHANGED
@@ -328,7 +328,7 @@ declare function mountPairingModal(state: PairingState, options: PairingModalOpt
328
328
  * auth-code mode leaves it to the RP backend.
329
329
  */
330
330
  declare const WIRE_VERSION = 1;
331
- declare const SDK_VERSION = "0.1.22";
331
+ declare const SDK_VERSION = "0.1.23";
332
332
  declare const SDK_NAME = "@zoreal/oauth2-js";
333
333
  declare const DEFAULT_ISSUER = "https://id.zoreal.com";
334
334
  /** Pending TTL is short. Poll gently; over-polling cancels the request. */
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ function unsafeClaims(idToken) {
14
14
 
15
15
  // src/wire.ts
16
16
  var WIRE_VERSION = 1;
17
- var SDK_VERSION = "0.1.22";
17
+ var SDK_VERSION = "0.1.23";
18
18
  var SDK_NAME = "@zoreal/oauth2-js";
19
19
  var DEFAULT_ISSUER = "https://id.zoreal.com";
20
20
  var POLL_INTERVAL_MS = 2e3;
@@ -670,9 +670,16 @@ var SVG_NS = "http://www.w3.org/2000/svg";
670
670
  var TAIL = 0.3;
671
671
  var STACK = Array.from({ length: 12 }, (_, i) => 12 - i);
672
672
  var HALO = [3, 2, 1];
673
- function radiusOf(control) {
674
- const value = parseFloat(getComputedStyle(control).borderTopLeftRadius);
675
- return Number.isFinite(value) ? value : 8;
673
+ function cornerOf(radius, width, height) {
674
+ const raw = radius.trim();
675
+ const value = parseFloat(raw);
676
+ const offset = 2;
677
+ if (raw.endsWith("%") && Number.isFinite(value)) {
678
+ return [width * value / 100 + offset, height * value / 100 + offset];
679
+ }
680
+ const px = Number.isFinite(value) ? value : /infinity/i.test(raw) ? Infinity : 8;
681
+ const r = Math.min(px, width / 2, height / 2) + offset;
682
+ return [r, r];
676
683
  }
677
684
  function holdBusy(control) {
678
685
  if (typeof document === "undefined") return () => {
@@ -693,12 +700,11 @@ function holdBusy(control) {
693
700
  overlay.setAttribute("aria-hidden", "true");
694
701
  const svg2 = document.createElementNS(SVG_NS, "svg");
695
702
  svg2.setAttribute("class", cx("ring-svg"));
696
- const rx = radiusOf(control) + 2;
703
+ const rects = [];
697
704
  const layer = (name, len, alpha) => {
698
705
  const rect = document.createElementNS(SVG_NS, "rect");
699
706
  rect.setAttribute("class", cx(name));
700
- rect.setAttribute("rx", String(rx));
701
- rect.setAttribute("ry", String(rx));
707
+ rects.push(rect);
702
708
  rect.style.strokeDasharray = `calc(var(--zrl-l) * ${len}) calc(var(--zrl-l) * ${1 - len})`;
703
709
  rect.style.setProperty("--zrl-s", `calc(var(--zrl-l) * ${-(TAIL - len)})`);
704
710
  rect.style.opacity = alpha;
@@ -721,6 +727,11 @@ function holdBusy(control) {
721
727
  overlay.style.top = `${box.top}px`;
722
728
  overlay.style.width = `${box.width}px`;
723
729
  overlay.style.height = `${box.height}px`;
730
+ const [rx, ry] = cornerOf(getComputedStyle(control).borderTopLeftRadius, box.width, box.height);
731
+ for (const rect of rects) {
732
+ rect.setAttribute("rx", String(rx));
733
+ rect.setAttribute("ry", String(ry));
734
+ }
724
735
  const length = typeof measured?.getTotalLength === "function" ? measured.getTotalLength() : 0;
725
736
  if (length > 0) overlay.style.setProperty("--zrl-ring-len", `${length}px`);
726
737
  };