@stoplight/elements-core 7.5.8 → 7.5.12

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/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { MDAST } from '@stoplight/markdown';
1
+ import type { IMarkdownViewerProps } from '@stoplight/markdown-viewer';
2
2
  import { IHttpOperation, IHttpService, NodeType } from '@stoplight/types';
3
3
  import { JSONSchema4, JSONSchema6, JSONSchema7 } from 'json-schema';
4
4
  export declare type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
5
5
  export declare type ParsedNode = {
6
6
  type: NodeType.Article;
7
- data: string | MDAST.Root;
7
+ data: IMarkdownViewerProps['markdown'];
8
8
  } | {
9
9
  type: NodeType.HttpOperation;
10
10
  data: IHttpOperation;
@@ -105,15 +105,3 @@ export declare type ParamField = {
105
105
  description: string;
106
106
  example: string;
107
107
  };
108
- export interface IArticleHeading {
109
- id: string;
110
- title: string;
111
- depth: number;
112
- }
113
- export interface IArticleHeadings {
114
- headings: IArticleHeading[];
115
- title?: string;
116
- className?: string;
117
- minimal?: boolean;
118
- maxWidth?: number;
119
- }
package/utils/guards.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { MDAST } from '@stoplight/markdown';
1
+ import type { IMarkdownViewerProps } from '@stoplight/markdown-viewer';
2
2
  import { IHttpOperation, IHttpService } from '@stoplight/types';
3
3
  import { JSONSchema7 } from 'json-schema';
4
- export declare function isSMDASTRoot(maybeAst: unknown): maybeAst is MDAST.Root;
4
+ export declare function isSMDASTRoot(maybeAst: unknown): maybeAst is IMarkdownViewerProps['markdown'];
5
5
  export declare function isJSONSchema(maybeSchema: unknown): maybeSchema is JSONSchema7;
6
6
  export declare function isHttpService(maybeHttpService: unknown): maybeHttpService is IHttpService;
7
7
  export declare function isHttpOperation(maybeHttpOperation: unknown): maybeHttpOperation is IHttpOperation;
@@ -1,5 +0,0 @@
1
- import { MDAST } from '@stoplight/markdown';
2
- export declare const ArticleHeadings: ({ tree, container }: {
3
- tree: MDAST.Root;
4
- container: HTMLDivElement | null;
5
- }) => JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function useComponentSize(container: HTMLDivElement | null): {
2
- readonly width: number;
3
- readonly height: number;
4
- };
@@ -1,4 +0,0 @@
1
- import { MDAST } from '@stoplight/markdown';
2
- import { IArticleHeading } from '../types';
3
- export declare function useComputeMarkdownHeadings(tree: MDAST.Root): IArticleHeading[];
4
- export declare function computeMarkdownHeadings(tree: MDAST.Root): IArticleHeading[];
@@ -1 +0,0 @@
1
- export declare function useLocationHash(): string | false;