@redocly/theme 0.60.0-next.0 → 0.60.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.
- package/lib/components/Buttons/ConnectMCPButton.js +3 -3
- package/lib/components/Buttons/variables.js +2 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +5 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +2 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +2 -2
- package/lib/components/Catalog/CatalogSelector.js +1 -1
- package/lib/components/Catalog/CatalogSortButton.js +4 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +2 -2
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +5 -1
- package/lib/components/Catalog/variables.dark.js +1 -1
- package/lib/components/Catalog/variables.js +5 -3
- package/lib/components/CatalogClassic/variables.js +1 -1
- package/lib/components/CodeBlock/CodeBlock.js +3 -1
- package/lib/components/CodeBlock/CodeBlockTabs.js +3 -3
- package/lib/components/DatePicker/variables.js +2 -0
- package/lib/components/Feedback/Mood.js +2 -2
- package/lib/components/Feedback/Rating.js +2 -2
- package/lib/components/Filter/FilterDateRange.js +2 -2
- package/lib/components/Filter/FilterSelect.js +5 -1
- package/lib/components/JsonViewer/{helpers.js → Helpers.js} +1 -1
- package/lib/components/JsonViewer/JsonViewer.js +2 -2
- package/lib/components/Loaders/Loading.js +4 -1
- package/lib/components/Markdown/Markdown.js +9 -9
- package/lib/components/Markdown/styles/{baseTable.js → base-table.js} +1 -1
- package/lib/components/Markdown/styles/{headingAnchor.js → heading-anchor.js} +1 -1
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiOperation.js +1 -0
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiTitle.js +1 -0
- package/lib/components/OpenApiDocs/hooks/BeforeOpenApiOperation.js +1 -0
- package/lib/components/OpenApiDocs/hooks/OpenApiFooter.js +3 -2
- package/lib/components/OpenApiDocs/hooks/OpenApiHeader.js +3 -2
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +2 -1
- package/lib/components/Search/SearchAiMessage.js +20 -18
- package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +5 -3
- package/lib/components/Search/SearchAiNegativeFeedbackForm.js +5 -4
- package/lib/components/Search/SearchGroups.js +4 -1
- package/lib/components/Search/SearchHighlight.js +1 -0
- package/lib/components/Search/SearchItem.js +4 -1
- package/lib/components/Search/variables.js +2 -0
- package/lib/components/Segmented/Segmented.d.ts +1 -1
- package/lib/components/Segmented/Segmented.js +2 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +4 -2
- package/lib/components/Select/SelectInput.d.ts +1 -1
- package/lib/components/Select/SelectInput.js +2 -0
- package/lib/components/SidebarActions/styled.d.ts +5 -4
- package/lib/components/SidebarActions/styled.js +9 -5
- package/lib/components/Tag/variables.dark.js +2 -0
- package/lib/components/Tag/variables.js +2 -0
- package/lib/components/Tooltip/Tooltip.js +2 -0
- package/lib/components/VersionPicker/VersionPicker.d.ts +1 -1
- package/lib/core/hoc/index.d.ts +1 -1
- package/lib/core/hoc/index.js +1 -1
- package/lib/core/hoc/{typedMemo.js → typed-memo.js} +1 -1
- package/lib/core/hooks/__tests__/mocks/mock-intersection-observer.d.ts +1 -1
- package/lib/core/hooks/__tests__/mocks/mock-intersection-observer.js +1 -3
- package/lib/core/hooks/catalog/{useCatalogEntities.js → use-catalog-entities.js} +1 -1
- package/lib/core/hooks/catalog/{useCatalogEntitySchema.d.ts → use-catalog-entity-schema.d.ts} +1 -1
- package/lib/core/hooks/catalog/{useCatalogEntitySchema.js → use-catalog-entity-schema.js} +1 -1
- package/lib/core/hooks/catalog/{useCatalogTableHeaderCellActions.js → use-catalog-table-header-cell-actions.js} +1 -1
- package/lib/core/hooks/catalog/{useCatalogTableViewRow.js → use-catalog-table-view-row.js} +1 -1
- package/lib/core/hooks/catalog/{useGraph.js → use-graph.js} +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -0
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -0
- package/lib/core/hooks/code-walkthrough/use-renderable-files.js +2 -2
- package/lib/core/hooks/index.d.ts +5 -2
- package/lib/core/hooks/index.js +5 -2
- package/lib/core/hooks/menu/use-collapse.js +1 -0
- package/lib/core/hooks/menu/use-mobile-menu-items.js +1 -0
- package/lib/core/hooks/use-mcp-config.js +9 -6
- package/lib/core/hooks/use-page-actions.js +5 -3
- package/lib/core/hooks/use-telemetry-fallback.js +1 -0
- package/lib/core/hooks/use-theme-config.js +1 -0
- package/lib/core/hooks/use-theme-hooks.js +1 -0
- package/lib/core/openapi/index.d.ts +1 -1
- package/lib/core/openapi/index.js +2 -2
- package/lib/core/templates/Markdown.js +1 -0
- package/lib/core/types/hooks.d.ts +6 -0
- package/lib/core/types/index.d.ts +20 -19
- package/lib/core/types/index.js +0 -19
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/utils/{dynamic.js → Dynamic.js} +1 -1
- package/lib/core/utils/{get-file-icon.js → GetFileIcon.js} +1 -1
- package/lib/core/utils/args-typecheck.d.ts +2 -2
- package/lib/core/utils/clipboard-service.js +2 -0
- package/lib/core/utils/get-user-agent.js +1 -0
- package/lib/core/utils/index.d.ts +2 -2
- package/lib/core/utils/index.js +2 -2
- package/lib/core/utils/js-utils.d.ts +1 -1
- package/lib/core/utils/load-and-navigate.js +1 -0
- package/lib/core/utils/markdoc.js +1 -0
- package/lib/core/utils/parse-style-string.js +1 -0
- package/lib/ext/configure.d.ts +2 -2
- package/lib/ext/configure.js +12 -6
- package/lib/ext/{useConfigureReplay.js → use-configure-replay.js} +5 -4
- package/lib/index.d.ts +3 -3
- package/lib/index.js +2 -3
- package/lib/layouts/ThreePanelLayout.js +4 -4
- package/lib/markdoc/components/Cards/variables.dark.js +2 -0
- package/lib/markdoc/components/Cards/variables.js +2 -0
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +1 -0
- package/lib/markdoc/tags/code-walkthrough.js +1 -0
- package/lib/markdoc/tags/html.js +1 -0
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +1 -0
- package/src/components/Buttons/ConnectMCPButton.tsx +1 -1
- package/src/components/Buttons/variables.ts +2 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +4 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +4 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +3 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +2 -2
- package/src/components/Catalog/CatalogSelector.tsx +2 -2
- package/src/components/Catalog/CatalogSortButton.tsx +5 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -1
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +8 -1
- package/src/components/Catalog/variables.dark.ts +1 -1
- package/src/components/Catalog/variables.ts +5 -3
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +1 -0
- package/src/components/CatalogClassic/variables.ts +1 -1
- package/src/components/CodeBlock/CodeBlock.tsx +4 -0
- package/src/components/CodeBlock/CodeBlockControls.tsx +1 -0
- package/src/components/CodeBlock/CodeBlockTabs.tsx +1 -1
- package/src/components/DatePicker/variables.ts +3 -1
- package/src/components/Feedback/Mood.tsx +2 -2
- package/src/components/Feedback/Rating.tsx +2 -2
- package/src/components/Filter/FilterDateRange.tsx +2 -2
- package/src/components/Filter/FilterSelect.tsx +1 -0
- package/src/components/JsonViewer/{helpers.tsx → Helpers.tsx} +2 -0
- package/src/components/JsonViewer/JsonViewer.tsx +2 -1
- package/src/components/LastUpdated/LastUpdated.tsx +1 -0
- package/src/components/Loaders/Loading.tsx +5 -1
- package/src/components/Markdown/Markdown.tsx +2 -2
- package/src/components/OpenApiDocs/hooks/AfterOpenApiOperation.tsx +1 -1
- package/src/components/OpenApiDocs/hooks/AfterOpenApiTitle.tsx +1 -1
- package/src/components/OpenApiDocs/hooks/BeforeOpenApiOperation.tsx +1 -1
- package/src/components/OpenApiDocs/hooks/OpenApiFooter.tsx +1 -1
- package/src/components/OpenApiDocs/hooks/OpenApiHeader.tsx +1 -1
- package/src/components/Search/FilterFields/SearchFilterFieldSelect.tsx +4 -1
- package/src/components/Search/SearchAiMessage.tsx +42 -37
- package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +7 -5
- package/src/components/Search/SearchGroups.tsx +4 -1
- package/src/components/Search/SearchHighlight.tsx +1 -0
- package/src/components/Search/SearchItem.tsx +8 -1
- package/src/components/Search/variables.ts +2 -0
- package/src/components/Segmented/Segmented.tsx +2 -2
- package/src/components/Select/Select.tsx +8 -4
- package/src/components/Select/SelectInput.tsx +10 -1
- package/src/components/SidebarActions/{styled.tsx → styled.ts} +11 -4
- package/src/components/Tag/Tag.tsx +1 -0
- package/src/components/Tag/variables.dark.ts +2 -0
- package/src/components/Tag/variables.ts +2 -0
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/VersionPicker/VersionPicker.tsx +2 -1
- package/src/core/hoc/index.ts +1 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +2 -2
- package/src/core/hooks/__tests__/mocks/mock-intersection-observer.ts +9 -8
- package/src/core/hooks/catalog/{useCatalogEntitySchema.ts → use-catalog-entity-schema.ts} +3 -3
- package/src/core/hooks/catalog/{useGraph.ts → use-graph.ts} +1 -1
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -1
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +24 -0
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +1 -0
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +2 -2
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +1 -1
- package/src/core/hooks/index.ts +5 -2
- package/src/core/hooks/menu/use-collapse.ts +3 -3
- package/src/core/hooks/menu/use-mobile-menu-items.ts +1 -0
- package/src/core/hooks/use-mcp-config.ts +11 -5
- package/src/core/hooks/use-page-actions.ts +3 -1
- package/src/core/hooks/use-telemetry-fallback.ts +1 -0
- package/src/core/hooks/use-theme-config.ts +1 -0
- package/src/core/hooks/use-theme-hooks.ts +2 -1
- package/src/core/openapi/index.ts +1 -1
- package/src/core/templates/Markdown.tsx +1 -0
- package/src/core/types/catalog.ts +3 -1
- package/src/core/types/filter.ts +1 -0
- package/src/core/types/hooks.ts +6 -0
- package/src/core/types/index.ts +20 -19
- package/src/core/types/l10n.ts +24 -1
- package/src/core/types/search.ts +1 -1
- package/src/core/types/segmented.ts +1 -0
- package/src/core/types/select.ts +1 -0
- package/src/core/utils/args-typecheck.ts +2 -2
- package/src/core/utils/clipboard-service.ts +2 -0
- package/src/core/utils/get-user-agent.ts +1 -0
- package/src/core/utils/index.ts +2 -2
- package/src/core/utils/js-utils.ts +1 -1
- package/src/core/utils/load-and-navigate.ts +1 -0
- package/src/core/utils/markdoc.ts +1 -0
- package/src/core/utils/parse-style-string.ts +1 -0
- package/src/ext/configure.ts +15 -8
- package/src/ext/{useConfigureReplay.ts → use-configure-replay.ts} +5 -3
- package/src/index.ts +3 -3
- package/src/layouts/ThreePanelLayout.tsx +1 -1
- package/src/markdoc/components/Cards/variables.dark.ts +2 -0
- package/src/markdoc/components/Cards/variables.ts +3 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +1 -1
- package/src/markdoc/tags/code-walkthrough.ts +2 -0
- package/src/markdoc/tags/html.ts +1 -0
- package/lib/core/hooks/__mocks__/index.d.ts +0 -28
- package/lib/core/hooks/__mocks__/index.js +0 -45
- package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +0 -5
- package/lib/core/hooks/__mocks__/search/use-recent-searches.js +0 -13
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +0 -8
- package/lib/core/hooks/__mocks__/search/use-search-filter.js +0 -15
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +0 -4
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.js +0 -13
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.js +0 -7
- package/lib/core/hooks/__mocks__/use-element-size.d.ts +0 -4
- package/lib/core/hooks/__mocks__/use-element-size.js +0 -9
- package/lib/core/hooks/__mocks__/use-input-key-commands.d.ts +0 -3
- package/lib/core/hooks/__mocks__/use-input-key-commands.js +0 -8
- package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-mobile-menu.js +0 -7
- package/lib/core/hooks/__mocks__/use-theme-config.d.ts +0 -8
- package/lib/core/hooks/__mocks__/use-theme-config.js +0 -13
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +0 -69
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +0 -94
- package/lib/core/hooks/__mocks__/use-time-ago.d.ts +0 -3
- package/lib/core/hooks/__mocks__/use-time-ago.js +0 -8
- package/lib/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.d.ts +0 -10
- package/lib/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.js +0 -56
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +0 -1
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.js +0 -35
- /package/lib/components/JsonViewer/{helpers.d.ts → Helpers.d.ts} +0 -0
- /package/lib/components/Markdown/styles/{baseTable.d.ts → base-table.d.ts} +0 -0
- /package/lib/components/Markdown/styles/{headingAnchor.d.ts → heading-anchor.d.ts} +0 -0
- /package/lib/core/hoc/{typedMemo.d.ts → typed-memo.d.ts} +0 -0
- /package/lib/core/hooks/catalog/{useCatalogEntities.d.ts → use-catalog-entities.d.ts} +0 -0
- /package/lib/core/hooks/catalog/{useCatalogTableHeaderCellActions.d.ts → use-catalog-table-header-cell-actions.d.ts} +0 -0
- /package/lib/core/hooks/catalog/{useCatalogTableViewRow.d.ts → use-catalog-table-view-row.d.ts} +0 -0
- /package/lib/core/hooks/catalog/{useGraph.d.ts → use-graph.d.ts} +0 -0
- /package/lib/core/utils/{dynamic.d.ts → Dynamic.d.ts} +0 -0
- /package/lib/core/utils/{get-file-icon.d.ts → GetFileIcon.d.ts} +0 -0
- /package/lib/ext/{useConfigureReplay.d.ts → use-configure-replay.d.ts} +0 -0
- /package/src/components/Markdown/styles/{baseTable.ts → base-table.ts} +0 -0
- /package/src/components/Markdown/styles/{headingAnchor.ts → heading-anchor.ts} +0 -0
- /package/src/components/Panel/{PanelBody.ts → PanelBody.tsx} +0 -0
- /package/src/components/Panel/{PanelHeader.ts → PanelHeader.tsx} +0 -0
- /package/src/components/Panel/{PanelHeaderTitle.ts → PanelHeaderTitle.tsx} +0 -0
- /package/src/components/StatusCode/{StatusCode.ts → StatusCode.tsx} +0 -0
- /package/src/components/Typography/{CompactTypography.ts → CompactTypography.tsx} +0 -0
- /package/src/components/Typography/{Emphasis.ts → Emphasis.tsx} +0 -0
- /package/src/components/Typography/{H1.ts → H1.tsx} +0 -0
- /package/src/components/Typography/{H2.ts → H2.tsx} +0 -0
- /package/src/components/Typography/{H3.ts → H3.tsx} +0 -0
- /package/src/components/Typography/{H4.ts → H4.tsx} +0 -0
- /package/src/components/Typography/{SectionHeader.ts → SectionHeader.tsx} +0 -0
- /package/src/components/Typography/{Typography.ts → Typography.tsx} +0 -0
- /package/src/core/hoc/{typedMemo.ts → typed-memo.ts} +0 -0
- /package/src/core/hooks/catalog/{useCatalogEntities.ts → use-catalog-entities.ts} +0 -0
- /package/src/core/hooks/catalog/{useCatalogTableHeaderCellActions.ts → use-catalog-table-header-cell-actions.ts} +0 -0
- /package/src/core/hooks/catalog/{useCatalogTableViewRow.ts → use-catalog-table-view-row.ts} +0 -0
- /package/src/core/utils/{dynamic.tsx → Dynamic.tsx} +0 -0
- /package/src/core/utils/{get-file-icon.tsx → GetFileIcon.tsx} +0 -0
package/lib/core/hooks/catalog/{useCatalogEntitySchema.d.ts → use-catalog-entity-schema.d.ts}
RENAMED
|
@@ -4,7 +4,7 @@ type CatalogEntitySchemaProps = {
|
|
|
4
4
|
relatedEntity: BffCatalogRelatedEntity | null;
|
|
5
5
|
};
|
|
6
6
|
export declare function useCatalogEntitySchema({ entity, relatedEntity }: CatalogEntitySchemaProps): {
|
|
7
|
-
definition:
|
|
7
|
+
definition: Record<string, unknown>;
|
|
8
8
|
parsedSchema: any;
|
|
9
9
|
rawSchema: any;
|
|
10
10
|
};
|
|
@@ -20,4 +20,4 @@ function useCatalogTableHeaderCellActions({ column, handleSortClick, setSortOpti
|
|
|
20
20
|
};
|
|
21
21
|
return { handleCellClick, sortKey, isUpActive, isDownActive };
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=use-catalog-table-header-cell-actions.js.map
|
|
@@ -4,7 +4,7 @@ exports.useGraph = useGraph;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_2 = require("@xyflow/react");
|
|
6
6
|
const catalog_1 = require("../../constants/catalog");
|
|
7
|
-
//
|
|
7
|
+
// Note: This isn't final implementation, leaved comments for future reference.
|
|
8
8
|
function useGraph({ entity, relations }) {
|
|
9
9
|
const rootNodeId = entity.id;
|
|
10
10
|
// Compute final label for a relation considering its role
|
|
@@ -162,4 +162,4 @@ function useGraph({ entity, relations }) {
|
|
|
162
162
|
onConnect,
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
//# sourceMappingURL=
|
|
165
|
+
//# sourceMappingURL=use-graph.js.map
|
|
@@ -122,6 +122,7 @@ function useCodeWalkthroughControls(filters, inputs, toggles, enableDeepLink) {
|
|
|
122
122
|
if (!controlsState[id].render) {
|
|
123
123
|
continue;
|
|
124
124
|
}
|
|
125
|
+
// eslint-disable-next-line no-warning-comments
|
|
125
126
|
// code-walk-todo: need to check if we have a default fallback
|
|
126
127
|
const items = Array.isArray(filter === null || filter === void 0 ? void 0 : filter.items) ? filter.items : [];
|
|
127
128
|
const activeItems = items.filter((item) => areConditionsMet(item));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useRenderableFiles = useRenderableFiles;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const find_closest_common_directory_1 = require("../../utils/find-closest-common-directory");
|
|
6
|
-
const
|
|
6
|
+
const GetFileIcon_1 = require("../../utils/GetFileIcon");
|
|
7
7
|
const urls_1 = require("../../utils/urls");
|
|
8
8
|
function useRenderableFiles(files) {
|
|
9
9
|
return (0, react_1.useMemo)(function () {
|
|
@@ -25,6 +25,6 @@ function useRenderableFiles(files) {
|
|
|
25
25
|
function getFileTypeIcon(basename) {
|
|
26
26
|
var _a;
|
|
27
27
|
const extension = ((_a = basename.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
28
|
-
return (0,
|
|
28
|
+
return (0, GetFileIcon_1.getFileIconByExt)(extension);
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=use-renderable-files.js.map
|
|
@@ -37,11 +37,14 @@ export * from './code-walkthrough/use-renderable-files';
|
|
|
37
37
|
export * from './use-element-size';
|
|
38
38
|
export * from './use-time-ago';
|
|
39
39
|
export * from './use-input-key-commands';
|
|
40
|
-
export * from './catalog/
|
|
41
|
-
export * from './catalog/
|
|
40
|
+
export * from './catalog/use-catalog-entities';
|
|
41
|
+
export * from './catalog/use-graph';
|
|
42
42
|
export * from './use-active-page-version';
|
|
43
43
|
export * from './use-page-versions';
|
|
44
44
|
export * from './use-user-teams';
|
|
45
45
|
export * from './use-page-actions';
|
|
46
46
|
export * from './use-mcp-config';
|
|
47
47
|
export * from './use-connect-mcp-button';
|
|
48
|
+
export * from './catalog/use-catalog-table-view-row';
|
|
49
|
+
export * from './catalog/use-catalog-entity-schema';
|
|
50
|
+
export * from './catalog/use-catalog-table-header-cell-actions';
|
package/lib/core/hooks/index.js
CHANGED
|
@@ -53,12 +53,15 @@ __exportStar(require("./code-walkthrough/use-renderable-files"), exports);
|
|
|
53
53
|
__exportStar(require("./use-element-size"), exports);
|
|
54
54
|
__exportStar(require("./use-time-ago"), exports);
|
|
55
55
|
__exportStar(require("./use-input-key-commands"), exports);
|
|
56
|
-
__exportStar(require("./catalog/
|
|
57
|
-
__exportStar(require("./catalog/
|
|
56
|
+
__exportStar(require("./catalog/use-catalog-entities"), exports);
|
|
57
|
+
__exportStar(require("./catalog/use-graph"), exports);
|
|
58
58
|
__exportStar(require("./use-active-page-version"), exports);
|
|
59
59
|
__exportStar(require("./use-page-versions"), exports);
|
|
60
60
|
__exportStar(require("./use-user-teams"), exports);
|
|
61
61
|
__exportStar(require("./use-page-actions"), exports);
|
|
62
62
|
__exportStar(require("./use-mcp-config"), exports);
|
|
63
63
|
__exportStar(require("./use-connect-mcp-button"), exports);
|
|
64
|
+
__exportStar(require("./catalog/use-catalog-table-view-row"), exports);
|
|
65
|
+
__exportStar(require("./catalog/use-catalog-entity-schema"), exports);
|
|
66
|
+
__exportStar(require("./catalog/use-catalog-table-header-cell-actions"), exports);
|
|
64
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -28,6 +28,7 @@ const useMobileMenuItems = (menuType) => {
|
|
|
28
28
|
const menuItems = [];
|
|
29
29
|
if (menuType === common_1.MobileMenuType.PAGE) {
|
|
30
30
|
if (activeVersion) {
|
|
31
|
+
// eslint-disable-next-line no-warning-comments
|
|
31
32
|
// TODO: consider to refactor
|
|
32
33
|
const versionsSection = (0, menu_1.buildVersionSection)(translate, versions, activeVersion);
|
|
33
34
|
menuItems.push(...versionsSection);
|
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMCPConfig = useMCPConfig;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const use_theme_hooks_1 = require("./use-theme-hooks");
|
|
6
6
|
const dom_1 = require("../utils/dom");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
const mcp_1 = require("../utils/mcp");
|
|
9
9
|
function useMCPConfig() {
|
|
10
|
-
var _a
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
10
|
+
var _a;
|
|
11
|
+
const { useMcpData } = (0, use_theme_hooks_1.useThemeHooks)();
|
|
12
|
+
const { docs: { enabled, name }, } = useMcpData();
|
|
13
|
+
const origin = dom_1.IS_BROWSER
|
|
14
|
+
? window.location.origin
|
|
15
|
+
: ((_a = globalThis['SSR_HOSTNAME']) !== null && _a !== void 0 ? _a : '');
|
|
16
|
+
const serverName = name || constants_1.DEFAULT_MCP_SERVER_NAME;
|
|
14
17
|
const serverUrl = `${origin}/mcp`;
|
|
15
|
-
const isMcpDisabled =
|
|
18
|
+
const isMcpDisabled = !enabled || false;
|
|
16
19
|
const cursorUrl = (0, react_1.useMemo)(() => (0, mcp_1.generateMCPDeepLink)('cursor', { serverName, url: serverUrl }), [serverName, serverUrl]);
|
|
17
20
|
const vscodeUrl = (0, react_1.useMemo)(() => (0, mcp_1.generateMCPDeepLink)('vscode', { serverName, url: serverUrl }), [serverName, serverUrl]);
|
|
18
21
|
return {
|
|
@@ -52,11 +52,13 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
52
52
|
return createMCPAction({ clientType, mcpConfig: config, translate });
|
|
53
53
|
}, [mcpUrl, mcpConfig, translate]);
|
|
54
54
|
const result = (0, react_1.useMemo)(() => {
|
|
55
|
-
var _a, _b;
|
|
55
|
+
var _a, _b, _c;
|
|
56
56
|
if (shouldHideAllActions) {
|
|
57
57
|
return [];
|
|
58
58
|
}
|
|
59
|
-
const origin = dom_1.IS_BROWSER
|
|
59
|
+
const origin = dom_1.IS_BROWSER
|
|
60
|
+
? window.location.origin
|
|
61
|
+
: ((_a = globalThis['SSR_HOSTNAME']) !== null && _a !== void 0 ? _a : '');
|
|
60
62
|
const normalizedSlug = pageSlug.startsWith('/') ? pageSlug : '/' + pageSlug;
|
|
61
63
|
const mdPageUrl = new URL(origin + normalizedSlug + (normalizedSlug === '/' ? 'index.html.md' : '.md')).toString();
|
|
62
64
|
const actionHandlers = {
|
|
@@ -115,7 +117,7 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
115
117
|
};
|
|
116
118
|
},
|
|
117
119
|
};
|
|
118
|
-
return (((
|
|
120
|
+
return (((_c = (_b = themeConfig.navigation) === null || _b === void 0 ? void 0 : _b.actions) === null || _c === void 0 ? void 0 : _c.items) || actions || DEFAULT_ENABLED_ACTIONS)
|
|
119
121
|
.map((action) => { var _a; return (_a = actionHandlers[action]) === null || _a === void 0 ? void 0 : _a.call(actionHandlers); })
|
|
120
122
|
.filter((action) => action !== null);
|
|
121
123
|
}, [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTelemetryFallback = void 0;
|
|
4
|
+
// eslint-disable-next-line no-warning-comments
|
|
4
5
|
// TODO we need to create some common way to do this.
|
|
5
6
|
const useTelemetryFallback = () => ({
|
|
6
7
|
send: () => { },
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useThemeConfig = useThemeConfig;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const ThemeDataContext_1 = require("../contexts/ThemeDataContext");
|
|
6
|
+
// eslint-disable-next-line no-warning-comments
|
|
6
7
|
// TODO: rename and additionally export as alias for backward compatibility
|
|
7
8
|
function useThemeConfig(useProductConfig = true) {
|
|
8
9
|
const context = (0, react_1.useContext)(ThemeDataContext_1.ThemeDataContext);
|
|
@@ -20,6 +20,7 @@ const fallbacks = {
|
|
|
20
20
|
usePageData: () => null,
|
|
21
21
|
usePageProps: () => ({}),
|
|
22
22
|
usePageSharedData: () => null,
|
|
23
|
+
useMcpData: () => ({ docs: { enabled: false } }),
|
|
23
24
|
};
|
|
24
25
|
const useThemeHooks = () => {
|
|
25
26
|
const context = (0, react_1.useContext)(ThemeDataContext_1.ThemeDataContext);
|
|
@@ -6,7 +6,7 @@ export type { SegmentedOption, SegmentedProps } from '../types/segmented';
|
|
|
6
6
|
export { IS_BROWSER } from '../utils/dom';
|
|
7
7
|
export { addLeadingSlash, removeLeadingSlash, getPathPrefix, combineUrls, addTrailingSlash, withPathPrefix, } from '../utils/urls';
|
|
8
8
|
export { capitalize } from '../utils/string';
|
|
9
|
-
export { typedMemo } from '../hoc/
|
|
9
|
+
export { typedMemo } from '../hoc/typed-memo';
|
|
10
10
|
export { useMount } from '../hooks/use-mount';
|
|
11
11
|
export { GlobalStyle } from '../styles/global';
|
|
12
12
|
export { breakpoints } from '../utils/media-css';
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "addTrailingSlash", { enumerable: true, get: func
|
|
|
12
12
|
Object.defineProperty(exports, "withPathPrefix", { enumerable: true, get: function () { return urls_1.withPathPrefix; } });
|
|
13
13
|
var string_1 = require("../utils/string");
|
|
14
14
|
Object.defineProperty(exports, "capitalize", { enumerable: true, get: function () { return string_1.capitalize; } });
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(exports, "typedMemo", { enumerable: true, get: function () { return
|
|
15
|
+
var typed_memo_1 = require("../hoc/typed-memo");
|
|
16
|
+
Object.defineProperty(exports, "typedMemo", { enumerable: true, get: function () { return typed_memo_1.typedMemo; } });
|
|
17
17
|
var use_mount_1 = require("../hooks/use-mount");
|
|
18
18
|
Object.defineProperty(exports, "useMount", { enumerable: true, get: function () { return use_mount_1.useMount; } });
|
|
19
19
|
var global_1 = require("../styles/global");
|
|
@@ -98,6 +98,12 @@ export type ThemeHooks = {
|
|
|
98
98
|
setSearchFacet: React.Dispatch<React.SetStateAction<SearchFacet | null>>;
|
|
99
99
|
setSearchFacetQuery: React.Dispatch<React.SetStateAction<SearchFacetQuery | null>>;
|
|
100
100
|
};
|
|
101
|
+
useMcpData: () => {
|
|
102
|
+
docs: {
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
name?: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
101
107
|
useSidebarItems: (activeVersion?: Version | null) => {
|
|
102
108
|
currentItems: ItemState[];
|
|
103
109
|
allSidebarItems: ItemState[];
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export * from './breadcrumb';
|
|
2
|
-
export * from './catalog';
|
|
3
|
-
export * from './l10n';
|
|
4
|
-
export * from './mcp';
|
|
5
|
-
export * from './feedback';
|
|
6
|
-
export * from './hooks';
|
|
7
|
-
export * from './markdown';
|
|
8
|
-
export * from './navbar';
|
|
1
|
+
export type * from './breadcrumb';
|
|
2
|
+
export type * from './catalog';
|
|
3
|
+
export type * from './l10n';
|
|
4
|
+
export type * from './mcp';
|
|
5
|
+
export type * from './feedback';
|
|
6
|
+
export type * from './hooks';
|
|
7
|
+
export type * from './markdown';
|
|
8
|
+
export type * from './navbar';
|
|
9
9
|
export * from './search';
|
|
10
|
-
export * from './select';
|
|
11
|
-
export * from './sidebar';
|
|
12
|
-
export * from './filter';
|
|
13
|
-
export * from './user-menu';
|
|
14
|
-
export * from './user-claims';
|
|
15
|
-
export * from './common';
|
|
16
|
-
export * from './open-api-server';
|
|
17
|
-
export * from './marker';
|
|
18
|
-
export * from './code-walkthrough';
|
|
19
|
-
export * from './page-actions';
|
|
20
|
-
export * from './open-api-info';
|
|
10
|
+
export type * from './select';
|
|
11
|
+
export type * from './sidebar';
|
|
12
|
+
export type * from './filter';
|
|
13
|
+
export type * from './user-menu';
|
|
14
|
+
export type * from './user-claims';
|
|
15
|
+
export type * from './common';
|
|
16
|
+
export type * from './open-api-server';
|
|
17
|
+
export type * from './marker';
|
|
18
|
+
export type * from './code-walkthrough';
|
|
19
|
+
export type * from './page-actions';
|
|
20
|
+
export type * from './open-api-info';
|
|
21
|
+
export type * from './segmented';
|
package/lib/core/types/index.js
CHANGED
|
@@ -14,24 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./breadcrumb"), exports);
|
|
18
|
-
__exportStar(require("./catalog"), exports);
|
|
19
|
-
__exportStar(require("./l10n"), exports);
|
|
20
|
-
__exportStar(require("./mcp"), exports);
|
|
21
|
-
__exportStar(require("./feedback"), exports);
|
|
22
|
-
__exportStar(require("./hooks"), exports);
|
|
23
|
-
__exportStar(require("./markdown"), exports);
|
|
24
|
-
__exportStar(require("./navbar"), exports);
|
|
25
17
|
__exportStar(require("./search"), exports);
|
|
26
|
-
__exportStar(require("./select"), exports);
|
|
27
|
-
__exportStar(require("./sidebar"), exports);
|
|
28
|
-
__exportStar(require("./filter"), exports);
|
|
29
|
-
__exportStar(require("./user-menu"), exports);
|
|
30
|
-
__exportStar(require("./user-claims"), exports);
|
|
31
|
-
__exportStar(require("./common"), exports);
|
|
32
|
-
__exportStar(require("./open-api-server"), exports);
|
|
33
|
-
__exportStar(require("./marker"), exports);
|
|
34
|
-
__exportStar(require("./code-walkthrough"), exports);
|
|
35
|
-
__exportStar(require("./page-actions"), exports);
|
|
36
|
-
__exportStar(require("./open-api-info"), exports);
|
|
37
18
|
//# sourceMappingURL=index.js.map
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.tags.more' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -124,4 +124,4 @@ function getFileIconByLanguage(language) {
|
|
|
124
124
|
const iconName = fileIconMap[language] || languageIconMap[language] || 'document';
|
|
125
125
|
return React.createElement(CDNIcon_1.CDNIcon, { name: iconName, pack: "code", mode: "background" });
|
|
126
126
|
}
|
|
127
|
-
//# sourceMappingURL=
|
|
127
|
+
//# sourceMappingURL=GetFileIcon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function isEmptyArray(items:
|
|
2
|
-
export declare function isPrimitive(arg:
|
|
1
|
+
export declare function isEmptyArray(items: unknown): boolean;
|
|
2
|
+
export declare function isPrimitive(arg: unknown): boolean;
|
|
@@ -15,7 +15,9 @@ class ClipboardService {
|
|
|
15
15
|
}
|
|
16
16
|
let range;
|
|
17
17
|
let selection;
|
|
18
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
18
19
|
if (document.body.createTextRange) {
|
|
20
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
19
21
|
range = document.body.createTextRange();
|
|
20
22
|
range.moveToElementText(element);
|
|
21
23
|
range.select();
|
|
@@ -5,6 +5,7 @@ exports.getUserAgent = getUserAgent;
|
|
|
5
5
|
* Returns user agent. Handles SSR and browser.
|
|
6
6
|
*/
|
|
7
7
|
function getUserAgent() {
|
|
8
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
8
9
|
const ssrUserAgent = globalThis['SSR_USER_AGENT'];
|
|
9
10
|
if (ssrUserAgent) {
|
|
10
11
|
return ssrUserAgent;
|
|
@@ -28,7 +28,7 @@ export * from './with-load-progress';
|
|
|
28
28
|
export * from './text-trimmer';
|
|
29
29
|
export * from './get-code-walkthrough-file-text';
|
|
30
30
|
export * from './download-code-walkthrough';
|
|
31
|
-
export * from './
|
|
31
|
+
export * from './GetFileIcon';
|
|
32
32
|
export * from './match-code-walkthrough-conditions';
|
|
33
33
|
export * from './replace-inputs-with-value';
|
|
34
34
|
export * from './find-closest-common-directory';
|
|
@@ -37,6 +37,6 @@ export * from './parse-style-string';
|
|
|
37
37
|
export * from './lang-to-name';
|
|
38
38
|
export * from './enhanced-smoothstep';
|
|
39
39
|
export * from './icon-resolver';
|
|
40
|
-
export * from './
|
|
40
|
+
export * from './Dynamic';
|
|
41
41
|
export * from './tabs';
|
|
42
42
|
export * from './frontmatter-translate';
|
package/lib/core/utils/index.js
CHANGED
|
@@ -44,7 +44,7 @@ __exportStar(require("./with-load-progress"), exports);
|
|
|
44
44
|
__exportStar(require("./text-trimmer"), exports);
|
|
45
45
|
__exportStar(require("./get-code-walkthrough-file-text"), exports);
|
|
46
46
|
__exportStar(require("./download-code-walkthrough"), exports);
|
|
47
|
-
__exportStar(require("./
|
|
47
|
+
__exportStar(require("./GetFileIcon"), exports);
|
|
48
48
|
__exportStar(require("./match-code-walkthrough-conditions"), exports);
|
|
49
49
|
__exportStar(require("./replace-inputs-with-value"), exports);
|
|
50
50
|
__exportStar(require("./find-closest-common-directory"), exports);
|
|
@@ -53,7 +53,7 @@ __exportStar(require("./parse-style-string"), exports);
|
|
|
53
53
|
__exportStar(require("./lang-to-name"), exports);
|
|
54
54
|
__exportStar(require("./enhanced-smoothstep"), exports);
|
|
55
55
|
__exportStar(require("./icon-resolver"), exports);
|
|
56
|
-
__exportStar(require("./
|
|
56
|
+
__exportStar(require("./Dynamic"), exports);
|
|
57
57
|
__exportStar(require("./tabs"), exports);
|
|
58
58
|
__exportStar(require("./frontmatter-translate"), exports);
|
|
59
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,7 +6,7 @@ export declare function toStringIfDefined(value: unknown): string | undefined;
|
|
|
6
6
|
* Returns true when the function executed in browser.
|
|
7
7
|
*/
|
|
8
8
|
export declare function isBrowser(): boolean;
|
|
9
|
-
export declare function isPlainObject(obj:
|
|
9
|
+
export declare function isPlainObject(obj: unknown): boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Returns the previous and next values in an array for a given index.
|
|
12
12
|
*
|
|
@@ -19,6 +19,7 @@ function loadAndNavigate(_a) {
|
|
|
19
19
|
lastNavigatedPath = to;
|
|
20
20
|
const { pathname, hash, search } = new URL(to, window.location.origin + window.location.pathname);
|
|
21
21
|
// use window-shared loader instead of importing to prevent circular import issue
|
|
22
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
22
23
|
const loader = window['__LOADER'];
|
|
23
24
|
const result = yield (0, with_load_progress_1.withLoadProgress)(loader.tryLoad(pathname));
|
|
24
25
|
// @ts-ignore
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isTag = isTag;
|
|
4
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
4
5
|
function isTag(value) {
|
|
5
6
|
return !!((value === null || value === void 0 ? void 0 : value.$$mdtype) === 'Tag');
|
|
6
7
|
}
|
|
@@ -15,6 +15,7 @@ function parseStyleString(styleString) {
|
|
|
15
15
|
const camelCaseKey = key.replace(/-[a-z]/g, (match) => {
|
|
16
16
|
return match[1].toUpperCase();
|
|
17
17
|
});
|
|
18
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
18
19
|
styleObj[camelCaseKey] = value;
|
|
19
20
|
}
|
|
20
21
|
return styleObj;
|
package/lib/ext/configure.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserClaims, OpenAPIServer } from '../core/types';
|
|
1
|
+
import type { UserClaims, OpenAPIServer } from '../core/types';
|
|
2
2
|
export type SecurityDetails = {
|
|
3
3
|
password?: string;
|
|
4
4
|
username?: string;
|
|
@@ -16,7 +16,7 @@ export type ConfigureRequestValues = {
|
|
|
16
16
|
query?: Record<string, string>;
|
|
17
17
|
path?: Record<string, string>;
|
|
18
18
|
cookie?: Record<string, string>;
|
|
19
|
-
security?: SecurityDetails
|
|
19
|
+
security?: Record<string, SecurityDetails>;
|
|
20
20
|
envVariables?: Record<string, string>;
|
|
21
21
|
serverVariables?: Record<string, string>;
|
|
22
22
|
};
|
package/lib/ext/configure.js
CHANGED
|
@@ -7,8 +7,10 @@ function configure(_context) {
|
|
|
7
7
|
// name: 'Default Product'
|
|
8
8
|
// },
|
|
9
9
|
// security: {
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// default: {
|
|
11
|
+
// username: 'default_api_user',
|
|
12
|
+
// password: 'secureP@ssword123'
|
|
13
|
+
// },
|
|
12
14
|
// },
|
|
13
15
|
// envVariables: {
|
|
14
16
|
// customLocation: 'default'
|
|
@@ -19,8 +21,10 @@ function configure(_context) {
|
|
|
19
21
|
// name: 'Development Product'
|
|
20
22
|
// },
|
|
21
23
|
// security: {
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
+
// default: {
|
|
25
|
+
// username: 'dev_api_user',
|
|
26
|
+
// password: 'Dev@P!T3st'
|
|
27
|
+
// },
|
|
24
28
|
// },
|
|
25
29
|
// envVariables: {
|
|
26
30
|
// customLocation: 'dev'
|
|
@@ -31,8 +35,10 @@ function configure(_context) {
|
|
|
31
35
|
// name: 'Production Product'
|
|
32
36
|
// },
|
|
33
37
|
// security: {
|
|
34
|
-
//
|
|
35
|
-
//
|
|
38
|
+
// default: {
|
|
39
|
+
// username: 'prod_api_user',
|
|
40
|
+
// password: 'Pr0d@P!S3cur3'
|
|
41
|
+
// },
|
|
36
42
|
// },
|
|
37
43
|
// envVariables: {
|
|
38
44
|
// customLocation: 'prod'
|
|
@@ -26,11 +26,12 @@ function getReplayConfiguration(_context) {
|
|
|
26
26
|
// throw new Error(`HTTP error! status: ${response.status}`);
|
|
27
27
|
// }
|
|
28
28
|
// const { token } = await response.json();
|
|
29
|
-
//
|
|
30
29
|
// return {
|
|
31
30
|
// security: {
|
|
32
|
-
//
|
|
33
|
-
//
|
|
31
|
+
// default: {
|
|
32
|
+
// token: {
|
|
33
|
+
// access_token: token,
|
|
34
|
+
// }
|
|
34
35
|
// }
|
|
35
36
|
// }
|
|
36
37
|
// };
|
|
@@ -61,4 +62,4 @@ function useConfigureReplay(context, isOpened) {
|
|
|
61
62
|
}, [isOpened, refresh]);
|
|
62
63
|
return { config, refresh };
|
|
63
64
|
}
|
|
64
|
-
//# sourceMappingURL=
|
|
65
|
+
//# sourceMappingURL=use-configure-replay.js.map
|