@rubixstudios/payload-typesense 1.0.4 → 1.0.6
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/LICENSE +2 -2
- package/README.md +1 -1
- package/dist/components/ThemeProvider.d.ts +1 -2
- package/dist/components/ThemeProvider.d.ts.map +1 -1
- package/dist/components/ThemeProvider.js +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/themes/hooks.d.ts +5 -5
- package/dist/components/themes/hooks.d.ts.map +1 -1
- package/dist/components/themes/hooks.js +16 -16
- package/dist/components/themes/index.d.ts +4 -4
- package/dist/components/themes/index.js +4 -4
- package/dist/components/themes/themes.d.ts +1 -1
- package/dist/components/themes/themes.d.ts.map +1 -1
- package/dist/components/themes/themes.js +109 -109
- package/dist/components/themes/types.d.ts.map +1 -1
- package/dist/components/themes/utils.d.ts +1 -1
- package/dist/components/themes/utils.d.ts.map +1 -1
- package/dist/components/themes/utils.js +139 -139
- package/dist/endpoints/customEndpointHandler.d.ts +1 -1
- package/dist/endpoints/customEndpointHandler.js +1 -1
- package/dist/endpoints/search.d.ts +3 -3
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/search.js +65 -65
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -17
- package/dist/lib/cache.d.ts +1 -1
- package/dist/lib/cache.d.ts.map +1 -1
- package/dist/lib/cache.js +19 -19
- package/dist/lib/config-validation.d.ts +1 -1
- package/dist/lib/config-validation.d.ts.map +1 -1
- package/dist/lib/config-validation.js +18 -18
- package/dist/lib/hooks.d.ts +2 -2
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/hooks.js +2 -2
- package/dist/lib/initialization.d.ts +3 -3
- package/dist/lib/initialization.d.ts.map +1 -1
- package/dist/lib/initialization.js +5 -5
- package/dist/lib/schema-mapper.d.ts +2 -2
- package/dist/lib/schema-mapper.d.ts.map +1 -1
- package/dist/lib/schema-mapper.js +27 -27
- package/dist/lib/types.d.ts +3 -3
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/typesense-client.d.ts +3 -3
- package/dist/lib/typesense-client.d.ts.map +1 -1
- package/dist/lib/typesense-client.js +55 -8
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2024 Front Tribe
|
|
4
|
-
Copyright (c) 2025 Rubix Studios Pty. Ltd. <
|
|
3
|
+
Copyright (c) 2024 Front Tribe <https://fronttribe.com>
|
|
4
|
+
Copyright (c) 2025 Rubix Studios Pty. Ltd. <https://rubixstudios.com.au>
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ThemeConfig, ThemeContextValue } from './themes/types.js';
|
|
3
2
|
interface ThemeProviderProps {
|
|
4
3
|
children: React.ReactNode;
|
|
5
4
|
config: ThemeConfig;
|
|
6
5
|
}
|
|
7
|
-
export declare function ThemeProvider({ children, config }: ThemeProviderProps):
|
|
6
|
+
export declare function ThemeProvider({ children, config }: ThemeProviderProps): import("react").JSX.Element;
|
|
8
7
|
export declare function useTheme(): ThemeContextValue;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/components/ThemeProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAIvE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,EAAE,WAAW,CAAA;CACpB;AAID,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,+BAIrE;AAED,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { createContext, use } from 'react';
|
|
3
3
|
import { useThemeConfig } from './themes/hooks.js';
|
|
4
4
|
const ThemeContext = /*#__PURE__*/ createContext(null);
|
|
5
5
|
export function ThemeProvider({ children, config }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type { BaseSearchInputProps, HealthCheckResponse, SearchResponse, SearchResult, SearchResultProps, TypesenseSearchConfig, } from
|
|
2
|
-
export { default as HeadlessSearchInput } from
|
|
3
|
-
export type { HeadlessSearchInputProps } from
|
|
4
|
-
export { ThemeProvider } from
|
|
5
|
-
export * from
|
|
1
|
+
export type { BaseSearchInputProps, HealthCheckResponse, SearchResponse, SearchResult, SearchResultProps, TypesenseSearchConfig, } from "../lib/types.js";
|
|
2
|
+
export { default as HeadlessSearchInput } from "./HeadlessSearchInput.js";
|
|
3
|
+
export type { HeadlessSearchInputProps } from "./HeadlessSearchInput.js";
|
|
4
|
+
export { ThemeProvider } from "./ThemeProvider.js";
|
|
5
|
+
export * from "./themes/index.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACrB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,YAAY,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,cAAc,mBAAmB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as HeadlessSearchInput } from
|
|
2
|
-
export { ThemeProvider } from
|
|
3
|
-
export * from
|
|
1
|
+
export { default as HeadlessSearchInput } from "./HeadlessSearchInput.js";
|
|
2
|
+
export { ThemeProvider } from "./ThemeProvider.js";
|
|
3
|
+
export * from "./themes/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Theme, ThemeConfig, ThemeContextValue } from
|
|
1
|
+
import type { Theme, ThemeConfig, ThemeContextValue } from "./types.js";
|
|
2
2
|
declare const ThemeContext: import("react").Context<ThemeContextValue | null>;
|
|
3
3
|
/**
|
|
4
4
|
* Hook to access theme context
|
|
@@ -27,19 +27,19 @@ export declare function useThemeClasses(config: ThemeConfig): Record<string, str
|
|
|
27
27
|
/**
|
|
28
28
|
* Hook to get theme-aware color values
|
|
29
29
|
*/
|
|
30
|
-
export declare function useThemeColors(config: ThemeConfig): Theme[
|
|
30
|
+
export declare function useThemeColors(config: ThemeConfig): Theme["colors"];
|
|
31
31
|
/**
|
|
32
32
|
* Hook to get theme-aware spacing values
|
|
33
33
|
*/
|
|
34
|
-
export declare function useThemeSpacing(config: ThemeConfig): Theme[
|
|
34
|
+
export declare function useThemeSpacing(config: ThemeConfig): Theme["spacing"];
|
|
35
35
|
/**
|
|
36
36
|
* Hook to get theme-aware typography values
|
|
37
37
|
*/
|
|
38
|
-
export declare function useThemeTypography(config: ThemeConfig): Theme[
|
|
38
|
+
export declare function useThemeTypography(config: ThemeConfig): Theme["typography"];
|
|
39
39
|
/**
|
|
40
40
|
* Hook to detect system theme preference
|
|
41
41
|
*/
|
|
42
|
-
export declare function useSystemTheme():
|
|
42
|
+
export declare function useSystemTheme(): "dark" | "light";
|
|
43
43
|
/**
|
|
44
44
|
* Hook to create auto theme configuration based on system preference
|
|
45
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/themes/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAYvE,QAAA,MAAM,YAAY,mDAAgD,CAAA;AAElE;;GAEG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/themes/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAYvE,QAAA,MAAM,YAAY,mDAAgD,CAAA;AAElE;;GAEG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,CAuBrE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,WAAW,EACvB,QAAQ,EAAE,OAAO,GACf,WAAW,CA8Bb;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,GACb,WAAW,CAIb;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,CAKnE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAKrE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,CAK3E;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,OAAO,CAUjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM1E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,GAC7B,WAAW,CAOb;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { createContext, useCallback, useContext, useMemo } from
|
|
3
|
-
import { applyTheme, generateThemeClasses, getThemeVariables, isDarkTheme, isLightTheme, mergeThemeConfig } from
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo } from "react";
|
|
3
|
+
import { applyTheme, generateThemeClasses, getThemeVariables, isDarkTheme, isLightTheme, mergeThemeConfig } from "./utils.js";
|
|
4
4
|
// Theme context
|
|
5
5
|
const ThemeContext = createContext(null);
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ const ThemeContext = createContext(null);
|
|
|
8
8
|
*/ export function useTheme() {
|
|
9
9
|
const context = useContext(ThemeContext);
|
|
10
10
|
if (!context) {
|
|
11
|
-
throw new Error(
|
|
11
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
12
12
|
}
|
|
13
13
|
return context;
|
|
14
14
|
}
|
|
@@ -61,18 +61,18 @@ const ThemeContext = createContext(null);
|
|
|
61
61
|
spacing: {
|
|
62
62
|
...baseConfig.spacing,
|
|
63
63
|
// Adjust spacing for mobile
|
|
64
|
-
headerPadding:
|
|
65
|
-
inputFontSize:
|
|
66
|
-
inputPadding:
|
|
67
|
-
itemPadding:
|
|
68
|
-
resultsMaxHeight:
|
|
64
|
+
headerPadding: "0.75rem 1rem",
|
|
65
|
+
inputFontSize: "16px",
|
|
66
|
+
inputPadding: "0.875rem 1rem",
|
|
67
|
+
itemPadding: "0.875rem 1rem",
|
|
68
|
+
resultsMaxHeight: "20rem"
|
|
69
69
|
},
|
|
70
70
|
// Disable animations on mobile for better performance
|
|
71
71
|
animations: isMobile ? {
|
|
72
72
|
...baseConfig.animations,
|
|
73
|
-
transitionFast:
|
|
74
|
-
transitionNormal:
|
|
75
|
-
transitionSlow:
|
|
73
|
+
transitionFast: "0s",
|
|
74
|
+
transitionNormal: "0s",
|
|
75
|
+
transitionSlow: "0s"
|
|
76
76
|
} : baseConfig.animations
|
|
77
77
|
};
|
|
78
78
|
return mobileConfig;
|
|
@@ -142,10 +142,10 @@ const ThemeContext = createContext(null);
|
|
|
142
142
|
* Hook to detect system theme preference
|
|
143
143
|
*/ export function useSystemTheme() {
|
|
144
144
|
return useMemo(()=>{
|
|
145
|
-
if (typeof window ===
|
|
146
|
-
return
|
|
145
|
+
if (typeof window === "undefined") {
|
|
146
|
+
return "light";
|
|
147
147
|
}
|
|
148
|
-
return window.matchMedia(
|
|
148
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
149
149
|
}, []);
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
@@ -153,7 +153,7 @@ const ThemeContext = createContext(null);
|
|
|
153
153
|
*/ export function useAutoTheme(lightTheme, darkTheme) {
|
|
154
154
|
const systemTheme = useSystemTheme();
|
|
155
155
|
return useMemo(()=>{
|
|
156
|
-
return systemTheme ===
|
|
156
|
+
return systemTheme === "dark" ? darkTheme : lightTheme;
|
|
157
157
|
}, [
|
|
158
158
|
systemTheme,
|
|
159
159
|
lightTheme,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./hooks.js";
|
|
2
|
+
export * from "./themes.js";
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export * from "./utils.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./hooks.js";
|
|
2
|
+
export * from "./themes.js";
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export * from "./utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/components/themes/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/components/themes/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AA8DvC,eAAO,MAAM,WAAW,EAAE,KAsDzB,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,KAqDvB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAGxC,CAAA;AAGD,eAAO,MAAM,YAAY,OAAc,CAAA"}
|
|
@@ -1,149 +1,149 @@
|
|
|
1
1
|
const baseTheme = {
|
|
2
2
|
animations: {
|
|
3
|
-
animationFast:
|
|
4
|
-
animationNormal:
|
|
5
|
-
animationSlow:
|
|
6
|
-
easeIn:
|
|
7
|
-
easeInOut:
|
|
8
|
-
easeOut:
|
|
9
|
-
transitionFast:
|
|
10
|
-
transitionNormal:
|
|
11
|
-
transitionSlow:
|
|
3
|
+
animationFast: "0.15s",
|
|
4
|
+
animationNormal: "0.2s",
|
|
5
|
+
animationSlow: "0.3s",
|
|
6
|
+
easeIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
7
|
+
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
8
|
+
easeOut: "cubic-bezier(0, 0, 0.2, 1)",
|
|
9
|
+
transitionFast: "0.15s",
|
|
10
|
+
transitionNormal: "0.2s",
|
|
11
|
+
transitionSlow: "0.3s"
|
|
12
12
|
},
|
|
13
13
|
shadows: {
|
|
14
|
-
focusShadow:
|
|
15
|
-
focusShadowColor:
|
|
16
|
-
shadowLg:
|
|
17
|
-
shadowMd:
|
|
18
|
-
shadowSm:
|
|
19
|
-
shadowXl:
|
|
14
|
+
focusShadow: "0 0 0 3px",
|
|
15
|
+
focusShadowColor: "rgba(59, 130, 246, 0.1)",
|
|
16
|
+
shadowLg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
17
|
+
shadowMd: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
18
|
+
shadowSm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
19
|
+
shadowXl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
20
20
|
},
|
|
21
21
|
spacing: {
|
|
22
|
-
headerFontSize:
|
|
23
|
-
headerPadding:
|
|
24
|
-
inputBorderRadius:
|
|
25
|
-
inputFontSize:
|
|
26
|
-
inputPadding:
|
|
27
|
-
itemBorderRadius:
|
|
28
|
-
itemMargin:
|
|
29
|
-
itemPadding:
|
|
30
|
-
metaFontSize:
|
|
31
|
-
metaPadding:
|
|
32
|
-
resultsBorderRadius:
|
|
33
|
-
resultsMaxHeight:
|
|
34
|
-
resultsPadding:
|
|
22
|
+
headerFontSize: "0.875rem",
|
|
23
|
+
headerPadding: "0.75rem 1rem",
|
|
24
|
+
inputBorderRadius: "0.5rem",
|
|
25
|
+
inputFontSize: "1rem",
|
|
26
|
+
inputPadding: "0.5rem 0.75rem",
|
|
27
|
+
itemBorderRadius: "0",
|
|
28
|
+
itemMargin: "0",
|
|
29
|
+
itemPadding: "0.75rem 1rem",
|
|
30
|
+
metaFontSize: "0.75rem",
|
|
31
|
+
metaPadding: "0.5rem 0",
|
|
32
|
+
resultsBorderRadius: "0 0 0.5rem 0.5rem",
|
|
33
|
+
resultsMaxHeight: "24rem",
|
|
34
|
+
resultsPadding: "0"
|
|
35
35
|
},
|
|
36
36
|
typography: {
|
|
37
37
|
fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
38
38
|
fontFamilyMono: 'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace',
|
|
39
|
-
fontSize2xl:
|
|
40
|
-
fontSizeBase:
|
|
41
|
-
fontSizeLg:
|
|
42
|
-
fontSizeSm:
|
|
43
|
-
fontSizeXl:
|
|
44
|
-
fontSizeXs:
|
|
45
|
-
fontWeightBold:
|
|
46
|
-
fontWeightMedium:
|
|
47
|
-
fontWeightNormal:
|
|
48
|
-
fontWeightSemibold:
|
|
49
|
-
lineHeightNormal:
|
|
50
|
-
lineHeightRelaxed:
|
|
51
|
-
lineHeightTight:
|
|
39
|
+
fontSize2xl: "1.5rem",
|
|
40
|
+
fontSizeBase: "1rem",
|
|
41
|
+
fontSizeLg: "1.125rem",
|
|
42
|
+
fontSizeSm: "0.875rem",
|
|
43
|
+
fontSizeXl: "1.25rem",
|
|
44
|
+
fontSizeXs: "0.75rem",
|
|
45
|
+
fontWeightBold: "700",
|
|
46
|
+
fontWeightMedium: "500",
|
|
47
|
+
fontWeightNormal: "400",
|
|
48
|
+
fontWeightSemibold: "600",
|
|
49
|
+
lineHeightNormal: "1.5",
|
|
50
|
+
lineHeightRelaxed: "1.625",
|
|
51
|
+
lineHeightTight: "1.25"
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
// Modern theme - clean, professional, with subtle shadows
|
|
55
55
|
export const modernTheme = {
|
|
56
|
-
name:
|
|
56
|
+
name: "modern",
|
|
57
57
|
colors: {
|
|
58
58
|
// Input colors
|
|
59
|
-
inputBackground:
|
|
60
|
-
inputBorder:
|
|
61
|
-
inputBorderFocus:
|
|
62
|
-
inputPlaceholder:
|
|
63
|
-
inputText:
|
|
59
|
+
inputBackground: "#ffffff",
|
|
60
|
+
inputBorder: "#d1d5db",
|
|
61
|
+
inputBorderFocus: "#3b82f6",
|
|
62
|
+
inputPlaceholder: "#6b7280",
|
|
63
|
+
inputText: "#111827",
|
|
64
64
|
// Results container colors
|
|
65
|
-
resultsBackground:
|
|
66
|
-
resultsBorder:
|
|
67
|
-
resultsShadow:
|
|
65
|
+
resultsBackground: "#ffffff",
|
|
66
|
+
resultsBorder: "#d1d5db",
|
|
67
|
+
resultsShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
68
68
|
// Header colors
|
|
69
|
-
headerBackground:
|
|
70
|
-
headerBorder:
|
|
71
|
-
headerText:
|
|
69
|
+
headerBackground: "#f9fafb",
|
|
70
|
+
headerBorder: "#e5e7eb",
|
|
71
|
+
headerText: "#6b7280",
|
|
72
72
|
// Result item colors
|
|
73
|
-
resultBackground:
|
|
74
|
-
resultBackgroundFocus:
|
|
75
|
-
resultBackgroundHover:
|
|
76
|
-
resultBorder:
|
|
73
|
+
resultBackground: "#ffffff",
|
|
74
|
+
resultBackgroundFocus: "#eff6ff",
|
|
75
|
+
resultBackgroundHover: "#f8fafc",
|
|
76
|
+
resultBorder: "#f3f4f6",
|
|
77
77
|
// Text colors
|
|
78
|
-
descriptionText:
|
|
79
|
-
highlightBackground:
|
|
80
|
-
highlightText:
|
|
81
|
-
metaText:
|
|
82
|
-
titleText:
|
|
78
|
+
descriptionText: "#6b7280",
|
|
79
|
+
highlightBackground: "#fef3c7",
|
|
80
|
+
highlightText: "#92400e",
|
|
81
|
+
metaText: "#9ca3af",
|
|
82
|
+
titleText: "#111827",
|
|
83
83
|
// Interactive elements
|
|
84
|
-
collectionBadge:
|
|
85
|
-
collectionBadgeText:
|
|
86
|
-
scoreBadge:
|
|
87
|
-
scoreBadgeText:
|
|
84
|
+
collectionBadge: "#dbeafe",
|
|
85
|
+
collectionBadgeText: "#1e40af",
|
|
86
|
+
scoreBadge: "#dcfce7",
|
|
87
|
+
scoreBadgeText: "#166534",
|
|
88
88
|
// State colors
|
|
89
|
-
errorBackground:
|
|
90
|
-
errorText:
|
|
91
|
-
loadingText:
|
|
92
|
-
noResultsText:
|
|
89
|
+
errorBackground: "#fef2f2",
|
|
90
|
+
errorText: "#dc2626",
|
|
91
|
+
loadingText: "#6b7280",
|
|
92
|
+
noResultsText: "#6b7280",
|
|
93
93
|
// Facet colors
|
|
94
|
-
facetActiveBackground:
|
|
95
|
-
facetActiveText:
|
|
96
|
-
facetBackground:
|
|
97
|
-
facetBorder:
|
|
98
|
-
facetText:
|
|
94
|
+
facetActiveBackground: "#3b82f6",
|
|
95
|
+
facetActiveText: "#ffffff",
|
|
96
|
+
facetBackground: "#f3f4f6",
|
|
97
|
+
facetBorder: "#d1d5db",
|
|
98
|
+
facetText: "#374151"
|
|
99
99
|
},
|
|
100
100
|
...baseTheme
|
|
101
101
|
};
|
|
102
102
|
// Dark theme - perfect for dark mode applications
|
|
103
103
|
export const darkTheme = {
|
|
104
|
-
name:
|
|
104
|
+
name: "dark",
|
|
105
105
|
colors: {
|
|
106
106
|
// Input colors
|
|
107
|
-
inputBackground:
|
|
108
|
-
inputBorder:
|
|
109
|
-
inputBorderFocus:
|
|
110
|
-
inputPlaceholder:
|
|
111
|
-
inputText:
|
|
107
|
+
inputBackground: "#1f2937",
|
|
108
|
+
inputBorder: "#374151",
|
|
109
|
+
inputBorderFocus: "#3b82f6",
|
|
110
|
+
inputPlaceholder: "#9ca3af",
|
|
111
|
+
inputText: "#f9fafb",
|
|
112
112
|
// Results container colors
|
|
113
|
-
resultsBackground:
|
|
114
|
-
resultsBorder:
|
|
115
|
-
resultsShadow:
|
|
113
|
+
resultsBackground: "#1f2937",
|
|
114
|
+
resultsBorder: "#374151",
|
|
115
|
+
resultsShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)",
|
|
116
116
|
// Header colors
|
|
117
|
-
headerBackground:
|
|
118
|
-
headerBorder:
|
|
119
|
-
headerText:
|
|
117
|
+
headerBackground: "#111827",
|
|
118
|
+
headerBorder: "#374151",
|
|
119
|
+
headerText: "#9ca3af",
|
|
120
120
|
// Result item colors
|
|
121
|
-
resultBackground:
|
|
122
|
-
resultBackgroundFocus:
|
|
123
|
-
resultBackgroundHover:
|
|
124
|
-
resultBorder:
|
|
121
|
+
resultBackground: "#1f2937",
|
|
122
|
+
resultBackgroundFocus: "#1e3a8a",
|
|
123
|
+
resultBackgroundHover: "#111827",
|
|
124
|
+
resultBorder: "#374151",
|
|
125
125
|
// Text colors
|
|
126
|
-
descriptionText:
|
|
127
|
-
highlightBackground:
|
|
128
|
-
highlightText:
|
|
129
|
-
metaText:
|
|
130
|
-
titleText:
|
|
126
|
+
descriptionText: "#d1d5db",
|
|
127
|
+
highlightBackground: "#451a03",
|
|
128
|
+
highlightText: "#fbbf24",
|
|
129
|
+
metaText: "#9ca3af",
|
|
130
|
+
titleText: "#f9fafb",
|
|
131
131
|
// Interactive elements
|
|
132
|
-
collectionBadge:
|
|
133
|
-
collectionBadgeText:
|
|
134
|
-
scoreBadge:
|
|
135
|
-
scoreBadgeText:
|
|
132
|
+
collectionBadge: "#1e3a8a",
|
|
133
|
+
collectionBadgeText: "#93c5fd",
|
|
134
|
+
scoreBadge: "#064e3b",
|
|
135
|
+
scoreBadgeText: "#6ee7b7",
|
|
136
136
|
// State colors
|
|
137
|
-
errorBackground:
|
|
138
|
-
errorText:
|
|
139
|
-
loadingText:
|
|
140
|
-
noResultsText:
|
|
137
|
+
errorBackground: "#7f1d1d",
|
|
138
|
+
errorText: "#fca5a5",
|
|
139
|
+
loadingText: "#9ca3af",
|
|
140
|
+
noResultsText: "#9ca3af",
|
|
141
141
|
// Facet colors
|
|
142
|
-
facetActiveBackground:
|
|
143
|
-
facetActiveText:
|
|
144
|
-
facetBackground:
|
|
145
|
-
facetBorder:
|
|
146
|
-
facetText:
|
|
142
|
+
facetActiveBackground: "#3b82f6",
|
|
143
|
+
facetActiveText: "#ffffff",
|
|
144
|
+
facetBackground: "#374151",
|
|
145
|
+
facetBorder: "#4b5563",
|
|
146
|
+
facetText: "#d1d5db"
|
|
147
147
|
},
|
|
148
148
|
...baseTheme
|
|
149
149
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/themes/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/themes/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAE3B,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IAEjB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;IAEvB,eAAe,EAAE,MAAM,CAAA;IAEvB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IAEjB,gBAAgB,EAAE,MAAM,CAAA;IAExB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAA;IAGrB,eAAe,EAAE,MAAM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UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IACzD,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAA;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/themes/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAIlE;;GAEG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAEjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/themes/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAIlE;;GAEG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAEjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CA2B3D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,KAAK,EACZ,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAC/B,YAAY,CAgXd;AAED;;GAEG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACd,MAAM,CAaR;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAMjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAElD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgCtE"}
|