@trops/dash-core 0.1.278 → 0.1.279

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/index.js CHANGED
@@ -29446,15 +29446,10 @@ var ComponentManager = {
29446
29446
  var tempComponentMap = this.componentMap();
29447
29447
  // Handle both module exports (widgetConfig.default) and direct config objects
29448
29448
  var config = widgetConfig["default"] || widgetConfig;
29449
- // Use scoped id if available (e.g., "trops.clock.AnalogClockWidget"),
29450
- // otherwise fall back to the provided widgetKey for backward compatibility
29449
+ // Register under a single canonical key: config.id (scoped widget ID) if
29450
+ // available, otherwise the provided widgetKey. No aliases — one widget, one key.
29451
29451
  var registrationKey = config.id || widgetKey;
29452
29452
  tempComponentMap[registrationKey] = ComponentConfigModel(config);
29453
- // Also register under plain component name for backward compat
29454
- // (dashboards may reference "SlackWidget" instead of "trops.slack.SlackWidget")
29455
- if (config.id && config.id !== widgetKey && !tempComponentMap[widgetKey]) {
29456
- tempComponentMap[widgetKey] = tempComponentMap[registrationKey];
29457
- }
29458
29453
  this.setComponentMap(tempComponentMap);
29459
29454
  },
29460
29455
  /**
@@ -33789,8 +33784,10 @@ function extractWidgetConfigs(bundleExports) {
33789
33784
 
33790
33785
  // Must have a component function and a recognized type
33791
33786
  if (typeof entry.component === "function" && (entry.type === "widget" || entry.type === "workspace")) {
33787
+ // Use the canonical widget ID from config if available,
33788
+ // otherwise fall back to the CJS export key
33792
33789
  configs.push({
33793
- key: key,
33790
+ key: entry.id || key,
33794
33791
  config: entry
33795
33792
  });
33796
33793
  }