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

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 (73) hide show
  1. package/README.md +9 -0
  2. package/dist/components/device-install/device-install-dialog.d.ts +5 -0
  3. package/dist/components/device-install/index.d.ts +2 -0
  4. package/dist/components/inspect-overlay.d.ts +1 -0
  5. package/dist/components/remote-control.d.ts +13 -2
  6. package/dist/core/ax-tree.d.ts +2 -0
  7. package/dist/core/device-install/apple/client.d.ts +17 -0
  8. package/dist/core/device-install/apple/crypto.d.ts +20 -0
  9. package/dist/core/device-install/apple/gsa-srp.d.ts +26 -0
  10. package/dist/core/device-install/apple/index.d.ts +5 -0
  11. package/dist/core/device-install/apple/provisioning.d.ts +161 -0
  12. package/dist/core/device-install/apple/relay.d.ts +29 -0
  13. package/dist/core/device-install/index.d.ts +4 -0
  14. package/dist/core/device-install/operations/index.d.ts +6 -0
  15. package/dist/core/device-install/operations/limbuild-client.d.ts +28 -0
  16. package/dist/core/device-install/operations/operations.d.ts +32 -0
  17. package/dist/core/device-install/operations/relay-client.d.ts +25 -0
  18. package/dist/core/device-install/operations/relay-protocol.d.ts +27 -0
  19. package/dist/core/device-install/operations/usbmux.d.ts +32 -0
  20. package/dist/core/device-install/operations/webusb.d.ts +21 -0
  21. package/dist/core/device-install/storage/browser-storage.d.ts +44 -0
  22. package/dist/core/device-install/storage/index.d.ts +1 -0
  23. package/dist/core/device-install/types.d.ts +48 -0
  24. package/dist/device-install/index.cjs +1 -0
  25. package/dist/device-install/index.d.ts +3 -0
  26. package/dist/device-install/index.js +78 -0
  27. package/dist/device-install/react.cjs +1 -0
  28. package/dist/device-install/react.d.ts +1 -0
  29. package/dist/device-install/react.js +4 -0
  30. package/dist/device-install-dialog-86RDdoK9.js +2 -0
  31. package/dist/device-install-dialog-CnyDWf0q.mjs +462 -0
  32. package/dist/device-install-dialog.css +1 -0
  33. package/dist/hooks/index.d.ts +1 -0
  34. package/dist/hooks/use-device-install.d.ts +73 -0
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.css +1 -1
  37. package/dist/index.d.ts +3 -1
  38. package/dist/index.js +737 -703
  39. package/dist/use-device-install-CbGVvwPp.js +31 -0
  40. package/dist/use-device-install-j1Gekpl4.mjs +13623 -0
  41. package/package.json +15 -2
  42. package/src/components/device-install/device-install-dialog.css +325 -0
  43. package/src/components/device-install/device-install-dialog.tsx +513 -0
  44. package/src/components/device-install/index.ts +2 -0
  45. package/src/components/inspect-overlay.css +6 -0
  46. package/src/components/inspect-overlay.tsx +46 -15
  47. package/src/components/remote-control.tsx +16 -2
  48. package/src/core/ax-tree.test.ts +124 -0
  49. package/src/core/ax-tree.ts +107 -0
  50. package/src/core/device-install/apple/client.ts +152 -0
  51. package/src/core/device-install/apple/crypto.ts +202 -0
  52. package/src/core/device-install/apple/gsa-srp.ts +127 -0
  53. package/src/core/device-install/apple/index.ts +5 -0
  54. package/src/core/device-install/apple/provisioning.ts +298 -0
  55. package/src/core/device-install/apple/relay.ts +221 -0
  56. package/src/core/device-install/index.ts +4 -0
  57. package/src/core/device-install/operations/index.ts +6 -0
  58. package/src/core/device-install/operations/limbuild-client.ts +104 -0
  59. package/src/core/device-install/operations/operations.ts +217 -0
  60. package/src/core/device-install/operations/relay-client.ts +255 -0
  61. package/src/core/device-install/operations/relay-protocol.ts +71 -0
  62. package/src/core/device-install/operations/usbmux.ts +270 -0
  63. package/src/core/device-install/operations/webusb-dom.d.ts +54 -0
  64. package/src/core/device-install/operations/webusb.ts +105 -0
  65. package/src/core/device-install/storage/browser-storage.ts +263 -0
  66. package/src/core/device-install/storage/index.ts +1 -0
  67. package/src/core/device-install/types.ts +65 -0
  68. package/src/device-install/index.ts +3 -0
  69. package/src/device-install/react.ts +1 -0
  70. package/src/hooks/index.ts +1 -0
  71. package/src/hooks/use-device-install.ts +1210 -0
  72. package/src/index.ts +4 -0
  73. package/vite.config.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limrun/ui",
