@redocly/redoc-reef 0.131.0-next.8 → 0.131.0

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 (112) hide show
  1. package/CHANGELOG.md +204 -1
  2. package/dist/bin.js +1 -1
  3. package/dist/cli/{prepare → build}/index.d.ts +2 -2
  4. package/dist/cli/{prepare → build}/index.js +1 -1
  5. package/dist/cli/develop.js +1 -1
  6. package/dist/cli/stats/collectors/{openapi.d.ts → openapi/index.d.ts} +2 -2
  7. package/dist/cli/stats/collectors/openapi/index.js +1 -0
  8. package/dist/cli/stats/collectors/openapi/oas32.d.ts +15 -0
  9. package/dist/cli/stats/collectors/openapi/oas32.js +1 -0
  10. package/dist/cli/stats/index.js +1 -1
  11. package/dist/cli/utils/listen-stdin.d.ts +10 -0
  12. package/dist/cli/utils/listen-stdin.js +2 -0
  13. package/dist/client/TestProvider.js +1 -1
  14. package/dist/client/app/hooks/index.d.ts +1 -0
  15. package/dist/client/app/hooks/index.js +1 -1
  16. package/dist/client/app/hooks/useAnchorPositioning.d.ts +6 -0
  17. package/dist/client/app/hooks/useAnchorPositioning.js +1 -0
  18. package/dist/client/app/l10n/index.js +1 -1
  19. package/dist/client/app/search/useAiSearch.js +1 -1
  20. package/dist/client/app/search/useSearch.js +1 -1
  21. package/dist/client/app/seo/SeoTags.js +1 -1
  22. package/dist/client/providers/theme/ThemeDataProvider.js +1 -1
  23. package/dist/client/templates/asyncapi-docs/template.js +1 -3
  24. package/dist/client/templates/openapi-docs/template.js +2 -6
  25. package/dist/client/types/ai-search.d.ts +1 -0
  26. package/dist/constants/l10n/langs/ar.js +1 -1
  27. package/dist/constants/l10n/langs/de.js +1 -1
  28. package/dist/constants/l10n/langs/en.js +1 -1
  29. package/dist/constants/l10n/langs/es.js +1 -1
  30. package/dist/constants/l10n/langs/fr.js +1 -1
  31. package/dist/constants/l10n/langs/hi.js +1 -1
  32. package/dist/constants/l10n/langs/it.js +1 -1
  33. package/dist/constants/l10n/langs/ja.js +1 -1
  34. package/dist/constants/l10n/langs/ko.js +1 -1
  35. package/dist/constants/l10n/langs/pl.js +1 -1
  36. package/dist/constants/l10n/langs/pt-BR.js +1 -1
  37. package/dist/constants/l10n/langs/pt.js +1 -1
  38. package/dist/constants/l10n/langs/ru.js +1 -1
  39. package/dist/constants/l10n/langs/uk.js +1 -1
  40. package/dist/constants/l10n/langs/zh.js +1 -1
  41. package/dist/server/api-routes/execute-api-route.js +1 -1
  42. package/dist/server/config/env-schema.d.ts +3 -3
  43. package/dist/server/config/env-schemas/search.d.ts +2 -2
  44. package/dist/server/config/env-schemas/search.js +1 -1
  45. package/dist/server/constants/plugins/search.d.ts +0 -4
  46. package/dist/server/constants/plugins/search.js +1 -1
  47. package/dist/server/node-bundle-entry.js +1 -1
  48. package/dist/server/plugins/analytics/segment/browser-hooks.js +1 -1
  49. package/dist/server/plugins/analytics/segment/build-script.js +5 -2
  50. package/dist/server/plugins/asyncapi-docs/search/get-ai-search-documents.js +37 -37
  51. package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +7 -0
  52. package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
  53. package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.d.ts +22 -0
  54. package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.js +29 -15
  55. package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.d.ts +6 -0
  56. package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.js +1 -1
  57. package/dist/server/plugins/entitlements/index.js +1 -1
  58. package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.d.ts +6 -0
  59. package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.js +1 -0
  60. package/dist/server/plugins/graphql-docs/index.js +1 -1
  61. package/dist/server/plugins/markdown/search/nodes/heading-node.js +1 -1
  62. package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +25 -25
  63. package/dist/server/plugins/pages/validators/validate-react-pages.js +1 -1
  64. package/dist/server/plugins/scorecard-classic/get-scorecard-config.d.ts +1 -1
  65. package/dist/server/plugins/search/documents/search-documents.js +1 -1
  66. package/dist/server/plugins/search/engines/typesense/index.js +1 -1
  67. package/dist/server/plugins/search/utils.js +1 -1
  68. package/dist/server/plugins/sidebars/index.d.ts +0 -1
  69. package/dist/server/plugins/sidebars/index.js +2 -2
  70. package/dist/server/ssr/template.js +3 -3
  71. package/dist/server/tools/notifiers/logger.d.ts +2 -2
  72. package/dist/server/tools/notifiers/logger.js +2 -2
  73. package/dist/server/tools/notifiers/reporter.d.ts +0 -1
  74. package/dist/server/tools/notifiers/reporter.js +6 -7
  75. package/dist/server/tools/notifiers/terminal-manager.d.ts +1 -1
  76. package/dist/server/tools/notifiers/terminal-manager.js +5 -4
  77. package/dist/server/utils/lifecycle-hooks.d.ts +2 -2
  78. package/dist/server/utils/rbac.js +1 -1
  79. package/dist/server/web-server/routes/catalog/catalog.js +1 -1
  80. package/dist/server/web-server/routes/catalog/helpers/upsert-pages-stats.d.ts +12 -0
  81. package/dist/server/web-server/routes/catalog/helpers/upsert-pages-stats.js +1 -0
  82. package/dist/server/web-server/routes/cors-proxy.js +2 -2
  83. package/package.json +13 -13
  84. package/dist/cli/stats/collectors/openapi.js +0 -1
  85. /package/dist/cli/{prepare → build}/analytics/collect-analytics.d.ts +0 -0
  86. /package/dist/cli/{prepare → build}/analytics/collect-analytics.js +0 -0
  87. /package/dist/cli/{prepare → build}/analytics/collectors/get-api-functions-usage.d.ts +0 -0
  88. /package/dist/cli/{prepare → build}/analytics/collectors/get-api-functions-usage.js +0 -0
  89. /package/dist/cli/{prepare → build}/analytics/collectors/get-async-api-usage.d.ts +0 -0
  90. /package/dist/cli/{prepare → build}/analytics/collectors/get-async-api-usage.js +0 -0
  91. /package/dist/cli/{prepare → build}/analytics/collectors/get-config-stats-usage.d.ts +0 -0
  92. /package/dist/cli/{prepare → build}/analytics/collectors/get-config-stats-usage.js +0 -0
  93. /package/dist/cli/{prepare → build}/analytics/collectors/get-file-extensions-usage.d.ts +0 -0
  94. /package/dist/cli/{prepare → build}/analytics/collectors/get-file-extensions-usage.js +0 -0
  95. /package/dist/cli/{prepare → build}/analytics/collectors/get-frontmatter-usage.d.ts +0 -0
  96. /package/dist/cli/{prepare → build}/analytics/collectors/get-frontmatter-usage.js +0 -0
  97. /package/dist/cli/{prepare → build}/analytics/collectors/get-markdoc-usage.d.ts +0 -0
  98. /package/dist/cli/{prepare → build}/analytics/collectors/get-markdoc-usage.js +0 -0
  99. /package/dist/cli/{prepare → build}/analytics/collectors/get-nested-configs-usage.d.ts +0 -0
  100. /package/dist/cli/{prepare → build}/analytics/collectors/get-nested-configs-usage.js +0 -0
  101. /package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.d.ts +0 -0
  102. /package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.js +0 -0
  103. /package/dist/cli/{prepare → build}/analytics/collectors/get-refs-usage.d.ts +0 -0
  104. /package/dist/cli/{prepare → build}/analytics/collectors/get-refs-usage.js +0 -0
  105. /package/dist/cli/{prepare → build}/analytics/collectors/get-theme-folder-usage.d.ts +0 -0
  106. /package/dist/cli/{prepare → build}/analytics/collectors/get-theme-folder-usage.js +0 -0
  107. /package/dist/cli/{prepare → build}/copy-env-files.d.ts +0 -0
  108. /package/dist/cli/{prepare → build}/copy-env-files.js +0 -0
  109. /package/dist/cli/{prepare → build}/libsql/copy-prebuilt-binary.d.ts +0 -0
  110. /package/dist/cli/{prepare → build}/libsql/copy-prebuilt-binary.js +0 -0
  111. /package/dist/cli/{prepare → build}/libsql/get-current-platform.d.ts +0 -0
  112. /package/dist/cli/{prepare → build}/libsql/get-current-platform.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,208 @@
1
1
  # @redocly/redoc-reef
2
2
 
