@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.esm.js CHANGED
@@ -29428,15 +29428,10 @@ var ComponentManager = {
29428
29428
  var tempComponentMap = this.componentMap();
29429
29429
  // Handle both module exports (widgetConfig.default) and direct config objects
29430
29430
  var config = widgetConfig["default"] || widgetConfig;
29431
- // Use scoped id if available (e.g., "trops.clock.AnalogClockWidget"),
29432
- // otherwise fall back to the provided widgetKey for backward compatibility
29431
+ // Register under a single canonical key: config.id (scoped widget ID) if
29432
+ // available, otherwise the provided widgetKey. No aliases — one widget, one key.
29433
29433
  var registrationKey = config.id || widgetKey;
29434
29434
  tempComponentMap[registrationKey] = ComponentConfigModel(config);
29435
- // Also register under plain component name for backward compat
29436
- // (dashboards may reference "SlackWidget" instead of "trops.slack.SlackWidget")
29437
- if (config.id && config.id !== widgetKey && !tempComponentMap[widgetKey]) {
29438
- tempComponentMap[widgetKey] = tempComponentMap[registrationKey];
29439
- }
29440
29435
  this.setComponentMap(tempComponentMap);
29441
29436
  },
29442
29437
  /**
@@ -33771,8 +33766,10 @@ function extractWidgetConfigs(bundleExports) {
33771
33766
 
33772
33767
  // Must have a component function and a recognized type
33773
33768
  if (typeof entry.component === "function" && (entry.type === "widget" || entry.type === "workspace")) {
33769
+ // Use the canonical widget ID from config if available,
33770
+ // otherwise fall back to the CJS export key
33774
33771
  configs.push({
33775
- key: key,
33772
+ key: entry.id || key,
33776
33773
  config: entry
33777
33774
  });
33778
33775
  }