@redocly/theme 0.66.0-next.1 → 0.66.0-next.2

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.
@@ -55,7 +55,12 @@ function CodeBlockControls({ children, className, title, controls, tabs, dropdow
55
55
  }
56
56
  else {
57
57
  telemetry.sendCopyCodeSnippetClickedMessage([
58
- { object: 'code_snippet', snippetType: 'copy' },
58
+ {
59
+ id: 'copyCodeSnippetButton',
60
+ object: 'button',
61
+ uri: 'urn:redocly:redoc:ui:button:copyCodeSnippetButton',
62
+ snippetType: 'copy',
63
+ },
59
64
  ]);
60
65
  }
61
66
  } }))) : null))) : null;
@@ -1,6 +1,7 @@
1
1
  export declare class MockIntersectionObserver {
2
2
  readonly root: Element | Document | null;
3
3
  readonly rootMargin: string;
4
+ readonly scrollMargin: string;
4
5
  readonly thresholds: ReadonlyArray<number>;
5
6
  private viewPort;
6
7
  private entries;
@@ -15,6 +15,12 @@ class MockIntersectionObserver {
15
15
  writable: true,
16
16
  value: void 0
17
17
  });
18
+ Object.defineProperty(this, "scrollMargin", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: void 0
23
+ });
18
24
  Object.defineProperty(this, "thresholds", {
19
25
  enumerable: true,
20
26
  configurable: true,
@@ -52,6 +58,7 @@ class MockIntersectionObserver {
52
58
  this.entries = [];
53
59
  this.root = null;
54
60
  this.rootMargin = '0px';
61
+ this.scrollMargin = '';
55
62
  this.thresholds = [1];
56
63
  this.callback = callback;
57
64
  this.viewPort.addEventListener('scroll', this.intersect);
@@ -1,5 +1,5 @@
1
1
  export declare function useProductPicker(): {
2
- currentProduct: import("@redocly/config").ProductUiConfig | undefined;
3
- products: import("@redocly/config").ProductUiConfig[];
4
- setProduct: (product: import("@redocly/config").ProductUiConfig | undefined) => void;
2
+ currentProduct: import("../..").ProductUiConfig | undefined;
3
+ products: import("../..").ProductUiConfig[];
4
+ setProduct: (product: import("../..").ProductUiConfig | undefined) => void;
5
5
  };
@@ -27,109 +27,25 @@ import { connectMcp } from '../markdoc/tags/connect-mcp';
27
27
  import { loginButton } from '../markdoc/tags/login-button';
28
28
  import { diagram } from '../markdoc/tags/diagram';
29
29
  export declare const tags: {
30
- [admonition.tagName]: import("@markdoc/markdoc").Schema & {
31
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
32
- resolver?: string;
33
- }>;
34
- };
35
- [debug.tagName]: import("@markdoc/markdoc").Schema & {
36
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
37
- resolver?: string;
38
- }>;
39
- };
40
- [html.tagName]: import("@markdoc/markdoc").Schema & {
41
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
42
- resolver?: string;
43
- }>;
44
- };
45
- [markdocExample.tagName]: import("@markdoc/markdoc").Schema & {
46
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
47
- resolver?: string;
48
- }>;
49
- };
50
- [partial.tagName]: import("@markdoc/markdoc").Schema & {
51
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
52
- resolver?: string;
53
- }>;
54
- };
55
- [tab.tagName]: import("@markdoc/markdoc").Schema & {
56
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
57
- resolver?: string;
58
- }>;
59
- };
60
- [tabs.tagName]: import("@markdoc/markdoc").Schema & {
61
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
62
- resolver?: string;
63
- }>;
64
- };
65
- [codeSnippet.tagName]: import("@markdoc/markdoc").Schema & {
66
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
67
- resolver?: string;
68
- }>;
69
- };
70
- [inlineSvg.tagName]: import("@markdoc/markdoc").Schema & {
71
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
72
- resolver?: string;
73
- }>;
74
- };
75
- [cards.tagName]: import("@markdoc/markdoc").Schema & {
76
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
77
- resolver?: string;
78
- }>;
79
- };
80
- [card.tagName]: import("@markdoc/markdoc").Schema & {
81
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
82
- resolver?: string;
83
- }>;
84
- };
85
- [img.tagName]: import("@markdoc/markdoc").Schema & {
86
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
87
- resolver?: string;
88
- }>;
89
- };
90
- [codeWalkthrough.tagName]: import("@markdoc/markdoc").Schema & {
91
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
92
- resolver?: string;
93
- }>;
94
- };
95
- [codeStep.tagName]: import("@markdoc/markdoc").Schema & {
96
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
97
- resolver?: string;
98
- }>;
99
- };
100
- [toggle.tagName]: import("@markdoc/markdoc").Schema & {
101
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
102
- resolver?: string;
103
- }>;
104
- };
105
- [input.tagName]: import("@markdoc/markdoc").Schema & {
106
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
107
- resolver?: string;
108
- }>;
109
- };
110
- [codeGroup.tagName]: import("@markdoc/markdoc").Schema & {
111
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
112
- resolver?: string;
113
- }>;
114
- };
115
- [icon.tagName]: import("@markdoc/markdoc").Schema & {
116
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
117
- resolver?: string;
118
- }>;
119
- };
120
- [connectMcp.tagName]: import("@markdoc/markdoc").Schema & {
121
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
122
- resolver?: string;
123
- }>;
124
- };
125
- [loginButton.tagName]: import("@markdoc/markdoc").Schema & {
126
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
127
- resolver?: string;
128
- }>;
129
- };
130
- [diagram.tagName]: import("@markdoc/markdoc").Schema & {
131
- attributes?: Record<string, import("@markdoc/markdoc").SchemaAttribute & {
132
- resolver?: string;
133
- }>;
134
- };
30
+ [admonition.tagName]: import("./tags/types").MarkdocTagSchema;
31
+ [debug.tagName]: import("./tags/types").MarkdocTagSchema;
32
+ [html.tagName]: import("./tags/types").MarkdocTagSchema;
33
+ [markdocExample.tagName]: import("./tags/types").MarkdocTagSchema;
34
+ [partial.tagName]: import("./tags/types").MarkdocTagSchema;
35
+ [tab.tagName]: import("./tags/types").MarkdocTagSchema;
36
+ [tabs.tagName]: import("./tags/types").MarkdocTagSchema;
37
+ [codeSnippet.tagName]: import("./tags/types").MarkdocTagSchema;
38
+ [inlineSvg.tagName]: import("./tags/types").MarkdocTagSchema;
39
+ [cards.tagName]: import("./tags/types").MarkdocTagSchema;
40
+ [card.tagName]: import("./tags/types").MarkdocTagSchema;
41
+ [img.tagName]: import("./tags/types").MarkdocTagSchema;
42
+ [codeWalkthrough.tagName]: import("./tags/types").MarkdocTagSchema;
43
+ [codeStep.tagName]: import("./tags/types").MarkdocTagSchema;
44
+ [toggle.tagName]: import("./tags/types").MarkdocTagSchema;
45
+ [input.tagName]: import("./tags/types").MarkdocTagSchema;
46
+ [codeGroup.tagName]: import("./tags/types").MarkdocTagSchema;
47
+ [icon.tagName]: import("./tags/types").MarkdocTagSchema;
48
+ [connectMcp.tagName]: import("./tags/types").MarkdocTagSchema;
49
+ [loginButton.tagName]: import("./tags/types").MarkdocTagSchema;
50
+ [diagram.tagName]: import("./tags/types").MarkdocTagSchema;
135
51
  };