3
+ ## 0.131.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d87ca0f750: Replaced the separate right-side development mode controls in Realm docs UI with a single bottom floating status bar to improve user experience.
8
+ - 447b0dc32a: Added support for the product filter on **Project Analytics** page.
9
+ - 1d7c82d350: Added support for `badges` option in `sidebars.yaml` to display visual indicators next to sidebar item labels.
10
+ - e7cc4036fc: Added support for OpenAPI 3.2 `tags` object.
11
+ - 4aa015b6ea: Added support for OpenAPI 3.2 `querystring` parameters to handle structured query parameters with nested objects and arrays.
12
+ - 8a6153095f: Added an internal `/_api/cors` proxy endpoint in Realm and configured embedded Replay to use it by default.
13
+ - 10585dd0d0: Added support for the `nodeType` field in the OpenAPI 3.2 XML Object.
14
+ - 703634d21f: Enabled semantic search for Docs MCP.
15
+ - c2b1717b2b: Added stricter validation to feedback forms.
16
+ - 34ef22b17c: Added `code-snippet` Markdoc tag support for `llms.txt`.
17
+ - e6944434c8: Added support for OpenAPI `allowReserved` query parameters in Replay.
18
+
19
+ ### Patch Changes
20
+
21
+ - 7f8301f1ed: Fixed an issue where the **Connect to MCP** button ignored the configured prefix path.
22
+ - bfdf798d61: Fixed **View as Markdown** and **Copy for LLM** page actions incorrectly omitting schema properties that share a name with a property at a different nesting level.
23
+ - dc4442ab07: Fixed canonical URLs on versioned pages to use the default version.
24
+ - 43955ab32f: Improved the accessibility of OpenAPI and GraphQL docs.
25
+ - 5ef75a3b5d: Fixed an issue where the **Copy for LLM** and **View as Markdown** page actions ignored the respective path prefix for the root page.
26
+ - 8b42559201: Fixed an issue where sidebar groups were displayed even though they contained no valid items in the active version.
27
+ - eb7a37ae27: Fixed tooltip visibility in browsers without anchor positioning support.
28
+ - 466f4ca3ba: Fixed an issue where custom Markdoc heading IDs were not used in search results.
29
+ - 17aafeac4a: Fixed an issue in OpenAPI docs where example keys were used instead of summary text in example drop-downs.
30
+ - f7b6c52055: Improved appearance and deep linking for the `tabs` Markdoc tag.
31
+ - d0b99c0768: Fixed URL fragment duplication when opening docs for endpoints with path parameters (e.g. `/foo/{id}/bar`).
32
+ - 2d305eec36: Fixed the built-in CORS proxy failing with "fetch failed" for certain URLs.
33
+ Now the browser's `accept-encoding` header isn't forwarded and the error message surfaces the underlying cause.
34
+ - 1eb287db9f: Fixed code sample generation when path parameter examples contain integer values.
35
+ - 807547ecbd: Improved build memory usage for large projects.
36
+ - 7276b4e5d6: Fixed an issue in AI Search where clearing the product tag would still include the product in the search request.
37
+ - a9a1ee0fe1: Fixed an issue where page actions remained visible even though `search` was disabled.
38
+ - 9b9b43a1b4: Improved the accessibility of AsyncAPI docs.
39
+ - 1cc1909566: Fixed an issue where optional properties of API operations were inconsistently displayed between API docs and Replay.
40
+ The optional properties are now respect the configuration in `redocly.yaml`.
41
+ - 130c111688: Fixed security vulnerability `CVE-2026-26996` by upgrading `minimatch` to version `10.2.1`.
42
+ - 7e3400d4a8: Fixed page actions overlapping the navbar.
43
+ - d264713872: Fixed an issue where `rbac` configuration ignored versioned content folder paths with leading slashes.
44
+ - 721799cba5: Fixed padding in schema definition and MCP tool views.
45
+ - 721799cba5: Fixed an issue in OpenAPI docs where the schema description in the **Schema definition** section was duplicated.
46
+ - 32c0b1683b: Fixed an issue where schemas using `allOf` with a `$ref` had their own `title` overridden by the referenced schema's title.
47
+ - 9b35001fdd: Fixed an issue in OpenAPI docs where nested Markdoc partial tags prevented partial content from rendering.
48
+ - 652e464285: Fixed an issue where the root `.md` pages for OpenAPI and AsyncAPI files failed to generate when `requiresLogin` was set to `true` in `redocly.yaml`.
49
+ - c50df09073: Fixed an issue where scorecard displayed a "Lint completed without rules" message when rules were configured in the `apis` section of `redocly.yaml` rather than at the root level.
50
+ - 263c8021c3: Fixed an issue where the terminal output retained artifacts from previous commands.
51
+ - ce4a06bc15: Fixed a bug where Segment analytics ignored `trackPage=false` in configuration when a custom script was used to send page view events.
52
+ - 7abfb7ff61: Updated `@redocly/openapi-core` to version `2.20.5`.
53
+ - 2641586046: Fixed an issue in GraphQL docs where navigating to a referenced field resulted in a `404` error.
54
+ - adf0e98992: Fixed an issue where the expand dropdown buttons were displayed over open dropdown menus.
55
+ - b2504fea98: Fixed an issue where `sidebars.yaml` files in ignored folders weren't excluded from link checking.
56
+ - 1b2efd5ab7: Fixed an issue with Mock Server where the response sample included `writeOnly` fields.
57
+ - 2bb21c43ec: Fixed security vulnerability `CVE-2026-26278` by upgrading `fast-xml-parser` to version `5.3.6`.
58
+ - Updated dependencies [7f8301f1ed]
59
+ - Updated dependencies [3554f6b8da]
60
+ - Updated dependencies [43955ab32f]
61
+ - Updated dependencies [5ef75a3b5d]
62
+ - Updated dependencies [447b0dc32a]
63
+ - Updated dependencies [c2b1717b2b]
64
+ - Updated dependencies [eb7a37ae27]
65
+ - Updated dependencies [17aafeac4a]
66
+ - Updated dependencies [f7b6c52055]
67
+ - Updated dependencies [1eb287db9f]
68
+ - Updated dependencies [8a5957c080]
69
+ - Updated dependencies [e7cc4036fc]
70
+ - Updated dependencies [7276b4e5d6]
71
+ - Updated dependencies [cf845446a0]
72
+ - Updated dependencies [a9a1ee0fe1]
73
+ - Updated dependencies [2bb21c43ec]
74
+ - Updated dependencies [377e39138a]
75
+ - Updated dependencies [4aa015b6ea]
76
+ - Updated dependencies [9b9b43a1b4]
77
+ - Updated dependencies [1cc1909566]
78
+ - Updated dependencies [10585dd0d0]
79
+ - Updated dependencies [7e3400d4a8]
80
+ - Updated dependencies [aca4d30c49]
81
+ - Updated dependencies [34ef22b17c]
82
+ - Updated dependencies [e6944434c8]
83
+ - Updated dependencies [721799cba5]
84
+ - Updated dependencies [721799cba5]
85
+ - Updated dependencies [32c0b1683b]
86
+ - Updated dependencies [7abfb7ff61]
87
+ - Updated dependencies [2641586046]
88
+ - Updated dependencies [adf0e98992]
89
+ - Updated dependencies [1b2efd5ab7]
90
+ - Updated dependencies [2bb21c43ec]
91
+ - @redocly/theme@0.63.0
92
+ - @redocly/realm-asyncapi-sdk@0.9.0
93
+ - @redocly/asyncapi-docs@1.8.0
94
+ - @redocly/graphql-docs@1.8.0
95
+ - @redocly/openapi-docs@3.19.0
96
+ - @redocly/portal-plugin-mock-server@0.16.0
97
+ - @redocly/portal-legacy-ui@0.14.0
98
+
99
+ ## 0.131.0-next.14
100
+
101
+ ### Patch Changes
102
+
103
+ - 2d305eec36a: Fixed the built-in CORS proxy failing with "fetch failed" for certain URLs.
104
+ Now the browser's `accept-encoding` header isn't forwarded and the error message surfaces the underlying cause.
105
+
106
+ ## 0.131.0-next.13
107
+
108
+ ### Patch Changes
109
+
110
+ - 466f4ca3ba3: Fixed an issue where custom Markdoc heading IDs were not used in search results.
111
+ - f7b6c520559: Improved appearance and deep linking for the `tabs` Markdoc tag.
112
+ - 0140f0ba709: Fixed an issue where React page validation failed silently, causing error reporting to be skipped during builds.
113
+ - 7abfb7ff617: Updated `@redocly/openapi-core` to version `2.20.5`.
114
+ - 8983e235fd1: Updated `openapi-sampler` from version 1.7.0 to 1.7.2.
115
+ - Updated dependencies [3554f6b8da8]
116
+ - Updated dependencies [f7b6c520559]
117
+ - Updated dependencies [cf845446a06]
118
+ - Updated dependencies [7abfb7ff617]
119
+ - Updated dependencies [8983e235fd1]
120
+ - @redocly/realm-asyncapi-sdk@0.9.0-next.5
121
+ - @redocly/theme@0.63.0-next.6
122
+ - @redocly/openapi-docs@3.19.0-next.9
123
+ - @redocly/asyncapi-docs@1.8.0-next.9
124
+ - @redocly/graphql-docs@1.8.0-next.7
125
+ - @redocly/portal-plugin-mock-server@0.16.0-next.9
126
+
127
+ ## 0.131.0-next.12
128
+
129
+ ### Patch Changes
130
+
131
+ - 43955ab32fd: Improved the accessibility of OpenAPI and GraphQL docs.
132
+ - 7276b4e5d63: Fixed an issue in AI Search where clearing the product tag would still include the product in the search request.
133
+ - 1cc1909566f: Fixed an issue where optional properties of API operations were inconsistently displayed between API docs and Replay.
134
+ The optional properties are now displayed or hidden according to configuration in `redocly.yaml`.
135
+ - d59b5669cea: Updated `@redocly/openapi-core` to version `2.20.4`.
136
+ - Updated dependencies [43955ab32fd]
137
+ - Updated dependencies [7276b4e5d63]
138
+ - Updated dependencies [1cc1909566f]
139
+ - Updated dependencies [d59b5669cea]
140
+ - @redocly/asyncapi-docs@1.8.0-next.8
141
+ - @redocly/graphql-docs@1.8.0-next.6
142
+ - @redocly/openapi-docs@3.19.0-next.8
143
+ - @redocly/theme@0.63.0-next.5
144
+ - @redocly/portal-plugin-mock-server@0.16.0-next.8
145
+
146
+ ## 0.131.0-next.11
147
+
148
+ ### Patch Changes
149
+
150
+ - dc4442ab07: Fixed canonical URLs on versioned pages to use the default version.
151
+ - b2504fea98: Fixed an issue where `sidebars.yaml` files in folders added to `ignore` configuration weren't excluded from link checking.
152
+ - Updated dependencies [8a5957c080]
153
+ - @redocly/realm-asyncapi-sdk@0.9.0-next.4
154
+ - @redocly/theme@0.63.0-next.4
155
+
156
+ ## 0.131.0-next.10
157
+
158
+ ### Patch Changes
159
+
160
+ - d59d3fce3d: Updated `@redocly/openapi-core` to version `2.20.3`.
161
+ - 1eb287db9f: Fixed code sample generation when path parameter examples contain integer values.
162
+ - 652e464285: Fixed an issue where the root `.md` pages for OpenAPI/AsyncAPI files failed to generate when `requiresLogin` was set to `true` in `redocly.yaml`.
163
+ - Updated dependencies [d59d3fce3d]
164
+ - Updated dependencies [1eb287db9f]
165
+ - @redocly/openapi-docs@3.19.0-next.7
166
+ - @redocly/asyncapi-docs@1.8.0-next.7
167
+ - @redocly/portal-plugin-mock-server@0.16.0-next.7
168
+
169
+ ## 0.131.0-next.9
170
+
171
+ ### Minor Changes
172
+
173
+ - 447b0dc32a: Added support for the product filter on Project Analytics page.
174
+
175
+ ### Patch Changes
176
+
177
+ - 2836be0996: Updated `@redocly/openapi-core` to version `2.19.2`.
178
+ - eb7a37ae27: Fixed tooltip visibility in browsers without anchor positioning support.
179
+ - a9a1ee0fe1: Fixed an issue where page actions remained visible even though `search` was disabled.
180
+ - 9b9b43a1b4: Improved the accessibility of AsyncAPI docs.
181
+ - d264713872: Fixed an issue where `rbac` configuration ignored versioned content folder paths with leading slashes.
182
+ - e6944434c8: Added support for OpenAPI `allowReserved` query parameters in Replay.
183
+ - 721799cba5: Fixed padding in schema definition and MCP tool views.
184
+ - 721799cba5: Fixed an issue in API docs where the schema description in the **Schema definition** section was duplicated.
185
+ - 263c8021c3: Fixed an issue where the terminal output retained artefacts from previous commands.
186
+ - 1a2a4eb7c4: Updated `@redocly/openapi-core` to version `2.20.1`.
187
+ - ce4a06bc15: Fixed a bug where segment analytics ignored `trackPage=false` in configuration when a custom script was used to send page view events.
188
+ - 1b2efd5ab7: Fixed an issue with mock server where the response sample included `writeOnly` fields.
189
+ - Updated dependencies [2836be0996]
190
+ - Updated dependencies [447b0dc32a]
191
+ - Updated dependencies [eb7a37ae27]
192
+ - Updated dependencies [a9a1ee0fe1]
193
+ - Updated dependencies [9b9b43a1b4]
194
+ - Updated dependencies [e6944434c8]
195
+ - Updated dependencies [721799cba5]
196
+ - Updated dependencies [721799cba5]
197
+ - Updated dependencies [1a2a4eb7c4]
198
+ - Updated dependencies [1b2efd5ab7]
199
+ - @redocly/openapi-docs@3.19.0-next.6
200
+ - @redocly/realm-asyncapi-sdk@0.9.0-next.3
201
+ - @redocly/asyncapi-docs@1.8.0-next.6
202
+ - @redocly/graphql-docs@1.8.0-next.5
203
+ - @redocly/theme@0.63.0-next.4
204
+ - @redocly/portal-plugin-mock-server@0.16.0-next.6
205
+
3
206
  ## 0.131.0-next.8
4
207
 
5
208
  ### Patch Changes
@@ -80,7 +283,7 @@
80
283
 
81
284
  ### Minor Changes
82
285
 
83
- - d87ca0f750: Replaces the separate right-side development mode controls in Realm docs UI with a single bottom floating status bar to improve user experience.
286
+ - d87ca0f750: Replaced the separate right-side development mode controls in Realm docs UI with a single bottom floating status bar to improve user experience.
84
287
  - e7cc4036fc: Added support for OpenAPI 3.2 `tags` object.
85
288
  - 4aa015b6ea: Added support for OpenAPI 3.2 `querystring` parameters to handle structured query parameters with nested objects and arrays.
86
289
  - 10585dd0d0: Added support for the `nodeType` field in the OpenAPI 3.2 XML Object.
