@limrun/ui 0.9.0-rc.7 → 0.9.0-rc.9

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.
@@ -13,7 +13,6 @@ export interface InspectOverlayProps {
13
13
  highlightedId: string | null;
14
14
  selectedId: string | null;
15
15
  mode: InspectMode;
16
- instanceId?: string;
17
16
  cursorPosition: {
18
17
  x: number;
19
18
  y: number;
@@ -20,25 +20,14 @@ interface RemoteControlProps {
20
20
  * video stream.
21
21
  *
22
22
  * - `true` — Select mode. Boxes are clickable, click pins a selection
23
- * with action buttons (Tap / Copy selector / Copy command), ESC
24
- * clears. The cursor turns into a crosshair while inspecting and the
25
- * info card hangs off the pointer. Device input is blocked while in
26
- * this mode.
23
+ * with action buttons (Tap / Copy selector / Copy id), ESC clears.
24
+ * Device input is blocked while in this mode.
27
25
  * - `'hover-only'` — Boxes follow the cursor as a visual preview. Device
28
26
  * input still passes through, so you can drive the simulator while
29
27
  * inspecting.
30
28
  * - `undefined` / `false` (default) — overlay disabled, no polling.
31
29
  */
32
30
  inspectMode?: boolean | 'hover-only';
33
- /**
34
- * Optional instance id used to render the "Copy command" button in the
35
- * inspect-mode info card. When provided, the button copies a CLI
36
- * invocation like
37
- * `lim ios tap-element --ax-label 'Sign in' --type Button --id <instanceId>`
38
- * (or its Android equivalent) that targets this exact element on this
39
- * exact instance. When omitted the button is hidden.
40
- */
41
- instanceId?: string;
42
31
  /**
43
32
  * Fires whenever a fresh accessibility snapshot is delivered.
44
33
  *
@@ -94,8 +94,6 @@ export declare function axElementsEqual(a: AxElement, b: AxElement): boolean;
94
94
  export declare function axSnapshotsEqual(a: AxSnapshot | null, b: AxSnapshot | null): boolean;
95
95
  export declare function axElementAtPoint(snapshot: AxSnapshot, x: number, y: number): AxElement | null;
96
96
  export declare function axElementSelectorExpression(el: AxElement, platform: AxPlatform): string | null;
97
- export declare function axElementSelectorObject(el: AxElement, platform: AxPlatform): Record<string, string> | null;
98
- export declare function axCliTapCommand(el: AxElement, platform: AxPlatform, instanceId: string): string | null;
99
97
  export declare function axElementRoleLabel(el: AxElement): string;
100
98
  export declare function axElementSummary(el: AxElement): string;
101
99
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CbGVvwPp.js"),t=require("../device-install-dialog-86RDdoK9.js");exports.AppleGsaSrpClient=e.AppleGsaSrpClient;exports.RELAY_HEADER_BYTES=e.RELAY_HEADER_BYTES;exports.RELAY_PROTOCOL_VERSION=e.RELAY_PROTOCOL_VERSION;exports.RelayClient=e.RelayClient;exports.RelayMessageType=e.RelayMessageType;exports.claimUsbmux=e.claimUsbmux;exports.closeDeviceRelayTarget=e.closeDeviceRelayTarget;exports.closeUsbmuxSession=e.closeUsbmuxSession;exports.createAppleRelaySession=e.createAppleRelaySession;exports.createBundleIDRequest=e.createBundleIDRequest;exports.createDevelopmentProfileRequest=e.createDevelopmentProfileRequest;exports.createUsbmuxSession=e.createUsbmuxSession;exports.decodeFrame=e.decodeFrame;exports.decodeJson=e.decodeJson;exports.deleteAppleRelaySession=e.deleteAppleRelaySession;exports.deviceRelayWebSocketUrl=e.deviceRelayWebSocketUrl;exports.downloadCertificateRequest=e.downloadCertificateRequest;exports.downloadProfileRequest=e.downloadProfileRequest;exports.encodeFrame=e.encodeFrame;exports.encodeJson=e.encodeJson;exports.exportAppleCertificateP12=e.exportAppleCertificateP12;exports.fetchAppleAccountSession=e.fetchAppleAccountSession;exports.fetchLimbuildInfo=e.fetchLimbuildInfo;exports.findBundleIDRequest=e.findBundleIDRequest;exports.findDevelopmentCertificatesRequest=e.findDevelopmentCertificatesRequest;exports.findDevelopmentProfilesRequest=e.findDevelopmentProfilesRequest;exports.findDeviceRequest=e.findDeviceRequest;exports.findSigningAssetsForBundle=e.findSigningAssetsForBundle;exports.findUsbmuxCandidates=e.findUsbmuxCandidates;exports.generateAppleSigningKeyAndCSR=e.generateAppleSigningKeyAndCSR;exports.getBulkEndpoints=e.getBulkEndpoints;exports.getLatestSigningAssets=e.getLatestSigningAssets;exports.getLatestSigningAssetsWithCertificate=e.getLatestSigningAssetsWithCertificate;exports.getPairRecord=e.getPairRecord;exports.getReusableAppleSigningAssets=e.getReusableAppleSigningAssets;exports.getSigningAssets=e.getSigningAssets;exports.listTeamsRequest=e.listTeamsRequest;exports.normalizeBundleID=e.normalizeBundleID;exports.normalizeUDID=e.normalizeUDID;exports.openStream=e.openStream;exports.parseProvisioningProfile=e.parseProvisioningProfile;exports.parseProvisioningProfileBase64=e.parseProvisioningProfileBase64;exports.parseProvisioningProfileBytes=e.parseProvisioningProfileBytes;exports.profileContainsDevice=e.profileContainsDevice;exports.profileMatchesBundleID=e.profileMatchesBundleID;exports.proxyPhoneTwoFactorCode=e.proxyPhoneTwoFactorCode;exports.proxyProvisioningRequest=e.proxyProvisioningRequest;exports.proxySrpComplete=e.proxySrpComplete;exports.proxySrpInit=e.proxySrpInit;exports.proxyTwoFactorCode=e.proxyTwoFactorCode;exports.putAppleGeneratedSigningAssets=e.putAppleGeneratedSigningAssets;exports.putPairRecord=e.putPairRecord;exports.putSigningAssets=e.putSigningAssets;exports.receiveStreamData=e.receiveStreamData;exports.registerDeviceRequest=e.registerDeviceRequest;exports.requestAppleDevice=e.requestAppleDevice;exports.requestUSBAccess=e.requestUSBAccess;exports.selectDeveloperPortalTeam=e.selectDeveloperPortalTeam;exports.sendStreamData=e.sendStreamData;exports.startBrowserOwnedAppleIDLogin=e.startBrowserOwnedAppleIDLogin;exports.startInstallRelay=e.startInstallRelay;exports.startPairingRelay=e.startPairingRelay;exports.startSignedDeviceBuild=e.startSignedDeviceBuild;exports.storedSigningAssetsReusable=e.storedSigningAssetsReusable;exports.submitDevelopmentCSRRequest=e.submitDevelopmentCSRRequest;exports.teamIDCandidates=e.teamIDCandidates;exports.transferIn=e.transferIn;exports.transferOutWithZlp=e.transferOutWithZlp;exports.triggerPhoneTwoFactor=e.triggerPhoneTwoFactor;exports.triggerTrustedDeviceTwoFactor=e.triggerTrustedDeviceTwoFactor;exports.useDeviceInstall=e.useDeviceInstall;exports.watchBuildLogEvents=e.watchBuildLogEvents;exports.DeviceInstallDialog=t.DeviceInstallDialog;exports.DeviceInstallRelay=t.DeviceInstallDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CAPli9MR.js"),t=require("../device-install-dialog-jvqQ-fuo.js");exports.AppleGsaSrpClient=e.AppleGsaSrpClient;exports.RELAY_HEADER_BYTES=e.RELAY_HEADER_BYTES;exports.RELAY_PROTOCOL_VERSION=e.RELAY_PROTOCOL_VERSION;exports.RelayClient=e.RelayClient;exports.RelayMessageType=e.RelayMessageType;exports.claimUsbmux=e.claimUsbmux;exports.closeDeviceRelayTarget=e.closeDeviceRelayTarget;exports.closeUsbmuxSession=e.closeUsbmuxSession;exports.createAppleRelaySession=e.createAppleRelaySession;exports.createBundleIDRequest=e.createBundleIDRequest;exports.createDevelopmentProfileRequest=e.createDevelopmentProfileRequest;exports.createUsbmuxSession=e.createUsbmuxSession;exports.decodeFrame=e.decodeFrame;exports.decodeJson=e.decodeJson;exports.deleteAppleRelaySession=e.deleteAppleRelaySession;exports.deviceRelayWebSocketUrl=e.deviceRelayWebSocketUrl;exports.downloadCertificateRequest=e.downloadCertificateRequest;exports.downloadProfileRequest=e.downloadProfileRequest;exports.encodeFrame=e.encodeFrame;exports.encodeJson=e.encodeJson;exports.exportAppleCertificateP12=e.exportAppleCertificateP12;exports.fetchAppleAccountSession=e.fetchAppleAccountSession;exports.fetchLimbuildInfo=e.fetchLimbuildInfo;exports.findBundleIDRequest=e.findBundleIDRequest;exports.findDevelopmentCertificatesRequest=e.findDevelopmentCertificatesRequest;exports.findDevelopmentProfilesRequest=e.findDevelopmentProfilesRequest;exports.findDeviceRequest=e.findDeviceRequest;exports.findSigningAssetsForBundle=e.findSigningAssetsForBundle;exports.findUsbmuxCandidates=e.findUsbmuxCandidates;exports.generateAppleSigningKeyAndCSR=e.generateAppleSigningKeyAndCSR;exports.getBulkEndpoints=e.getBulkEndpoints;exports.getLatestSigningAssets=e.getLatestSigningAssets;exports.getLatestSigningAssetsWithCertificate=e.getLatestSigningAssetsWithCertificate;exports.getPairRecord=e.getPairRecord;exports.getReusableAppleSigningAssets=e.getReusableAppleSigningAssets;exports.getSigningAssets=e.getSigningAssets;exports.listTeamsRequest=e.listTeamsRequest;exports.normalizeBundleID=e.normalizeBundleID;exports.normalizeUDID=e.normalizeUDID;exports.openStream=e.openStream;exports.parseProvisioningProfile=e.parseProvisioningProfile;exports.parseProvisioningProfileBase64=e.parseProvisioningProfileBase64;exports.parseProvisioningProfileBytes=e.parseProvisioningProfileBytes;exports.profileContainsDevice=e.profileContainsDevice;exports.profileMatchesBundleID=e.profileMatchesBundleID;exports.proxyPhoneTwoFactorCode=e.proxyPhoneTwoFactorCode;exports.proxyProvisioningRequest=e.proxyProvisioningRequest;exports.proxySrpComplete=e.proxySrpComplete;exports.proxySrpInit=e.proxySrpInit;exports.proxyTwoFactorCode=e.proxyTwoFactorCode;exports.putAppleGeneratedSigningAssets=e.putAppleGeneratedSigningAssets;exports.putPairRecord=e.putPairRecord;exports.putSigningAssets=e.putSigningAssets;exports.receiveStreamData=e.receiveStreamData;exports.registerDeviceRequest=e.registerDeviceRequest;exports.requestAppleDevice=e.requestAppleDevice;exports.requestUSBAccess=e.requestUSBAccess;exports.selectDeveloperPortalTeam=e.selectDeveloperPortalTeam;exports.sendStreamData=e.sendStreamData;exports.startBrowserOwnedAppleIDLogin=e.startBrowserOwnedAppleIDLogin;exports.startInstallRelay=e.startInstallRelay;exports.startPairingRelay=e.startPairingRelay;exports.startSignedDeviceBuild=e.startSignedDeviceBuild;exports.storedSigningAssetsReusable=e.storedSigningAssetsReusable;exports.submitDevelopmentCSRRequest=e.submitDevelopmentCSRRequest;exports.teamIDCandidates=e.teamIDCandidates;exports.transferIn=e.transferIn;exports.transferOutWithZlp=e.transferOutWithZlp;exports.triggerPhoneTwoFactor=e.triggerPhoneTwoFactor;exports.triggerTrustedDeviceTwoFactor=e.triggerTrustedDeviceTwoFactor;exports.useDeviceInstall=e.useDeviceInstall;exports.watchBuildLogEvents=e.watchBuildLogEvents;exports.DeviceInstallDialog=t.DeviceInstallDialog;exports.DeviceInstallRelay=t.DeviceInstallDialog;
@@ -1,5 +1,5 @@
1
- import { A as a, O as t, N as i, R as n, P as r, a0 as o, L as l, Z as p, q as c, d, j as g, V as u, S as R, U as D, v as S, M as f, i as m, k as A, Q as v, T as P, e as y, D as C, F as I, f as q, b as B, c as x, a as T, ac as b, $ as h, g as w, a1 as E, a9 as L, aa as F, a6 as U, m as O, a8 as _, l as W, a5 as Y, a4 as k, W as z, af as G, ag as J, ah as M, ad as H, ae as K, C as N, E as V, x as Z, w as j, B as Q, p as X, a7 as $, ab as ee, Y as se, r as ae, _ as te, I as ie, o as ne, X as re, s as oe, K as le, J as pe, G as ce, n as de, h as ge, t as ue, a3 as Re, a2 as De, z as Se, y as fe, u as me, H as Ae } from "../use-device-install-j1Gekpl4.mjs";
2
- import { D as Pe, D as ye } from "../device-install-dialog-CnyDWf0q.mjs";
1
+ import { A as a, O as t, N as i, R as n, P as r, a0 as o, L as l, Z as p, q as c, d, j as g, V as u, S as R, U as D, v as S, M as f, i as m, k as A, Q as v, T as P, e as y, D as C, F as I, f as q, b as B, c as x, a as T, ac as b, $ as h, g as w, a1 as E, a9 as L, aa as F, a6 as U, m as O, a8 as _, l as W, a5 as Y, a4 as k, W as z, af as G, ag as J, ah as M, ad as H, ae as K, C as N, E as V, x as Z, w as j, B as Q, p as X, a7 as $, ab as ee, Y as se, r as ae, _ as te, I as ie, o as ne, X as re, s as oe, K as le, J as pe, G as ce, n as de, h as ge, t as ue, a3 as Re, a2 as De, z as Se, y as fe, u as me, H as Ae } from "../use-device-install-H8dqqvbR.mjs";
2
+ import { D as Pe, D as ye } from "../device-install-dialog-CqxDEH85.mjs";
3
3
  export {
4
4
  a as AppleGsaSrpClient,
5
5
  Pe as DeviceInstallDialog,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CbGVvwPp.js");exports.useDeviceInstall=e.useDeviceInstall;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../use-device-install-CAPli9MR.js");exports.useDeviceInstall=e.useDeviceInstall;
@@ -1,4 +1,4 @@
1
- import { u as a } from "../use-device-install-j1Gekpl4.mjs";
1
+ import { u as a } from "../use-device-install-H8dqqvbR.mjs";
2
2
  export {
3
3
  a as useDeviceInstall
4
4
  };
@@ -1,34 +1,34 @@
1
1
  import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
- import { useState as p, useId as T, useEffect as k } from "react";
3
- import { u as D } from "./use-device-install-j1Gekpl4.mjs";
4
- import './device-install-dialog.css';function A(t) {
2
+ import { useState as p, useId as T, useEffect as D } from "react";
3
+ import { u as k } from "./use-device-install-H8dqqvbR.mjs";
4
+ import './device-install-dialog.css';function C(t) {
5
5
  var r, s, a = "";
6
6
  if (typeof t == "string" || typeof t == "number") a += t;
7
7
  else if (typeof t == "object") if (Array.isArray(t)) {
8
8
  var d = t.length;
9
- for (r = 0; r < d; r++) t[r] && (s = A(t[r])) && (a && (a += " "), a += s);
9
+ for (r = 0; r < d; r++) t[r] && (s = C(t[r])) && (a && (a += " "), a += s);
10
10
  } else for (s in t) t[s] && (a && (a += " "), a += s);
11
11
  return a;
12
12
  }
13
- function m() {
14
- for (var t, r, s = 0, a = "", d = arguments.length; s < d; s++) (t = arguments[s]) && (r = A(t)) && (a && (a += " "), a += r);
13
+ function g() {
14
+ for (var t, r, s = 0, a = "", d = arguments.length; s < d; s++) (t = arguments[s]) && (r = C(t)) && (a && (a += " "), a += r);
15
15
  return a;
16
16
  }
17
17
  const x = [
18
18
  {
19
19
  id: "signing",
20
20
  title: "Prepare signing",
21
- description: "Choose Apple ID login or upload certificates, then confirm the target developer device."
21
+ description: "Choose Apple ID login or upload certificates for a registered developer device."
22
22
  },
23
23
  {
24
- id: "connect",
25
- title: "Connect and pair",
26
- description: "Connect the iPhone with WebUSB, then pair this browser so installs can use the device."
24
+ id: "build",
25
+ title: "Build for device",
26
+ description: "Start the signed iPhone build before connecting over USB."
27
27
  },
28
28
  {
29
- id: "build",
30
- title: "Check and build",
31
- description: "Verify the device and provisioning profile are ready, then start the signed build."
29
+ id: "connect",
30
+ title: "Connect and pair",
31
+ description: "After the build succeeds, connect the iPhone with WebUSB and pair this browser."
32
32
  },
33
33
  {
34
34
  id: "install",
@@ -40,13 +40,13 @@ function $({
40
40
  disabled: t,
41
41
  ...r
42
42
  }) {
43
- const [s, a] = p(!1), [d, u] = p("signing"), [o, N] = p(), [_, w] = p(""), [b, P] = p(""), [f, I] = p(""), S = T(), e = D(r);
44
- k(() => {
45
- u(e.currentStep);
43
+ const [s, a] = p(!1), [d, h] = p("signing"), [o, N] = p(), [m, w] = p(""), [_, P] = p(""), [b, I] = p(""), y = T(), e = k(r);
44
+ D(() => {
45
+ h(e.currentStep);
46
46
  }, [e.currentStep]);
47
- const C = (c, h) => {
47
+ const S = (c, u) => {
48
48
  e.setSigningFiles({
49
- [c]: h.currentTarget.files?.[0]
49
+ [c]: u.currentTarget.files?.[0]
50
50
  });
51
51
  };
52
52
  return /* @__PURE__ */ l("div", { className: "lr-device-install", children: [
@@ -63,28 +63,28 @@ function $({
63
63
  s && /* @__PURE__ */ i("div", { className: "lr-device-install__backdrop", role: "presentation", children: /* @__PURE__ */ l(
64
64
  "section",
65
65
  {
66
- "aria-labelledby": S,
66
+ "aria-labelledby": y,
67
67
  "aria-modal": "true",
68
68
  className: "lr-device-install__dialog",
69
69
  role: "dialog",
70
70
  children: [
71
71
  /* @__PURE__ */ l("header", { className: "lr-device-install__header", children: [
72
72
  /* @__PURE__ */ l("div", { children: [
73
- /* @__PURE__ */ i("h2", { id: S, children: "Install to a real iPhone" }),
74
- /* @__PURE__ */ i("p", { children: "Prepare signing, connect and pair the device, build, then install from this browser." })
73
+ /* @__PURE__ */ i("h2", { id: y, children: "Install to a real iPhone" }),
74
+ /* @__PURE__ */ i("p", { children: "Prepare signing, build for the registered device, connect and pair, then install from this browser." })
75
75
  ] }),
76
76
  /* @__PURE__ */ i("button", { type: "button", className: "lr-device-install__icon-button", onClick: () => a(!1), children: "Close" })
77
77
  ] }),
78
78
  e.error && /* @__PURE__ */ i("div", { className: "lr-device-install__error", children: e.error }),
79
- /* @__PURE__ */ i("div", { className: "lr-device-install__steps", children: x.map((c, h) => /* @__PURE__ */ l(
80
- R,
79
+ /* @__PURE__ */ i("div", { className: "lr-device-install__steps", children: x.map((c, u) => /* @__PURE__ */ l(
80
+ B,
81
81
  {
82
- index: h + 1,
82
+ index: u + 1,
83
83
  step: c,
84
84
  active: e.currentStep === c.id,
85
85
  open: d === c.id,
86
86
  status: e.stepStatuses[c.id],
87
- onToggle: () => u(c.id),
87
+ onToggle: () => h(c.id),
88
88
  children: [
89
89
  c.id === "signing" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
90
90
  /* @__PURE__ */ l("div", { className: "lr-device-install__choice-grid", children: [
@@ -92,14 +92,14 @@ function $({
92
92
  "button",
93
93
  {
94
94
  type: "button",
95
- className: m(
95
+ className: g(
96
96
  "lr-device-install__choice",
97
97
  o === "apple-id" && "lr-device-install__choice--active"
98
98
  ),
99
99
  onClick: () => N("apple-id"),
100
100
  children: [
101
101
  /* @__PURE__ */ i("strong", { children: "Apple ID login" }),
102
- /* @__PURE__ */ i("span", { children: "Sign in, choose team, bundle ID, devices, then generate signing assets." })
102
+ /* @__PURE__ */ i("span", { children: "Sign in, choose team, bundle ID, and registered devices, then generate signing assets." })
103
103
  ]
104
104
  }
105
105
  ),
@@ -107,7 +107,7 @@ function $({
107
107
  "button",
108
108
  {
109
109
  type: "button",
110
- className: m(
110
+ className: g(
111
111
  "lr-device-install__choice",
112
112
  o === "upload" && "lr-device-install__choice--active"
113
113
  ),
@@ -129,7 +129,7 @@ function $({
129
129
  type: "email",
130
130
  autoComplete: "username",
131
131
  placeholder: "name@example.com",
132
- value: _,
132
+ value: m,
133
133
  onChange: (n) => w(n.currentTarget.value)
134
134
  }
135
135
  )
@@ -142,7 +142,7 @@ function $({
142
142
  type: "password",
143
143
  autoComplete: "current-password",
144
144
  placeholder: "Password stays in this browser",
145
- value: b,
145
+ value: _,
146
146
  onChange: (n) => P(n.currentTarget.value)
147
147
  }
148
148
  )
@@ -165,10 +165,10 @@ function $({
165
165
  {
166
166
  type: "button",
167
167
  className: "lr-device-install__secondary",
168
- disabled: t || !r.apiUrl || !_ || !b || e.busyAction === "signing",
168
+ disabled: t || !r.apiUrl || !m || !_ || e.busyAction === "signing",
169
169
  onClick: () => void e.startAppleIDLogin({
170
- accountName: _,
171
- password: b
170
+ accountName: m,
171
+ password: _
172
172
  }),
173
173
  children: e.appleSigningStatus === "authenticating" ? "Signing in..." : "Sign in with Apple ID"
174
174
  }
@@ -187,7 +187,7 @@ function $({
187
187
  type: "text",
188
188
  inputMode: "numeric",
189
189
  autoComplete: "one-time-code",
190
- value: f,
190
+ value: b,
191
191
  onChange: (n) => I(n.currentTarget.value)
192
192
  }
193
193
  )
@@ -197,8 +197,8 @@ function $({
197
197
  {
198
198
  type: "button",
199
199
  className: "lr-device-install__secondary",
200
- disabled: !f || e.busyAction === "signing",
201
- onClick: () => void e.submitAppleTwoFactorCode(f),
200
+ disabled: !b || e.busyAction === "signing",
201
+ onClick: () => void e.submitAppleTwoFactorCode(b),
202
202
  children: "Submit Apple ID code"
203
203
  }
204
204
  )
@@ -210,13 +210,13 @@ function $({
210
210
  {
211
211
  value: e.selectedAppleTeamID ?? "",
212
212
  onChange: (n) => e.setSelectedAppleTeamID(n.currentTarget.value || void 0),
213
- children: e.appleTeams.map((n, y) => {
213
+ children: e.appleTeams.map((n, f) => {
214
214
  const v = n.teamId ?? (n.providerId === void 0 ? void 0 : String(n.providerId)) ?? n.publicProviderId ?? "";
215
215
  return /* @__PURE__ */ l("option", { value: v, children: [
216
216
  n.name ?? "Apple Developer Team",
217
217
  " ",
218
218
  v ? `(${v})` : ""
219
- ] }, `${v}-${y}`);
219
+ ] }, `${v}-${f}`);
220
220
  })
221
221
  }
222
222
  )
@@ -229,7 +229,7 @@ function $({
229
229
  multiple: !0,
230
230
  value: e.selectedAppleDeviceIDs,
231
231
  onChange: (n) => e.setSelectedAppleDeviceIDs(
232
- Array.from(n.currentTarget.selectedOptions).map((y) => y.value)
232
+ Array.from(n.currentTarget.selectedOptions).map((f) => f.value)
233
233
  ),
234
234
  children: e.appleDevices.map((n) => /* @__PURE__ */ l(
235
235
  "option",
@@ -275,7 +275,7 @@ function $({
275
275
  {
276
276
  type: "file",
277
277
  accept: ".p12,application/x-pkcs12",
278
- onChange: (n) => C("certificateFile", n)
278
+ onChange: (n) => S("certificateFile", n)
279
279
  }
280
280
  )
281
281
  ] }),
@@ -286,7 +286,7 @@ function $({
286
286
  {
287
287
  type: "file",
288
288
  accept: ".mobileprovision",
289
- onChange: (n) => C("provisioningProfileFile", n)
289
+ onChange: (n) => S("provisioningProfileFile", n)
290
290
  }
291
291
  )
292
292
  ] }),
@@ -302,12 +302,12 @@ function $({
302
302
  )
303
303
  ] })
304
304
  ] }),
305
- /* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "The provisioning profile will be checked against the connected iPhone before the build starts." })
305
+ /* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "The provisioning profile will be checked against the connected iPhone before installation." })
306
306
  ] }),
307
307
  e.hasSigningAssets && /* @__PURE__ */ i("p", { children: "Signing assets are stored in this browser for the selected bundle and device." })
308
308
  ] }),
309
309
  c.id === "connect" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
310
- /* @__PURE__ */ i("p", { children: "WebUSB works in Chromium browsers on secure origins. Connect the iPhone over USB, approve the browser permission prompt, then pair this browser." }),
310
+ /* @__PURE__ */ i("p", { children: "WebUSB works in Chromium browsers on secure origins. Once the build succeeds, connect the iPhone over USB, approve the browser permission prompt, then pair this browser." }),
311
311
  /* @__PURE__ */ l("div", { className: "lr-device-install__actions", children: [
312
312
  /* @__PURE__ */ i(
313
313
  "button",
@@ -336,32 +336,13 @@ function $({
336
336
  /* @__PURE__ */ i("strong", { children: "Trust" }),
337
337
  " in the system dialog, then confirm the pair record."
338
338
  ] }),
339
- /* @__PURE__ */ i("p", { children: e.hasPairRecord ? "Pair record is stored locally. Continue to the build check." : "Pair this browser once before building and installing." })
339
+ /* @__PURE__ */ i("p", { children: e.hasPairRecord ? "Pair record is stored locally. Continue to installation." : "Pair this browser once before installing." })
340
340
  ] }),
341
341
  c.id === "build" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
342
342
  /* @__PURE__ */ l("div", { className: "lr-device-install__checklist", children: [
343
- /* @__PURE__ */ i(g, { label: "Signing assets", ready: e.hasSigningInputs, pendingText: "Ready to verify" }),
344
- /* @__PURE__ */ i(g, { label: "USB device", ready: !!e.device }),
345
- /* @__PURE__ */ i(g, { label: "Pair record", ready: e.hasPairRecord }),
346
- /* @__PURE__ */ i(
347
- g,
348
- {
349
- label: "Profile includes connected device",
350
- ready: e.connectedDeviceInProfile,
351
- pendingText: "Checked when the build starts"
352
- }
353
- )
343
+ /* @__PURE__ */ i(A, { label: "Signing assets", ready: e.hasSigningInputs }),
344
+ /* @__PURE__ */ i(A, { label: "Device build", ready: e.buildStatus === "succeeded" ? !0 : void 0, pendingText: "Not started" })
354
345
  ] }),
355
- e.device && e.appleTeams.length > 0 && !e.connectedAppleDeviceRegistered && /* @__PURE__ */ i(
356
- "button",
357
- {
358
- type: "button",
359
- className: "lr-device-install__secondary",
360
- disabled: t || !!e.busyAction,
361
- onClick: () => void e.registerConnectedAppleDevice(),
362
- children: "Register connected iPhone"
363
- }
364
- ),
365
346
  /* @__PURE__ */ i(
366
347
  "button",
367
348
  {
@@ -409,44 +390,44 @@ function $({
409
390
  )) }),
410
391
  /* @__PURE__ */ l("footer", { className: "lr-device-install__logs", children: [
411
392
  /* @__PURE__ */ i("h3", { children: "Progress" }),
412
- /* @__PURE__ */ i("ol", { children: e.logs.map((c, h) => /* @__PURE__ */ i("li", { children: c }, `${h}-${c.slice(0, 24)}`)) })
393
+ /* @__PURE__ */ i("ol", { children: e.logs.map((c, u) => /* @__PURE__ */ i("li", { children: c }, `${u}-${c.slice(0, 24)}`)) })
413
394
  ] })
414
395
  ]
415
396
  }
416
397
  ) })
417
398
  ] });
418
399
  }
419
- function R({
400
+ function B({
420
401
  index: t,
421
402
  step: r,
422
403
  active: s,
423
404
  open: a,
424
405
  status: d,
425
- onToggle: u,
406
+ onToggle: h,
426
407
  children: o
427
408
  }) {
428
- return /* @__PURE__ */ l("article", { className: m("lr-device-install__step", s && "lr-device-install__step--active"), children: [
409
+ return /* @__PURE__ */ l("article", { className: g("lr-device-install__step", s && "lr-device-install__step--active"), children: [
429
410
  /* @__PURE__ */ l(
430
411
  "button",
431
412
  {
432
413
  type: "button",
433
414
  className: "lr-device-install__step-header",
434
415
  "aria-expanded": a,
435
- onClick: u,
416
+ onClick: h,
436
417
  children: [
437
418
  /* @__PURE__ */ i("div", { className: "lr-device-install__step-number", children: t }),
438
419
  /* @__PURE__ */ l("div", { children: [
439
420
  /* @__PURE__ */ i("h3", { children: r.title }),
440
421
  /* @__PURE__ */ i("p", { children: r.description })
441
422
  ] }),
442
- /* @__PURE__ */ i("span", { className: m("lr-device-install__status", `lr-device-install__status--${d}`), children: d === "complete" ? "✓ Completed" : d })
423
+ /* @__PURE__ */ i("span", { className: g("lr-device-install__status", `lr-device-install__status--${d}`), children: d === "complete" ? "✓ Completed" : d })
443
424
  ]
444
425
  }
445
426
  ),
446
427
  a && o
447
428
  ] });
448
429
  }
449
- function g({
430
+ function A({
450
431
  label: t,
451
432
  ready: r,
452
433
  pendingText: s = "Not ready"
@@ -458,5 +439,5 @@ function g({
458
439
  }
459
440
  export {
460
441
  $ as D,
461
- m as c
442
+ g as c
462
443
  };
@@ -0,0 +1,2 @@
1
+ "use strict";require('./device-install-dialog.css');const e=require("react/jsx-runtime"),d=require("react"),w=require("./use-device-install-CAPli9MR.js");function S(l){var t,a,n="";if(typeof l=="string"||typeof l=="number")n+=l;else if(typeof l=="object")if(Array.isArray(l)){var c=l.length;for(t=0;t<c;t++)l[t]&&(a=S(l[t]))&&(n&&(n+=" "),n+=a)}else for(a in l)l[a]&&(n&&(n+=" "),n+=a);return n}function u(){for(var l,t,a=0,n="",c=arguments.length;a<c;a++)(l=arguments[a])&&(t=S(l))&&(n&&(n+=" "),n+=t);return n}const P=[{id:"signing",title:"Prepare signing",description:"Choose Apple ID login or upload certificates for a registered developer device."},{id:"build",title:"Build for device",description:"Start the signed iPhone build before connecting over USB."},{id:"connect",title:"Connect and pair",description:"After the build succeeds, connect the iPhone with WebUSB and pair this browser."},{id:"install",title:"Start installation",description:"Relay the last successful device build to the paired iPhone."}];function I({disabled:l,...t}){const[a,n]=d.useState(!1),[c,h]=d.useState("signing"),[o,b]=d.useState(),[g,y]=d.useState(""),[m,A]=d.useState(""),[x,C]=d.useState(""),j=d.useId(),i=w.useDeviceInstall(t);d.useEffect(()=>{h(i.currentStep)},[i.currentStep]);const f=(r,p)=>{i.setSigningFiles({[r]:p.currentTarget.files?.[0]})};return e.jsxs("div",{className:"lr-device-install",children:[e.jsx("button",{type:"button",className:"lr-device-install__trigger",disabled:l||!t.apiUrl,onClick:()=>n(!0),children:"Install to iPhone"}),a&&e.jsx("div",{className:"lr-device-install__backdrop",role:"presentation",children:e.jsxs("section",{"aria-labelledby":j,"aria-modal":"true",className:"lr-device-install__dialog",role:"dialog",children:[e.jsxs("header",{className:"lr-device-install__header",children:[e.jsxs("div",{children:[e.jsx("h2",{id:j,children:"Install to a real iPhone"}),e.jsx("p",{children:"Prepare signing, build for the registered device, connect and pair, then install from this browser."})]}),e.jsx("button",{type:"button",className:"lr-device-install__icon-button",onClick:()=>n(!1),children:"Close"})]}),i.error&&e.jsx("div",{className:"lr-device-install__error",children:i.error}),e.jsx("div",{className:"lr-device-install__steps",children:P.map((r,p)=>e.jsxs(T,{index:p+1,step:r,active:i.currentStep===r.id,open:c===r.id,status:i.stepStatuses[r.id],onToggle:()=>h(r.id),children:[r.id==="signing"&&e.jsxs("div",{className:"lr-device-install__step-body",children:[e.jsxs("div",{className:"lr-device-install__choice-grid",children:[e.jsxs("button",{type:"button",className:u("lr-device-install__choice",o==="apple-id"&&"lr-device-install__choice--active"),onClick:()=>b("apple-id"),children:[e.jsx("strong",{children:"Apple ID login"}),e.jsx("span",{children:"Sign in, choose team, bundle ID, and registered devices, then generate signing assets."})]}),e.jsxs("button",{type:"button",className:u("lr-device-install__choice",o==="upload"&&"lr-device-install__choice--active"),onClick:()=>b("upload"),children:[e.jsx("strong",{children:"Upload certificates"}),e.jsx("span",{children:"Use an existing .p12 certificate and provisioning profile."})]})]}),o==="apple-id"&&e.jsxs("div",{className:"lr-device-install__section-panel",children:[e.jsxs("div",{className:"lr-device-install__grid",children:[e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Apple ID"}),e.jsx("input",{type:"email",autoComplete:"username",placeholder:"name@example.com",value:g,onChange:s=>y(s.currentTarget.value)})]}),e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Apple ID password"}),e.jsx("input",{type:"password",autoComplete:"current-password",placeholder:"Password stays in this browser",value:m,onChange:s=>A(s.currentTarget.value)})]}),!i.hasReusableAppleCertificate&&e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Generated .p12 password"}),e.jsx("input",{type:"password",placeholder:"Used when exporting Apple certificate",onChange:s=>i.setSigningFiles({certificatePassword:s.currentTarget.value})})]})]}),e.jsxs("div",{className:"lr-device-install__actions",children:[e.jsx("button",{type:"button",className:"lr-device-install__secondary",disabled:l||!t.apiUrl||!g||!m||i.busyAction==="signing",onClick:()=>void i.startAppleIDLogin({accountName:g,password:m}),children:i.appleSigningStatus==="authenticating"?"Signing in...":"Sign in with Apple ID"}),e.jsxs("span",{className:"lr-device-install__hint",children:["Apple password is used only by browser-side SRP. Status: ",i.appleSigningStatus]})]}),i.appleSigningStatus==="two-factor-required"&&e.jsxs("div",{className:"lr-device-install__grid",children:[e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Two-factor code"}),e.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:x,onChange:s=>C(s.currentTarget.value)})]}),e.jsx("button",{type:"button",className:"lr-device-install__secondary",disabled:!x||i.busyAction==="signing",onClick:()=>void i.submitAppleTwoFactorCode(x),children:"Submit Apple ID code"})]}),i.appleTeams.length>0&&e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Apple Developer team"}),e.jsx("select",{value:i.selectedAppleTeamID??"",onChange:s=>i.setSelectedAppleTeamID(s.currentTarget.value||void 0),children:i.appleTeams.map((s,_)=>{const v=s.teamId??(s.providerId===void 0?void 0:String(s.providerId))??s.publicProviderId??"";return e.jsxs("option",{value:v,children:[s.name??"Apple Developer Team"," ",v?`(${v})`:""]},`${v}-${_}`)})})]}),i.appleDevices.length>0&&e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Apple Developer devices"}),e.jsx("select",{multiple:!0,value:i.selectedAppleDeviceIDs,onChange:s=>i.setSelectedAppleDeviceIDs(Array.from(s.currentTarget.selectedOptions).map(_=>_.value)),children:i.appleDevices.map(s=>e.jsxs("option",{value:s.deviceId??"",children:[s.name??s.model??"Apple device"," ",s.deviceNumber??""]},s.deviceId??s.deviceNumber))})]}),i.applePortalSummary&&e.jsxs("p",{className:"lr-device-install__hint",children:["Found ",i.applePortalSummary.certificateCount," certificates and"," ",i.applePortalSummary.profileCount," provisioning profiles."]}),i.hasReusableAppleCertificate&&e.jsx("p",{className:"lr-device-install__hint",children:"Reusing the certificate and private key stored in this browser."}),e.jsx("button",{type:"button",className:"lr-device-install__primary",disabled:l||!i.canPrepareAppleSigningAssets,onClick:()=>void i.prepareAppleSigningAssets(),children:i.appleSigningStatus==="preparing-assets"?"Preparing signing assets...":"Generate certificate and profile"})]}),o==="upload"&&e.jsxs("div",{className:"lr-device-install__section-panel",children:[e.jsxs("div",{className:"lr-device-install__grid",children:[e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Certificate (.p12)"}),e.jsx("input",{type:"file",accept:".p12,application/x-pkcs12",onChange:s=>f("certificateFile",s)})]}),e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Provisioning profile"}),e.jsx("input",{type:"file",accept:".mobileprovision",onChange:s=>f("provisioningProfileFile",s)})]}),e.jsxs("label",{className:"lr-device-install__field",children:[e.jsx("span",{children:"Uploaded .p12 password"}),e.jsx("input",{type:"password",placeholder:"Export password",onChange:s=>i.setSigningFiles({certificatePassword:s.currentTarget.value})})]})]}),e.jsx("p",{className:"lr-device-install__hint",children:"The provisioning profile will be checked against the connected iPhone before installation."})]}),i.hasSigningAssets&&e.jsx("p",{children:"Signing assets are stored in this browser for the selected bundle and device."})]}),r.id==="connect"&&e.jsxs("div",{className:"lr-device-install__step-body",children:[e.jsx("p",{children:"WebUSB works in Chromium browsers on secure origins. Once the build succeeds, connect the iPhone over USB, approve the browser permission prompt, then pair this browser."}),e.jsxs("div",{className:"lr-device-install__actions",children:[e.jsx("button",{type:"button",className:"lr-device-install__primary",disabled:l||!i.canRequestUSBAccess,onClick:()=>void i.requestUSBAccess(),children:i.busyAction==="usb"?"Selecting iPhone...":"Allow USB access"}),e.jsx("button",{type:"button",className:"lr-device-install__secondary",disabled:l||!i.canPairBrowser,onClick:()=>void i.pairBrowser(),children:i.busyAction==="pair"?"Pairing...":i.pairConfirmationRequired?"Confirm pair record":"Pair browser"})]}),i.device&&e.jsx("div",{className:"lr-device-install__device",children:`${i.device.productName??"iPhone"} ${i.device.serialNumber??""}`.trim()}),i.pairConfirmationRequired&&e.jsxs("p",{children:["Unlock the iPhone and tap ",e.jsx("strong",{children:"Trust"})," in the system dialog, then confirm the pair record."]}),e.jsx("p",{children:i.hasPairRecord?"Pair record is stored locally. Continue to installation.":"Pair this browser once before installing."})]}),r.id==="build"&&e.jsxs("div",{className:"lr-device-install__step-body",children:[e.jsxs("div",{className:"lr-device-install__checklist",children:[e.jsx(N,{label:"Signing assets",ready:i.hasSigningInputs}),e.jsx(N,{label:"Device build",ready:i.buildStatus==="succeeded"?!0:void 0,pendingText:"Not started"})]}),e.jsx("button",{type:"button",className:"lr-device-install__primary",disabled:l||!i.canBuild,onClick:()=>void i.startDeviceBuild(),children:i.busyAction==="build"?"Starting build...":"Start device build"}),e.jsxs("details",{className:"lr-device-install__build-logs",open:i.buildLogPanelOpen,onToggle:s=>i.setBuildLogPanelOpen(s.currentTarget.open),children:[e.jsxs("summary",{children:["Build logs (",i.buildStatus,")"]}),e.jsx("pre",{children:i.buildLogs.length>0?i.buildLogs.filter(s=>s.type!=="meta").map(s=>s.data).join(`
2
+ `):"Build logs will appear here while the device build is running."})]})]}),r.id==="install"&&e.jsxs("div",{className:"lr-device-install__step-body",children:[e.jsx("button",{type:"button",className:"lr-device-install__primary",disabled:l||!i.canInstall,onClick:()=>void i.startInstallation(),children:i.busyAction==="install"?"Installing...":"Install last build"}),e.jsx("button",{type:"button",className:"lr-device-install__secondary",onClick:i.stopRelay,children:"Stop relay"})]})]},r.id))}),e.jsxs("footer",{className:"lr-device-install__logs",children:[e.jsx("h3",{children:"Progress"}),e.jsx("ol",{children:i.logs.map((r,p)=>e.jsx("li",{children:r},`${p}-${r.slice(0,24)}`))})]})]})})]})}function T({index:l,step:t,active:a,open:n,status:c,onToggle:h,children:o}){return e.jsxs("article",{className:u("lr-device-install__step",a&&"lr-device-install__step--active"),children:[e.jsxs("button",{type:"button",className:"lr-device-install__step-header","aria-expanded":n,onClick:h,children:[e.jsx("div",{className:"lr-device-install__step-number",children:l}),e.jsxs("div",{children:[e.jsx("h3",{children:t.title}),e.jsx("p",{children:t.description})]}),e.jsx("span",{className:u("lr-device-install__status",`lr-device-install__status--${c}`),children:c==="complete"?"✓ Completed":c})]}),n&&o]})}function N({label:l,ready:t,pendingText:a="Not ready"}){const n=t===void 0?a:t?"Ready":"Needs attention";return e.jsxs("div",{className:"lr-device-install__check-row",children:[e.jsx("span",{children:l}),e.jsx("strong",{children:n})]})}exports.DeviceInstallDialog=I;exports.clsx=u;