@skhema/embed 0.1.2 → 0.1.4

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.cjs CHANGED
@@ -1031,6 +1031,7 @@ class SkhemaComponent extends HTMLElement {
1031
1031
  return [
1032
1032
  "component-type",
1033
1033
  "contributor-id",
1034
+ "contributor-name",
1034
1035
  "title",
1035
1036
  "theme",
1036
1037
  "track-analytics",
@@ -1170,7 +1171,8 @@ class SkhemaComponent extends HTMLElement {
1170
1171
  const componentLabel = getComponentTypeLabel(component_type);
1171
1172
  const acronym = getComponentTypeAcronym(component_type);
1172
1173
  const colors = COMPONENT_COLORS[component_type];
1173
- const displayName = this.formatContributorName(contributor_id);
1174
+ const contributorName = this.getAttribute("contributor-name");
1175
+ const displayName = contributorName || this.formatContributorName(contributor_id);
1174
1176
  const themeAttribute = this.getAttribute("theme") || "auto";
1175
1177
  const actualTheme = this.getActualTheme(themeAttribute);
1176
1178
  const redirectUrl = generateComponentRedirectUrl(
@@ -1728,6 +1730,7 @@ class SkhemaElement extends HTMLElement {
1728
1730
  return [
1729
1731
  "element-type",
1730
1732
  "contributor-id",
1733
+ "contributor-name",
1731
1734
  "content",
1732
1735
  "source-url",
1733
1736
  "theme",
@@ -1848,7 +1851,8 @@ class SkhemaElement extends HTMLElement {
1848
1851
  );
1849
1852
  const themeAttribute = this.getAttribute("theme") || "auto";
1850
1853
  const actualTheme = this.getActualTheme(themeAttribute);
1851
- const displayName = this.formatContributorName(contributor_id);
1854
+ const contributorName = this.getAttribute("contributor-name");
1855
+ const displayName = contributorName || this.formatContributorName(contributor_id);
1852
1856
  const componentType = resolveComponentType(element_type);
1853
1857
  const acronym = getComponentTypeAcronym(componentType);
1854
1858
  const colors = COMPONENT_COLORS[componentType];