package/dist/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import"./server/utils/set-execution-mode.js";import"./cli/utils/node-version-check.js";import o from"mri";import*as r from"node:path";import{tmpdir as A}from"node:os";import*as x from"node:fs";import"./server/node-fetch-polyfill.js";import{cliCommandNames as g}from"./constants/common.js";import{initPlugins as T}from"./server/plugins/lifecycle.js";import{loadEnvVariables as y}from"./server/utils/envs/load-env-variables.js";import{PORTAL_VERSION as k}from"./server/version.js";import{logger as p}from"./server/tools/notifiers/logger.js";import{reporter as t}from"./server/tools/notifiers/reporter.js";import{sha as R}from"./server/utils/crypto/sha.js";import{envConfig as S}from"./server/config/env-config.js";import{develop as V}from"./cli/develop.js";import{eject as I}from"./cli/eject/index.js";import{beforeCommand as w}from"./server/utils/lifecycle-hooks.js";import{Store as C}from"./server/store.js";import{prepare as L}from"./cli/prepare/index.js";import{fromCurrentDir as _}from"./server/utils/paths.js";import{translationsCliOpts as M}from"./cli/translations/options.js";import{generateTranslations as N}from"./cli/translations/index.js";import{EntitlementsProvider as F}from"./server/entitlements/entitlements-provider.js";import{isValidPlan as U}from"./server/entitlements/is-valid-plan.js";import{stopAllCompilers as $}from"./server/esbuild/esbuild.js";import{copyLibsqlPrebuiltBinary as q}from"./cli/prepare/libsql/copy-prebuilt-binary.js";import{telemetry as d}from"./cli/telemetry/index.js";import{stats as B}from"./cli/stats/index.js";import{statsCliOpts as G}from"./cli/stats/options.js";const n=process.argv[2];let i;const f={alias:{d:"project-dir",p:"port"},default:{"project-dir":S.REDOCLY_CONTENT_DIR||process.cwd(),outdir:"public"}},Y={alias:f.alias,default:{...f.default,plan:"enterprise"}},z={alias:{d:"prepareDir"},default:{prepareDir:"public"}},H={boolean:["force"],alias:{f:"force",d:"project-dir"},default:{"project-dir":process.cwd()}};process.on("uncaughtException",async function(e){e?.code==="ERR_INVALID_STATE"?console.log("Ignore premature close error"):(p.error("Uncaught exception occurred. Stopping compilers."),await $(),p.error("Exiting due to uncaught exception"),await t.panic(e))});try{n||await t.panicOnContentError("Command not specified.");const e=F.instance();switch(["prepare","serve","stats"].includes(n)&&await e.init(),["eject","translate"].includes(n)&&await e.init({developModePlan:"enterprise"}),n){case"develop":case"preview":const a=o(process.argv.slice(3),Y),E=r.resolve(a["project-dir"]),j=r.join(A(),"redocly-public-"+R(E)),l=a.plan.toLowerCase();U(l)||await t.panicOnContentError(`Invalid --plan argument value '${l}'.`),await e.init({developModePlan:l}),i=new C({contentDir:r.resolve(a["project-dir"]),outdir:j,serverOutDir:_(import.meta.url,"./server/esbuild/cache/server")}),await w(g.DEVELOP,a,i),await V(a,i);break;case"prepare":const s=o(process.argv.slice(3),f),u=r.resolve(r.join(s.outdir,"server"));i=new C({contentDir:r.resolve(s["project-dir"]),outdir:r.resolve(s.outdir,"client"),serverOutDir:u}),await w(g.PREPARE,s,i),q(u),await L(s,i);break;case"serve":await y();const b=o(process.argv.slice(3),z),O=r.resolve(b.prepareDir);d.sendServeCliCommandExecutedMessage();const v=r.join(O,"server","index.mjs");x.existsSync(v)||await t.panic("Server not found. Please run `realm prepare` first"),import(v).catch(async c=>{await t.panic("Failed to load server",c)});break;case"eject":e.canAccessFeature("themeEjecting")||await t.panicOnContentError('The "eject" command is not available for this project');const m=o(process.argv.slice(3),H),{lifecycleContext:{getConfig:h,fs:D}}=await T({outdir:"",contentDir:r.resolve(m["project-dir"]),setGlobalConfig:()=>null});D.dispose(),d.sendCliCommandEjectExecutedMessage([{object:"cli_command",arguments:m}]),await I({...m,config:await h()}),p.clearAllTimeouts();break;case"translate":if(e.canAccessFeature("l10n")){const c=o(process.argv.slice(3),M);d.sendCliCommandTranslateExecutedMessage({arguments:c}),await N(c)}else await t.panicOnContentError('The "translate" command is not available for this project');break;case"stats":const P=o(process.argv.slice(3),G);await B(P);break;case"--version":console.log(k);break;default:await t.panicOnContentError(`Unknown command "${n}"`)}}catch(e){p.error("Exiting due to uncaught exception"),await t.panic(e)}
2
+ import"./server/utils/set-execution-mode.js";import"./cli/utils/node-version-check.js";import o from"mri";import*as r from"node:path";import{tmpdir as T}from"node:os";import*as u from"node:fs";import"./server/node-fetch-polyfill.js";import{cliCommandNames as C}from"./constants/common.js";import{initPlugins as S}from"./server/plugins/lifecycle.js";import{loadEnvVariables as k}from"./server/utils/envs/load-env-variables.js";import{PORTAL_VERSION as I}from"./server/version.js";import{logger as i}from"./server/tools/notifiers/logger.js";import{reporter as t}from"./server/tools/notifiers/reporter.js";import{sha as V}from"./server/utils/crypto/sha.js";import{envConfig as L}from"./server/config/env-config.js";import{PACKAGE_NAME as w}from"./config/product-gates.js";import{develop as R}from"./cli/develop.js";import{eject as _}from"./cli/eject/index.js";import{beforeCommand as E}from"./server/utils/lifecycle-hooks.js";import{Store as j}from"./server/store.js";import{build as M}from"./cli/build/index.js";import{fromCurrentDir as N}from"./server/utils/paths.js";import{translationsCliOpts as F}from"./cli/translations/options.js";import{generateTranslations as U}from"./cli/translations/index.js";import{EntitlementsProvider as $}from"./server/entitlements/entitlements-provider.js";import{isValidPlan as B}from"./server/entitlements/is-valid-plan.js";import{stopAllCompilers as G}from"./server/esbuild/esbuild.js";import{copyLibsqlPrebuiltBinary as q}from"./cli/build/libsql/copy-prebuilt-binary.js";import{telemetry as f}from"./cli/telemetry/index.js";import{stats as K}from"./cli/stats/index.js";import{statsCliOpts as Y}from"./cli/stats/options.js";const c=process.argv[2];let a;const v={alias:{d:"project-dir",p:"port"},default:{"project-dir":L.REDOCLY_CONTENT_DIR||process.cwd(),outdir:"public"}},z={alias:v.alias,default:{...v.default,plan:"enterprise"}},H={alias:{d:"buildDir"},default:{buildDir:"public"}},J={boolean:["force"],alias:{f:"force",d:"project-dir"},default:{"project-dir":process.cwd()}};process.on("uncaughtException",async function(e){e?.code==="ERR_INVALID_STATE"?console.log("Ignore premature close error"):(i.error("Uncaught exception occurred. Stopping compilers."),await G(),i.error("Exiting due to uncaught exception"),await t.panic(e))});try{c||await t.panicOnContentError("Command not specified.");const e=$.instance();switch(["build","prepare","serve","stats"].includes(c)&&await e.init(),["eject","translate"].includes(c)&&await e.init({developModePlan:"enterprise"}),c){case"develop":case"preview":const s=o(process.argv.slice(3),z),O=r.resolve(s["project-dir"]),h=encodeURIComponent(V(O)),p=r.join(T(),"redocly-public-"+h);u.existsSync(p)&&(i.verbose("Cleaning temporary output directory..."),u.rmSync(p,{recursive:!0,force:!0}),i.verbose("Temporary output directory cleaned."));const m=s.plan.toLowerCase();B(m)||await t.panicOnContentError(`Invalid --plan argument value '${m}'.`),await e.init({developModePlan:m}),a=new j({contentDir:r.resolve(s["project-dir"]),outdir:p,serverOutDir:N(import.meta.url,"./server/esbuild/cache/server")}),await E(C.DEVELOP,s,a),await R(s,a);break;case"build":case"prepare":const n=o(process.argv.slice(3),v),g=r.resolve(r.join(n.outdir,"server"));a=new j({contentDir:r.resolve(n["project-dir"]),outdir:r.resolve(n.outdir,"client"),serverOutDir:g}),await E(C.BUILD,n,a),q(g),await M(n,a);break;case"serve":await k();const A=o(process.argv.slice(3),H),D=r.resolve(A.buildDir);f.sendServeCliCommandExecutedMessage();const b=r.join(D,"server","index.mjs");u.existsSync(b)||await t.panic(`Server not found. Please run \`${w} build\` first (or \`${w} prepare\` for the deprecated command)`),import(b).catch(async l=>{await t.panic("Failed to load server",l)});break;case"eject":e.canAccessFeature("themeEjecting")||await t.panicOnContentError('The "eject" command is not available for this project');const d=o(process.argv.slice(3),J),{lifecycleContext:{getConfig:y,fs:P}}=await S({outdir:"",contentDir:r.resolve(d["project-dir"]),setGlobalConfig:()=>null});P.dispose(),f.sendCliCommandEjectExecutedMessage([{object:"cli_command",arguments:d}]),await _({...d,config:await y()}),i.clearAllTimeouts();break;case"translate":if(e.canAccessFeature("l10n")){const l=o(process.argv.slice(3),F);f.sendCliCommandTranslateExecutedMessage({arguments:l}),await U(l)}else await t.panicOnContentError('The "translate" command is not available for this project');break;case"stats":const x=o(process.argv.slice(3),Y);await K(x);break;case"--version":console.log(I);break;default:await t.panicOnContentError(`Unknown command "${c}"`)}}catch(e){i.error("Exiting due to uncaught exception"),await t.panic(e)}
@@ -1,10 +1,10 @@
1
1
  import type { Store } from '../../server/store.js';
