@trops/dash-core 0.1.139 → 0.1.141

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.
@@ -14,7 +14,7 @@ var require$$6 = require('csv-parser');
14
14
  var require$$0$3 = require('image-downloader');
15
15
  var require$$2$1 = require('get-pixels');
16
16
  var require$$3$1 = require('extract-colors');
17
- var require$$8 = require('https');
17
+ var require$$8$1 = require('https');
18
18
  var require$$0$5 = require('@modelcontextprotocol/sdk/client/index.js');
19
19
  var require$$1$3 = require('@modelcontextprotocol/sdk/client/stdio.js');
20
20
  var require$$0$4 = require('pkce-challenge');
@@ -35,6 +35,31 @@ function getDefaultExportFromCjs (x) {
35
35
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
36
36
  }
37
37
 
38
+ function getAugmentedNamespace(n) {
39
+ if (n.__esModule) return n;
40
+ var f = n.default;
41
+ if (typeof f == "function") {
42
+ var a = function a () {
43
+ if (this instanceof a) {
44
+ return Reflect.construct(f, arguments, this.constructor);
45
+ }
46
+ return f.apply(this, arguments);
47
+ };
48
+ a.prototype = f.prototype;
49
+ } else a = {};
50
+ Object.defineProperty(a, '__esModule', {value: true});
51
+ Object.keys(n).forEach(function (k) {
52
+ var d = Object.getOwnPropertyDescriptor(n, k);
53
+ Object.defineProperty(a, k, d.get ? d : {
54
+ enumerable: true,
55
+ get: function () {
56
+ return n[k];
57
+ }
58
+ });
59
+ });
60
+ return a;
61
+ }
62
+
38
63
  const SECURE_STORE_ENCRYPTION_CHECK$1 = "secure-storage-encryption-check";
39
64
  const SECURE_STORE_ENCRYPTION_CHECK_COMPLETE =
40
65
  "secure-storage-encryption-check-complete";
@@ -3607,7 +3632,7 @@ const { getFileContents: getFileContents$5, writeToFile: writeToFile$2 } = file;
3607
3632
  const ObjectsToCsv = require$$5$1;
3608
3633
  const Transform = transform;
3609
3634
  const { extractColorsFromImageURL: extractColorsFromImageURL$1 } = color;
3610
- const https = require$$8;
3635
+ const https = require$$8$1;
3611
3636
  const appName$5 = "Dashboard";
3612
3637
 
