@redocly/theme 0.57.0-next.2 → 0.57.0-next.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.
Files changed (96) hide show
  1. package/lib/components/Breadcrumbs/Breadcrumbs.js +4 -7
  2. package/lib/components/Buttons/EditPageButton.js +1 -1
  3. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +1 -1
  4. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +1 -35
  5. package/lib/components/CatalogClassic/CatalogClassicActions.js +1 -1
  6. package/lib/components/CatalogClassic/CatalogClassicCard.js +1 -1
  7. package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
  8. package/lib/components/CodeBlock/CodeBlockControls.js +7 -9
  9. package/lib/components/Feedback/Feedback.js +1 -1
  10. package/lib/components/Feedback/ReportDialog.js +1 -1
  11. package/lib/components/Filter/FilterCheckboxes.js +1 -1
  12. package/lib/components/Footer/FooterItem.js +1 -1
  13. package/lib/components/LanguagePicker/LanguagePicker.js +1 -4
  14. package/lib/components/Logo/Logo.js +1 -1
  15. package/lib/components/Menu/MenuItem.js +3 -6
  16. package/lib/components/Navbar/Navbar.js +2 -2
  17. package/lib/components/Navbar/NavbarItem.js +1 -1
  18. package/lib/components/Search/SearchDialog.js +9 -15
  19. package/lib/components/Search/SearchInput.js +1 -1
  20. package/lib/components/Search/SearchRecent.js +1 -1
  21. package/lib/components/SidebarActions/SidebarActions.js +3 -3
  22. package/lib/components/Switch/Switch.d.ts +4 -1
  23. package/lib/components/Switch/Switch.js +12 -3
  24. package/lib/components/TableOfContent/TableOfContent.js +1 -1
  25. package/lib/components/Tooltip/TooltipWrapper.d.ts +2 -2
  26. package/lib/components/Tooltip/TooltipWrapper.js +2 -4
  27. package/lib/components/UserMenu/LoginButton.js +1 -1
  28. package/lib/components/UserMenu/LogoutMenuItem.js +1 -1
  29. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
  30. package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
  31. package/lib/core/hooks/search/use-search-dialog.js +2 -2
  32. package/lib/core/hooks/use-color-switcher.js +1 -4
  33. package/lib/core/hooks/use-product-picker.js +1 -1
  34. package/lib/core/hooks/use-telemetry-fallback.d.ts +60 -0
  35. package/lib/core/hooks/use-telemetry-fallback.js +66 -0
  36. package/lib/core/hooks/use-theme-hooks.js +2 -1
  37. package/lib/core/types/hooks.d.ts +2 -4
  38. package/lib/core/types/index.d.ts +0 -1
  39. package/lib/core/types/index.js +0 -1
  40. package/lib/icons/PlayIcon/PlayIcon.d.ts +9 -0
  41. package/lib/icons/PlayIcon/PlayIcon.js +21 -0
  42. package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.d.ts +9 -0
  43. package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.js +23 -0
  44. package/lib/index.d.ts +2 -0
  45. package/lib/index.js +2 -0
  46. package/lib/layouts/ThreePanelLayout.js +1 -4
  47. package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +2 -2
  48. package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +1 -0
  49. package/lib/markdoc/components/CodeWalkthrough/CodeToggle.js +1 -1
  50. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +7 -8
  51. package/package.json +2 -2
  52. package/src/components/Breadcrumbs/Breadcrumbs.tsx +4 -7
  53. package/src/components/Buttons/EditPageButton.tsx +1 -1
  54. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +1 -1
  55. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +4 -76
  56. package/src/components/CatalogClassic/CatalogClassicActions.tsx +1 -1
  57. package/src/components/CatalogClassic/CatalogClassicCard.tsx +1 -1
  58. package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +1 -3
  59. package/src/components/CodeBlock/CodeBlockControls.tsx +19 -9
  60. package/src/components/Feedback/Feedback.tsx +1 -1
  61. package/src/components/Feedback/ReportDialog.tsx +1 -1
  62. package/src/components/Filter/FilterCheckboxes.tsx +1 -1
  63. package/src/components/Footer/FooterItem.tsx +1 -1
  64. package/src/components/LanguagePicker/LanguagePicker.tsx +1 -4
  65. package/src/components/Logo/Logo.tsx +1 -1
  66. package/src/components/Menu/MenuItem.tsx +3 -6
  67. package/src/components/Navbar/Navbar.tsx +2 -2
  68. package/src/components/Navbar/NavbarItem.tsx +1 -3
  69. package/src/components/Search/SearchDialog.tsx +9 -15
  70. package/src/components/Search/SearchInput.tsx +1 -1
  71. package/src/components/Search/SearchRecent.tsx +1 -1
  72. package/src/components/SidebarActions/SidebarActions.tsx +3 -3
  73. package/src/components/Switch/Switch.tsx +34 -3
  74. package/src/components/TableOfContent/TableOfContent.tsx +1 -1
  75. package/src/components/Tooltip/TooltipWrapper.tsx +4 -6
  76. package/src/components/UserMenu/LoginButton.tsx +1 -1
  77. package/src/components/UserMenu/LogoutMenuItem.tsx +1 -1
  78. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  79. package/src/core/hooks/search/use-search-dialog.ts +2 -2
  80. package/src/core/hooks/use-color-switcher.ts +1 -4
  81. package/src/core/hooks/use-product-picker.ts +1 -1
  82. package/src/core/hooks/use-telemetry-fallback.ts +61 -0
  83. package/src/core/hooks/use-theme-hooks.ts +2 -1
  84. package/src/core/types/hooks.ts +10 -4
  85. package/src/core/types/index.ts +0 -1
  86. package/src/icons/PlayIcon/PlayIcon.tsx +22 -0
  87. package/src/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.tsx +32 -0
  88. package/src/index.ts +2 -0
  89. package/src/layouts/ThreePanelLayout.tsx +1 -4
  90. package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +2 -2
  91. package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +1 -0
  92. package/src/markdoc/components/CodeWalkthrough/CodeToggle.tsx +5 -1
  93. package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +7 -8
  94. package/lib/core/types/telemetry.d.ts +0 -17
  95. package/lib/core/types/telemetry.js +0 -3
  96. package/src/core/types/telemetry.ts +0 -28
