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