@@ -1,9 +1,15 @@
1
- import type { Schema, SchemaAttribute } from '@markdoc/markdoc';
1
+ import type { Node, Schema, SchemaAttribute } from '@markdoc/markdoc';
2
+ export type RenderForLlmsContext = {
3
+ getBody: () => string;
4
+ };
5
+ export type RenderForLlmsFn = (node: Node, context: RenderForLlmsContext) => string;
6
+ export type MarkdocTagSchema = Schema & {
7
+ attributes?: Record<string, SchemaAttribute & {
8
+ resolver?: string;
9
+ }>;
10
+ renderForLlms?: RenderForLlmsFn;
11
+ };
2
12
  export type MarkdocSchemaWrapper = {
3
- schema: Schema & {
4
- attributes?: Record<string, SchemaAttribute & {
5
- resolver?: string;
6
- }>;
7
- };
13
+ schema: MarkdocTagSchema;
8
14
  tagName: string;
9
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.66.0-next.1",
3
+ "version": "0.66.0-next.2",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -43,13 +43,13 @@
43
43
  "@types/highlight-words-core": "1.2.3",
44
44
  "@types/lodash.debounce": "4.0.9",
45
45
  "@types/lodash.throttle": "4.1.9",
46
- "@types/node": "22.18.13",
46
+ "@types/node": "24.1.0",
47
47
  "@types/nprogress": "0.2.3",
48
48
  "@types/react": "^19.2.7",
49
49
  "@types/react-dom": "^19.2.3",
50
50
  "@types/styled-components": "5.1.34",
51
51
  "@vitest/coverage-v8": "4.0.10",
52
- "@vitest/ui": "3.2.4",
52
+ "@vitest/ui": "4.0.10",
53
53
  "concurrently": "7.6.0",
54
54
  "react-router-dom": "^6.30.3",
55
55
  "resize-observer-polyfill": "1.5.1",
@@ -59,11 +59,11 @@
59
59
  "tsc-alias": "1.8.16",
60
60
  "tsconfig-paths": "4.2.0",
61
61
  "tsconfig-paths-webpack-plugin": "3.5.2",
62
- "typescript": "5.9.3",
62
+ "typescript": "6.0.3",
63
63
  "vitest": "4.0.10",
64
64
  "vitest-when": "0.6.2",
65
65
  "webpack": "5.105.2",
66
- "@redocly/realm-asyncapi-sdk": "0.12.0-next.1"
66
+ "@redocly/realm-asyncapi-sdk": "0.12.0-next.2"
67
67
  },
