lua-cli 2.5.0 → 2.5.2

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.
@@ -4,6 +4,7 @@ import ProductInstance from "./product.instance.js";
4
4
  /**
5
5
  * Product search instance class providing a fluent API for product search results
6
6
  * Contains an array of ProductInstance objects matching the search query
7
+ * Supports array methods like map, filter, forEach for direct iteration
7
8
  */
8
9
  export default class ProductSearchInstance {
9
10
  products: ProductInstance[];
@@ -14,6 +15,63 @@ export default class ProductSearchInstance {
14
15
  * @param results - The product search results from the API
15
16
  */
16
17
  constructor(api: ProductAPI, results: SearchProductsResponse);
18
+ /**
19
+ * Returns the number of products in the search results
20
+ */
21
+ get length(): number;
22
+ /**
23
+ * Maps over the products array
24
+ * @param callback - Function to execute for each product
25
+ * @returns Array of mapped results
26
+ */
27
+ map<T>(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => T): T[];
28
+ /**
29
+ * Filters the products array
30
+ * @param callback - Function to test each product
31
+ * @returns Array of products that pass the test
32
+ */
33
+ filter(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => boolean): ProductInstance[];
34
+ /**
35
+ * Executes a function for each product
36
+ * @param callback - Function to execute for each product
37
+ */
38
+ forEach(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => void): void;
39
+ /**
40
+ * Finds the first product that satisfies the test
41
+ * @param callback - Function to test each product
42
+ * @returns The first product that passes the test, or undefined
43
+ */
44
+ find(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => boolean): ProductInstance | undefined;
45
+ /**
46
+ * Finds the index of the first product that satisfies the test
47
+ * @param callback - Function to test each product
48
+ * @returns The index of the first product that passes the test, or -1
49
+ */
50
+ findIndex(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => boolean): number;
51
+ /**
52
+ * Checks if some products satisfy the test
53
+ * @param callback - Function to test each product
54
+ * @returns true if at least one product passes the test
55
+ */
56
+ some(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => boolean): boolean;
57
+ /**
58
+ * Checks if all products satisfy the test
59
+ * @param callback - Function to test each product
60
+ * @returns true if all products pass the test
61
+ */
62
+ every(callback: (product: ProductInstance, index: number, array: ProductInstance[]) => boolean): boolean;
63
+ /**
64
+ * Reduces the products array to a single value
65
+ * @param callback - Function to execute on each product
66
+ * @param initialValue - Initial value for the accumulator
67
+ * @returns The final accumulated value
68
+ */
69
+ reduce<T>(callback: (accumulator: T, product: ProductInstance, index: number, array: ProductInstance[]) => T, initialValue: T): T;
70
+ /**
71
+ * Makes the instance iterable
72
+ * @returns Iterator for the products array
73
+ */
74
+ [Symbol.iterator](): Iterator<ProductInstance>;
17
75
  /**
18
76
  * Custom toJSON method to control what gets serialized when logging
19
77
  * @returns Serialized search results with product data
@@ -2,6 +2,7 @@ import ProductInstance from "./product.instance.js";
2
2
  /**
3
3
  * Product search instance class providing a fluent API for product search results
4
4
  * Contains an array of ProductInstance objects matching the search query
5
+ * Supports array methods like map, filter, forEach for direct iteration
5
6
  */
6
7
  export default class ProductSearchInstance {
7
8
  /**
@@ -19,6 +20,83 @@ export default class ProductSearchInstance {
19
20
  configurable: true
20
21
  });
21
22
  }
23
+ /**
24
+ * Returns the number of products in the search results
25
+ */
26
+ get length() {
27
+ return this.products.length;
28
+ }
29
+ /**
30
+ * Maps over the products array
31
+ * @param callback - Function to execute for each product
32
+ * @returns Array of mapped results
33
+ */
34
+ map(callback) {
35
+ return this.products.map(callback);
36
+ }
37
+ /**
38
+ * Filters the products array
39
+ * @param callback - Function to test each product
40
+ * @returns Array of products that pass the test
41
+ */
42
+ filter(callback) {
43
+ return this.products.filter(callback);
44
+ }
45
+ /**
46
+ * Executes a function for each product
47
+ * @param callback - Function to execute for each product
48
+ */
49
+ forEach(callback) {
50
+ this.products.forEach(callback);
51
+ }
52
+ /**
53
+ * Finds the first product that satisfies the test
54
+ * @param callback - Function to test each product
55
+ * @returns The first product that passes the test, or undefined
56
+ */
57
+ find(callback) {
58
+ return this.products.find(callback);
59
+ }
60
+ /**
61
+ * Finds the index of the first product that satisfies the test
62
+ * @param callback - Function to test each product
63
+ * @returns The index of the first product that passes the test, or -1
64
+ */
65
+ findIndex(callback) {
66
+ return this.products.findIndex(callback);
67
+ }
68
+ /**
69
+ * Checks if some products satisfy the test
70
+ * @param callback - Function to test each product
71
+ * @returns true if at least one product passes the test
72
+ */
73
+ some(callback) {
74
+ return this.products.some(callback);
75
+ }
76
+ /**
77
+ * Checks if all products satisfy the test
78
+ * @param callback - Function to test each product
79
+ * @returns true if all products pass the test
80
+ */
81
+ every(callback) {
82
+ return this.products.every(callback);
83
+ }
84
+ /**
85
+ * Reduces the products array to a single value
86
+ * @param callback - Function to execute on each product
87
+ * @param initialValue - Initial value for the accumulator
88
+ * @returns The final accumulated value
89
+ */
90
+ reduce(callback, initialValue) {
91
+ return this.products.reduce(callback, initialValue);
92
+ }
93
+ /**
94
+ * Makes the instance iterable
95
+ * @returns Iterator for the products array
96
+ */
97
+ [Symbol.iterator]() {
98
+ return this.products[Symbol.iterator]();
99
+ }
22
100
  /**
23
101
  * Custom toJSON method to control what gets serialized when logging
24
102
  * @returns Serialized search results with product data
@@ -8,6 +8,7 @@ import { UserDataAPI } from "../types/index.js";
8
8
  export default class UserDataInstance {
9
9
  data: Record<string, any>;
10
10
  private userAPI;
11
+ [key: string]: any;
11
12
  /**
12
13
  * Creates a new UserDataInstance with proxy support for direct property access
13
14
  * @param api - The UserDataAPI instance for making API calls
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;