@opexa/portal-components 0.1.32 → 0.1.34

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.
@@ -10,7 +10,7 @@ export declare const tabsRecipe: import("tailwind-variants").TVReturnType<{
10
10
  trigger: string;
11
11
  };
12
12
  };
13
- }, Record<"content" | "root" | "trigger" | "list" | "indicator", string | string[]>, undefined, {
13
+ }, Record<"content" | "root" | "list" | "trigger" | "indicator", string | string[]>, undefined, {
14
14
  size: {
15
15
  md: {};
16
16
  };
@@ -22,7 +22,7 @@ export declare const tabsRecipe: import("tailwind-variants").TVReturnType<{
22
22
  trigger: string;
23
23
  };
24
24
  };
25
- }, Record<"content" | "root" | "trigger" | "list" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
25
+ }, Record<"content" | "root" | "list" | "trigger" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
26
26
  size: {
27
27
  md: {};
28
28
  };
@@ -34,4 +34,4 @@ export declare const tabsRecipe: import("tailwind-variants").TVReturnType<{
34
34
  trigger: string;
35
35
  };
36
36
  };
37
- }, Record<"content" | "root" | "trigger" | "list" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>;
37
+ }, Record<"content" | "root" | "list" | "trigger" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>;
@@ -1 +1,6 @@
1
1
  export declare function sanitizeGamesSearch(search?: string): string;
2
+ export declare function collapseGamesSearch(search?: string): string;
3
+ export declare function normalizeGameName(value: string): string;
4
+ export declare function mergeUniqueById<T extends {
5
+ id: string;
6
+ }>(...lists: T[][]): T[];
@@ -7,3 +7,23 @@ export function sanitizeGamesSearch(search) {
7
7
  const normalized = cleaned.trim().replace(/\s+/g, ' ');
8
8
  return normalized.length > 0 ? normalized : '';
9
9
  }
10
+ export function collapseGamesSearch(search) {
11
+ return sanitizeGamesSearch(search).replace(/\s+/g, '');
12
+ }
13
+ export function normalizeGameName(value) {
14
+ return value.toLowerCase().replace(/[^a-z0-9]/g, '');
15
+ }
16
+ export function mergeUniqueById(...lists) {
17
+ const seen = new Set();
18
+ const result = [];
19
+ for (const list of lists) {
20
+ for (const item of list) {
21
+ if (seen.has(item.id)) {
22
+ continue;
23
+ }
24
+ seen.add(item.id);
25
+ result.push(item);
26
+ }
27
+ }
28
+ return result;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",