@redocly/theme 0.27.0 → 0.27.1

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.
@@ -205,7 +205,7 @@ exports.MarkdownWrapper = styled_components_1.default.main.attrs(({ className })
205
205
  font-family: var(--heading-font-family);
206
206
  position: relative;
207
207
 
208
- scroll-margin-top: 60px;
208
+ scroll-margin-top: var(--navbar-height);
209
209
  }
210
210
 
211
211
  strong {
@@ -40,7 +40,7 @@ function NextButton({ nextPage, className }) {
40
40
  return React.createElement("div", null, "\u00A0");
41
41
  }
42
42
  const nextPageText = nextPage.label || nextPage.routeSlug || '';
43
- const defaultText = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.text) || 'Next to {label}').replace('{label}', nextPageText);
43
+ const defaultText = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.text) || 'Next to {{label}}').replace('{{label}}', nextPageText);
44
44
  const translationKey = 'theme.page.nextButton';
45
45
  const text = translate(translationKey, { label: nextPageText, defaultValue: defaultText });
46
46
  return (React.createElement(StyledButton, { size: "large", to: nextPage.link, "data-component-name": "PageNavigation/NextPageLink", "data-translation-key": translationKey, extraClass: className }, text));
@@ -17,7 +17,7 @@ function PreviousButton({ prevPage, className }) {
17
17
  return react_1.default.createElement("div", null, "\u00A0");
18
18
  }
19
19
  const prevPageText = prevPage.label || prevPage.routeSlug || '';
20
- const defaultText = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _b === void 0 ? void 0 : _b.text) || 'Back to {label}').replace('{label}', prevPageText);
20
+ const defaultText = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _b === void 0 ? void 0 : _b.text) || 'Back to {{label}}').replace('{{label}}', prevPageText);
21
21
  const translationKey = 'theme.page.previousButton';
22
22
  const text = translate(translationKey, {
23
23
  label: prevPageText,
package/lib/config.d.ts CHANGED
@@ -1196,7 +1196,7 @@ export declare const themeConfigSchema: {
1196
1196
  };
1197
1197
  readonly text: {
1198
1198
  readonly type: "string";
1199
- readonly default: "Next to {label}";
1199
+ readonly default: "Next to {{label}}";
1200
1200
  };
1201
1201
  };
1202
1202
  readonly additionalProperties: false;
@@ -1210,7 +1210,7 @@ export declare const themeConfigSchema: {
1210
1210
  };
1211
1211
  readonly text: {
1212
1212
  readonly type: "string";
1213
- readonly default: "Back to {label}";
1213
+ readonly default: "Back to {{label}}";
1214
1214
  };
1215
1215
  };
1216
1216
  readonly additionalProperties: false;
package/lib/config.js CHANGED
@@ -465,13 +465,13 @@ exports.themeConfigSchema = {
465
465
  properties: {
466
466
  nextButton: {
467
467
  type: 'object',
468
- properties: Object.assign({ text: { type: 'string', default: 'Next to {label}' } }, hideConfigSchema.properties),
468
+ properties: Object.assign({ text: { type: 'string', default: 'Next to {{label}}' } }, hideConfigSchema.properties),
469
469
  additionalProperties: false,
470
470
  default: {},
471
471
  },
472
472
  previousButton: {
473
473
  type: 'object',
474
- properties: Object.assign({ text: { type: 'string', default: 'Back to {label}' } }, hideConfigSchema.properties),
474
+ properties: Object.assign({ text: { type: 'string', default: 'Back to {{label}}' } }, hideConfigSchema.properties),
475
475
  additionalProperties: false,
476
476
  default: {},
477
477
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -189,7 +189,7 @@ export const MarkdownWrapper = styled.main.attrs<{
189
189
  font-family: var(--heading-font-family);
190
190
  position: relative;
191
191
 
192
- scroll-margin-top: 60px;
192
+ scroll-margin-top: var(--navbar-height);
193
193
  }
194
194
 
195
195
  strong {
@@ -20,8 +20,8 @@ export function NextButton({ nextPage, className }: NextPageType): JSX.Element {
20
20
  }
21
21
 
22
22
  const nextPageText = nextPage.label || nextPage.routeSlug || '';
23
- const defaultText = (navigation?.nextButton?.text || 'Next to {label}').replace(
24
- '{label}',
23
+ const defaultText = (navigation?.nextButton?.text || 'Next to {{label}}').replace(
24
+ '{{label}}',
25
25
  nextPageText,
26
26
  );
27
27
  const translationKey = 'theme.page.nextButton';
@@ -20,8 +20,8 @@ export function PreviousButton({ prevPage, className }: PreviousPageType): JSX.E
20
20
  }
21
21
 
22
22
  const prevPageText = prevPage.label || prevPage.routeSlug || '';
23
- const defaultText = (navigation?.previousButton?.text || 'Back to {label}').replace(
24
- '{label}',
23
+ const defaultText = (navigation?.previousButton?.text || 'Back to {{label}}').replace(
24
+ '{{label}}',
25
25
  prevPageText,
26
26
  );
27
27
  const translationKey = 'theme.page.previousButton';
package/src/config.ts CHANGED
@@ -534,7 +534,7 @@ export const themeConfigSchema = {
534
534
  nextButton: {
535
535
  type: 'object',
536
536
  properties: {
537
- text: { type: 'string', default: 'Next to {label}' },
537
+ text: { type: 'string', default: 'Next to {{label}}' },
538
538
  ...hideConfigSchema.properties,
539
539
  },
540
540
  additionalProperties: false,
@@ -543,7 +543,7 @@ export const themeConfigSchema = {
543
543
  previousButton: {
544
544
  type: 'object',
545
545
  properties: {
546
- text: { type: 'string', default: 'Back to {label}' },
546
+ text: { type: 'string', default: 'Back to {{label}}' },
547
547
  ...hideConfigSchema.properties,
548
548
  },
549
549
  additionalProperties: false,