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

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 (78) hide show
  1. package/README.md +0 -9
  2. package/dist/components/inspect-overlay.d.ts +33 -0
  3. package/dist/components/remote-control.d.ts +86 -0
  4. package/dist/core/ax-fetcher.d.ts +49 -0
  5. package/dist/core/ax-tree.d.ts +99 -0
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.css +1 -1
  8. package/dist/index.d.ts +3 -2
  9. package/dist/index.js +1491 -777
  10. package/package.json +8 -17
  11. package/src/components/inspect-overlay.css +223 -0
  12. package/src/components/inspect-overlay.tsx +437 -0
  13. package/src/components/remote-control.tsx +547 -9
  14. package/src/core/ax-fetcher.test.ts +418 -0
  15. package/src/core/ax-fetcher.ts +377 -0
  16. package/src/core/ax-tree.test.ts +491 -0
  17. package/src/core/ax-tree.ts +416 -0
  18. package/src/demo.tsx +93 -10
  19. package/src/index.ts +17 -2
  20. package/vite.config.ts +2 -6
  21. package/vitest.config.ts +23 -0
  22. package/dist/components/device-install/device-install-dialog.d.ts +0 -5
  23. package/dist/components/device-install/index.d.ts +0 -2
  24. package/dist/core/device-install/apple/client.d.ts +0 -17
  25. package/dist/core/device-install/apple/crypto.d.ts +0 -20
  26. package/dist/core/device-install/apple/gsa-srp.d.ts +0 -26
  27. package/dist/core/device-install/apple/index.d.ts +0 -5
  28. package/dist/core/device-install/apple/provisioning.d.ts +0 -161
  29. package/dist/core/device-install/apple/relay.d.ts +0 -29
  30. package/dist/core/device-install/index.d.ts +0 -4
  31. package/dist/core/device-install/operations/index.d.ts +0 -6
  32. package/dist/core/device-install/operations/limbuild-client.d.ts +0 -28
  33. package/dist/core/device-install/operations/operations.d.ts +0 -32
  34. package/dist/core/device-install/operations/relay-client.d.ts +0 -25
  35. package/dist/core/device-install/operations/relay-protocol.d.ts +0 -27
  36. package/dist/core/device-install/operations/usbmux.d.ts +0 -32
  37. package/dist/core/device-install/operations/webusb.d.ts +0 -21
  38. package/dist/core/device-install/storage/browser-storage.d.ts +0 -44
  39. package/dist/core/device-install/storage/index.d.ts +0 -1
  40. package/dist/core/device-install/types.d.ts +0 -48
  41. package/dist/device-install/index.cjs +0 -1
  42. package/dist/device-install/index.d.ts +0 -3
  43. package/dist/device-install/index.js +0 -78
  44. package/dist/device-install/react.cjs +0 -1
  45. package/dist/device-install/react.d.ts +0 -1
  46. package/dist/device-install/react.js +0 -4
  47. package/dist/device-install-dialog-86RDdoK9.js +0 -2
  48. package/dist/device-install-dialog-CnyDWf0q.mjs +0 -462
  49. package/dist/device-install-dialog.css +0 -1
  50. package/dist/hooks/index.d.ts +0 -1
  51. package/dist/hooks/use-device-install.d.ts +0 -73
  52. package/dist/use-device-install-CbGVvwPp.js +0 -31
  53. package/dist/use-device-install-j1Gekpl4.mjs +0 -13623
  54. package/src/components/device-install/device-install-dialog.css +0 -325
  55. package/src/components/device-install/device-install-dialog.tsx +0 -513
  56. package/src/components/device-install/index.ts +0 -2
  57. package/src/core/device-install/apple/client.ts +0 -152
  58. package/src/core/device-install/apple/crypto.ts +0 -202
  59. package/src/core/device-install/apple/gsa-srp.ts +0 -127
  60. package/src/core/device-install/apple/index.ts +0 -5
  61. package/src/core/device-install/apple/provisioning.ts +0 -298
  62. package/src/core/device-install/apple/relay.ts +0 -221
  63. package/src/core/device-install/index.ts +0 -4
  64. package/src/core/device-install/operations/index.ts +0 -6
  65. package/src/core/device-install/operations/limbuild-client.ts +0 -104
  66. package/src/core/device-install/operations/operations.ts +0 -217
  67. package/src/core/device-install/operations/relay-client.ts +0 -255
  68. package/src/core/device-install/operations/relay-protocol.ts +0 -71
  69. package/src/core/device-install/operations/usbmux.ts +0 -270
  70. package/src/core/device-install/operations/webusb-dom.d.ts +0 -54
  71. package/src/core/device-install/operations/webusb.ts +0 -105
  72. package/src/core/device-install/storage/browser-storage.ts +0 -263
  73. package/src/core/device-install/storage/index.ts +0 -1
  74. package/src/core/device-install/types.ts +0 -65
  75. package/src/device-install/index.ts +0 -3
  76. package/src/device-install/react.ts +0 -1
  77. package/src/hooks/index.ts +0 -1
  78. package/src/hooks/use-device-install.ts +0 -1210
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limrun/ui",
3
- "version": "0.9.0-rc.4",
3
+ "version": "0.9.0-rc.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,16 +13,6 @@
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
- },
26
16
  "./package.json": "./package.json"
