@limrun/ui 0.9.0-rc.8 → 0.13.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +25 -8
  2. package/dist/app-store-relay/index.cjs +9 -0
  3. package/dist/app-store-relay/index.d.ts +102 -0
  4. package/dist/app-store-relay/index.js +430 -0
  5. package/dist/app-store-relay/react.cjs +1 -0
  6. package/dist/app-store-relay/react.d.ts +15 -0
  7. package/dist/app-store-relay/react.js +65 -0
  8. package/dist/browser-storage-BJ__DGJ6.mjs +202 -0
  9. package/dist/browser-storage-C1jQLXat.js +1 -0
  10. package/dist/client-Bk1N3XIF.mjs +228 -0
  11. package/dist/client-CnbCWvCs.js +1 -0
  12. package/dist/components/device-install/index.d.ts +1 -2
  13. package/dist/core/device-install/apple/provisioning.d.ts +55 -4
  14. package/dist/core/device-install/operations/limbuild-client.d.ts +15 -1
  15. package/dist/core/device-install/storage/browser-storage.d.ts +9 -5
  16. package/dist/core/device-install/types.d.ts +4 -1
  17. package/dist/device-build/index.cjs +1 -0
  18. package/dist/device-build/index.d.ts +4 -0
  19. package/dist/device-build/index.js +84 -0
  20. package/dist/device-build/react.cjs +1 -0
  21. package/dist/device-build/react.d.ts +20 -0
  22. package/dist/device-build/react.js +66 -0
  23. package/dist/device-build/signing.d.ts +20 -0
  24. package/dist/device-install/index.cjs +1 -1
  25. package/dist/device-install/index.d.ts +18 -3
  26. package/dist/device-install/index.js +570 -76
  27. package/dist/device-install/react.cjs +1 -1
  28. package/dist/device-install/react.d.ts +23 -1
  29. package/dist/device-install/react.js +93 -2
  30. package/dist/hooks/index.d.ts +1 -1
  31. package/dist/index-BXg7HdIs.mjs +11547 -0
  32. package/dist/index-CMeQfhYy.js +22 -0
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.d.ts +0 -2
  35. package/dist/index.js +502 -495
  36. package/dist/limbuild-client-CFJhYsRx.mjs +79 -0
  37. package/dist/limbuild-client-C_CMNLYV.js +1 -0
  38. package/dist/provisioning-CdseoMJQ.mjs +239 -0
  39. package/dist/provisioning-D2ZZQeyX.js +1 -0
  40. package/package.json +21 -1
  41. package/src/app-store-relay/index.test.ts +74 -0
  42. package/src/app-store-relay/index.ts +447 -0
  43. package/src/app-store-relay/react.ts +125 -0
  44. package/src/components/device-install/index.ts +1 -2
  45. package/src/core/device-install/apple/provisioning.test.ts +84 -0
  46. package/src/core/device-install/apple/provisioning.ts +91 -7
  47. package/src/core/device-install/operations/limbuild-client.ts +32 -2
  48. package/src/core/device-install/storage/browser-storage.ts +29 -14
  49. package/src/core/device-install/types.ts +5 -1
  50. package/src/device-build/index.ts +42 -0
  51. package/src/device-build/react.ts +128 -0
  52. package/src/device-build/signing.ts +94 -0
  53. package/src/device-install/index.ts +49 -3
  54. package/src/device-install/react.ts +180 -1
  55. package/src/hooks/index.ts +1 -1
  56. package/src/index.ts +1 -4
  57. package/vite.config.ts +4 -0
  58. package/dist/components/device-install/device-install-dialog.d.ts +0 -5
  59. package/dist/device-install-dialog-DGn2ZdBB.js +0 -2
  60. package/dist/device-install-dialog-DgWsZF6o.mjs +0 -443
  61. package/dist/device-install-dialog.css +0 -1
  62. package/dist/hooks/use-device-install.d.ts +0 -73
  63. package/dist/use-device-install-ByUSmeYz.js +0 -31
  64. package/dist/use-device-install-Y42p84we.mjs +0 -13624
  65. package/src/components/device-install/device-install-dialog.css +0 -325
  66. package/src/components/device-install/device-install-dialog.tsx +0 -495
  67. package/src/hooks/use-device-install.ts +0 -1219
