@trops/dash-core 0.1.44 → 0.1.46

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.
@@ -8641,6 +8641,20 @@ var dynamicWidgetLoaderExports = dynamicWidgetLoader$2.exports;
8641
8641
 
8642
8642
  for (const candidate of candidates) {
8643
8643
  if (fs.existsSync(candidate)) {
8644
+ // Skip ESM files — the eval pipeline requires CJS
8645
+ if (candidate.endsWith(".js") && !candidate.endsWith(".cjs.js")) {
8646
+ try {
8647
+ const head = fs.readFileSync(candidate, "utf8").slice(0, 256);
8648
+ if (/^\s*(import\s|export\s)/m.test(head)) {
8649
+ console.log(
8650
+ `[WidgetRegistry] Skipping ESM bundle: ${candidate}`,
8651
+ );
8652
+ continue;
8653
+ }
8654
+ } catch (_) {
8655
+ // Non-fatal — allow fallthrough
8656
+ }
8657
+ }
8644
8658
  return candidate;
8645
8659
  }
8646
8660
  }
@@ -8990,6 +9004,12 @@ function createMainApi$1(extensions = {}) {
8990
9004
  plugins: pluginApi$1,
8991
9005
  clientCache: clientCacheApi$1,
8992
9006
 
9007
+ widgetEvent: {
9008
+ publish: (eventType, content) => {
9009
+ ipcRenderer.send("widget-event:publish", { eventType, content });
9010
+ },
9011
+ },
9012
+
8993
9013
  // Merge template-specific extensions
8994
9014
  ...extensions,
8995
9015
  };