27
17
  },
28
18
  "scripts": {
@@ -30,7 +20,9 @@
30
20
  "build": "tsc && vite build",
31
21
  "prepublishOnly": "npm run build",
32
22
  "lint": "eslint .",
33
- "preview": "vite preview"
23
+ "preview": "vite preview",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest"
34
26
  },
35
27
  "repository": {
36
28
  "type": "git",
@@ -39,20 +31,19 @@
39
31
  },
40
32
  "license": "MIT",
41
33
  "devDependencies": {
42
- "@types/node-forge": "^1.3.14",
43
34
  "@types/react": "^19.1.12",
44
35
  "@types/react-dom": "^19.1.9",
45
36
  "@vitejs/plugin-react-swc": "^4.0.1",
37
+ "jsdom": "^26.0.0",
46
38
  "path": "^0.12.7",
47
39
  "react": "^19.1.1",
48
40
  "react-dom": "^19.1.1",
49
41
  "vite": "^7.1.4",
50
42
  "vite-plugin-dts": "^4.5.4",
51
- "vite-plugin-lib-inject-css": "^2.2.2"
43
+ "vite-plugin-lib-inject-css": "^2.2.2",
44
+ "vitest": "^2.1.9"
52
45
  },
53
46
  "dependencies": {
54
- "@foxt/js-srp": "^0.0.3-patch2",
55
- "clsx": "^2.1.1",
56
- "node-forge": "^1.4.0"
47
+ "clsx": "^2.1.1"
57
48
  }
58
49
  }