@@ -72,11 +72,11 @@ const FilterWrapper = styled.div`
72
72
  flex-wrap: wrap;
73
73
  position: sticky;
74
74
 
75
- padding-top: calc(var(--spacing-xs) + var(--spacing-xl));
75
+ padding-top: var(--spacing-xl);
76
76
  padding-right: var(--spacing-xl);
77
77
  padding-left: var(--spacing-xl);
78
78
  padding-bottom: var(--spacing-xs);
79
- top: calc(var(--navbar-height));
79
+ top: var(--navbar-height);
80
80
  background-color: var(--bg-color);
81
81
  z-index: 1;
82
82
  max-width: var(--md-content-max-width);
@@ -58,6 +58,7 @@ const CodePanelWrapper = styled.div`
58
58
  min-width: 0;
59
59
  height: 100%;
60
60
  word-wrap: break-word;
61
+ margin-top: var(--spacing-xl);
61
62
 
62
63
  background-color: var(--code-panel-bg-color);
63
64
  border: 1px solid var(--code-panel-border-color);
@@ -26,7 +26,11 @@ export function CodeToggle(props: CodeToggleProps) {
26
26
  <ToggleWrapper data-component-name="Markdoc/CodeWalkthrough/CodeToggle">
27
27
  <ToggleContentWrapper>
28
28
  <ToggleSubtitle>
29
- <Switch value={checked} onChange={(newValue) => changeControlState(id, newValue)} />
29
+ <Switch
30
+ value={checked}
31
+ onChange={(newValue) => changeControlState(id, newValue)}
32
+ stopPropagation
33
+ />
30
34
  <div>{label}</div>
31
35
  </ToggleSubtitle>
32
36
  {description ? (
@@ -82,9 +82,14 @@ const DocsPanel = styled.div`
82
82
  min-height: 0;
83
83
  min-height: calc(100vh - var(--navbar-height));
84
84
 
85
+ padding-top: var(--spacing-xl);
85
86
  padding-right: var(--spacing-xs);
86
87
  padding-bottom: calc(var(--spacing-xs) + var(--spacing-xl));
87
88
  gap: var(--spacing-xl);
89
+
90
+ &:has([data-component-name='Markdoc/CodeWalkthrough/CodeFilters']) {
91
+ padding-top: 0;
92
+ }
88
93
  `;
89
94
 
90
95
  const ContentWrapper = styled.div`
@@ -111,13 +116,7 @@ const ContentWrapper = styled.div`
111
116
  -ms-overflow-style: none; /* IE and Edge */
112
117
  scrollbar-width: none; /* Firefox */
113
118
 
114
- &:first-child {
115
- padding-top: var(--spacing-sm);
116
- }
117
-
118
- &:not(:first-child) {
119
- & > *:first-child {
120
- margin-top: 0;
121
- }
119
+ && > *:first-child {
120
+ margin-top: 0;
122
121
  }
123
122
  `;
@@ -1,17 +0,0 @@
1
- import { AsyncApiRealm } from '@redocly/realm-asyncapi-sdk';
2
- type ExtractEventType<T> = T extends {
3
- type: infer EventType;
4
- } ? EventType : never;
5
- export type EventType = ExtractEventType<AsyncApiRealm.Messages>;
6
- type GetMessageForEventType<TEventType extends EventType> = Extract<AsyncApiRealm.Messages, {
7
- type: TEventType;
8
- }>;
9
- type ExtractEventDataForType<TEventType extends EventType> = GetMessageForEventType<TEventType> extends {
10
- data: infer Data;
11
- } ? Data : never;
12
- export type EventPayload<TEventType extends EventType> = ExtractEventDataForType<TEventType>;
13
- export interface SendEventParams<TEventType extends EventType> {
14
- type: TEventType;
15
- payload?: EventPayload<TEventType>;
16
- }
17
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=telemetry.js.map
@@ -1,28 +0,0 @@
1
- import { AsyncApiRealm } from '@redocly/realm-asyncapi-sdk';
2
-
3
- type ExtractEventType<T> = T extends {
4
- type: infer EventType;
5
- }
6
- ? EventType
7
- : never;
8
-
9
- export type EventType = ExtractEventType<AsyncApiRealm.Messages>;
10
-
11
- type GetMessageForEventType<TEventType extends EventType> = Extract<
12
- AsyncApiRealm.Messages,
13
- { type: TEventType }
14
- >;
15
-
16
- type ExtractEventDataForType<TEventType extends EventType> =
17
- GetMessageForEventType<TEventType> extends {
18
- data: infer Data;
19
- }
20
- ? Data
21
- : never;
22
-
23
- export type EventPayload<TEventType extends EventType> = ExtractEventDataForType<TEventType>;
24
-
25
- export interface SendEventParams<TEventType extends EventType> {
26
- type: TEventType;
27
- payload?: EventPayload<TEventType>;
28
- }