3613
3638
  const dataController$1 = {
@@ -25601,7 +25626,7 @@ async function refreshGoogleOAuthToken(tokenRefresh) {
25601
25626
 
25602
25627
  console.log("[mcpController] Refreshing Google OAuth token...");
25603
25628
 
25604
- const https = require$$8;
25629
+ const https = require$$8$1;
25605
25630
  const postData = [
25606
25631
  `client_id=${encodeURIComponent(keyData.client_id)}`,
25607
25632
  `client_secret=${encodeURIComponent(keyData.client_secret)}`,
@@ -28670,6 +28695,59 @@ var dashboardConfigValidator$1 = {
28670
28695
  CURRENT_SCHEMA_VERSION: CURRENT_SCHEMA_VERSION$1,
28671
28696
  };
28672
28697
 
28698
+ /**
28699
+ * Shared Tailwind color utilities.
28700
+ *
28701
+ * Single source of truth for mapping Tailwind color family names to hex values.
28702
+ * Used by both renderer components (theme detail/discovery) and electron
28703
+ * controllers (theme publish/install).
28704
+ */
28705
+
28706
+ // Tailwind color family name → representative hex (500 shade)
28707
+ const TAILWIND_COLORS$1 = {
28708
+ slate: "#64748b",
28709
+ gray: "#6b7280",
28710
+ zinc: "#71717a",
28711
+ neutral: "#737373",
28712
+ stone: "#78716c",
28713
+ red: "#ef4444",
28714
+ orange: "#f97316",
28715
+ amber: "#f59e0b",
28716
+ yellow: "#eab308",
28717
+ lime: "#84cc16",
28718
+ green: "#22c55e",
28719
+ emerald: "#10b981",
28720
+ teal: "#14b8a6",
28721
+ cyan: "#06b6d4",
28722
+ sky: "#0ea5e9",
28723
+ blue: "#3b82f6",
28724
+ indigo: "#6366f1",
28725
+ violet: "#8b5cf6",
28726
+ purple: "#a855f7",
28727
+ fuchsia: "#d946ef",
28728
+ pink: "#ec4899",
28729
+ rose: "#f43f5e",
28730
+ };
28731
+
28732
+ /**
28733
+ * Convert a color value to a CSS-usable color.
28734
+ * If it's a Tailwind family name, map to its hex 500 shade.
28735
+ * If it already looks like a hex/rgb/hsl value, return as-is.
28736
+ */
28737
+ function toDisplayColor$2(value) {
28738
+ if (!value) return "";
28739
+ const lower = value.toLowerCase().trim();
28740
+ return TAILWIND_COLORS$1[lower] || value;
28741
+ }
28742
+
28743
+ var colorUtils = /*#__PURE__*/Object.freeze({
28744
+ __proto__: null,
28745
+ TAILWIND_COLORS: TAILWIND_COLORS$1,
28746
+ toDisplayColor: toDisplayColor$2
28747
+ });
28748
+
28749
+ var require$$8 = /*@__PURE__*/getAugmentedNamespace(colorUtils);
28750
+
28673
28751
  /**
28674
28752
  * dashboardConfigUtils.js
28675
28753
  *
@@ -29016,42 +29094,7 @@ function checkDashboardCompatibility(
29016
29094
  };
29017
29095
  }
29018
29096
 
29019
- // Tailwind color family name representative hex (500 shade)
29020
- const TAILWIND_COLORS$1 = {
29021
- slate: "#64748b",
29022
- gray: "#6b7280",
29023
- zinc: "#71717a",
29024
- neutral: "#737373",
29025
- stone: "#78716c",
29026
- red: "#ef4444",
29027
- orange: "#f97316",
29028
- amber: "#f59e0b",
29029
- yellow: "#eab308",
29030
- lime: "#84cc16",
29031
- green: "#22c55e",
29032
- emerald: "#10b981",
29033
- teal: "#14b8a6",
29034
- cyan: "#06b6d4",
29035
- sky: "#0ea5e9",
29036
- blue: "#3b82f6",
29037
- indigo: "#6366f1",
29038
- violet: "#8b5cf6",
29039
- purple: "#a855f7",
29040
- fuchsia: "#d946ef",
29041
- pink: "#ec4899",
29042
- rose: "#f43f5e",
29043
- };
29044
-
29045
- /**
29046
- * Convert a color value to a CSS-usable color.
29047
- * If it's a Tailwind family name, map to its hex 500 shade.
29048
- */
29049
- function toDisplayColor$1(value) {
29050
- if (!value) return "";
29051
- const lower = value.toLowerCase().trim();
29052
- if (TAILWIND_COLORS$1[lower]) return TAILWIND_COLORS$1[lower];
29053
- return value;
29054
- }
29097
+ const { toDisplayColor: toDisplayColor$1 } = require$$8;
29055
29098
 
29056
29099
  /**
29057
29100
  * Generate a registry manifest from a dashboard config.
@@ -31188,43 +31231,10 @@ function generateThemeRegistryManifest(themeData, themeKey, options = {}) {
31188
31231
  };
31189
31232
  }
31190
31233
 
31191
- // Tailwind color family name → representative hex (500 shade)
31192
- const TAILWIND_COLORS = {
31193
- slate: "#64748b",
31194
- gray: "#6b7280",
31195
- zinc: "#71717a",
31196
- neutral: "#737373",
31197
- stone: "#78716c",
31198
- red: "#ef4444",
31199
- orange: "#f97316",
31200
- amber: "#f59e0b",
31201
- yellow: "#eab308",
31202
- lime: "#84cc16",
31203
- green: "#22c55e",
31204
- emerald: "#10b981",
31205
- teal: "#14b8a6",
31206
- cyan: "#06b6d4",
31207
- sky: "#0ea5e9",
31208
- blue: "#3b82f6",
31209
- indigo: "#6366f1",
31210
- violet: "#8b5cf6",
31211
- purple: "#a855f7",
31212
- fuchsia: "#d946ef",
31213
- pink: "#ec4899",
31214
- rose: "#f43f5e",
31215
- };
31216
-
31217
- /**
31218
- * Convert a color value to a CSS-usable color.
31219
- * If it's a Tailwind family name, map to its hex 500 shade.
31220
- * If it already looks like a hex/rgb/hsl value, return as-is.
31221
- */
31222
- function toDisplayColor(value) {
31223
- if (!value) return "";
31224
- const lower = value.toLowerCase().trim();
31225
- if (TAILWIND_COLORS[lower]) return TAILWIND_COLORS[lower];
31226
- return value;
31227
- }
31234
+ const {
31235
+ TAILWIND_COLORS,
31236
+ toDisplayColor,
31237
+ } = require$$8;
31228
31238
 
31229
31239
  /**
31230
31240
  * Extract primary/secondary/tertiary/neutral colors from a theme object.
@@ -34540,11 +34550,7 @@ const registryApi$2 = {
34540
34550
  */
34541
34551
  searchThemes: async (query = "", filters = {}) => {
34542
34552
  try {
34543
- return await ipcRenderer$d.invoke(
34544
- "registry:search-themes",
34545
- query,
34546
- filters,
34547
- );
34553
+ return await ipcRenderer$d.invoke("registry:search-themes", query, filters);
34548
34554
  } catch (error) {
34549
34555
  console.error("[RegistryApi] Error searching themes:", error);
34550
34556
  throw error;