3
- "version": "0.9.0-rc.5",
3
+ "version": "0.9.0-rc.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,6 +13,16 @@
13
13
  "import": "./dist/index.js",
14
14
  "require": "./dist/index.cjs"
15
15
  },
16
+ "./device-install": {
17
+ "types": "./dist/device-install/index.d.ts",
18
+ "import": "./dist/device-install/index.js",
19
+ "require": "./dist/device-install/index.cjs"
20
+ },
21
+ "./device-install/react": {
22
+ "types": "./dist/device-install/react.d.ts",
23
+ "import": "./dist/device-install/react.js",
24
+ "require": "./dist/device-install/react.cjs"
25
+ },
16
26
  "./package.json": "./package.json"
17
27
  },
18
28
  "scripts": {
@@ -31,6 +41,7 @@
31
41
  },
32
42
  "license": "MIT",
33
43
  "devDependencies": {
44
+ "@types/node-forge": "^1.3.14",
34
45
  "@types/react": "^19.1.12",
35
46
  "@types/react-dom": "^19.1.9",
36
47
  "@vitejs/plugin-react-swc": "^4.0.1",
@@ -44,6 +55,8 @@
44
55
  "vitest": "^2.1.9"
45
56
  },
46
57
  "dependencies": {
47
- "clsx": "^2.1.1"
58
+ "@foxt/js-srp": "^0.0.3-patch2",
59
+ "clsx": "^2.1.1",
60
+ "node-forge": "^1.4.0"
48
61
  }
49
62
  }
