dynim-react 1.0.46 → 1.0.48
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/dist/theme.d.ts +2 -23
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +18 -47
- package/package.json +1 -1
package/dist/theme.d.ts
CHANGED
|
@@ -2,24 +2,7 @@
|
|
|
2
2
|
* Dynim Theme System
|
|
3
3
|
*
|
|
4
4
|
* Theme is automatically fetched from the API per project.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Example API response:
|
|
8
|
-
* ```json
|
|
9
|
-
* {
|
|
10
|
-
* "accent": "#4CAF50",
|
|
11
|
-
* "builderBg": "#000000",
|
|
12
|
-
* "chatAccent": "#8b5cf6"
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* CSS variables are automatically generated and can be used in components:
|
|
17
|
-
* ```css
|
|
18
|
-
* .builder-bar {
|
|
19
|
-
* background: var(--dynim-builder-bg);
|
|
20
|
-
* color: var(--dynim-builder-text);
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
5
|
+
* CSS variables are injected with defaults matching the original design.
|
|
23
6
|
*/
|
|
24
7
|
export interface DynimTheme {
|
|
25
8
|
accent?: string;
|
|
@@ -42,7 +25,7 @@ export interface DynimTheme {
|
|
|
42
25
|
hoverOpacity?: string;
|
|
43
26
|
}
|
|
44
27
|
/**
|
|
45
|
-
* Default theme values
|
|
28
|
+
* Default theme values - matches original SDK styling exactly
|
|
46
29
|
*/
|
|
47
30
|
export declare const defaultTheme: Required<DynimTheme>;
|
|
48
31
|
/**
|
|
@@ -72,8 +55,4 @@ export declare const themeVars: {
|
|
|
72
55
|
readonly selectionOpacity: "var(--dynim-selection-opacity)";
|
|
73
56
|
readonly hoverOpacity: "var(--dynim-hover-opacity)";
|
|
74
57
|
};
|
|
75
|
-
/**
|
|
76
|
-
* Helper to convert hex to rgba for opacity support
|
|
77
|
-
*/
|
|
78
|
-
export declare function hexToRgba(hex: string, opacity: string | number): string;
|
|
79
58
|
//# sourceMappingURL=theme.d.ts.map
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,UAAU;IAEzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,UAAU,CAwB7C,CAAC;AA+BF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,UAAe,GAAG,MAAM,CAW/D;AAED;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAwBZ,CAAC"}
|
package/dist/theme.js
CHANGED
|
@@ -2,50 +2,33 @@
|
|
|
2
2
|
* Dynim Theme System
|
|
3
3
|
*
|
|
4
4
|
* Theme is automatically fetched from the API per project.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Example API response:
|
|
8
|
-
* ```json
|
|
9
|
-
* {
|
|
10
|
-
* "accent": "#4CAF50",
|
|
11
|
-
* "builderBg": "#000000",
|
|
12
|
-
* "chatAccent": "#8b5cf6"
|
|
13
|
-
* }
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* CSS variables are automatically generated and can be used in components:
|
|
17
|
-
* ```css
|
|
18
|
-
* .builder-bar {
|
|
19
|
-
* background: var(--dynim-builder-bg);
|
|
20
|
-
* color: var(--dynim-builder-text);
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
5
|
+
* CSS variables are injected with defaults matching the original design.
|
|
23
6
|
*/
|
|
24
7
|
/**
|
|
25
|
-
* Default theme values
|
|
8
|
+
* Default theme values - matches original SDK styling exactly
|
|
26
9
|
*/
|
|
27
10
|
export const defaultTheme = {
|
|
28
|
-
// Builder Bar
|
|
29
|
-
accent: '#
|
|
30
|
-
accentHover: '#
|
|
11
|
+
// Builder Bar - original values
|
|
12
|
+
accent: '#3b82f6',
|
|
13
|
+
accentHover: '#2563eb',
|
|
31
14
|
builderBg: '#000000',
|
|
32
15
|
builderText: '#ffffff',
|
|
33
|
-
builderFont: 'system-ui, -apple-system, sans-serif',
|
|
16
|
+
builderFont: 'system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
34
17
|
builderRadius: '22px',
|
|
35
|
-
builderOpacity: '0.
|
|
36
|
-
// Chat Widget
|
|
37
|
-
chatAccent: '#
|
|
38
|
-
chatBg: '#
|
|
39
|
-
chatText: '#
|
|
40
|
-
chatFont: 'system-ui, -apple-system, sans-serif',
|
|
41
|
-
chatRadius: '
|
|
42
|
-
chatOpacity: '0.
|
|
43
|
-
// Selection
|
|
18
|
+
builderOpacity: '0.08',
|
|
19
|
+
// Chat Widget - original values
|
|
20
|
+
chatAccent: '#3b82f6',
|
|
21
|
+
chatBg: '#ffffff',
|
|
22
|
+
chatText: '#1f2937',
|
|
23
|
+
chatFont: 'system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
24
|
+
chatRadius: '16px',
|
|
25
|
+
chatOpacity: '0.08',
|
|
26
|
+
// Selection - original values
|
|
44
27
|
selectionColor: '#8b5cf6',
|
|
45
28
|
hoverColor: '#0ea5e9',
|
|
46
|
-
selectionRadius: '
|
|
47
|
-
selectionOpacity: '0.
|
|
48
|
-
hoverOpacity: '0.
|
|
29
|
+
selectionRadius: '0',
|
|
30
|
+
selectionOpacity: '0.1',
|
|
31
|
+
hoverOpacity: '0.1',
|
|
49
32
|
};
|
|
50
33
|
/**
|
|
51
34
|
* CSS variable names mapped to theme keys
|
|
@@ -112,15 +95,3 @@ export const themeVars = {
|
|
|
112
95
|
selectionOpacity: 'var(--dynim-selection-opacity)',
|
|
113
96
|
hoverOpacity: 'var(--dynim-hover-opacity)',
|
|
114
97
|
};
|
|
115
|
-
/**
|
|
116
|
-
* Helper to convert hex to rgba for opacity support
|
|
117
|
-
*/
|
|
118
|
-
export function hexToRgba(hex, opacity) {
|
|
119
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
120
|
-
if (!result)
|
|
121
|
-
return hex;
|
|
122
|
-
const r = parseInt(result[1], 16);
|
|
123
|
-
const g = parseInt(result[2], 16);
|
|
124
|
-
const b = parseInt(result[3], 16);
|
|
125
|
-
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
126
|
-
}
|