lua-cli 2.4.1 → 2.5.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.
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * User data instance class providing a fluent API for managing user data
3
3
  * Automatically sanitizes sensitive fields and provides methods for updating and clearing data
4
+ * Supports direct property access (e.g., user.name) instead of user.data.name
4
5
  */
5
6
  export default class UserDataInstance {
6
7
  /**
7
- * Creates a new UserDataInstance
8
+ * Creates a new UserDataInstance with proxy support for direct property access
8
9
  * @param api - The UserDataAPI instance for making API calls
9
10
  * @param data - The user data from the API (will be sanitized automatically)
11
+ * @returns Proxied instance that allows direct access to data properties
10
12
  */
11
13
  constructor(api, data) {
12
14
  this.data = this.sanitizeData(data);
@@ -17,6 +19,60 @@ export default class UserDataInstance {
17
19
  enumerable: false,
18
20
  configurable: true
19
21
  });
22
+ // Return a proxy that allows direct property access
23
+ return new Proxy(this, {
24
+ get(target, prop, receiver) {
25
+ // If the property exists on the instance itself, return it
26
+ if (prop in target) {
27
+ return Reflect.get(target, prop, receiver);
28
+ }
29
+ // Otherwise, try to get it from the data object
30
+ if (typeof prop === 'string' && prop in target.data) {
31
+ return target.data[prop];
32
+ }
33
+ return undefined;
34
+ },
35
+ set(target, prop, value, receiver) {
36
+ // Reserved properties that should be set on the instance itself
37
+ const reservedProps = ['data', 'userAPI', 'update', 'clear', 'toJSON'];
38
+ if (typeof prop === 'string' && reservedProps.includes(prop)) {
39
+ return Reflect.set(target, prop, value, receiver);
40
+ }
41
+ // All other properties get set on the data object
42
+ if (typeof prop === 'string') {
43
+ target.data[prop] = value;
44
+ return true;
45
+ }
46
+ return false;
47
+ },
48
+ has(target, prop) {
49
+ // Check if property exists on instance or in data
50
+ return prop in target || (typeof prop === 'string' && prop in target.data);
51
+ },
52
+ ownKeys(target) {
53
+ // Return both instance keys and data keys
54
+ const instanceKeys = Reflect.ownKeys(target);
55
+ const dataKeys = Object.keys(target.data);
56
+ return [...new Set([...instanceKeys, ...dataKeys])];
57
+ },
58
+ getOwnPropertyDescriptor(target, prop) {
59
+ // First check if it's an instance property
60
+ const instanceDesc = Reflect.getOwnPropertyDescriptor(target, prop);
61
+ if (instanceDesc) {
62
+ return instanceDesc;
63
+ }
64
+ // Then check if it's a data property
65
+ if (typeof prop === 'string' && prop in target.data) {
66
+ return {
67
+ configurable: true,
68
+ enumerable: true,
69
+ writable: true,
70
+ value: target.data[prop]
71
+ };
72
+ }
73
+ return undefined;
74
+ }
75
+ });
20
76
  }
