@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/README.md +1 -1
- package/dist/components/SkhemaComponent.d.ts.map +1 -1
- package/dist/components/SkhemaElement.d.ts.map +1 -1
- package/dist/components/types.d.ts +2 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/embed.min.js +1 -1
- package/dist/embed.min.js.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +6 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
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
|
|
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
|
|
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];
|