@stoplight/elements-core 9.0.28 → 9.0.30-beta.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.
@@ -1,6 +1,5 @@
1
1
  import { IMarkdownViewerProps } from '@stoplight/markdown-viewer';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  declare type ArticleProps = DocsComponentProps<IMarkdownViewerProps['markdown']>;
5
- export declare const Article: React.FunctionComponent<ArticleProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const Article: import("react").FunctionComponent<ArticleProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
6
5
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IHttpOperationRequestBody } from '@stoplight/types';
3
2
  export interface BodyProps {
4
3
  body: IHttpOperationRequestBody;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IHttpCallbackOperation } from '@stoplight/types';
3
2
  import { ExtensionAddonRenderer } from '../Docs';
4
3
  export interface CallbacksProps {
@@ -1,8 +1,7 @@
1
1
  import { IHttpEndpointOperation } from '@stoplight/types';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type HttpOperationProps = DocsComponentProps<IHttpEndpointOperation>;
5
- export declare const HttpOperation: React.FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const HttpOperation: import("react").FunctionComponent<HttpOperationProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
6
5
  export declare function OperationHeader({ id, noHeading, hasBadges, name, isDeprecated, isInternal, hideServerUrl, method, path, }: {
7
6
  id: string;
8
7
  noHeading?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IHttpOperationResponse } from '@stoplight/types';
3
2
  interface ResponsesProps {
4
3
  responses: IHttpOperationResponse[];
@@ -1,5 +1,4 @@
1
1
  import { IHttpService } from '@stoplight/types';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type HttpServiceProps = DocsComponentProps<Partial<IHttpService>>;
5
- export declare const HttpService: React.FunctionComponent<HttpServiceProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const HttpService: import("react").FunctionComponent<HttpServiceProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
@@ -1,5 +1,4 @@
1
1
  import { JSONSchema7 } from 'json-schema';
2
- import * as React from 'react';
3
2
  import { DocsComponentProps } from '..';
4
3
  export declare type ModelProps = DocsComponentProps<JSONSchema7>;
5
- export declare const Model: React.FunctionComponent<ModelProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
4
+ export declare const Model: import("react").FunctionComponent<ModelProps & import("@stoplight/react-error-boundary").ErrorBoundaryProps<{}>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const DocsSkeleton: ({ className, padding }: {
3
2
  className?: string | undefined;
4
3
  padding?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExtensionAddonRenderer } from './Docs';
3
2
  export declare const renderExtensionRenderer: ExtensionAddonRenderer;
4
3
  export declare const wrapOptionsContext: (story: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LogoProps } from '../../types';
3
2
  import type { TableOfContentsItem } from '../TableOfContents';
4
3
  export declare const MobileTopNav: ({ name, logo, tree, pathname, onTocClick, }: {
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const Loading: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LinkProps } from '@stoplight/mosaic';
3
2
  export declare const ReactRouterMarkdownLink: ({ title, to, href: _href, children, }: Omit<LinkProps<"a">, "target" | "rel"> & {
4
3
  to?: string | undefined;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { BundledBranchNode } from '../../../types';
3
- export declare const createResolvedImageComponent: (branchNode: BundledBranchNode) => React.NamedExoticComponent<React.ImgHTMLAttributes<HTMLImageElement> & import("@stoplight/markdown/ast-types/hast").ImageProperties>;
3
+ export declare const createResolvedImageComponent: (branchNode: BundledBranchNode) => React.NamedExoticComponent<import("react").ImgHTMLAttributes<HTMLImageElement> & import("@stoplight/markdown/ast-types/hast").ImageProperties>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IMarkdownViewerProps } from '@stoplight/markdown-viewer';
3
2
  export declare const MarkdownViewer: {
4
3
  (props: IMarkdownViewerProps): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IHttpEndpointOperation } from '@stoplight/types';
3
2
  export interface ResponseExamplesProps {
4
3
  httpOperation: IHttpEndpointOperation;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare type TableOfContentsProps = {
3
2
  tree: TableOfContentsItem[];
4
3
  activeId: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { IServer } from '@stoplight/types';
3
2
  export declare type ServersDropdownProps = {
4
3
  servers: IServer[];
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare const PersistenceContextProvider: ({ initialValues, scope, children, }: React.PropsWithChildren<{
2
+ export declare const PersistenceContextProvider: ({ initialValues, scope, children, }: import("react").PropsWithChildren<{
3
3
  initialValues?: Iterable<readonly [import("jotai").Atom<unknown>, unknown]> | undefined;
4
4
  scope?: import("jotai/core/atom").Scope | undefined;
5
- }>) => React.FunctionComponentElement<React.ProviderProps<import("jotai/core/contexts").ScopeContainer>>;
5
+ }>) => import("react").FunctionComponentElement<import("react").ProviderProps<import("jotai/core/contexts").ScopeContainer>>;
6
6
  export declare function withPersistenceBoundary<T>(WrappedComponent: React.ComponentType<T>): React.FC<T>;
package/index.esm.js CHANGED
@@ -3557,7 +3557,7 @@ function useSplitUrl(url) {
3557
3557
  }
3558
3558
 
3559
3559
  const HttpServiceComponent = React.memo(({ data: unresolvedData, location = {}, layoutOptions, exportProps }) => {
3560
- var _a, _b, _c, _d;
3560
+ var _a, _b, _c, _d, _e;
3561
3561
  const { nodeHasChanged } = useOptionsCtx();
3562
3562
  const data = useResolvedObject(unresolvedData);
3563
3563
  const { ref: layoutRef } = useIsCompact(layoutOptions);
@@ -3580,7 +3580,7 @@ const HttpServiceComponent = React.memo(({ data: unresolvedData, location = {},
3580
3580
  React.createElement(VStack, { spacing: 6 },
3581
3581
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideServerInfo) ? null : React.createElement(ServerInfo, { servers: (_b = data.servers) !== null && _b !== void 0 ? _b : [], mockUrl: mocking.mockUrl }),
3582
3582
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSecurityInfo) ? null : (React.createElement(Box, { "data-test": "security" }, ((_c = data.security) === null || _c === void 0 ? void 0 : _c.length) ? (React.createElement(SecuritySchemes, { secSchemes: data.security, defaultScheme: query.get('security') || undefined, parentId: data.id })) : null)),
3583
- React.createElement(Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || data.license || data.termsOfService) && (React.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3583
+ React.createElement(Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || ((_e = data.contact) === null || _e === void 0 ? void 0 : _e.url) || data.license || data.termsOfService) && (React.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3584
3584
  data.description && (React.createElement(Box, { pos: "relative" },
3585
3585
  React.createElement(MarkdownViewer, { className: "sl-my-5", markdown: data.description }),
3586
3586
  React.createElement(NodeAnnotation, { change: descriptionChanged })))));
package/index.js CHANGED
@@ -3578,7 +3578,7 @@ function useSplitUrl(url) {
3578
3578
  }
3579
3579
 
3580
3580
  const HttpServiceComponent = React__namespace.memo(({ data: unresolvedData, location = {}, layoutOptions, exportProps }) => {
3581
- var _a, _b, _c, _d;
3581
+ var _a, _b, _c, _d, _e;
3582
3582
  const { nodeHasChanged } = useOptionsCtx();
3583
3583
  const data = useResolvedObject(unresolvedData);
3584
3584
  const { ref: layoutRef } = useIsCompact(layoutOptions);
@@ -3601,7 +3601,7 @@ const HttpServiceComponent = React__namespace.memo(({ data: unresolvedData, loca
3601
3601
  React__namespace.createElement(mosaic.VStack, { spacing: 6 },
3602
3602
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideServerInfo) ? null : React__namespace.createElement(ServerInfo, { servers: (_b = data.servers) !== null && _b !== void 0 ? _b : [], mockUrl: mocking.mockUrl }),
3603
3603
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSecurityInfo) ? null : (React__namespace.createElement(mosaic.Box, { "data-test": "security" }, ((_c = data.security) === null || _c === void 0 ? void 0 : _c.length) ? (React__namespace.createElement(SecuritySchemes, { secSchemes: data.security, defaultScheme: query.get('security') || undefined, parentId: data.id })) : null)),
3604
- React__namespace.createElement(mosaic.Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || data.license || data.termsOfService) && (React__namespace.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3604
+ React__namespace.createElement(mosaic.Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || ((_e = data.contact) === null || _e === void 0 ? void 0 : _e.url) || data.license || data.termsOfService) && (React__namespace.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3605
3605
  data.description && (React__namespace.createElement(mosaic.Box, { pos: "relative" },
3606
3606
  React__namespace.createElement(MarkdownViewer, { className: "sl-my-5", markdown: data.description }),
3607
3607
  React__namespace.createElement(mosaic.NodeAnnotation, { change: descriptionChanged })))));
package/index.mjs CHANGED
@@ -3557,7 +3557,7 @@ function useSplitUrl(url) {
3557
3557
  }
3558
3558
 
3559
3559
  const HttpServiceComponent = React.memo(({ data: unresolvedData, location = {}, layoutOptions, exportProps }) => {
3560
- var _a, _b, _c, _d;
3560
+ var _a, _b, _c, _d, _e;
3561
3561
  const { nodeHasChanged } = useOptionsCtx();
3562
3562
  const data = useResolvedObject(unresolvedData);
3563
3563
  const { ref: layoutRef } = useIsCompact(layoutOptions);
@@ -3580,7 +3580,7 @@ const HttpServiceComponent = React.memo(({ data: unresolvedData, location = {},
3580
3580
  React.createElement(VStack, { spacing: 6 },
3581
3581
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideServerInfo) ? null : React.createElement(ServerInfo, { servers: (_b = data.servers) !== null && _b !== void 0 ? _b : [], mockUrl: mocking.mockUrl }),
3582
3582
  (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.hideSecurityInfo) ? null : (React.createElement(Box, { "data-test": "security" }, ((_c = data.security) === null || _c === void 0 ? void 0 : _c.length) ? (React.createElement(SecuritySchemes, { secSchemes: data.security, defaultScheme: query.get('security') || undefined, parentId: data.id })) : null)),
3583
- React.createElement(Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || data.license || data.termsOfService) && (React.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3583
+ React.createElement(Box, { "data-test": "additional-info" }, (((_d = data.contact) === null || _d === void 0 ? void 0 : _d.email) || ((_e = data.contact) === null || _e === void 0 ? void 0 : _e.url) || data.license || data.termsOfService) && (React.createElement(AdditionalInfo, { id: data.id, contact: data.contact, license: data.license, termsOfService: data.termsOfService })))),
3584
3584
  data.description && (React.createElement(Box, { pos: "relative" },
3585
3585
  React.createElement(MarkdownViewer, { className: "sl-my-5", markdown: data.description }),
3586
3586
  React.createElement(NodeAnnotation, { change: descriptionChanged })))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements-core",
3
- "version": "9.0.28",
3
+ "version": "9.0.30-beta.0",
4
4
  "main": "./index.js",
5
5
  "sideEffects": [
6
6
  "web-components.min.js",