68
68
  "dependencies": {
69
69
  "@tanstack/react-query": "5.62.3",
@@ -186,7 +186,12 @@ export function CodeBlockControls({
186
186
  copy?.onClick?.();
187
187
  } else {
188
188
  telemetry.sendCopyCodeSnippetClickedMessage([
189
- { object: 'code_snippet', snippetType: 'copy' },
189
+ {
190
+ id: 'copyCodeSnippetButton',
191
+ object: 'button',
192
+ uri: 'urn:redocly:redoc:ui:button:copyCodeSnippetButton',
193
+ snippetType: 'copy',
194
+ },
190
195
  ]);
191
196
  }
192
197
  }}
@@ -1,6 +1,7 @@
1
1
  export class MockIntersectionObserver {
2
2
  public readonly root: Element | Document | null;
3
3
  public readonly rootMargin: string;
4
+ public readonly scrollMargin: string;
4
5
  public readonly thresholds: ReadonlyArray<number>;
5
6
 
6
7
  private viewPort: Element | Document | Window;
@@ -12,6 +13,7 @@ export class MockIntersectionObserver {
12
13
  this.entries = [];
13
14
  this.root = null;
14
15
  this.rootMargin = '0px';
16
+ this.scrollMargin = '';
15
17
  this.thresholds = [1];
16
18
  this.callback = callback;
17
19
 
@@ -3,6 +3,7 @@ import { vi } from 'vitest';
3
3
  export class MockIntersectionObserver {
4
4
  public readonly root: Element | Document | null;
5
5
  public readonly rootMargin: string;
6
+ public readonly scrollMargin: string;
6
7
  public readonly thresholds: ReadonlyArray<number>;
7
8
  observe: (target: HTMLElement) => void;
8
9
  unobserve: (target: HTMLElement) => void;
@@ -12,6 +13,7 @@ export class MockIntersectionObserver {
12
13
  constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {
13
14
  this.root = null;
14
15
  this.rootMargin = '0px';
16
+ this.scrollMargin = '';
15
17
  this.thresholds = [1];
16
18
  this.observe = vi.fn();
17
19
  this.unobserve = vi.fn();
@@ -1,8 +1,17 @@
1
- import type { Schema, SchemaAttribute } from '@markdoc/markdoc';
1
+ import type { Node, Schema, SchemaAttribute } from '@markdoc/markdoc';
2
+
3
+ export type RenderForLlmsContext = {
4
+ getBody: () => string;
5
+ };
6
+
7
+ export type RenderForLlmsFn = (node: Node, context: RenderForLlmsContext) => string;
8
+
9
+ export type MarkdocTagSchema = Schema & {
10
+ attributes?: Record<string, SchemaAttribute & { resolver?: string }>;
11
+ renderForLlms?: RenderForLlmsFn;
12
+ };
2
13
 
3
14
  export type MarkdocSchemaWrapper = {
4
- schema: Schema & {
5
- attributes?: Record<string, SchemaAttribute & { resolver?: string }>;
6
- };
15
+ schema: MarkdocTagSchema;
7
16
  tagName: string;
8
17
  };