@limrun/ui 0.7.0 → 0.8.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.
package/index.html ADDED
@@ -0,0 +1,199 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>RemoteControl Demo - @limrun/ui</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
16
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
+ min-height: 100vh;
18
+ padding: 20px;
19
+ }
20
+
21
+ #root {
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: 20px;
25
+ max-width: 1400px;
26
+ margin: 0 auto;
27
+ }
28
+
29
+ .header {
30
+ text-align: center;
31
+ color: white;
32
+ padding: 20px;
33
+ }
34
+
35
+ .header h1 {
36
+ font-size: 2.5rem;
37
+ margin-bottom: 10px;
38
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
39
+ }
40
+
41
+ .header p {
42
+ font-size: 1.1rem;
43
+ opacity: 0.9;
44
+ }
45
+
46
+ .demo-container {
47
+ background: white;
48
+ border-radius: 20px;
49
+ padding: 30px;
50
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
51
+ }
52
+
53
+ .controls {
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 15px;
57
+ margin-bottom: 30px;
58
+ }
59
+
60
+ .control-group {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 8px;
64
+ }
65
+
66
+ .control-group label {
67
+ font-weight: 600;
68
+ font-size: 0.9rem;
69
+ color: #374151;
70
+ }
71
+
72
+ .control-group input,
73
+ .control-group select {
74
+ padding: 10px 15px;
75
+ border: 2px solid #e5e7eb;
76
+ border-radius: 8px;
77
+ font-size: 0.95rem;
78
+ transition: border-color 0.2s;
79
+ }
80
+
81
+ .control-group input:focus,
82
+ .control-group select:focus {
83
+ outline: none;
84
+ border-color: #667eea;
85
+ }
86
+
87
+ .button-group {
88
+ display: flex;
89
+ gap: 10px;
90
+ }
91
+
92
+ button {
93
+ padding: 12px 24px;
94
+ border: none;
95
+ border-radius: 8px;
96
+ font-size: 1rem;
97
+ font-weight: 600;
98
+ cursor: pointer;
99
+ transition: all 0.2s;
100
+ }
101
+
102
+ button.primary {
103
+ background: #667eea;
104
+ color: white;
105
+ }
106
+
107
+ button.primary:hover {
108
+ background: #5568d3;
109
+ transform: translateY(-1px);
110
+ box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
111
+ }
112
+
113
+ button.secondary {
114
+ background: #e5e7eb;
115
+ color: #374151;
116
+ }
117
+
118
+ button.secondary:hover {
119
+ background: #d1d5db;
120
+ }
121
+
122
+ button:disabled {
123
+ opacity: 0.5;
124
+ cursor: not-allowed;
125
+ }
126
+
127
+ .device-preview {
128
+ display: flex;
129
+ gap: 30px;
130
+ justify-content: center;
131
+ flex-wrap: wrap;
132
+ }
133
+
134
+ .preview-item {
135
+ flex: 1 1 420px;
136
+ max-width: 520px;
137
+ height: min(75vh, 900px);
138
+ }
139
+
140
+ .preview-item h3 {
141
+ text-align: center;
142
+ margin-bottom: 15px;
143
+ font-size: 1.2rem;
144
+ color: #374151;
145
+ }
146
+
147
+ .device-wrapper {
148
+ height: 100%;
149
+ width: 100%;
150
+ background: #f9fafb;
151
+ border-radius: 12px;
152
+ overflow: hidden;
153
+ }
154
+
155
+ @media (max-width: 640px) {
156
+ body {
157
+ padding: 12px;
158
+ }
159
+
160
+ .demo-container {
161
+ padding: 16px;
162
+ }
163
+
164
+ .button-group {
165
+ flex-direction: column;
166
+ }
167
+
168
+ .preview-item {
169
+ max-width: 100%;
170
+ height: 70vh;
171
+ }
172
+ }
173
+
174
+ .info-box {
175
+ background: #fef3c7;
176
+ border: 2px solid #fbbf24;
177
+ border-radius: 8px;
178
+ padding: 15px;
179
+ margin-bottom: 20px;
180
+ }
181
+
182
+ .info-box h4 {
183
+ color: #92400e;
184
+ margin-bottom: 8px;
185
+ font-size: 0.95rem;
186
+ }
187
+
188
+ .info-box p {
189
+ color: #78350f;
190
+ font-size: 0.9rem;
191
+ line-height: 1.5;
192
+ }
193
+ </style>
194
+ </head>
195
+ <body>
196
+ <div id="root"></div>
197
+ <script type="module" src="/src/demo.tsx"></script>
198
+ </body>
199
+ </html>
package/package.json CHANGED
@@ -1,45 +1,49 @@
1
1
  {
2
- "name": "@limrun/ui",
3
- "version": "0.7.0",
4
- "publishConfig": {
5
- "access": "public"
2
+ "name": "@limrun/ui",
3
+ "version": "0.8.1",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs"
6
15
  },
7
- "main": "./dist/index.js",
8
- "module": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "require": "./dist/index.cjs"
15
- },
16
- "./package.json": "./package.json"
17
- },
18
- "scripts": {
19
- "dev": "vite",
20
- "build": "tsc && vite build",
21
- "prepublishOnly": "npm run build",
22
- "lint": "eslint .",
23
- "preview": "vite preview"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/limrun-inc/typescript-sdk.git",
28
- "directory": "packages/ui"
29
- },
30
- "license": "MIT",
31
- "devDependencies": {
32
- "@types/react": "^19.1.12",
33
- "@types/react-dom": "^19.1.9",
34
- "@vitejs/plugin-react-swc": "^4.0.1",
35
- "path": "^0.12.7",
36
- "react": "^19.1.1",
37
- "react-dom": "^19.1.1",
38
- "vite": "^7.1.4",
39
- "vite-plugin-dts": "^4.5.4",
40
- "vite-plugin-lib-inject-css": "^2.2.2"
41
- },
42
- "dependencies": {
43
- "clsx": "^2.1.1"
44
- }
45
- }
16
+ "./package.json": "./package.json"
17
+ },
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "tsc && vite build",
21
+ "prepublishOnly": "npm run build",
22
+ "lint": "eslint .",
23
+ "preview": "vite preview",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/limrun-inc/typescript-sdk.git",
30
+ "directory": "packages/ui"
31
+ },
32
+ "license": "MIT",
33
+ "devDependencies": {
34
+ "@types/react": "^19.1.12",
35
+ "@types/react-dom": "^19.1.9",
36
+ "@vitejs/plugin-react-swc": "^4.0.1",
37
+ "jsdom": "^26.0.0",
38
+ "path": "^0.12.7",
39
+ "react": "^19.1.1",
40
+ "react-dom": "^19.1.1",
41
+ "vite": "^7.1.4",
42
+ "vite-plugin-dts": "^4.5.4",
43
+ "vite-plugin-lib-inject-css": "^2.2.2",
44
+ "vitest": "^2.1.9"
45
+ },
46
+ "dependencies": {
47
+ "clsx": "^2.1.1"
48
+ }
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
+ }