@stellar-expert/ui-framework 1.12.7 → 1.12.9

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.
@@ -45,6 +45,10 @@ code {
45
45
  background: var(--color-alt-bg);
46
46
  padding: 0 3px;
47
47
  border-radius: $border-radius-input;
48
+
49
+ code {
50
+ padding: 0;
51
+ }
48
52
  }
49
53
 
50
54
  .text-small {
@@ -37,7 +37,7 @@ function parseMetrics(metrics) {
37
37
  break
38
38
  case 'emit_event':
39
39
  if (value > 0) {
40
- res['Emitted events'] = value.toString() + ' ' + formatBytes(value)
40
+ res['Emitted events'] = `${value.toString()} (${formatBytes(metrics.emit_event_byte)})`
41
41
  }
42
42
  break
43
43
  case 'invoke_time_nsecs':
@@ -66,17 +66,11 @@ function generateOpenGraphMeta({description, title, facebookImage}, canonicalUrl
66
66
  {name: 'og:url', content: canonicalUrl},
67
67
  {name: 'og:site_name', content: formatPageTitle(metaProps.serviceTitle)},
68
68
  {name: 'og:description', content: description || metaProps.description},
69
- {name: 'og:type', content: 'website'}
69
+ {name: 'og:type', content: 'website'},
70
+ {name: 'og:image:width', content: 1200},
71
+ {name: 'og:image:height', content: 630},
72
+ {name: 'og:image', content: facebookImage || metaProps.facebookImage}
70
73
  ]
71
- if (facebookImage) {
72
- tags.push({name: 'og:image', content: facebookImage})
73
- } else {
74
- tags.push({name: 'og:image', content: metaProps.facebookImage})
75
- /*tags = tags.concat([
76
- {name: 'og:image', content: metaProps.facebookImage},
77
- {name: 'og:image:width', content: 1200},
78
- {name: 'og:image:height', content: 630}])*/
79
- }
80
74
  return {
81
75
  locator: 'property',
82
76
  tags
@@ -164,6 +158,10 @@ export function setPageMetadata(meta) {
164
158
  return
165
159
  const canonicalUrl = origin + location.pathname// + location.search
166
160
  document.title = formatPageTitle(meta.title)
161
+ if (meta.image) {
162
+ meta.facebookImage = meta.image
163
+ meta.twitterImage = meta.image
164
+ }
167
165
  for (const replacer of tagReplacerPipeline) {
168
166
  replaceMetaTags(replacer(meta, canonicalUrl))
169
167
  }
@@ -187,19 +185,6 @@ export function resetPageMetadata(meta) {
187
185
  //TODO: add logic to cleanup custom page meta tags on page unload
188
186
  }
189
187
 
190
- /*export function setPageNoIndex(noIndex) {
191
- if (!noIndex) {
192
- removeTag('meta[name=robots]')
193
- } else {
194
- replaceMetaTags({
195
- locator: 'name',
196
- tags: [
197
- {name: 'robots', content: 'noindex,nofollow'}
198
- ]
199
- })
200
- }
201
- }*/
202
-
203
188
  /**
204
189
  * React hook for setting page metadata
205
190
  * @param {PageMeta} meta - Page metadata
@@ -218,6 +203,7 @@ export function usePageMetadata(meta, dependencies = []) {
218
203
  * @property {String} description - Contents description
219
204
  * @property {String} [twitterImage] - Twitter image url
220
205
  * @property {String} [facebookImage] - Facebook image url
206
+ * @property {String} [image] - Sets the image for both the Twitter image and the Facebook image
221
207
  * @property {MetaTagReplacement} [customMeta] - Custom metadata tags
222
208
  */
223
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/ui-framework",
3
- "version": "1.12.7",
3
+ "version": "1.12.9",
4
4
  "description": "StellarExpert shared UI components library",
5
5
  "main": "index.js",
6
6
  "module": "./index.js",
package/.npmrc DELETED
@@ -1 +0,0 @@
1
- auto-install-peers=true