2
- export type PrepareArgs = {
2
+ export type BuildArgs = {
3
3
  outdir: string;
4
4
  'project-dir': string;
5
5
  'log-level'?: string;
6
6
  devLogin?: boolean;
7
7
  pathPrefix?: string;
8
8
  };
9
- export declare function prepare(args: PrepareArgs, store: Store): Promise<void>;
9
+ export declare function build(args: BuildArgs, store: Store): Promise<void>;
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import T from"node:path";import{unlink as h}from"node:fs/promises";import{writeFileSync as y}from"node:fs";import{envConfig as S}from"../../server/config/env-config.js";import{PORTAL_VERSION as A}from"../../server/version.js";import{logger as e}from"../../server/tools/notifiers/logger.js";import{reporter as b}from"../../server/tools/notifiers/reporter.js";import{shutdowner as O}from"../../server/tools/shutdowner.js";import{promiseMapLimit as D}from"../../server/utils/async/promise-map-limit.js";import{validateReactPages as E}from"../../server/plugins/pages/validators/validate-react-pages.js";import{ensureDir as v}from"../../server/utils/index.js";import{initPlugins as M,runPlugins as _,writeClientEntries as x}from"../../server/plugins/lifecycle.js";import{createClientCompiler as L,createNodeBundleCompiler as J}from"../../server/esbuild/esbuild.js";import{validateAllMarkdowns as j}from"../../server/plugins/markdown/compiler.js";import{copyEnvFiles as k}from"./copy-env-files.js";import{EsbuildError as l,esbuildLogger as p}from"../../server/esbuild/esbuild-logger.js";import{reportAllErrors as F}from"../../server/utils/report-all-errors.js";import{collectAnalytics as U}from"./analytics/collect-analytics.js";import{copyMigrationsFolder as z}from"../../server/providers/database/copy-migrations.js";import{telemetry as c}from"../telemetry/index.js";import{telemetryTraceStep as m}from"../telemetry/helpers/trace-step.js";async function si(C,i){c.initialize(A),e.info("Starting project build.");const P=e.startTiming();await m("build.start",async R=>{x(i);const d=await L(i,i.outdir,"production"),u=await J(i,i.serverOutDir,"production");let n,f;try{await m("build.client_compilation",async()=>{const s=e.startTiming(),o=await d.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Client JavaScript compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.server_compilation",async()=>{const s=e.startTiming(),o=await u.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Server JavaScript compiled");r&&c.sendTimingPerformedMessage({message:r.message,timeMs:r.timeMs})}),await i.reloadMarkdocOptions();let t;({pluginInstances:t,lifecycleContext:n}=await M({outdir:i.outdir,serverOutDir:i.serverOutDir,contentDir:i.contentDir,devLogin:C.devLogin,setGlobalConfig:i.setGlobalConfig})),n.fs.dispose(),i.lifecycleContext=n,z(i),await _(t,i,n),f=U(i,n),await m("build.client_server_recompile",async()=>{const s=e.startTiming();e.info("Re-compiling JavaScript with user code"),(await Promise.all([d.rebuild(),u.rebuild()]).catch(a=>{throw new l(a)})).forEach(({warnings:a})=>{Array.isArray(a)&&p(new l({warnings:a}))});const r=e.infoTime(s,"JavaScript re-compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.pages_validation",async()=>{await E(i,n),await j(i,n)}),await F(n),i.markUserCodeReady()}catch(t){R?.error(t),t instanceof l&&p(t)}finally{f&&await f.catch(()=>{}),await d.dispose(),await u.dispose()}b.printErrors(),e.info("Rendering pages..."),await m("build.prepare_static_data",async t=>{const s=e.startTiming(),o=[...i.getAllRoutes(),...i.getAllApiRoutes()];t?.setAttribute("totalRoutes",o.length.toString()),await D(o,15,a=>i.writeRouteStaticData(a,n));const r=e.successTime(s,"Page static data prepared.");r&&c.sendTimingPerformedMessage(r)}),await m("build.store_serialization",async()=>{const t=e.startTiming();v(i.serverOutDir),y(T.join(i.serverOutDir,"store.json"),JSON.stringify(await i.toJson())),e.successTime(t,"Store serialized and written."),k(i)});const g=S.REDOCLY_PROBLEMS_OUTPUT_FILE;if(g){const t=e.startTiming();y(v(g),JSON.stringify(b.getProblems()),"utf-8"),e.successTime(t,"Broken links written.")}await h(T.join(i.serverOutDir,"index.css"));const w=e.successTime(P,"All done");w&&c.sendTimingPerformedMessage(w)}),await O.exitWithCode(0)}export{si as prepare};
1
+ import T from"node:path";import{unlink as h}from"node:fs/promises";import{writeFileSync as y}from"node:fs";import{envConfig as S}from"../../server/config/env-config.js";import{PORTAL_VERSION as A}from"../../server/version.js";import{logger as e}from"../../server/tools/notifiers/logger.js";import{reporter as b}from"../../server/tools/notifiers/reporter.js";import{shutdowner as O}from"../../server/tools/shutdowner.js";import{promiseMapLimit as D}from"../../server/utils/async/promise-map-limit.js";import{validateReactPages as E}from"../../server/plugins/pages/validators/validate-react-pages.js";import{ensureDir as v}from"../../server/utils/index.js";import{initPlugins as M,runPlugins as _,writeClientEntries as x}from"../../server/plugins/lifecycle.js";import{createClientCompiler as L,createNodeBundleCompiler as J}from"../../server/esbuild/esbuild.js";import{validateAllMarkdowns as j}from"../../server/plugins/markdown/compiler.js";import{copyEnvFiles as k}from"./copy-env-files.js";import{EsbuildError as l,esbuildLogger as p}from"../../server/esbuild/esbuild-logger.js";import{reportAllErrors as F}from"../../server/utils/report-all-errors.js";import{collectAnalytics as U}from"./analytics/collect-analytics.js";import{copyMigrationsFolder as z}from"../../server/providers/database/copy-migrations.js";import{telemetry as c}from"../telemetry/index.js";import{telemetryTraceStep as m}from"../telemetry/helpers/trace-step.js";async function si(C,i){c.initialize(A),e.info("Starting project build.");const P=e.startTiming();await m("build.start",async R=>{x(i);const d=await L(i,i.outdir,"production"),u=await J(i,i.serverOutDir,"production");let n,f;try{await m("build.client_compilation",async()=>{const s=e.startTiming(),o=await d.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Client JavaScript compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.server_compilation",async()=>{const s=e.startTiming(),o=await u.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Server JavaScript compiled");r&&c.sendTimingPerformedMessage({message:r.message,timeMs:r.timeMs})}),await i.reloadMarkdocOptions();let t;({pluginInstances:t,lifecycleContext:n}=await M({outdir:i.outdir,serverOutDir:i.serverOutDir,contentDir:i.contentDir,devLogin:C.devLogin,setGlobalConfig:i.setGlobalConfig})),n.fs.dispose(),i.lifecycleContext=n,z(i),await _(t,i,n),f=U(i,n),await m("build.client_server_recompile",async()=>{const s=e.startTiming();e.info("Re-compiling JavaScript with user code"),(await Promise.all([d.rebuild(),u.rebuild()]).catch(a=>{throw new l(a)})).forEach(({warnings:a})=>{Array.isArray(a)&&p(new l({warnings:a}))});const r=e.infoTime(s,"JavaScript re-compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.pages_validation",async()=>{await E(i,n),await j(i,n)}),await F(n),i.markUserCodeReady()}catch(t){R?.error(t),t instanceof l&&p(t)}finally{f&&await f.catch(()=>{}),await d.dispose(),await u.dispose()}b.printErrors(),e.info("Rendering pages..."),await m("build.prepare_static_data",async t=>{const s=e.startTiming(),o=[...i.getAllRoutes(),...i.getAllApiRoutes()];t?.setAttribute("totalRoutes",o.length.toString()),await D(o,15,a=>i.writeRouteStaticData(a,n));const r=e.successTime(s,"Page static data prepared.");r&&c.sendTimingPerformedMessage(r)}),await m("build.store_serialization",async()=>{const t=e.startTiming();v(i.serverOutDir),y(T.join(i.serverOutDir,"store.json"),JSON.stringify(await i.toJson())),e.successTime(t,"Store serialized and written."),k(i)});const g=S.REDOCLY_PROBLEMS_OUTPUT_FILE;if(g){const t=e.startTiming();y(v(g),JSON.stringify(b.getProblems()),"utf-8"),e.successTime(t,"Broken links written.")}await h(T.join(i.serverOutDir,"index.css"));const w=e.successTime(P,"All done");w&&c.sendTimingPerformedMessage(w)}),await O.exitWithCode(0)}export{si as build};
@@ -1 +1 @@
1
- import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as u}from"../server/tools/notifiers/reporter.js";import{green as v}from"../server/tools/notifiers/helpers/colors.js";import{envConfig as m}from"../server/config/env-config.js";import{resolveCache as w}from"../server/esbuild/plugins/themes-resolver.js";import{getBilledPagesCount as p}from"../server/utils/index.js";import{createClientCompiler as C,createServerCompiler as h}from"../server/esbuild/esbuild.js";import{initPlugins as S,runPlugins as f,writeClientEntries as E}from"../server/plugins/lifecycle.js";import{startDevServer as R}from"../server/web-server/dev-server.js";import{validateAllMarkdowns as b}from"../server/plugins/markdown/compiler.js";import{reportAllErrors as g}from"../server/utils/report-all-errors.js";import{copyMigrationsFolder as y}from"../server/providers/database/copy-migrations.js";async function F(i,e){t.info("Starting project preview mode."),E(e),t.startTiming("initial-js"),await L(e),t.infoTime("initial-js","JavaScript compiled");const{pluginInstances:a,lifecycleContext:n}=await S({contentDir:e.contentDir,outdir:e.outdir,serverOutDir:void 0,devLogin:i["dev-login"]!==!1,setGlobalConfig:e.setGlobalConfig});e.lifecycleContext=n,y(e),await f(a,e,n,{failFast:!0});const d=async()=>{const r=performance.now();u.clearErrors(),await f(a,e,n),m.REDOCLY_EXP_DISABLE_MD_VALIDATION!=="true"?await b(e,n):t.info("Skipping markdown validation step"),D().then(async()=>{await g(n);const l=p(e.getAllRoutes()),o=u.summary(` \u{1F440} Last change processed in ${v(Math.round(performance.now()-r)+"ms")}`,l);e.runListeners("errors-updated",void 0,o),e.runListeners("pages-updated",void 0,l),e.runListeners("routes-updated")})};m.REDOCLY_EXP_DISABLE_MD_VALIDATION!=="true"?await b(e,n):t.info("Skipping markdown validation step"),await g(n);const s=p(e.getAllRoutes());u.summary(" \u{1F440} Watching for changes...",s),e.runListeners("pages-updated",void 0,s),n.fs.watch(async()=>{w.clear(),await d()}),t.verbose("Starting development server."),await R(e,n,{port:Number(i.port||4e3)}),u.listenStdin()}async function L(i){let e=!0,a=!0;const n=r=>{r==="client"?e=!0:a=!0,i.runListeners("build-started"),e!=a&&(i.startEsbuildRun(),t.startTiming("rebuild"))},d=async r=>{r==="client"?e=!1:a=!1,!(e||a)&&(i.finishEsbuildRun(),i.buildRevision++,t.infoTime("rebuild","JavaScript re-compiled"),await i.reloadMarkdocOptions(),i.markUserCodeReady(),i.runListeners("build-updated"),i.lifecycleContext&&i.buildRevision>1&&i.lifecycleContext.fs.emitCodeUpdated())},s=[new Promise((r,l)=>{const o={label:"client",buildStart(){t.verbose("Start compiling client code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Client compiled"),r(!0)},rebuildStart:()=>n("client"),rebuildEnd:()=>d("client")};C(i,i.outdir,"development",o).then(c=>c.watch()).catch(l)}),new Promise((r,l)=>{const o={label:"server",buildStart(){t.verbose("Start compiling server code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Server compiled"),r(!0)},rebuildStart:()=>n("server"),rebuildEnd:()=>d("server")};h(i,i.serverOutDir,"development",o).then(c=>c.watch()).catch(l)})];await Promise.all(s),await i.reloadMarkdocOptions()}function D(){return new Promise(i=>{setTimeout(i,0)})}export{F as develop};
1
+ import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as c}from"../server/tools/notifiers/reporter.js";import{green as v}from"../server/tools/notifiers/helpers/colors.js";import{envConfig as m}from"../server/config/env-config.js";import{resolveCache as w}from"../server/esbuild/plugins/themes-resolver.js";import{getBilledPagesCount as p}from"../server/utils/index.js";import{createClientCompiler as C,createServerCompiler as h}from"../server/esbuild/esbuild.js";import{initPlugins as S,runPlugins as f,writeClientEntries as E}from"../server/plugins/lifecycle.js";import{startDevServer as R}from"../server/web-server/dev-server.js";import{validateAllMarkdowns as b}from"../server/plugins/markdown/compiler.js";import{reportAllErrors as g}from"../server/utils/report-all-errors.js";import{copyMigrationsFolder as y}from"../server/providers/database/copy-migrations.js";import{listenStdin as L}from"./utils/listen-stdin.js";async function J(i,e){t.info("Starting project preview mode."),E(e),t.startTiming("initial-js"),await D(e),t.infoTime("initial-js","JavaScript compiled");const{pluginInstances:a,lifecycleContext:n}=await S({contentDir:e.contentDir,outdir:e.outdir,serverOutDir:void 0,devLogin:i["dev-login"]!==!1,setGlobalConfig:e.setGlobalConfig});e.lifecycleContext=n,y(e),await f(a,e,n,{failFast:!0});const d=async()=>{const r=performance.now();c.clearErrors(),await f(a,e,n),m.REDOCLY_EXP_DISABLE_MD_VALIDATION!=="true"?await b(e,n):t.info("Skipping markdown validation step"),P().then(async()=>{await g(n);const l=p(e.getAllRoutes()),o=c.summary(` \u{1F440} Last change processed in ${v(Math.round(performance.now()-r)+"ms")}`,l);e.runListeners("errors-updated",void 0,o),e.runListeners("pages-updated",void 0,l),e.runListeners("routes-updated")})};m.REDOCLY_EXP_DISABLE_MD_VALIDATION!=="true"?await b(e,n):t.info("Skipping markdown validation step"),await g(n);const s=p(e.getAllRoutes());c.summary(" \u{1F440} Watching for changes...",s),e.runListeners("pages-updated",void 0,s),n.fs.watch(async()=>{w.clear(),await d()}),t.verbose("Starting development server."),await R(e,n,{port:Number(i.port||4e3)}),L()}async function D(i){let e=!0,a=!0;const n=r=>{r==="client"?e=!0:a=!0,i.runListeners("build-started"),e!=a&&(i.startEsbuildRun(),t.startTiming("rebuild"))},d=async r=>{r==="client"?e=!1:a=!1,!(e||a)&&(i.finishEsbuildRun(),i.buildRevision++,t.infoTime("rebuild","JavaScript re-compiled"),await i.reloadMarkdocOptions(),i.markUserCodeReady(),i.runListeners("build-updated"),i.lifecycleContext&&i.buildRevision>1&&i.lifecycleContext.fs.emitCodeUpdated())},s=[new Promise((r,l)=>{const o={label:"client",buildStart(){t.verbose("Start compiling client code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Client compiled"),r(!0)},rebuildStart:()=>n("client"),rebuildEnd:()=>d("client")};C(i,i.outdir,"development",o).then(u=>u.watch()).catch(l)}),new Promise((r,l)=>{const o={label:"server",buildStart(){t.verbose("Start compiling server code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Server compiled"),r(!0)},rebuildStart:()=>n("server"),rebuildEnd:()=>d("server")};h(i,i.serverOutDir,"development",o).then(u=>u.watch()).catch(l)})];await Promise.all(s),await i.reloadMarkdocOptions()}function P(){return new Promise(i=>{setTimeout(i,0)})}export{J as develop};
@@ -1,3 +1,3 @@
1
- import type { LifecycleContext } from '../../../server/types';
1
+ import type { LifecycleContext } from '../../../../server/types';
2
2
  export declare function collectOpenapiDocumentsStatistics(lifecycleContext: LifecycleContext, telemetryEnabled: boolean): Promise<void>;
3
- //# sourceMappingURL=openapi.d.ts.map
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ import{detectSpec as u,getTypes as d,normalizeTypes as w,normalizeVisitors as h,resolveDocument as S,BaseResolver as g,StatsOAS as y,walkDocument as D}from"@redocly/openapi-core";import{logger as m}from"../../../../server/tools/notifiers/logger.js";import{envConfig as I}from"../../../../server/config/env-config.js";import{telemetryTraceStep as O}from"../../../telemetry/helpers/trace-step.js";import{telemetry as v}from"../../../telemetry/index.js";import{computeOas32Stats as b}from"./oas32.js";const t={refs:{metric:"References",total:0,color:"red",items:new Set},externalDocs:{metric:"External Documents",total:0,color:"magenta"},schemas:{metric:"Schemas",total:0,color:"white"},parameters:{metric:"Parameters",total:0,color:"yellow",items:new Set},links:{metric:"Links",total:0,color:"cyan",items:new Set},pathItems:{metric:"Path Items",total:0,color:"green"},webhooks:{metric:"Webhooks",total:0,color:"green"},operations:{metric:"Operations",total:0,color:"yellow"},tags:{metric:"Tags",total:0,color:"white",items:new Set}};async function _(a,o){await O("stats.openapi",async()=>{m.info("OpenAPI collector: start processing documents...");const e=(await a.cache.load(".","load-oas-docs")).data,s=[];for(const r of e)if(!r.isVirtual){const n=await k(r);s.push(n),v.sendStatsOpenapiCollectedMessage([{...n,projectBuildId:I.PROJECT_BUILD_ID||""}])}o||console.table(s),m.info("OpenAPI collector: openapi documents processing completed.")})}async function k(a){const o=a.definition,e=u(o),s=w(d(e)),r=h([{severity:"warn",ruleId:"openapi_stats",visitor:y(t)}],s),n={problems:[],specVersion:e,visitorsData:{}},c={source:{absoluteRef:""},parsed:o},i=s.Root;if(!i)throw new Error("Root type not found in OpenAPI spec types");const f=await S({rootDocument:c,rootType:i,externalRefResolver:new g});D({rootType:i,normalizedVisitors:r,resolvedRefMap:f,document:c,ctx:n});const l={path:a.relativePath,refs:t.refs.total,externalDocs:t.externalDocs.total,schemas:t.schemas.total,parameters:t.parameters.total,links:t.links.total,pathItems:t.pathItems.total,webhooks:t.webhooks.total,operations:t.operations.total,tags:t.tags.total,version:e};if(e==="oas3_2"){const p=b(o);p&&Object.assign(l,p)}return l}export{_ as collectOpenapiDocumentsStatistics};
@@ -0,0 +1,15 @@
1
+ export type OpenapiStatsOas32 = {
2
+ streamingOperations: number;
3
+ itemSchemaMediaTypes: number;
4
+ additionalOperations: number;
5
+ serversWithName: number;
6
+ discriminatorSchemas: number;
7
+ queryMethodOperations: number;
8
+ parametersWithQueryString: number;
9
+ oauth2WithMetadataUrl: number;
10
+ oauth2DeviceAuthorization: number;
11
+ componentMediaTypes: number;
12
+ xmlNodeTypeUsage: number;
13
+ };
14
+ export declare function computeOas32Stats(doc: unknown): OpenapiStatsOas32 | null;
15
+ //# sourceMappingURL=oas32.d.ts.map
@@ -0,0 +1 @@
1
+ const q=new Set(["text/event-stream","application/jsonl","application/json-seq","multipart/mixed"]);function i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function c(e,t){const s=e[t];return i(s)?s:void 0}function l(e,t){const s=e[t];return Array.isArray(s)?s:[]}function b(e,t){let s=0;for(const a of Object.keys(e))t.has(a)&&s++;return s}function O(e){let t=0;for(const s of Object.values(e))i(s)&&s.itemSchema!=null&&t++;return t}function S(e){return b(e,q)}function d(e){return e.filter(t=>i(t)?t.in==="querystring":!1).length}function g(e,t){const s=e.responses;if(i(s))for(const o of Object.values(s))i(o)&&i(o.content)&&(t.streaming+=S(o.content),t.itemSchema+=O(o.content));const a=c(e,"requestBody");if(a){const o=c(a,"content");o&&(t.streaming+=S(o),t.itemSchema+=O(o))}const m=l(e,"parameters");t.queryStringParams+=d(m)}function v(e,t){const s=l(e,"parameters");t.queryStringParams+=d(s);const a=["get","put","post","delete","patch","head","options","trace","query"];for(const o of a){const n=e[o];i(n)&&(o==="query"&&t.queryMethod++,g(n,t))}const m=c(e,"additionalOperations");if(m){t.additionalOps+=Object.keys(m).length;for(const o of Object.values(m))i(o)&&g(o,t)}}function f(e,t){e.discriminator!=null&&t.discriminator++,c(e,"xml")?.nodeType!=null&&t.xmlNodeType++;const a=e.items;i(a)&&f(a,t);for(const o of["properties","patternProperties"]){const n=e[o];if(i(n))for(const r of Object.values(n))i(r)&&f(r,t)}const m=e.additionalProperties;i(m)&&f(m,t);for(const o of["oneOf","anyOf","allOf","prefixItems"]){const n=e[o];if(Array.isArray(n))for(const r of n)i(r)&&f(r,t)}}function T(e){if(!i(e))return null;const t={streamingOperations:0,itemSchemaMediaTypes:0,additionalOperations:0,serversWithName:0,discriminatorSchemas:0,queryMethodOperations:0,parametersWithQueryString:0,oauth2WithMetadataUrl:0,oauth2DeviceAuthorization:0,componentMediaTypes:0,xmlNodeTypeUsage:0},s=l(e,"servers");for(const n of s)i(n)&&n.name!=null&&t.serversWithName++;const a=c(e,"paths");if(a){const n={streaming:0,additionalOps:0,queryMethod:0,queryStringParams:0,itemSchema:0};for(const r of Object.values(a))i(r)&&v(r,n);t.streamingOperations=n.streaming,t.additionalOperations=n.additionalOps,t.queryMethodOperations=n.queryMethod,t.parametersWithQueryString=n.queryStringParams,t.itemSchemaMediaTypes=n.itemSchema}const m=c(e,"webhooks");if(m){const n={streaming:0,additionalOps:0,queryMethod:0,queryStringParams:0,itemSchema:0};for(const r of Object.values(m))i(r)&&v(r,n);t.streamingOperations+=n.streaming,t.additionalOperations+=n.additionalOps,t.queryMethodOperations+=n.queryMethod,t.parametersWithQueryString+=n.queryStringParams,t.itemSchemaMediaTypes+=n.itemSchema}const o=c(e,"components");if(o){const n=c(o,"mediaTypes");if(n){t.componentMediaTypes=Object.keys(n).length;for(const u of Object.values(n))i(u)&&u.itemSchema!=null&&t.itemSchemaMediaTypes++}const r=c(o,"schemas");if(r){const u={discriminator:0,xmlNodeType:0};for(const p of Object.values(r))i(p)&&f(p,u);t.discriminatorSchemas=u.discriminator,t.xmlNodeTypeUsage=u.xmlNodeType}const h=c(o,"securitySchemes");if(h)for(const u of Object.values(h))i(u)&&u.type==="oauth2"&&(u.oauth2MetadataUrl!=null&&t.oauth2WithMetadataUrl++,c(u,"flows")?.deviceAuthorization!=null&&t.oauth2DeviceAuthorization++);const y=c(o,"parameters");y&&(t.parametersWithQueryString+=d(Object.values(y)))}return t}export{T as computeOas32Stats};
@@ -1 +1 @@
1
- import{initPlugins as n}from"../../server/plugins/lifecycle.js";import{configParserPlugin as a}from"../../server/plugins/config-parser/index.js";import{openAPIDocsPlugin as c}from"../../server/plugins/openapi-docs/index.js";import{shutdowner as s}from"../../server/tools/shutdowner.js";import{PORTAL_VERSION as p}from"../../server/version.js";import{collectOpenapiDocumentsStatistics as l}from"./collectors/openapi.js";import{telemetry as f}from"../telemetry/index.js";import{telemetryTraceStep as y}from"../telemetry/helpers/trace-step.js";async function I(e){const{"project-dir":o,telemetry:t,verbose:i}=e;f.initialize(p,t,i),await y("stats",async()=>{const r=[a,c],{lifecycleContext:m}=await n({contentDir:o},r);await l(m,t)}),await s.exitWithCode(0)}export{I as stats};
1
+ import{initPlugins as n}from"../../server/plugins/lifecycle.js";import{configParserPlugin as a}from"../../server/plugins/config-parser/index.js";import{openAPIDocsPlugin as c}from"../../server/plugins/openapi-docs/index.js";import{shutdowner as s}from"../../server/tools/shutdowner.js";import{PORTAL_VERSION as p}from"../../server/version.js";import{collectOpenapiDocumentsStatistics as l}from"./collectors/openapi/index.js";import{telemetry as f}from"../telemetry/index.js";import{telemetryTraceStep as y}from"../telemetry/helpers/trace-step.js";async function I(e){const{"project-dir":o,telemetry:t,verbose:i}=e;f.initialize(p,t,i),await y("stats",async()=>{const r=[a,c],{lifecycleContext:m}=await n({contentDir:o},r);await l(m,t)}),await s.exitWithCode(0)}export{I as stats};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Listens to stdin and handles the following keys:
3
+ * - ctrl-c ( end of text )
4
+ * - backspace ( delete character )
5
+ * - enter ( new line )
6
+ * - e ( print errors )
7
+ * - q ( exit )
8
+ */
9
+ export declare function listenStdin(): void;
10
+ //# sourceMappingURL=listen-stdin.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{logger as t}from"../../server/tools/notifiers/logger.js";import{reporter as s}from"../../server/tools/notifiers/reporter.js";function o(){t.isInteractive()&&(process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding("utf8"),process.stdin.on("data",r=>{if(r===""&&process.exit(),r==="\x7F"){process.stdout.write("\b \b");return}if(r==="\r"){process.stdout.write(`
2
+ `);return}if(r==="e"){s.printErrors();return}r==="q"&&process.exit(0)}))}export{o as listenStdin};
@@ -1 +1 @@
1
- import e from"react";import{BrowserRouter as o}from"react-router-dom";import{ThemeDataContext as n,SearchSessionProvider as i}from"@redocly/theme/core/contexts";import u from"@redocly/theme/core/templates/Markdown";import{useBreadcrumbs as m,useBanner as d,useCatalogClassic as l,useCurrentProduct as c,useGlobalData as p,useI18n as g,useI18nConfig as h,useL10n as f,useL10nConfig as b,usePageData as C,usePageSharedData as T,usePageVersions as k,usePreloadHistory as v,useProducts as w,useUserMenu as P,useSubmitFeedback as S,useTranslate as y,useSidebarSiblingsData as D,usePageProps as $,useUserTeams as E,useMarkdownText as I,useCodeHighlight as L,useLoadAndNavigate as x,useCatalog as F,useCatalogSort as H,useCatalogSearch as M,useFetchCatalogEntities as R,useFetchCatalogEntitiesRelations as A,useTelemetry as r,useMcpData as B,useFetchCatalogEntityRevisions as G}from"./app/hooks";import{Link as O}from"./app/Link";import{useFacetQuery as U,useSearch as N,useAiSearch as Q}from"./app/search";import{useSidebarItems as V}from"./app/Sidebar/useSidebarItems";import{PageDataContext as j}from"./providers/page-data/PageDataContext";const s={Template:({pageProps:a,children:t})=>e.createElement(u,{pageProps:{...a,metadata:{...a.metadata,markdoc:{tagList:[]}}}},t),templateId:"markdown",isPublic:!0,props:{seo:{title:"Test"},ast:{$$mdtype:"Tag",name:"div",children:[{$$mdtype:"Tag",name:"Heading",attributes:{id:"github-flavored-markdown",level:1},children:["GitHub-flavored markdown"]},{$$mdtype:"Tag",name:"p",attributes:{},children:["These exercises assume you have",{$$mdtype:"Tag",name:"a",attributes:{href:"https://docs.redoc.ly/"},children:["basic markdown knowledge"]},"."]},{$$mdtype:"Tag",name:"Heading",attributes:{id:"create-a-new-plain-markdown-page",level:2},children:["Create a new plain markdown page"]}]},lastModified:new Date("2022-01-01").toISOString()},slug:"",userData:{isAuthenticated:!1,name:"test name",picture:""},sidebar:null,sharedData:{},sharedDataIds:{}},q={useBreadcrumbs:m,useBanner:d,useCatalog:F,useCatalogSort:H,useCatalogSearch:M,useFetchCatalogEntities:R,useFetchCatalogEntitiesRelations:A,useFetchCatalogEntityRevisions:G,useCatalogClassic:l,useCurrentProduct:c,useGlobalData:p,useSearch:N,useAiSearch:Q,useFacetQuery:U,useI18n:g,useI18nConfig:h,useL10n:f,useL10nConfig:b,usePageData:C,usePageSharedData:T,usePageVersions:k,usePreloadHistory:v,useProducts:w,useUserMenu:P,useSidebarItems:V,useSidebarSiblingsData:D,useSubmitFeedback:S,useTranslate:y,useUserTeams:E,usePageProps:$,useMarkdownText:I,useCodeHighlight:L,useLoadAndNavigate:x,useTelemetry:r,useOtelTelemetry:r,useMcpData:B},z={LinkComponent:O},J={hooks:q,components:z,config:{}};function re({children:a,customPageData:t}){return e.createElement(o,null,e.createElement(i,null,e.createElement(j.Provider,{value:{...s,...t,props:{...s.props,...t?.props}}},e.createElement(n.Provider,{value:J},a))))}export{re as TestProvider};
1
+ import e from"react";import{BrowserRouter as o}from"react-router-dom";import{ThemeDataContext as n,SearchSessionProvider as i}from"@redocly/theme/core/contexts";import u from"@redocly/theme/core/templates/Markdown";import{useAnchorPositioning as m,useBreadcrumbs as d,useBanner as l,useCatalogClassic as c,useCurrentProduct as p,useGlobalData as g,useI18n as h,useI18nConfig as f,useL10n as b,useL10nConfig as C,usePageData as T,usePageSharedData as k,usePageVersions as v,usePreloadHistory as P,useProducts as w,useUserMenu as S,useSubmitFeedback as y,useTranslate as D,useSidebarSiblingsData as $,usePageProps as E,useUserTeams as I,useMarkdownText as L,useCodeHighlight as x,useLoadAndNavigate as F,useCatalog as H,useCatalogSort as M,useCatalogSearch as A,useFetchCatalogEntities as R,useFetchCatalogEntitiesRelations as B,useTelemetry as r,useMcpData as G,useFetchCatalogEntityRevisions as O}from"./app/hooks";import{Link as U}from"./app/Link";import{useFacetQuery as N,useSearch as Q,useAiSearch as V}from"./app/search";import{useSidebarItems as j}from"./app/Sidebar/useSidebarItems";import{PageDataContext as q}from"./providers/page-data/PageDataContext";const s={Template:({pageProps:a,children:t})=>e.createElement(u,{pageProps:{...a,metadata:{...a.metadata,markdoc:{tagList:[]}}}},t),templateId:"markdown",isPublic:!0,props:{seo:{title:"Test"},ast:{$$mdtype:"Tag",name:"div",children:[{$$mdtype:"Tag",name:"Heading",attributes:{id:"github-flavored-markdown",level:1},children:["GitHub-flavored markdown"]},{$$mdtype:"Tag",name:"p",attributes:{},children:["These exercises assume you have",{$$mdtype:"Tag",name:"a",attributes:{href:"https://docs.redoc.ly/"},children:["basic markdown knowledge"]},"."]},{$$mdtype:"Tag",name:"Heading",attributes:{id:"create-a-new-plain-markdown-page",level:2},children:["Create a new plain markdown page"]}]},lastModified:new Date("2022-01-01").toISOString()},slug:"",userData:{isAuthenticated:!1,name:"test name",picture:""},sidebar:null,sharedData:{},sharedDataIds:{}},z={useAnchorPositioning:m,useBreadcrumbs:d,useBanner:l,useCatalog:H,useCatalogSort:M,useCatalogSearch:A,useFetchCatalogEntities:R,useFetchCatalogEntitiesRelations:B,useFetchCatalogEntityRevisions:O,useCatalogClassic:c,useCurrentProduct:p,useGlobalData:g,useSearch:Q,useAiSearch:V,useFacetQuery:N,useI18n:h,useI18nConfig:f,useL10n:b,useL10nConfig:C,usePageData:T,usePageSharedData:k,usePageVersions:v,usePreloadHistory:P,useProducts:w,useUserMenu:S,useSidebarItems:j,useSidebarSiblingsData:$,useSubmitFeedback:y,useTranslate:D,useUserTeams:I,usePageProps:E,useMarkdownText:L,useCodeHighlight:x,useLoadAndNavigate:F,useTelemetry:r,useOtelTelemetry:r,useMcpData:G},J={LinkComponent:U},K={hooks:z,components:J,config:{}};function se({children:a,customPageData:t}){return e.createElement(o,null,e.createElement(i,null,e.createElement(q.Provider,{value:{...s,...t,props:{...s.props,...t?.props}}},e.createElement(n.Provider,{value:K},a))))}export{se as TestProvider};
@@ -29,4 +29,5 @@ export { useCodeHighlight } from './codeHighlight/useCodeHighlight';
29
29
  export { useLoadAndNavigate } from './useLoadAndNavigate';
30
30
  export { useUserClaims } from './useUserClaims';
31
31
  export { useMcpData } from './useMcpData';
32
+ export { useAnchorPositioning } from './useAnchorPositioning';
32
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export*from"../../providers/page-data/hooks";import{usePageSharedData as t}from"../../providers/hooks";import{useLoginUrl as a}from"./useLoginUrl";import{useGlobalData as f}from"../useGlobalData";import{useL10n as p}from"../l10n/hooks";import{useL10nConfig as n}from"./useL10nConfig";import{useL10n as l}from"../l10n/hooks";import{useTranslate as C}from"../l10n/hooks";import{useL10nConfig as d}from"./useL10nConfig";export*from"./useCurrentUserTeams";export*from"./products";import{usePageVersions as F}from"../../providers/page-data/hooks";import{useUserMenu as T}from"../UserMenu/useUserMenu";import{useSubmitFeedback as y}from"../Feedback/useSubmitFeedback";import{usePreloadHistory as E}from"../usePreloadHistory";import{useBreadcrumbs as P}from"../Sidebar/useBreadcrumbs";import{useBanner as v}from"./useBanner";import{useCatalog as H}from"./catalog/useCatalog";import{useCatalogSort as R}from"./catalog/useCatalogSort";import{useCatalogSearch as A}from"./catalog/useCatalogSearch";import{useFetchCatalogEntities as N}from"./catalog/useFetchCatalogEntities";import{useFetchCatalogEntitiesRelations as j}from"./catalog/useFetchCatalogEntitiesRelations";import{useFetchCatalogEntityRevisions as z}from"./catalog/useFetchCatalogEntityRevisions";import{useCatalogClassic as K}from"./catalog/useCatalogClassic";import{useTelemetry as Q}from"./useTelemetry";import{useUserTeams as X}from"./useUserTeams";import{useMarkdownText as Z}from"./markdown/useMarkdownText";import{useCodeHighlight as $}from"./codeHighlight/useCodeHighlight";import{useLoadAndNavigate as oe}from"./useLoadAndNavigate";import{useUserClaims as te}from"./useUserClaims";import{useMcpData as ae}from"./useMcpData";export{v as useBanner,P as useBreadcrumbs,H as useCatalog,K as useCatalogClassic,A as useCatalogSearch,R as useCatalogSort,$ as useCodeHighlight,N as useFetchCatalogEntities,j as useFetchCatalogEntitiesRelations,z as useFetchCatalogEntityRevisions,f as useGlobalData,p as useI18n,n as useI18nConfig,l as useL10n,d as useL10nConfig,oe as useLoadAndNavigate,a as useLoginUrl,Z as useMarkdownText,ae as useMcpData,t as usePageSharedData,F as usePageVersions,E as usePreloadHistory,y as useSubmitFeedback,Q as useTelemetry,C as useTranslate,te as useUserClaims,T as useUserMenu,X as useUserTeams};
1
+ export*from"../../providers/page-data/hooks";import{usePageSharedData as t}from"../../providers/hooks";import{useLoginUrl as a}from"./useLoginUrl";import{useGlobalData as f}from"../useGlobalData";import{useL10n as p}from"../l10n/hooks";import{useL10nConfig as n}from"./useL10nConfig";import{useL10n as g}from"../l10n/hooks";import{useTranslate as C}from"../l10n/hooks";import{useL10nConfig as d}from"./useL10nConfig";export*from"./useCurrentUserTeams";export*from"./products";import{usePageVersions as F}from"../../providers/page-data/hooks";import{useUserMenu as S}from"../UserMenu/useUserMenu";import{useSubmitFeedback as U}from"../Feedback/useSubmitFeedback";import{usePreloadHistory as D}from"../usePreloadHistory";import{useBreadcrumbs as M}from"../Sidebar/useBreadcrumbs";import{useBanner as v}from"./useBanner";import{useCatalog as B}from"./catalog/useCatalog";import{useCatalogSort as I}from"./catalog/useCatalogSort";import{useCatalogSearch as w}from"./catalog/useCatalogSearch";import{useFetchCatalogEntities as N}from"./catalog/useFetchCatalogEntities";import{useFetchCatalogEntitiesRelations as j}from"./catalog/useFetchCatalogEntitiesRelations";import{useFetchCatalogEntityRevisions as z}from"./catalog/useFetchCatalogEntityRevisions";import{useCatalogClassic as K}from"./catalog/useCatalogClassic";import{useTelemetry as Q}from"./useTelemetry";import{useUserTeams as X}from"./useUserTeams";import{useMarkdownText as Z}from"./markdown/useMarkdownText";import{useCodeHighlight as $}from"./codeHighlight/useCodeHighlight";import{useLoadAndNavigate as oe}from"./useLoadAndNavigate";import{useUserClaims as te}from"./useUserClaims";import{useMcpData as ae}from"./useMcpData";import{useAnchorPositioning as fe}from"./useAnchorPositioning";export{fe as useAnchorPositioning,v as useBanner,M as useBreadcrumbs,B as useCatalog,K as useCatalogClassic,w as useCatalogSearch,I as useCatalogSort,$ as useCodeHighlight,N as useFetchCatalogEntities,j as useFetchCatalogEntitiesRelations,z as useFetchCatalogEntityRevisions,f as useGlobalData,p as useI18n,n as useI18nConfig,g as useL10n,d as useL10nConfig,oe as useLoadAndNavigate,a as useLoginUrl,Z as useMarkdownText,ae as useMcpData,t as usePageSharedData,F as usePageVersions,D as usePreloadHistory,U as useSubmitFeedback,Q as useTelemetry,C as useTranslate,te as useUserClaims,S as useUserMenu,X as useUserTeams};
@@ -0,0 +1,6 @@
1
+ type AnchorPositioningResult = {
2
+ isSupported: boolean;
3
+ };
4
+ export declare const useAnchorPositioning: () => AnchorPositioningResult;
5
+ export {};
6
+ //# sourceMappingURL=useAnchorPositioning.d.ts.map
@@ -0,0 +1 @@
1
+ import{useState as n,useEffect as s}from"react";const e=()=>{const[o,t]=n(!1);return s(()=>{t(p())},[]),{isSupported:o}};function p(){return typeof CSS>"u"||typeof CSS.supports!="function"?!1:CSS.supports("anchor-name: --a")&&CSS.supports("position-anchor: --a")&&CSS.supports("top: anchor(top)")}export{e as useAnchorPositioning};
@@ -1 +1 @@
1
- import o from"i18next";import{useEffect as a}from"react";import{DEFAULT_LOCALE_PLACEHOLDER as s}from"../../../constants/common";import{defaultTranslationImports as l}from"../../../constants/l10n/default-translations";import{useL10nConfig as u}from"../hooks";const p=()=>{const{currentLocale:t}=u();a(()=>{!t||t===s?document.documentElement.removeAttribute("lang"):document.documentElement.setAttribute("lang",t)},[t])},g=async t=>{if(!t)return;const n=new Set(o.languages);for(const e of Object.keys(t.translations)){const r=await l[e]?.()||{};o.addResourceBundle(e,"translation",{...r,...t.translations[e]?.translation??{}},!0,!0),n.delete(e)}for(const e of n)o.removeResourceBundle(e,"translation")};export{g as updateTranslations,p as useL10n};
1
+ import e from"i18next";import{useEffect as a}from"react";import{DEFAULT_LOCALE_PLACEHOLDER as s}from"../../../constants/common";import{defaultTranslationImports as l}from"../../../constants/l10n/default-translations";import{useL10nConfig as i}from"../hooks";const p=()=>{const{currentLocale:t}=i();a(()=>{const o=!t||t===s?"en":t;document.documentElement.setAttribute("lang",o)},[t])},g=async t=>{if(!t)return;const o=new Set(e.languages);for(const n of Object.keys(t.translations)){const r=await l[n]?.()||{};e.addResourceBundle(n,"translation",{...r,...t.translations[n]?.translation??{}},!0,!0),o.delete(n)}for(const n of o)e.removeResourceBundle(n,"translation")};export{g as updateTranslations,p as useL10n};
@@ -1 +1 @@
1
- import{useCallback as h,useEffect as J,useMemo as N,useRef as f,useState as E}from"react";import{AiSearchError as m}from"@redocly/theme/core/constants";import{withPathPrefix as V,splitContentByToolCalls as j}from"@redocly/theme/core/utils";import{ServerRoutes as B}from"../../../constants/common";import{useSearchSession as D}from"@redocly/theme/core/contexts";import{AI_SEARCH_REQUEST_HEADERS as G,HTTP_ERROR_MAP as K}from"../../constants";import{useI18nConfig as L,useCurrentProduct as U,usePageVersions as z}from"../hooks";import{telemetry as W}from"../telemetry/index.js";import{streamSSEMessages as X}from"./sse-parser";import{handleSSEMessage as Y}from"./message-handlers";function ur(C){const{searchSessionId:d}=D(),[r,s]=E({status:"idle"}),[w,p]=E([]),[g,b]=E([]),t=f(null),u=f(""),o=f(""),a=f([]),{currentLocale:y}=L(),A=U(),{versions:M=[]}=z()||{},i=M.find(e=>e?.active),l=h(()=>{s({status:"idle",response:""}),b([]),u.current="",o.current="",a.current=[]},[]),O=h(()=>{t.current?.abort(),t.current=null,l(),p([])},[l]);J(()=>()=>{t.current?.abort()},[]);const k=h(async(e,F)=>{if(!e)return;t.current?.abort();const R=new AbortController;t.current=R,l(),s({status:"loading",question:e,response:"",resources:[]});try{const n=await fetch(V(B.ASK_AI),{method:"POST",headers:G,body:JSON.stringify({text:e,history:F||[],locale:y,product:A?.name,filter:C?.filter,version:i&&{folder:i.folderId,label:i.label},searchSessionId:d}),signal:R.signal});if(!n.ok){s({status:"error",question:e,error:K[n.status]??m.HttpRequestFailed});return}const I=n.body;if(!I){s({status:"error",question:e,error:m.HttpRequestFailed});return}let v=!1;for await(const c of X(I,R.signal)){const Q={messageId:u.current,resources:a.current,accumulatedResponse:o.current,setConversation:p,setState:s,setToolCalls:b},{messageId:H,resources:P,accumulatedResponse:_}=Y(c,Q);H&&(u.current=H),P&&(a.current=P),_&&(o.current=_),c.type==="error"&&(v=!0)}t.current=null,s(c=>c.status==="error"?c:o.current?{status:"success",question:e,response:o.current,resources:a.current}:{status:"error",question:e,error:m.EmptyResponse}),!v&&o.current&&e.trim()&&u.current&&W.sendSearchAIQueryMessage([{object:"search",question:e,answer:o.current,resources:JSON.stringify(a.current),searchSessionId:d,messageId:u.current}])}catch(n){if(n instanceof Error&&n.name==="AbortError")return;t.current=null,s({status:"error",question:e,error:m.HttpRequestFailed})}},[l,y,A?.name,C?.filter,i,d]),S=r.status==="loading"||r.status==="success"||r.status==="idle"?r.response:void 0,q=N(()=>j(S,g),[S,g]);return{askQuestion:k,isGeneratingResponse:r.status==="loading",response:S,resources:r.status==="loading"||r.status==="success"?r.resources:[],question:r.status!=="idle"?r.question:"",error:r.status==="error"?r.error:null,clearConversation:O,conversation:w,setConversation:p,toolCalls:g,contentSegments:q}}export{ur as useAiSearch};
1
+ import{useCallback as E,useEffect as Q,useMemo as J,useRef as m,useState as b}from"react";import{AiSearchError as d}from"@redocly/theme/core/constants";import{withPathPrefix as N,splitContentByToolCalls as V}from"@redocly/theme/core/utils";import{ServerRoutes as j}from"../../../constants/common";import{useSearchSession as B}from"@redocly/theme/core/contexts";import{AI_SEARCH_REQUEST_HEADERS as D,HTTP_ERROR_MAP as G}from"../../constants";import{useI18nConfig as K,usePageVersions as L}from"../hooks";import{telemetry as U}from"../telemetry/index.js";import{streamSSEMessages as z}from"./sse-parser";import{handleSSEMessage as W}from"./message-handlers";function or(n){const{searchSessionId:p}=B(),[r,s]=b({status:"idle"}),[_,g]=b([]),[S,y]=b([]),t=m(null),c=m(""),o=m(""),a=m([]),{currentLocale:C}=K(),{versions:w=[]}=L()||{},l=w.find(e=>e?.active),f=E(()=>{s({status:"idle",response:""}),y([]),c.current="",o.current="",a.current=[]},[]),M=E(()=>{t.current?.abort(),t.current=null,f(),g([])},[f]);Q(()=>()=>{t.current?.abort()},[]);const O=E(async(e,q)=>{if(!e)return;t.current?.abort();const h=new AbortController;t.current=h,f(),s({status:"loading",question:e,response:"",resources:[]});try{const u=await fetch(N(j.ASK_AI),{method:"POST",headers:D,body:JSON.stringify({text:e,history:q||[],locale:C,product:n?.product,filter:n?.filter,version:l&&{folder:l.folderId,label:l.label},searchSessionId:p}),signal:h.signal});if(!u.ok){s({status:"error",question:e,error:G[u.status]??d.HttpRequestFailed});return}const A=u.body;if(!A){s({status:"error",question:e,error:d.HttpRequestFailed});return}let I=!1;for await(const i of z(A,h.signal)){const F={messageId:c.current,resources:a.current,accumulatedResponse:o.current,setConversation:g,setState:s,setToolCalls:y},{messageId:v,resources:H,accumulatedResponse:P}=W(i,F);v&&(c.current=v),H&&(a.current=H),P&&(o.current=P),i.type==="error"&&(I=!0)}t.current=null,s(i=>i.status==="error"?i:o.current?{status:"success",question:e,response:o.current,resources:a.current}:{status:"error",question:e,error:d.EmptyResponse}),!I&&o.current&&e.trim()&&c.current&&U.sendSearchAIQueryMessage([{object:"search",question:e,answer:o.current,resources:JSON.stringify(a.current),searchSessionId:p,messageId:c.current,...n?.product&&{product:n.product}}])}catch(u){if(u instanceof Error&&u.name==="AbortError")return;t.current=null,s({status:"error",question:e,error:d.HttpRequestFailed})}},[f,n?.product,C,n?.filter,l,p]),R=r.status==="loading"||r.status==="success"||r.status==="idle"?r.response:void 0,k=J(()=>V(R,S),[R,S]);return{askQuestion:O,isGeneratingResponse:r.status==="loading",response:R,resources:r.status==="loading"||r.status==="success"?r.resources:[],question:r.status!=="idle"?r.question:"",error:r.status==="error"?r.error:null,clearConversation:M,conversation:_,setConversation:g,toolCalls:S,contentSegments:k}}export{or as useAiSearch};
@@ -1 +1 @@
1
- import{useCallback as I,useEffect as y,useState as F,useRef as T}from"react";import{SEARCH_DEBOUNCE_TIME_MS as G}from"@redocly/theme/core/constants";import{withPathPrefix as b}from"@redocly/theme/core/utils";import{SEARCH_GROUP_FACET_FIELD as _,SEARCH_PRODUCT_FIELD as N,SEARCH_VERSION_FIELD as k,ServerRoutes as O}from"../../../constants/common";import{debounce as M}from"../../../utils/time/debounce.js";import{useSearchSession as Q}from"@redocly/theme/core/contexts";import{useGlobalData as U,useI18nConfig as P}from"../hooks";import{usePageVersions as x}from"../../providers/page-data/hooks";import{useFacets as J}from"./useFacets";import{telemetry as B}from"../telemetry/index.js";const K=(s,r,e,n,a,c,i,f)=>{const{searchSessionId:d}=Q(),{currentLocale:m}=P(),l=T(""),p=I(M(async(t,h,u,S)=>{if(!t.trim().length&&!h.length){e({}),n({}),a(!1);return}const R={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,filter:A(h,S,c),locale:u})};try{const o=await fetch(b(O.SEARCH),R);if(l.current===t){const E=await o.json();n(E.facets),e(E.documents),t.trim().length>1&&B.sendSearchQueryMessage([{object:"search",query:t,resultCount:Object.keys(E.documents).length.toString(),searchSessionId:d}])}a(!1)}catch(o){e({}),console.log(o)}},G),[c?.version,c?.folderId,i]);return y(()=>{f||(a(!0),p(s,r,m,i),l.current=s)},[f,r,m,i,s,p,a]),{}},z=(s,r,e,n,a,c,i,f)=>{const{currentLocale:d}=P();y(()=>{m(e,s,r,d,n,a,f)},[n,f]);const m=I(async(l,p,t,h,u,S,R)=>{if(u){const{groupKey:o}=u;i(!0);const j={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:p,filter:(()=>{const g=S.find(C=>C.field===_);return g&&!t.find(L=>L.field===g?.field)?[...t,{field:g.field,values:[o]}]:A(t,R)})(),loadMore:u,locale:h})},v=await(await fetch(b(O.SEARCH),j)).json(),D=l[o]||[],H=v.documents[o],w={...l,[o]:[...D,...H]};c(w),i(!1)}},[]);return{}};function re(s,r){const{searchFeatures:e}=U(),[n,a]=F(""),[c,i]=F([]),[f,d]=F({}),[m,l]=F({}),[p,t]=F(),[h,u]=F(!1),{facets:S}=J(m),{versions:R=[]}=x()||{},o=R.find(E=>E?.active);return K(n,c,d,l,u,o,s,r),z(n,c,f,p,S,d,u,s),{query:n,setQuery:a,filter:c,setFilter:i,items:f,isSearchLoading:h,facets:S,groupField:_,setLoadMore:t,advancedSearch:e?.advanced?.enabled,askAi:e?.ai?.enabled}}function A(s,r,e){return[...s,...r?[{field:N,values:[r]}]:[],...e?[{field:k,values:[...e.default?["default"]:[e.folderId,e.version]]}]:[]]}export{re as useSearch};
1
+ import{useCallback as I,useEffect as y,useState as F,useRef as T}from"react";import{SEARCH_DEBOUNCE_TIME_MS as G}from"@redocly/theme/core/constants";import{withPathPrefix as b}from"@redocly/theme/core/utils";import{SEARCH_GROUP_FACET_FIELD as _,SEARCH_PRODUCT_FIELD as N,SEARCH_VERSION_FIELD as k,ServerRoutes as O}from"../../../constants/common";import{debounce as M}from"../../../utils/time/debounce.js";import{useSearchSession as Q}from"@redocly/theme/core/contexts";import{useGlobalData as U,useI18nConfig as P}from"../hooks";import{usePageVersions as x}from"../../providers/page-data/hooks";import{useFacets as J}from"./useFacets";import{telemetry as B}from"../telemetry/index.js";const K=(s,o,e,r,a,c,i,f)=>{const{searchSessionId:d}=Q(),{currentLocale:p}=P(),m=T(""),h=I(M(async(t,S,l,u)=>{if(!t.trim().length&&!S.length){e({}),r({}),a(!1);return}const R={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,filter:A(S,u,c),locale:l})};try{const n=await fetch(b(O.SEARCH),R);if(m.current===t){const E=await n.json();r(E.facets),e(E.documents),t.trim().length>1&&B.sendSearchQueryMessage([{object:"search",query:t,resultCount:Object.keys(E.documents).length.toString(),searchSessionId:d,...u&&{product:u}}])}a(!1)}catch(n){e({}),console.log(n)}},G),[c?.version,c?.folderId,i]);return y(()=>{f||(a(!0),h(s,o,p,i),m.current=s)},[f,o,p,i,s,h,a]),{}},z=(s,o,e,r,a,c,i,f)=>{const{currentLocale:d}=P();y(()=>{p(e,s,o,d,r,a,f)},[r,f]);const p=I(async(m,h,t,S,l,u,R)=>{if(l){const{groupKey:n}=l;i(!0);const j={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:h,filter:(()=>{const g=u.find(C=>C.field===_);return g&&!t.find(L=>L.field===g?.field)?[...t,{field:g.field,values:[n]}]:A(t,R)})(),loadMore:l,locale:S})},v=await(await fetch(b(O.SEARCH),j)).json(),D=m[n]||[],H=v.documents[n],w={...m,[n]:[...D,...H]};c(w),i(!1)}},[]);return{}};function oe(s,o){const{searchFeatures:e}=U(),[r,a]=F(""),[c,i]=F([]),[f,d]=F({}),[p,m]=F({}),[h,t]=F(),[S,l]=F(!1),{facets:u}=J(p),{versions:R=[]}=x()||{},n=R.find(E=>E?.active);return K(r,c,d,m,l,n,s,o),z(r,c,f,h,u,d,l,s),{query:r,setQuery:a,filter:c,setFilter:i,items:f,isSearchLoading:S,facets:u,groupField:_,setLoadMore:t,advancedSearch:e?.advanced?.enabled,askAi:e?.ai?.enabled}}function A(s,o,e){return[...s,...o?[{field:N,values:[o]}]:[],...e?[{field:k,values:[...e.default?["default"]:[e.folderId,e.version]]}]:[]]}export{oe as useSearch};
@@ -1 +1 @@
1
- import e from"react";import{Helmet as s}from"@dr.pogodin/react-helmet";import{combineUrls as a}from"@redocly/theme/core/utils";import{isTruthy as c}from"../../../utils/guards/is-truthy";import{getMetaTagsAttributes as p}from"../utils/get-meta-tags-attributes";function T(r){const{seo:t,slug:l}=r;if(!t)return null;const n=p(t),i=[t.title,t.projectTitle].filter(c).join(" | ");return e.createElement(s,null,e.createElement("title",null,i),t.siteUrl?e.createElement("link",{rel:"canonical",href:a(t.siteUrl,l)}):null,t.jsonLd?e.createElement("script",{type:"application/ld+json"},JSON.stringify(t.jsonLd)):null,n.map((o,m)=>e.createElement("meta",{key:m,...o})))}export{T as SeoTags};
1
+ import e from"react";import{Helmet as c}from"@dr.pogodin/react-helmet";import{combineUrls as u}from"@redocly/theme/core/utils";import{isTruthy as f}from"../../../utils/guards/is-truthy";import{usePageVersions as p}from"../../providers/page-data/hooks";import{getMetaTagsAttributes as g}from"../utils/get-meta-tags-attributes";function b(r){const{seo:t,slug:i}=r,{versions:l}=p();if(!t)return null;const o=g(t),s=[t.title,t.projectTitle].filter(f).join(" | "),a=l.find(n=>n.default)?.link||i;return e.createElement(c,null,e.createElement("title",null,s),t.siteUrl?e.createElement("link",{rel:"canonical",href:u(t.siteUrl,a)}):null,t.jsonLd?e.createElement("script",{type:"application/ld+json"},JSON.stringify(t.jsonLd)):null,o.map((n,m)=>e.createElement("meta",{key:m,...n})))}export{b as SeoTags};
@@ -1 +1 @@
1
- import e from"react";import{ThemeDataContext as m,SearchSessionProvider as l}from"@redocly/theme/core/contexts";import{useBreadcrumbs as d,useBanner as g,useCatalogClassic as p,useCurrentProduct as f,useGlobalData as o,useI18n as b,useI18nConfig as C,useL10n as h,useL10nConfig as S,usePageData as r,usePageSharedData as P,usePageVersions as T,usePreloadHistory as D,useProducts as v,useUserMenu as F,useSubmitFeedback as k,useTranslate as E,useSidebarSiblingsData as L,usePageProps as M,useUserTeams as O,useMarkdownText as R,useCodeHighlight as y,useLoadAndNavigate as w,useCatalog as x,useCatalogSort as A,useCatalogSearch as I,useFetchCatalogEntities as j,useFetchCatalogEntitiesRelations as B,useFetchCatalogEntityRevisions as H,useTelemetry as s,useMcpData as N}from"../../app/hooks";import{Link as U}from"../../app/Link";import{useFacetQuery as _,useSearch as G,useAiSearch as Q}from"../../app/search";import{useSidebarItems as V}from"../../app/Sidebar/useSidebarItems";import{deepMerge as W}from"../../../utils/object/deep-merge";import{allowlistObject as q}from"../../../utils/object/allowlist-object";const z=["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation","banner"],J={useBreadcrumbs:d,useBanner:g,useCatalog:x,useCatalogSort:A,useCatalogSearch:I,useFetchCatalogEntities:j,useFetchCatalogEntitiesRelations:B,useFetchCatalogEntityRevisions:H,useCatalogClassic:p,useCurrentProduct:f,useGlobalData:o,useSearch:G,useAiSearch:Q,useFacetQuery:_,useI18n:b,useI18nConfig:C,useL10n:h,useL10nConfig:S,usePageData:r,usePageSharedData:P,usePageVersions:T,usePreloadHistory:D,useProducts:v,useUserMenu:F,useSidebarItems:V,useSidebarSiblingsData:L,useSubmitFeedback:k,useTranslate:E,useUserTeams:O,usePageProps:M,useMarkdownText:R,useCodeHighlight:y,useLoadAndNavigate:w,useTelemetry:s,useOtelTelemetry:s,useMcpData:N},K={LinkComponent:U};function re({children:n}){const{props:t}=r()||{},a=o()||{},u=e.useMemo(()=>{const c=q(t?.frontmatter||{},z);return W(a,c)},[a,t?.frontmatter]),i={hooks:J,components:K,config:u};return e.createElement(l,null,e.createElement(m.Provider,{value:i},n))}export{re as ThemeDataProvider};
1
+ import e from"react";import{ThemeDataContext as m,SearchSessionProvider as l}from"@redocly/theme/core/contexts";import{useAnchorPositioning as d,useBreadcrumbs as g,useBanner as p,useCatalogClassic as f,useCurrentProduct as b,useGlobalData as o,useI18n as h,useI18nConfig as C,useL10n as P,useL10nConfig as S,usePageData as r,usePageSharedData as T,usePageVersions as D,usePreloadHistory as v,useProducts as F,useUserMenu as k,useSubmitFeedback as E,useTranslate as L,useSidebarSiblingsData as M,usePageProps as O,useUserTeams as R,useMarkdownText as y,useCodeHighlight as A,useLoadAndNavigate as w,useCatalog as x,useCatalogSort as I,useCatalogSearch as j,useFetchCatalogEntities as B,useFetchCatalogEntitiesRelations as H,useFetchCatalogEntityRevisions as N,useTelemetry as s,useMcpData as U}from"../../app/hooks";import{Link as _}from"../../app/Link";import{useFacetQuery as G,useSearch as Q,useAiSearch as V}from"../../app/search";import{useSidebarItems as W}from"../../app/Sidebar/useSidebarItems";import{deepMerge as q}from"../../../utils/object/deep-merge";import{allowlistObject as z}from"../../../utils/object/allowlist-object";const J=["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation","banner"],K={useAnchorPositioning:d,useBreadcrumbs:g,useBanner:p,useCatalog:x,useCatalogSort:I,useCatalogSearch:j,useFetchCatalogEntities:B,useFetchCatalogEntitiesRelations:H,useFetchCatalogEntityRevisions:N,useCatalogClassic:f,useCurrentProduct:b,useGlobalData:o,useSearch:Q,useAiSearch:V,useFacetQuery:G,useI18n:h,useI18nConfig:C,useL10n:P,useL10nConfig:S,usePageData:r,usePageSharedData:T,usePageVersions:D,usePreloadHistory:v,useProducts:F,useUserMenu:k,useSidebarItems:W,useSidebarSiblingsData:M,useSubmitFeedback:E,useTranslate:L,useUserTeams:R,usePageProps:O,useMarkdownText:y,useCodeHighlight:A,useLoadAndNavigate:w,useTelemetry:s,useOtelTelemetry:s,useMcpData:U},X={LinkComponent:_};function se({children:n}){const{props:t}=r()||{},a=o()||{},u=e.useMemo(()=>{const c=z(t?.frontmatter||{},J);return q(a,c)},[a,t?.frontmatter]),i={hooks:K,components:X,config:u};return e.createElement(l,null,e.createElement(m.Provider,{value:i},n))}export{se as ThemeDataProvider};
@@ -2,9 +2,7 @@ import l from"styled-components";import*as o from"react";import{RedoclyAsyncAPID
2
2
  a[id],
3
3
  a[data-section-id],
4
4
  div[data-section-id] {
5
- scroll-margin-top: calc(
6
- var(--navbar-height) + var(--banner-height) + var(--panel-gap-vertical)
7
- );
5
+ scroll-margin-top: calc(var(--navbar-height) + var(--banner-height) + var(--panel-gap-vertical));
8
6
  }
9
7
 
10
8
  --sidebar-width: 0px;
@@ -4,14 +4,10 @@ import*as a from"react";import i from"styled-components";import{RedoclyOpenAPIDo
4
4
  }
5
5
  `,g=i.div`
6
6
  div[id] {
7
- scroll-margin-top: calc(
8
- var(--navbar-height) + var(--banner-height) - var(--panel-gap-vertical)
9
- );
7
+ scroll-margin-top: calc(var(--navbar-height) + var(--banner-height) - var(--panel-gap-vertical));
10
8
  }
11
9
  a[id] {
12
- scroll-margin-top: calc(
13
- var(--navbar-height) + var(--banner-height) + var(--panel-gap-vertical)
14
- );
10
+ scroll-margin-top: calc(var(--navbar-height) + var(--banner-height) + var(--panel-gap-vertical));
15
11
  }
16
12
 
17
13
  --sidebar-width: 0px;
@@ -51,6 +51,7 @@ export type ToolCallState = {
51
51
  };
52
52
  export type AiSearchOptions = {
53
53
  filter?: SearchFilterItem[];
54
+ product?: string;
54
55
  };
55
56
  export type AiSearchState = {
56
57
  status: 'idle';