21
77
  /**
22
78
  * Removes sensitive fields from the data before storing
@@ -31,7 +87,7 @@ export default class UserDataInstance {
31
87
  // Create a copy of the data to avoid mutating the original
32
88
  const sanitized = { ...data };
33
89
  // Remove sensitive fields
34
- const sensitiveFields = ['apiKey', 'agentId', 'userId', 'token', 'secret', 'key'];
90
+ const sensitiveFields = ['agentId', 'userId'];
35
91
  sensitiveFields.forEach(field => {
36
92
  delete sanitized[field];
37
93
  });
package/dist/web/app.css CHANGED
@@ -10,6 +10,7 @@
10
10
  --lua-color-red-50: oklch(97.1% 0.013 17.38);
11
11
  --lua-color-red-100: oklch(93.6% 0.032 17.717);
12
12
  --lua-color-red-200: oklch(88.5% 0.062 18.334);
13
+ --lua-color-red-500: oklch(63.7% 0.237 25.331);
13
14
  --lua-color-red-600: oklch(57.7% 0.245 27.325);
14
15
  --lua-color-red-700: oklch(50.5% 0.213 27.518);
15
16
  --lua-color-red-800: oklch(44.4% 0.177 26.899);
@@ -293,6 +294,9 @@
293
294
  #lua-root .lua\:mx-4 {
294
295
  margin-inline: calc(var(--lua-spacing) * 4);
295
296
  }
297
+ #lua-root .lua\:mx-auto {
298
+ margin-inline: auto;
299
+ }
296
300
  #lua-root .lua\:mt-0 {
297
301
  margin-top: calc(var(--lua-spacing) * 0);
298
302
  }
@@ -335,6 +339,12 @@
335
339
  #lua-root .lua\:ml-4 {
336
340
  margin-left: calc(var(--lua-spacing) * 4);
337
341
  }
342
+ #lua-root .lua\:line-clamp-2 {
343
+ overflow: hidden;
344
+ display: -webkit-box;
345
+ -webkit-box-orient: vertical;
346
+ -webkit-line-clamp: 2;
347
+ }
338
348
  #lua-root .lua\:block {
339
349
  display: block;
340
350
  }
@@ -370,12 +380,21 @@
370
380
  #lua-root .lua\:h-10 {
371
381
  height: calc(var(--lua-spacing) * 10);
372
382
  }
383
+ #lua-root .lua\:h-12 {
384
+ height: calc(var(--lua-spacing) * 12);
385
+ }
373
386
  #lua-root .lua\:h-48 {
374
387
  height: calc(var(--lua-spacing) * 48);
375
388
  }
376
389
  #lua-root .lua\:h-full {
377
390
  height: 100%;
378
391
  }
392
+ #lua-root .lua\:max-h-96 {
393
+ max-height: calc(var(--lua-spacing) * 96);
394
+ }
395
+ #lua-root .lua\:max-h-full {
396
+ max-height: 100%;
397
+ }
379
398
  #lua-root .lua\:min-h-7 {
380
399
  min-height: calc(var(--lua-spacing) * 7);
381
400
  }
@@ -400,6 +419,9 @@
400
419
  #lua-root .lua\:w-8 {
401
420
  width: calc(var(--lua-spacing) * 8);
402
421
  }
422
+ #lua-root .lua\:w-12 {
423
+ width: calc(var(--lua-spacing) * 12);
424
+ }
403
425
  #lua-root .lua\:w-fit {
404
426
  width: -moz-fit-content;
405
427
  width: fit-content;
@@ -473,6 +495,9 @@
473
495
  #lua-root .lua\:grid-cols-1 {
474
496
  grid-template-columns: repeat(1, minmax(0, 1fr));
475
497
  }
498
+ #lua-root .lua\:grid-cols-2 {
499
+ grid-template-columns: repeat(2, minmax(0, 1fr));
500
+ }
476
501
  #lua-root .lua\:flex-col {
477
502
  flex-direction: column;
478
503
  }
@@ -550,6 +575,20 @@
550
575
  margin-block-end: calc(calc(var(--lua-spacing) * 5) * calc(1 - var(--tw-space-y-reverse)));
551
576
  }
552
577
  }
578
+ #lua-root .lua\:space-y-6 {
579
+ :where(& > :not(:last-child)) {
580
+ --tw-space-y-reverse: 0;
581
+ margin-block-start: calc(calc(var(--lua-spacing) * 6) * var(--tw-space-y-reverse));
582
+ margin-block-end: calc(calc(var(--lua-spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
583
+ }
584
+ }
585
+ #lua-root .lua\:space-x-2 {
586
+ :where(& > :not(:last-child)) {
587
+ --tw-space-x-reverse: 0;
588
+ margin-inline-start: calc(calc(var(--lua-spacing) * 2) * var(--tw-space-x-reverse));
589
+ margin-inline-end: calc(calc(var(--lua-spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
590
+ }
591
+ }
553
592
  #lua-root .lua\:divide-y {
554
593
  :where(& > :not(:last-child)) {
555
594
  --tw-divide-y-reverse: 0;
@@ -653,6 +692,9 @@
653
692
  #lua-root .lua\:border-red-200 {
654
693
  border-color: var(--lua-color-red-200);
655
694
  }
695
+ #lua-root .lua\:border-transparent {
696
+ border-color: transparent;
697
+ }
656
698
  #lua-root .lua\:border-yellow-200 {
657
699
  border-color: var(--lua-color-yellow-200);
658
700
  }
@@ -794,6 +836,12 @@
794
836
  #lua-root .lua\:py-10 {
795
837
  padding-block: calc(var(--lua-spacing) * 10);
796
838
  }
839
+ #lua-root .lua\:py-12 {
840
+ padding-block: calc(var(--lua-spacing) * 12);
841
+ }
842
+ #lua-root .lua\:pt-0 {
843
+ padding-top: calc(var(--lua-spacing) * 0);
844
+ }
797
845
  #lua-root .lua\:pt-4 {
798
846
  padding-top: calc(var(--lua-spacing) * 4);
799
847
  }
@@ -886,9 +934,15 @@
886
934
  #lua-root .lua\:whitespace-pre-wrap {
887
935
  white-space: pre-wrap;
888
936
  }
937
+ #lua-root .lua\:text-blue-600 {
938
+ color: var(--lua-color-blue-600);
939
+ }
889
940
  #lua-root .lua\:text-blue-700 {
890
941
  color: var(--lua-color-blue-700);
891
942
  }
943
+ #lua-root .lua\:text-blue-800 {
944
+ color: var(--lua-color-blue-800);
945
+ }
892
946
  #lua-root .lua\:text-gray-200 {
893
947
  color: var(--lua-color-gray-200);
894
948
  }
@@ -922,6 +976,9 @@
922
976
  #lua-root .lua\:text-green-800 {
923
977
  color: var(--lua-color-green-800);
924
978
  }
979
+ #lua-root .lua\:text-red-500 {
980
+ color: var(--lua-color-red-500);
981
+ }
925
982
  #lua-root .lua\:text-red-600 {
926
983
  color: var(--lua-color-red-600);
927
984
  }
@@ -1332,6 +1389,11 @@
1332
1389
  background-color: var(--lua-color-gray-50);
1333
1390
  }
1334
1391
  }
1392
+ #lua-root .lua\:data-\[state\=active\]\:bg-white {
1393
+ &[data-state="active"] {
1394
+ background-color: var(--lua-color-white);
1395
+ }
1396
+ }
1335
1397
  #lua-root .lua\:data-\[state\=active\]\:text-blue-600 {
1336
1398
  &[data-state="active"] {
1337
1399
  color: var(--lua-color-blue-600);
@@ -1342,6 +1404,12 @@
1342
1404
  color: var(--lua-color-gray-900);
1343
1405
  }
1344
1406
  }
1407
+ #lua-root .lua\:data-\[state\=active\]\:shadow-sm {
1408
+ &[data-state="active"] {
1409
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
1410
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1411
+ }
1412
+ }
1345
1413
  #lua-root .lua\:data-\[state\=inactive\]\:hidden {
1346
1414
  &[data-state="inactive"] {
1347
1415
  display: none;
@@ -1352,6 +1420,16 @@
1352
1420
  margin-inline: calc(var(--lua-spacing) * 5);
1353
1421
  }
1354
1422
  }
1423
+ #lua-root .lua\:sm\:grid-cols-2 {
1424
+ @media (width >= 40rem) {
1425
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1426
+ }
1427
+ }
1428
+ #lua-root .lua\:lg\:grid-cols-3 {
1429
+ @media (width >= 64rem) {
1430
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1431
+ }
1432
+ }
1355
1433
  }
1356
1434
  @layer base {
1357
1435
  #lua-root *, #lua-root ::after, #lua-root ::before, #lua-root ::backdrop, #lua-root ::file-selector-button {
@@ -1861,6 +1939,11 @@
1861
1939
  inherits: false;
1862
1940
  initial-value: 0;
1863
1941
  }
1942
+ @property --tw-space-x-reverse {
1943
+ syntax: "*";
1944
+ inherits: false;
1945
+ initial-value: 0;
1946
+ }
1864
1947
  @property --tw-divide-y-reverse {
1865
1948
  syntax: "*";
1866
1949
  inherits: false;
@@ -1987,6 +2070,7 @@
1987
2070
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
1988
2071
  #lua-root *, #lua-root ::before, #lua-root ::after, #lua-root ::backdrop {
1989
2072
  --tw-space-y-reverse: 0;
2073
+ --tw-space-x-reverse: 0;
1990
2074
  --tw-divide-y-reverse: 0;
1991
2075
  --tw-border-style: solid;
1992
2076
  --tw-leading: initial;
@@ -2667,7 +2751,6 @@ a:focus-visible,
2667
2751
 
2668
2752
  .logs-container {
2669
2753
  background: #1e1e1e;
2670
- border-top: 1px solid #3e3e42;
2671
2754
  display: flex;
2672
2755
  flex-direction: column;
2673
2756
  min-height: 150px;
@@ -2678,7 +2761,7 @@ a:focus-visible,
2678
2761
 
2679
2762
  .logs-resize-handle {
2680
2763
  height: 4px;
2681
- background: #3e3e42;
2764
+ background: #d1d5dc;
2682
2765
  cursor: row-resize;
2683
2766
  position: relative;
2684
2767
  transition: background-color 0.2s;