@@ -0,0 +1,223 @@
1
+ .rc-inspect-overlay {
2
+ position: absolute;
3
+ z-index: 25;
4
+ pointer-events: none;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .rc-inspect-overlay-select {
9
+ /* When click-to-select is enabled, the container also captures clicks
10
+ that fall outside any box so we can clear selection. */
11
+ pointer-events: auto;
12
+ }
13
+
14
+ .rc-inspect-box {
15
+ position: absolute;
16
+ box-sizing: border-box;
17
+ border: 1px solid rgba(64, 169, 255, 0.55);
18
+ background: rgba(64, 169, 255, 0.06);
19
+ border-radius: 2px;
20
+ cursor: pointer;
21
+ pointer-events: none;
22
+ transition:
23
+ border-color 80ms ease,
24
+ border-width 80ms ease,
25
+ background-color 80ms ease;
26
+ padding: 0;
27
+ margin: 0;
28
+ font: inherit;
29
+ color: inherit;
30
+ outline: none;
31
+ }
32
+
33
+ .rc-inspect-overlay-select .rc-inspect-box {
34
+ pointer-events: auto;
35
+ }
36
+
37
+ .rc-inspect-box-disabled {
38
+ opacity: 0.55;
39
+ }
40
+
41
+ .rc-inspect-box[data-highlighted='true'] {
42
+ border-color: rgba(255, 197, 28, 0.95);
43
+ border-width: 1.5px;
44
+ background: rgba(255, 197, 28, 0.16);
45
+ z-index: 1;
46
+ }
47
+
48
+ .rc-inspect-box[data-selected='true'] {
49
+ border-color: rgba(0, 122, 255, 1);
50
+ border-width: 2px;
51
+ background: rgba(0, 122, 255, 0.22);
52
+ z-index: 2;
53
+ }
54
+
55
+ .rc-inspect-card {
56
+ /* Card is rendered via React portal to document.body so it can escape
57
+ any ancestor overflow:hidden (e.g. customer-provided .device-wrapper
58
+ in our demo). Coordinates passed in via inline style are
59
+ viewport-absolute. */
60
+ position: fixed;
61
+ z-index: 2147483600;
62
+ pointer-events: auto;
63
+ background: rgba(22, 24, 30, 0.97);
64
+ color: #f5f5f7;
65
+ border: 1px solid rgba(255, 255, 255, 0.1);
66
+ border-radius: 10px;
67
+ padding: 9px 11px 11px;
68
+ min-width: 200px;
69
+ max-width: 260px;
70
+ /* Cap card height. Anything longer scrolls inside the card instead of
71
+ pushing the viewport. */
72
+ max-height: 220px;
73
+ overflow-y: auto;
74
+ box-shadow:
75
+ 0 12px 36px rgba(0, 0, 0, 0.4),
76
+ 0 1px 0 rgba(255, 255, 255, 0.04) inset;
77
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
78
+ font-size: 12px;
79
+ line-height: 1.4;
80
+ backdrop-filter: blur(8px);
81
+ -webkit-backdrop-filter: blur(8px);
82
+ scrollbar-width: thin;
83
+ }
84
+
85
+ .rc-inspect-card-header {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: 5px;
89
+ flex-wrap: wrap;
90
+ margin-bottom: 4px;
91
+ }
92
+
93
+ .rc-inspect-card-role {
94
+ font-size: 10px;
95
+ font-weight: 600;
96
+ text-transform: uppercase;
97
+ letter-spacing: 0.06em;
98
+ color: rgba(245, 245, 247, 0.55);
99
+ display: inline-block;
100
+ white-space: nowrap;
101
+ }
102
+
103
+ .rc-inspect-card-tag {
104
+ font-size: 9px;
105
+ font-weight: 600;
106
+ text-transform: uppercase;
107
+ letter-spacing: 0.05em;
108
+ padding: 1px 5px;
109
+ border-radius: 4px;
110
+ background: rgba(255, 255, 255, 0.08);
111
+ color: rgba(245, 245, 247, 0.7);
112
+ border: 1px solid rgba(255, 255, 255, 0.06);
113
+ }
114
+
115
+ .rc-inspect-card-tag-blue {
116
+ background: rgba(10, 132, 255, 0.18);
117
+ border-color: rgba(10, 132, 255, 0.45);
118
+ color: rgb(140, 195, 255);
119
+ }
120
+
121
+ .rc-inspect-card-title {
122
+ font-size: 12.5px;
123
+ font-weight: 600;
124
+ color: #fff;
125
+ margin: 0 0 7px;
126
+ word-break: break-word;
127
+ /* Clamp to 2 lines so a paragraph-long AXLabel doesn't take over. The
128
+ full text is available on hover via the title attribute and via the
129
+ value/id rows below. */
130
+ display: -webkit-box;
131
+ -webkit-line-clamp: 2;
132
+ line-clamp: 2;
133
+ -webkit-box-orient: vertical;
134
+ overflow: hidden;
135
+ }
136
+
137
+ .rc-inspect-card-row {
138
+ display: flex;
139
+ gap: 6px;
140
+ align-items: baseline;
141
+ font-size: 10.5px;
142
+ color: rgba(245, 245, 247, 0.72);
143
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
144
+ monospace;
145
+ margin: 1px 0;
146
+ min-width: 0;
147
+ }
148
+
149
+ .rc-inspect-card-row-label {
150
+ color: rgba(245, 245, 247, 0.42);
151
+ font-weight: 500;
152
+ flex-shrink: 0;
153
+ }
154
+
155
+ .rc-inspect-card-row-value {
156
+ flex: 1 1 auto;
157
+ min-width: 0;
158
+ word-break: break-word;
159
+ /* Clamp long values (selectors, IDs) to two lines, full value visible
160
+ via the row's title attr or via "Copy" action. */
161
+ display: -webkit-box;
162
+ -webkit-line-clamp: 2;
163
+ line-clamp: 2;
164
+ -webkit-box-orient: vertical;
165
+ overflow: hidden;
166
+ }
167
+
168
+ .rc-inspect-card-actions {
169
+ display: flex;
170
+ flex-wrap: wrap;
171
+ gap: 6px;
172
+ margin-top: 10px;
173
+ padding-top: 9px;
174
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
175
+ }
176
+
177
+ .rc-inspect-card-btn {
178
+ appearance: none;
179
+ border: 1px solid rgba(255, 255, 255, 0.12);
180
+ background: rgba(255, 255, 255, 0.06);
181
+ color: #f5f5f7;
182
+ font: inherit;
183
+ font-size: 11px;
184
+ font-weight: 500;
185
+ padding: 4px 9px;
186
+ border-radius: 6px;
187
+ cursor: pointer;
188
+ transition:
189
+ background-color 100ms ease,
190
+ border-color 100ms ease,
191
+ color 100ms ease;
192
+ }
193
+
194
+ .rc-inspect-card-btn:hover:not(:disabled) {
195
+ background: rgba(255, 255, 255, 0.12);
196
+ border-color: rgba(255, 255, 255, 0.2);
197
+ }
198
+
199
+ .rc-inspect-card-btn:active:not(:disabled) {
200
+ background: rgba(255, 255, 255, 0.16);
201
+ }
202
+
203
+ .rc-inspect-card-btn:disabled {
204
+ opacity: 0.4;
205
+ cursor: not-allowed;
206
+ }
207
+
208
+ .rc-inspect-card-btn-primary {
209
+ background: rgba(0, 122, 255, 0.85);
210
+ border-color: rgba(0, 122, 255, 0.9);
211
+ color: #fff;
212
+ }
213
+
214
+ .rc-inspect-card-btn-primary:hover:not(:disabled) {
215
+ background: rgba(10, 132, 255, 1);
216
+ border-color: rgba(10, 132, 255, 1);
217
+ }
218
+
219
+ .rc-inspect-card-btn-copied {
220
+ background: rgba(48, 209, 88, 0.22);
221
+ border-color: rgba(48, 209, 88, 0.55);
222
+ color: rgb(159, 240, 178);
223
+ }