dbgate-api-premium 6.8.2 → 7.0.0

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,21 +1,29 @@
1
- const getDiagramExport = (html, css, themeType, themeClassName, watermark) => {
1
+ const getDiagramExport = (html, css, themeType, themeVariables, watermark) => {
2
2
  const watermarkHtml = watermark
3
3
  ? `
4
- <div style="position: fixed; bottom: 0; right: 0; padding: 5px; font-size: 12px; color: var(--theme-font-2); background-color: var(--theme-bg-2); border-top-left-radius: 5px; border: 1px solid var(--theme-border);">
4
+ <div style="position: fixed; bottom: 0; right: 0; padding: 5px; font-size: 12px; color: var(--theme-generic-font-grayed); background-color: var(--theme-datagrid-background); border-top-left-radius: 5px; border: var(--theme-card-border);">
5
5
  ${watermark}
6
6
  </div>
7
7
  `
8
8
  : '';
9
+
10
+ // Convert theme variables object to CSS custom properties
11
+ const themeVariablesCSS = themeVariables
12
+ ? `:root {\n${Object.entries(themeVariables).map(([key, value]) => ` ${key}: ${value};`).join('\n')}\n}`
13
+ : '';
14
+
9
15
  return `<html>
10
16
  <meta charset='utf-8'>
11
17
 
12
18
  <head>
13
19
  <style>
20
+ ${themeVariablesCSS}
21
+
14
22
  ${css}
15
23
 
16
24
  body {
17
- background: var(--theme-bg-1);
18
- color: var(--theme-font-1);
25
+ background: var(--theme-datagrid-background);
26
+ color: var(--theme-generic-font);
19
27
  }
20
28
  </style>
21
29
 
@@ -55,7 +63,7 @@ const getDiagramExport = (html, css, themeType, themeClassName, watermark) => {
55
63
  </script>
56
64
  </head>
57
65
 
58
- <body class='${themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light'} ${themeClassName}' style='user-select:none; cursor:pointer'>
66
+ <body class='${themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light'}' style='user-select:none; cursor:pointer'>
59
67
  ${html}
60
68
  ${watermarkHtml}
61
69
  </body>