@@ -1,443 +0,0 @@
1
- import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
- import { useState as p, useId as T, useEffect as D } from "react";
3
- import { u as k } from "./use-device-install-Y42p84we.mjs";
4
- import './device-install-dialog.css';function C(t) {
5
- var r, s, a = "";
6
- if (typeof t == "string" || typeof t == "number") a += t;
7
- else if (typeof t == "object") if (Array.isArray(t)) {
8
- var d = t.length;
9
- for (r = 0; r < d; r++) t[r] && (s = C(t[r])) && (a && (a += " "), a += s);
10
- } else for (s in t) t[s] && (a && (a += " "), a += s);
11
- return a;
12
- }
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
- return a;
16
- }
17
- const x = [
18
- {
19
- id: "signing",
20
- title: "Prepare signing",
21
- description: "Choose Apple ID login or upload certificates for a registered developer device."
22
- },
23
- {
24
- id: "build",
25
- title: "Build for device",
26
- description: "Start the signed iPhone build before connecting over USB."
27
- },
28
- {
29
- id: "connect",
30
- title: "Connect and pair",
31
- description: "After the build succeeds, connect the iPhone with WebUSB and pair this browser."
32
- },
33
- {
34
- id: "install",
35
- title: "Start installation",
36
- description: "Relay the last successful device build to the paired iPhone."
37
- }
38
- ];
39
- function $({
40
- disabled: t,
41
- ...r
42
- }) {
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
- }, [e.currentStep]);
47
- const S = (c, u) => {
48
- e.setSigningFiles({
49
- [c]: u.currentTarget.files?.[0]
50
- });
51
- };
52
- return /* @__PURE__ */ l("div", { className: "lr-device-install", children: [
53
- /* @__PURE__ */ i(
54
- "button",
55
- {
56
- type: "button",
57
- className: "lr-device-install__trigger",
58
- disabled: t || !r.apiUrl,
59
- onClick: () => a(!0),
60
- children: "Install to iPhone"
61
- }
62
- ),
63
- s && /* @__PURE__ */ i("div", { className: "lr-device-install__backdrop", role: "presentation", children: /* @__PURE__ */ l(
64
- "section",
65
- {
66
- "aria-labelledby": y,
67
- "aria-modal": "true",
68
- className: "lr-device-install__dialog",
69
- role: "dialog",
70
- children: [
71
- /* @__PURE__ */ l("header", { className: "lr-device-install__header", children: [
72
- /* @__PURE__ */ l("div", { children: [
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
- ] }),
76
- /* @__PURE__ */ i("button", { type: "button", className: "lr-device-install__icon-button", onClick: () => a(!1), children: "Close" })
77
- ] }),
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, u) => /* @__PURE__ */ l(
80
- B,
81
- {
82
- index: u + 1,
83
- step: c,
84
- active: e.currentStep === c.id,
85
- open: d === c.id,
86
- status: e.stepStatuses[c.id],
87
- onToggle: () => h(c.id),
88
- children: [
89
- c.id === "signing" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
90
- /* @__PURE__ */ l("div", { className: "lr-device-install__choice-grid", children: [
91
- /* @__PURE__ */ l(
92
- "button",
93
- {
94
- type: "button",
95
- className: g(
96
- "lr-device-install__choice",
97
- o === "apple-id" && "lr-device-install__choice--active"
98
- ),
99
- onClick: () => N("apple-id"),
100
- children: [
101
- /* @__PURE__ */ i("strong", { children: "Apple ID login" }),
102
- /* @__PURE__ */ i("span", { children: "Sign in, choose team, bundle ID, and registered devices, then generate signing assets." })
103
- ]
104
- }
105
- ),
106
- /* @__PURE__ */ l(
107
- "button",
108
- {
109
- type: "button",
110
- className: g(
111
- "lr-device-install__choice",
112
- o === "upload" && "lr-device-install__choice--active"
113
- ),
114
- onClick: () => N("upload"),
115
- children: [
116
- /* @__PURE__ */ i("strong", { children: "Upload certificates" }),
117
- /* @__PURE__ */ i("span", { children: "Use an existing .p12 certificate and provisioning profile." })
118
- ]
119
- }
120
- )
121
- ] }),
122
- o === "apple-id" && /* @__PURE__ */ l("div", { className: "lr-device-install__section-panel", children: [
123
- /* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
124
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
125
- /* @__PURE__ */ i("span", { children: "Apple ID" }),
126
- /* @__PURE__ */ i(
127
- "input",
128
- {
129
- type: "email",
130
- autoComplete: "username",
131
- placeholder: "name@example.com",
132
- value: m,
133
- onChange: (n) => w(n.currentTarget.value)
134
- }
135
- )
136
- ] }),
137
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
138
- /* @__PURE__ */ i("span", { children: "Apple ID password" }),
139
- /* @__PURE__ */ i(
140
- "input",
141
- {
142
- type: "password",
143
- autoComplete: "current-password",
144
- placeholder: "Password stays in this browser",
145
- value: _,
146
- onChange: (n) => P(n.currentTarget.value)
147
- }
148
- )
149
- ] }),
150
- !e.hasReusableAppleCertificate && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
151
- /* @__PURE__ */ i("span", { children: "Generated .p12 password" }),
152
- /* @__PURE__ */ i(
153
- "input",
154
- {
155
- type: "password",
156
- placeholder: "Used when exporting Apple certificate",
157
- onChange: (n) => e.setSigningFiles({ certificatePassword: n.currentTarget.value })
158
- }
159
- )
160
- ] })
161
- ] }),
162
- /* @__PURE__ */ l("div", { className: "lr-device-install__actions", children: [
163
- /* @__PURE__ */ i(
164
- "button",
165
- {
166
- type: "button",
167
- className: "lr-device-install__secondary",
168
- disabled: t || !r.apiUrl || !m || !_ || e.busyAction === "signing",
169
- onClick: () => void e.startAppleIDLogin({
170
- accountName: m,
171
- password: _
172
- }),
173
- children: e.appleSigningStatus === "authenticating" ? "Signing in..." : "Sign in with Apple ID"
174
- }
175
- ),
176
- /* @__PURE__ */ l("span", { className: "lr-device-install__hint", children: [
177
- "Apple password is used only by browser-side SRP. Status: ",
178
- e.appleSigningStatus
179
- ] })
180
- ] }),
181
- e.appleSigningStatus === "two-factor-required" && /* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
182
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
183
- /* @__PURE__ */ i("span", { children: "Two-factor code" }),
184
- /* @__PURE__ */ i(
185
- "input",
186
- {
187
- type: "text",
188
- inputMode: "numeric",
189
- autoComplete: "one-time-code",
190
- value: b,
191
- onChange: (n) => I(n.currentTarget.value)
192
- }
193
- )
194
- ] }),
195
- /* @__PURE__ */ i(
196
- "button",
197
- {
198
- type: "button",
199
- className: "lr-device-install__secondary",
200
- disabled: !b || e.busyAction === "signing",
201
- onClick: () => void e.submitAppleTwoFactorCode(b),
202
- children: "Submit Apple ID code"
203
- }
204
- )
205
- ] }),
206
- e.appleTeams.length > 0 && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
207
- /* @__PURE__ */ i("span", { children: "Apple Developer team" }),
208
- /* @__PURE__ */ i(
209
- "select",
210
- {
211
- value: e.selectedAppleTeamID ?? "",
212
- onChange: (n) => e.setSelectedAppleTeamID(n.currentTarget.value || void 0),
213
- children: e.appleTeams.map((n, f) => {
214
- const v = n.teamId ?? (n.providerId === void 0 ? void 0 : String(n.providerId)) ?? n.publicProviderId ?? "";
215
- return /* @__PURE__ */ l("option", { value: v, children: [
216
- n.name ?? "Apple Developer Team",
217
- " ",
218
- v ? `(${v})` : ""
219
- ] }, `${v}-${f}`);
220
- })
221
- }
222
- )
223
- ] }),
224
- e.appleDevices.length > 0 && /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
225
- /* @__PURE__ */ i("span", { children: "Apple Developer devices" }),
226
- /* @__PURE__ */ i(
227
- "select",
228
- {
229
- multiple: !0,
230
- value: e.selectedAppleDeviceIDs,
231
- onChange: (n) => e.setSelectedAppleDeviceIDs(
232
- Array.from(n.currentTarget.selectedOptions).map((f) => f.value)
233
- ),
234
- children: e.appleDevices.map((n) => /* @__PURE__ */ l(
235
- "option",
236
- {
237
- value: n.deviceId ?? "",
238
- children: [
239
- n.name ?? n.model ?? "Apple device",
240
- " ",
241
- n.deviceNumber ?? ""
242
- ]
243
- },
244
- n.deviceId ?? n.deviceNumber
245
- ))
246
- }
247
- )
248
- ] }),
249
- e.applePortalSummary && /* @__PURE__ */ l("p", { className: "lr-device-install__hint", children: [
250
- "Found ",
251
- e.applePortalSummary.certificateCount,
252
- " certificates and",
253
- " ",
254
- e.applePortalSummary.profileCount,
255
- " provisioning profiles."
256
- ] }),
257
- e.hasReusableAppleCertificate && /* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "Reusing the certificate and private key stored in this browser." }),
258
- /* @__PURE__ */ i(
259
- "button",
260
- {
261
- type: "button",
262
- className: "lr-device-install__primary",
263
- disabled: t || !e.canPrepareAppleSigningAssets,
264
- onClick: () => void e.prepareAppleSigningAssets(),
265
- children: e.appleSigningStatus === "preparing-assets" ? "Preparing signing assets..." : "Generate certificate and profile"
266
- }
267
- )
268
- ] }),
269
- o === "upload" && /* @__PURE__ */ l("div", { className: "lr-device-install__section-panel", children: [
270
- /* @__PURE__ */ l("div", { className: "lr-device-install__grid", children: [
271
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
272
- /* @__PURE__ */ i("span", { children: "Certificate (.p12)" }),
273
- /* @__PURE__ */ i(
274
- "input",
275
- {
276
- type: "file",
277
- accept: ".p12,application/x-pkcs12",
278
- onChange: (n) => S("certificateFile", n)
279
- }
280
- )
281
- ] }),
282
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
283
- /* @__PURE__ */ i("span", { children: "Provisioning profile" }),
284
- /* @__PURE__ */ i(
285
- "input",
286
- {
287
- type: "file",
288
- accept: ".mobileprovision",
289
- onChange: (n) => S("provisioningProfileFile", n)
290
- }
291
- )
292
- ] }),
293
- /* @__PURE__ */ l("label", { className: "lr-device-install__field", children: [
294
- /* @__PURE__ */ i("span", { children: "Uploaded .p12 password" }),
295
- /* @__PURE__ */ i(
296
- "input",
297
- {
298
- type: "password",
299
- placeholder: "Export password",
300
- onChange: (n) => e.setSigningFiles({ certificatePassword: n.currentTarget.value })
301
- }
302
- )
303
- ] })
304
- ] }),
305
- /* @__PURE__ */ i("p", { className: "lr-device-install__hint", children: "The provisioning profile will be checked against the connected iPhone before installation." })
306
- ] }),
307
- e.hasSigningAssets && /* @__PURE__ */ i("p", { children: "Signing assets are stored in this browser for the selected bundle and device." })
308
- ] }),
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. Once the build succeeds, connect the iPhone over USB, approve the browser permission prompt, then pair this browser." }),
311
- /* @__PURE__ */ l("div", { className: "lr-device-install__actions", children: [
312
- /* @__PURE__ */ i(
313
- "button",
314
- {
315
- type: "button",
316
- className: "lr-device-install__primary",
317
- disabled: t || !e.canRequestUSBAccess,
318
- onClick: () => void e.requestUSBAccess(),
319
- children: e.busyAction === "usb" ? "Selecting iPhone..." : "Allow USB access"
320
- }
321
- ),
322
- /* @__PURE__ */ i(
323
- "button",
324
- {
325
- type: "button",
326
- className: "lr-device-install__secondary",
327
- disabled: t || !e.canPairBrowser,
328
- onClick: () => void e.pairBrowser(),
329
- children: e.busyAction === "pair" ? "Pairing..." : e.pairConfirmationRequired ? "Confirm pair record" : "Pair browser"
330
- }
331
- )
332
- ] }),
333
- e.device && /* @__PURE__ */ i("div", { className: "lr-device-install__device", children: `${e.device.productName ?? "iPhone"} ${e.device.serialNumber ?? ""}`.trim() }),
334
- e.pairConfirmationRequired && /* @__PURE__ */ l("p", { children: [
335
- "Unlock the iPhone and tap ",
336
- /* @__PURE__ */ i("strong", { children: "Trust" }),
337
- " in the system dialog, then confirm the pair record."
338
- ] }),
339
- /* @__PURE__ */ i("p", { children: e.hasPairRecord ? "Pair record is stored locally. Continue to installation." : "Pair this browser once before installing." })
340
- ] }),
341
- c.id === "build" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
342
- /* @__PURE__ */ l("div", { className: "lr-device-install__checklist", children: [
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" })
345
- ] }),
346
- /* @__PURE__ */ i(
347
- "button",
348
- {
349
- type: "button",
350
- className: "lr-device-install__primary",
351
- disabled: t || !e.canBuild,
352
- onClick: () => void e.startDeviceBuild(),
353
- children: e.busyAction === "build" ? "Starting build..." : "Start device build"
354
- }
355
- ),
356
- /* @__PURE__ */ l(
357
- "details",
358
- {
359
- className: "lr-device-install__build-logs",
360
- open: e.buildLogPanelOpen,
361
- onToggle: (n) => e.setBuildLogPanelOpen(n.currentTarget.open),
362
- children: [
363
- /* @__PURE__ */ l("summary", { children: [
364
- "Build logs (",
365
- e.buildStatus,
366
- ")"
367
- ] }),
368
- /* @__PURE__ */ i("pre", { children: e.buildLogs.length > 0 ? e.buildLogs.filter((n) => n.type !== "meta").map((n) => n.data).join(`
369
- `) : "Build logs will appear here while the device build is running." })
370
- ]
371
- }
372
- )
373
- ] }),
374
- c.id === "install" && /* @__PURE__ */ l("div", { className: "lr-device-install__step-body", children: [
375
- /* @__PURE__ */ i(
376
- "button",
377
- {
378
- type: "button",
379
- className: "lr-device-install__primary",
380
- disabled: t || !e.canInstall,
381
- onClick: () => void e.startInstallation(),
382
- children: e.busyAction === "install" ? "Installing..." : "Install last build"
383
- }
384
- ),
385
- /* @__PURE__ */ i("button", { type: "button", className: "lr-device-install__secondary", onClick: e.stopRelay, children: "Stop relay" })
386
- ] })
387
- ]
388
- },
389
- c.id
390
- )) }),
391
- /* @__PURE__ */ l("footer", { className: "lr-device-install__logs", children: [
392
- /* @__PURE__ */ i("h3", { children: "Progress" }),
393
- /* @__PURE__ */ i("ol", { children: e.logs.map((c, u) => /* @__PURE__ */ i("li", { children: c }, `${u}-${c.slice(0, 24)}`)) })
394
- ] })
395
- ]
396
- }
397
- ) })
398
- ] });
399
- }
400
- function B({
401
- index: t,
402
- step: r,
403
- active: s,
404
- open: a,
405
- status: d,
406
- onToggle: h,
407
- children: o
408
- }) {
409
- return /* @__PURE__ */ l("article", { className: g("lr-device-install__step", s && "lr-device-install__step--active"), children: [
410
- /* @__PURE__ */ l(
411
- "button",
412
- {
413
- type: "button",
414
- className: "lr-device-install__step-header",
415
- "aria-expanded": a,
416
- onClick: h,
417
- children: [
418
- /* @__PURE__ */ i("div", { className: "lr-device-install__step-number", children: t }),
419
- /* @__PURE__ */ l("div", { children: [
420
- /* @__PURE__ */ i("h3", { children: r.title }),
421
- /* @__PURE__ */ i("p", { children: r.description })
422
- ] }),
423
- /* @__PURE__ */ i("span", { className: g("lr-device-install__status", `lr-device-install__status--${d}`), children: d === "complete" ? "✓ Completed" : d })
424
- ]
425
- }
426
- ),
427
- a && o
428
- ] });
429
- }
430
- function A({
431
- label: t,
432
- ready: r,
433
- pendingText: s = "Not ready"
434
- }) {
435
- return /* @__PURE__ */ l("div", { className: "lr-device-install__check-row", children: [
436
- /* @__PURE__ */ i("span", { children: t }),
437
- /* @__PURE__ */ i("strong", { children: r === void 0 ? s : r ? "Ready" : "Needs attention" })
438
- ] });
439
- }
440
- export {
441
- $ as D,
442
- g as c
443
- };
@@ -1 +0,0 @@
1
- .lr-device-install{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.lr-device-install__trigger,.lr-device-install__primary,.lr-device-install__secondary,.lr-device-install__icon-button{border:1px solid #d1d5db;border-radius:8px;cursor:pointer;font:inherit}.lr-device-install__trigger,.lr-device-install__primary{background:#111827;color:#fff;padding:8px 12px}.lr-device-install__secondary,.lr-device-install__icon-button{background:#fff;color:#111827;padding:8px 12px}.lr-device-install__trigger:disabled,.lr-device-install__primary:disabled,.lr-device-install__secondary:disabled{cursor:not-allowed;opacity:.55}.lr-device-install__backdrop{align-items:center;background:#1118278c;display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:50}.lr-device-install__dialog{background:#fff;border-radius:16px;box-shadow:0 24px 80px #0f172a47;color:#111827;max-height:min(90vh,900px);max-width:880px;overflow:auto;padding:24px;width:100%}.lr-device-install__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between;margin-bottom:18px}.lr-device-install__header h2,.lr-device-install__step h3,.lr-device-install__logs h3{margin:0}.lr-device-install__header p,.lr-device-install__step p,.lr-device-install__logs{color:#4b5563}.lr-device-install__error{background:#fef2f2;border:1px solid #fecaca;border-radius:10px;color:#991b1b;margin-bottom:14px;padding:10px 12px}.lr-device-install__steps{display:grid;gap:12px}.lr-device-install__step{border:1px solid #e5e7eb;border-radius:12px;padding:14px}.lr-device-install__step--active{border-color:#111827}.lr-device-install__step-header{align-items:flex-start;background:transparent;border:0;color:inherit;cursor:pointer;display:grid;gap:12px;grid-template-columns:auto 1fr auto;padding:0;text-align:left;width:100%}.lr-device-install__step-number{align-items:center;background:#111827;border-radius:999px;color:#fff;display:flex;font-size:13px;font-weight:700;height:28px;justify-content:center;width:28px}.lr-device-install__status{border-radius:999px;font-size:12px;padding:3px 8px;text-transform:capitalize}.lr-device-install__status--idle{background:#f3f4f6;color:#4b5563}.lr-device-install__status--active{background:#dbeafe;color:#1d4ed8}.lr-device-install__status--complete{background:#dcfce7;color:#166534}.lr-device-install__status--error{background:#fee2e2;color:#991b1b}.lr-device-install__step-body{display:grid;gap:12px;margin-top:12px}.lr-device-install__choice-grid{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}.lr-device-install__choice{background:#fff;border:1px solid #d1d5db;border-radius:10px;color:inherit;cursor:pointer;display:grid;gap:6px;padding:12px;text-align:left}.lr-device-install__choice span{color:#4b5563;font-size:13px}.lr-device-install__choice--active{border-color:#111827;box-shadow:0 0 0 1px #111827}.lr-device-install__section-panel{border:1px solid #e5e7eb;border-radius:12px;display:grid;gap:12px;padding:12px}.lr-device-install__grid{display:grid;gap:10px;grid-template-columns:repeat(3,minmax(0,1fr))}.lr-device-install__field{display:grid;gap:6px}.lr-device-install__field span{color:#374151;font-size:13px;font-weight:600}.lr-device-install__field input,.lr-device-install__field select{border:1px solid #d1d5db;border-radius:8px;font:inherit;padding:8px 10px}.lr-device-install__actions{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.lr-device-install__hint{color:#6b7280;font-size:13px}.lr-device-install__checklist{border:1px solid #e5e7eb;border-radius:10px;display:grid;overflow:hidden}.lr-device-install__check-row{align-items:center;display:flex;gap:12px;justify-content:space-between;padding:10px 12px}.lr-device-install__check-row+.lr-device-install__check-row{border-top:1px solid #e5e7eb}.lr-device-install__check-row strong{color:#111827;font-size:13px}.lr-device-install__build-logs{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden}.lr-device-install__build-logs summary{cursor:pointer;font-weight:600;padding:10px 12px}.lr-device-install__build-logs pre{background:#0f172a;color:#e5e7eb;margin:0;max-height:240px;overflow:auto;padding:12px;white-space:pre-wrap}.lr-device-install__device{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:10px}.lr-device-install__logs{border-top:1px solid #e5e7eb;margin-top:18px;padding-top:14px}.lr-device-install__logs ol{display:grid;gap:6px;list-style:none;margin:8px 0 0;max-height:160px;overflow:auto;padding:0}.lr-device-install__logs li{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:12px;white-space:pre-wrap}@media (max-width: 760px){.lr-device-install__choice-grid,.lr-device-install__grid{grid-template-columns:1fr}.lr-device-install__step-header{grid-template-columns:auto 1fr}.lr-device-install__status{grid-column:2}}
@@ -1,73 +0,0 @@
1
- import { AppleDeveloperPortalDevice, AppleDeveloperPortalAppID, AppleDeveloperPortalTeam, BuildLogLine, DeviceInstallBuildStatus, DeviceInstallBusyAction, DeviceInstallStep, DeviceInstallStepStatus } from '../core/device-install';
2
- type DeviceInstallStepStatuses = Record<DeviceInstallStep, DeviceInstallStepStatus>;
3
- export type UseDeviceInstallOptions = {
4
- apiUrl?: string;
5
- token?: string;
6
- };
7
- export type UseDeviceInstallResult = {
8
- currentStep: DeviceInstallStep;
9
- stepStatuses: DeviceInstallStepStatuses;
10
- device?: DeviceInstallDevice;
11
- hasPairRecord: boolean;
12
- hasSigningAssets: boolean;
13
- hasSigningInputs: boolean;
14
- pairConfirmationRequired: boolean;
15
- logs: string[];
16
- buildLogs: BuildLogLine[];
17
- buildStatus: DeviceInstallBuildStatus;
18
- appleSigningStatus: DeviceInstallAppleSigningStatus;
19
- appleTeams: AppleDeveloperPortalTeam[];
20
- appleDevices: AppleDeveloperPortalDevice[];
21
- appleAppIDs: AppleDeveloperPortalAppID[];
22
- applePortalSummary?: ApplePortalSummary;
23
- selectedAppleTeamID?: string;
24
- selectedAppleDeviceIDs: string[];
25
- connectedAppleDeviceRegistered: boolean;
26
- connectedDeviceInProfile?: boolean;
27
- hasReusableAppleCertificate: boolean;
28
- appleBundleID: string;
29
- buildLogPanelOpen: boolean;
30
- busyAction?: DeviceInstallBusyAction;
31
- error?: string;
32
- canBuild: boolean;
33
- canPrepareAppleSigningAssets: boolean;
34
- canRequestUSBAccess: boolean;
35
- canPairBrowser: boolean;
36
- canInstall: boolean;
37
- setSigningFiles: (files: DeviceInstallSigningFiles) => void;
38
- setAppleBundleID: (bundleID: string) => void;
39
- setSelectedAppleDeviceIDs: (deviceIDs: string[]) => void;
40
- setBuildLogPanelOpen: (open: boolean) => void;
41
- startAppleIDLogin: (input: DeviceInstallAppleIDLoginInput) => Promise<void>;
42
- submitAppleTwoFactorCode: (code: string) => Promise<void>;
43
- setSelectedAppleTeamID: (teamID: string | undefined) => void;
44
- clearAppleIDLogin: () => void;
45
- registerConnectedAppleDevice: () => Promise<void>;
46
- prepareAppleSigningAssets: () => Promise<void>;
47
- startDeviceBuild: () => Promise<void>;
48
- requestUSBAccess: () => Promise<void>;
49
- pairBrowser: () => Promise<void>;
50
- startInstallation: () => Promise<void>;
51
- stopRelay: () => void;
52
- };
53
- export type DeviceInstallAppleSigningStatus = 'idle' | 'authenticating' | 'two-factor-required' | 'authenticated' | 'preparing-assets' | 'assets-ready' | 'using-cached-profile' | 'error';
54
- export type DeviceInstallDevice = {
55
- serialNumber?: string;
56
- productName?: string;
57
- manufacturerName?: string;
58
- };
59
- export type DeviceInstallSigningFiles = {
60
- certificateFile?: File;
61
- provisioningProfileFile?: File;
62
- certificatePassword?: string;
63
- };
64
- export type DeviceInstallAppleIDLoginInput = {
65
- accountName: string;
66
- password: string;
67
- };
68
- export type ApplePortalSummary = {
69
- certificateCount: number;
70
- profileCount: number;
71
- };
72
- export declare function useDeviceInstall({ apiUrl, token, }: UseDeviceInstallOptions): UseDeviceInstallResult;
73
- export {};