@@ -0,0 +1,325 @@
1
+ .lr-device-install {
2
+ font-family:
3
+ Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
4
+ }
5
+
6
+ .lr-device-install__trigger,
7
+ .lr-device-install__primary,
8
+ .lr-device-install__secondary,
9
+ .lr-device-install__icon-button {
10
+ border: 1px solid #d1d5db;
11
+ border-radius: 8px;
12
+ cursor: pointer;
13
+ font: inherit;
14
+ }
15
+
16
+ .lr-device-install__trigger,
17
+ .lr-device-install__primary {
18
+ background: #111827;
19
+ color: #ffffff;
20
+ padding: 8px 12px;
21
+ }
22
+
23
+ .lr-device-install__secondary,
24
+ .lr-device-install__icon-button {
25
+ background: #ffffff;
26
+ color: #111827;
27
+ padding: 8px 12px;
28
+ }
29
+
30
+ .lr-device-install__trigger:disabled,
31
+ .lr-device-install__primary:disabled,
32
+ .lr-device-install__secondary:disabled {
33
+ cursor: not-allowed;
34
+ opacity: 0.55;
35
+ }
36
+
37
+ .lr-device-install__backdrop {
38
+ align-items: center;
39
+ background: rgb(17 24 39 / 0.55);
40
+ display: flex;
41
+ inset: 0;
42
+ justify-content: center;
43
+ padding: 24px;
44
+ position: fixed;
45
+ z-index: 50;
46
+ }
47
+
48
+ .lr-device-install__dialog {
49
+ background: #ffffff;
50
+ border-radius: 16px;
51
+ box-shadow: 0 24px 80px rgb(15 23 42 / 0.28);
52
+ color: #111827;
53
+ max-height: min(90vh, 900px);
54
+ max-width: 880px;
55
+ overflow: auto;
56
+ padding: 24px;
57
+ width: 100%;
58
+ }
59
+
60
+ .lr-device-install__header {
61
+ align-items: flex-start;
62
+ display: flex;
63
+ gap: 16px;
64
+ justify-content: space-between;
65
+ margin-bottom: 18px;
66
+ }
67
+
68
+ .lr-device-install__header h2,
69
+ .lr-device-install__step h3,
70
+ .lr-device-install__logs h3 {
71
+ margin: 0;
72
+ }
73
+
74
+ .lr-device-install__header p,
75
+ .lr-device-install__step p,
76
+ .lr-device-install__logs {
77
+ color: #4b5563;
78
+ }
79
+
80
+ .lr-device-install__error {
81
+ background: #fef2f2;
82
+ border: 1px solid #fecaca;
83
+ border-radius: 10px;
84
+ color: #991b1b;
85
+ margin-bottom: 14px;
86
+ padding: 10px 12px;
87
+ }
88
+
89
+ .lr-device-install__steps {
90
+ display: grid;
91
+ gap: 12px;
92
+ }
93
+
94
+ .lr-device-install__step {
95
+ border: 1px solid #e5e7eb;
96
+ border-radius: 12px;
97
+ padding: 14px;
98
+ }
99
+
100
+ .lr-device-install__step--active {
101
+ border-color: #111827;
102
+ }
103
+
104
+ .lr-device-install__step-header {
105
+ align-items: flex-start;
106
+ background: transparent;
107
+ border: 0;
108
+ color: inherit;
109
+ cursor: pointer;
110
+ display: grid;
111
+ gap: 12px;
112
+ grid-template-columns: auto 1fr auto;
113
+ padding: 0;
114
+ text-align: left;
115
+ width: 100%;
116
+ }
117
+
118
+ .lr-device-install__step-number {
119
+ align-items: center;
120
+ background: #111827;
121
+ border-radius: 999px;
122
+ color: #ffffff;
123
+ display: flex;
124
+ font-size: 13px;
125
+ font-weight: 700;
126
+ height: 28px;
127
+ justify-content: center;
128
+ width: 28px;
129
+ }
130
+
131
+ .lr-device-install__status {
132
+ border-radius: 999px;
133
+ font-size: 12px;
134
+ padding: 3px 8px;
135
+ text-transform: capitalize;
136
+ }
137
+
138
+ .lr-device-install__status--idle {
139
+ background: #f3f4f6;
140
+ color: #4b5563;
141
+ }
142
+
143
+ .lr-device-install__status--active {
144
+ background: #dbeafe;
145
+ color: #1d4ed8;
146
+ }
147
+
148
+ .lr-device-install__status--complete {
149
+ background: #dcfce7;
150
+ color: #166534;
151
+ }
152
+
153
+ .lr-device-install__status--error {
154
+ background: #fee2e2;
155
+ color: #991b1b;
156
+ }
157
+
158
+ .lr-device-install__step-body {
159
+ display: grid;
160
+ gap: 12px;
161
+ margin-top: 12px;
162
+ }
163
+
164
+ .lr-device-install__choice-grid {
165
+ display: grid;
166
+ gap: 10px;
167
+ grid-template-columns: repeat(2, minmax(0, 1fr));
168
+ }
169
+
170
+ .lr-device-install__choice {
171
+ background: #ffffff;
172
+ border: 1px solid #d1d5db;
173
+ border-radius: 10px;
174
+ color: inherit;
175
+ cursor: pointer;
176
+ display: grid;
177
+ gap: 6px;
178
+ padding: 12px;
179
+ text-align: left;
180
+ }
181
+
182
+ .lr-device-install__choice span {
183
+ color: #4b5563;
184
+ font-size: 13px;
185
+ }
186
+
187
+ .lr-device-install__choice--active {
188
+ border-color: #111827;
189
+ box-shadow: 0 0 0 1px #111827;
190
+ }
191
+
192
+ .lr-device-install__section-panel {
193
+ border: 1px solid #e5e7eb;
194
+ border-radius: 12px;
195
+ display: grid;
196
+ gap: 12px;
197
+ padding: 12px;
198
+ }
199
+
200
+ .lr-device-install__grid {
201
+ display: grid;
202
+ gap: 10px;
203
+ grid-template-columns: repeat(3, minmax(0, 1fr));
204
+ }
205
+
206
+ .lr-device-install__field {
207
+ display: grid;
208
+ gap: 6px;
209
+ }
210
+
211
+ .lr-device-install__field span {
212
+ color: #374151;
213
+ font-size: 13px;
214
+ font-weight: 600;
215
+ }
216
+
217
+ .lr-device-install__field input,
218
+ .lr-device-install__field select {
219
+ border: 1px solid #d1d5db;
220
+ border-radius: 8px;
221
+ font: inherit;
222
+ padding: 8px 10px;
223
+ }
224
+
225
+ .lr-device-install__actions {
226
+ align-items: center;
227
+ display: flex;
228
+ flex-wrap: wrap;
229
+ gap: 10px;
230
+ }
231
+
232
+ .lr-device-install__hint {
233
+ color: #6b7280;
234
+ font-size: 13px;
235
+ }
236
+
237
+ .lr-device-install__checklist {
238
+ border: 1px solid #e5e7eb;
239
+ border-radius: 10px;
240
+ display: grid;
241
+ overflow: hidden;
242
+ }
243
+
244
+ .lr-device-install__check-row {
245
+ align-items: center;
246
+ display: flex;
247
+ gap: 12px;
248
+ justify-content: space-between;
249
+ padding: 10px 12px;
250
+ }
251
+
252
+ .lr-device-install__check-row + .lr-device-install__check-row {
253
+ border-top: 1px solid #e5e7eb;
254
+ }
255
+
256
+ .lr-device-install__check-row strong {
257
+ color: #111827;
258
+ font-size: 13px;
259
+ }
260
+
261
+ .lr-device-install__build-logs {
262
+ border: 1px solid #e5e7eb;
263
+ border-radius: 10px;
264
+ overflow: hidden;
265
+ }
266
+
267
+ .lr-device-install__build-logs summary {
268
+ cursor: pointer;
269
+ font-weight: 600;
270
+ padding: 10px 12px;
271
+ }
272
+
273
+ .lr-device-install__build-logs pre {
274
+ background: #0f172a;
275
+ color: #e5e7eb;
276
+ margin: 0;
277
+ max-height: 240px;
278
+ overflow: auto;
279
+ padding: 12px;
280
+ white-space: pre-wrap;
281
+ }
282
+
283
+ .lr-device-install__device {
284
+ background: #f9fafb;
285
+ border: 1px solid #e5e7eb;
286
+ border-radius: 10px;
287
+ padding: 10px;
288
+ }
289
+
290
+ .lr-device-install__logs {
291
+ border-top: 1px solid #e5e7eb;
292
+ margin-top: 18px;
293
+ padding-top: 14px;
294
+ }
295
+
296
+ .lr-device-install__logs ol {
297
+ display: grid;
298
+ gap: 6px;
299
+ list-style: none;
300
+ margin: 8px 0 0;
301
+ max-height: 160px;
302
+ overflow: auto;
303
+ padding: 0;
304
+ }
305
+
306
+ .lr-device-install__logs li {
307
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
308
+ font-size: 12px;
309
+ white-space: pre-wrap;
310
+ }
311
+
312
+ @media (max-width: 760px) {
313
+ .lr-device-install__choice-grid,
314
+ .lr-device-install__grid {
315
+ grid-template-columns: 1fr;
316
+ }
317
+
318
+ .lr-device-install__step-header {
319
+ grid-template-columns: auto 1fr;
320
+ }
321
+
322
+ .lr-device-install__status {
323
+ grid-column: 2;
324
+ }
325
+ }