@mintlify/components 0.3.9 → 0.3.11

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.
@@ -0,0 +1,10 @@
1
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2
+
3
+ version: 2
4
+ updates:
5
+ - package-ecosystem: "npm" # See documentation for possible values
6
+ directory: "/" # Location of package manifests
7
+ schedule:
8
+ interval: "daily"
9
+ allow:
10
+ - dependency-name: "@mintlify/*"
@@ -0,0 +1,13 @@
1
+ name: Code Style Checks
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ style-checks:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v3
10
+ - name: Install modules
11
+ run: yarn
12
+ - name: Check formatting
13
+ run: yarn format:check
@@ -0,0 +1,13 @@
1
+ name: Sanity Check
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ sanity-check:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v3
10
+ - name: Install modules
11
+ run: yarn
12
+ - name: Check build
13
+ run: yarn build
@@ -0,0 +1,49 @@
1
+ # we are using yarn in this project
2
+ package.lock
3
+
4
+ # user editor preferences
5
+ /.vscode/
6
+ /.idea/
7
+
8
+ # dependencies
9
+ /node_modules
10
+ /.pnp
11
+ .pnp.js
12
+
13
+ # testing
14
+ /coverage
15
+
16
+ # next.js
17
+ /.next/
18
+ /out/
19
+ /public/feeds/
20
+
21
+ # production
22
+ /build
23
+ /dist
24
+
25
+ # generated files
26
+ /public/*
27
+ /src/pages/*
28
+ !/src/pages/api
29
+ /src/pages/api/*.mdx
30
+ !/src/pages/*.tsx
31
+ !/src/pages/*.ts
32
+ /src/config.json
33
+ /src/openapi.json
34
+
35
+ # misc
36
+ .DS_Store
37
+
38
+ # debug
39
+ npm-debug.log*
40
+ yarn-debug.log*
41
+ yarn-error.log*
42
+ build-storybook.log
43
+
44
+ # local env files
45
+ .env
46
+ .env.local
47
+ .env.development.local
48
+ .env.test.local
49
+ .env.production.local
package/.prettierrc ADDED
@@ -0,0 +1 @@
1
+ "@mintlify/prettier-config/config.js"
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  declare function Accordion({ title, description, defaultOpen, icon, onChange, variant, children, }: {
3
3
  /** The main text of the Accordion shown in bold */
4
4
  title: string;
@@ -11,7 +11,7 @@ declare function Accordion({ title, description, defaultOpen, icon, onChange, va
11
11
  /** Callback when the Accordion is clicked with the new open state */
12
12
  onChange?: (open: boolean) => void;
13
13
  /** The Accordion UI style */
14
- variant?: "rounded" | "minimalist";
14
+ variant?: 'rounded' | 'minimalist';
15
15
  /** The Accordion contents */
16
16
  children: ReactNode;
17
17
  }): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  declare function AccordionItemCover({ title, description, open, setOpen, icon, coverClass, }: {
3
3
  title: string;
4
4
  description?: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  declare function AccordionGroup({ children }: {
3
3
  children: ReactNode;
4
4
  }): JSX.Element;
@@ -1,3 +1,3 @@
1
- import Accordion from "./Accordion";
2
- import AccordionGroup from "./AccordionGroup";
1
+ import Accordion from './Accordion';
2
+ import AccordionGroup from './AccordionGroup';
3
3
  export { Accordion, AccordionGroup };
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
- import { ParamGroup, RequestMethods } from "./types";
1
+ import { ReactNode } from 'react';
2
+ import { ParamGroup, RequestMethods } from './types';
3
3
  export declare function ApiPlayground({ method, paramGroups, paramValues, isSendingRequest, onChangeParamValues, onSendRequest, header, response, }: {
4
4
  /** Request method. */
5
5
  method: RequestMethods;
@@ -1,4 +1,4 @@
1
- import { RequestMethods } from "./types";
1
+ import { RequestMethods } from './types';
2
2
  export declare const RequestMethodBubble: ({ method }: {
3
3
  method: RequestMethods;
4
4
  }) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { RequestMethods } from "./types";
1
+ import { RequestMethods } from './types';
2
2
  export declare const RequestPathHeader: ({ method, path, baseUrls, defaultBaseUrl, onBaseUrlChange, }: {
3
3
  /** Request method. */
4
4
  method: RequestMethods;
@@ -1,4 +1,4 @@
1
- import { ApiPlayground } from "./ApiPlayground";
2
- import { RequestMethodBubble } from "./RequestMethodBubble";
3
- import { RequestPathHeader } from "./RequestPathHeader";
1
+ import { ApiPlayground } from './ApiPlayground';
2
+ import { RequestMethodBubble } from './RequestMethodBubble';
3
+ import { RequestPathHeader } from './RequestPathHeader';
4
4
  export { ApiPlayground, RequestMethodBubble, RequestPathHeader };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ApiInputValue, Param } from "../types";
2
+ import { ApiInputValue, Param } from '../types';
3
3
  /**
4
4
  * ApiInput provides a UI to receive inputs from the user for API calls.
5
5
  * The user is responsible for updating value when onChangeParam is called.
@@ -1,4 +1,4 @@
1
- export type RequestMethods = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "COPY" | "HEAD" | "OPTIONS" | "LINK" | "UNLINK" | "PURGE" | "LOCK" | "UNLOCK" | "PROPFIND" | "VIEW";
1
+ export type RequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'COPY' | 'HEAD' | 'OPTIONS' | 'LINK' | 'UNLINK' | 'PURGE' | 'LOCK' | 'UNLOCK' | 'PROPFIND' | 'VIEW';
2
2
  export type ParamGroup = {
3
3
  name: string;
4
4
  params: Param[];
package/dist/Button.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ElementType, ComponentPropsWithoutRef, Ref } from "react";
1
+ import { ElementType, ComponentPropsWithoutRef, Ref } from 'react';
2
2
  type ColorInterface = keyof typeof colors;
3
3
  declare let colors: {
4
4
  indigo: string[];
@@ -38,5 +38,5 @@ export interface ButtonPropsBase<T> {
38
38
  * @typeParam T - Type of the Element rendered by the button.
39
39
  */
40
40
  export type ButtonProps<T extends ElementType> = ButtonPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof ButtonPropsBase<T>>;
41
- export declare function Button<T extends ElementType = "button">({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element;
41
+ export declare function Button<T extends ElementType = 'button'>({ as, color, darkColor, reverse, children, className, mRef, ...props }: ButtonProps<T>): JSX.Element;
42
42
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  type CalloutContent = {
3
3
  children: ReactNode;
4
4
  };
package/dist/Card.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from "react";
1
+ import { ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from 'react';
2
2
  export interface CardPropsBase<T> {
3
3
  /**
4
4
  * Large title above children.
@@ -8,6 +8,10 @@ export interface CardPropsBase<T> {
8
8
  * Icon to the top-left of the title.
9
9
  */
10
10
  icon?: ReactNode;
11
+ /**
12
+ * If provided, will render an image to the top of the card.
13
+ */
14
+ image?: string;
11
15
  /**
12
16
  * Type of element to be rendered.
13
17
  */
@@ -26,4 +30,4 @@ export interface CardPropsBase<T> {
26
30
  * @typeParam T - Type of the Element rendered by the card.
27
31
  */
28
32
  export type CardProps<T extends ElementType> = CardPropsBase<T> & Omit<ComponentPropsWithoutRef<T>, keyof CardPropsBase<T>>;
29
- export declare function Card<T extends ElementType = "div">({ title, icon, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element;
33
+ export declare function Card<T extends ElementType = 'div'>({ title, icon, image, className, children, as, mRef, ...props }: CardProps<T>): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
- export declare function CardGroup({ children, cols, }: {
1
+ import { ReactNode } from 'react';
2
+ export declare function CardGroup({ children, cols }: {
3
3
  children: ReactNode;
4
4
  cols?: 1 | 2 | 3 | 4;
5
5
  }): JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ComponentPropsWithoutRef } from "react";
2
- import { CopyToClipboardResult } from "../utils/copyToClipboard";
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { CopyToClipboardResult } from '../utils/copyToClipboard';
3
3
  export interface CodeBlockPropsBase {
4
4
  filename?: string;
5
5
  /**
@@ -10,14 +10,10 @@ export interface CodeBlockPropsBase {
10
10
  * Background color for the tooltip saying `Click to Copy` when hovering the clipboard button.
11
11
  */
12
12
  tooltipColor?: string;
13
- /**
14
- * Background color for the tooltip saying `Copied` when clicking the clipboard button.
15
- */
16
- copiedTooltipColor?: string;
17
13
  /**
18
14
  * The callback function when a user clicks on the copied to clipboard button
19
15
  */
20
16
  onCopied?: (result: CopyToClipboardResult, textToCopy?: string) => void;
21
17
  }
22
- export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<"div">, keyof CodeBlockPropsBase>;
23
- export declare function CodeBlock({ filename, filenameColor, tooltipColor, copiedTooltipColor, onCopied, children, className, ...props }: CodeBlockProps): JSX.Element;
18
+ export type CodeBlockProps = CodeBlockPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeBlockPropsBase>;
19
+ export declare function CodeBlock({ filename, filenameColor, tooltipColor, onCopied, children, className, ...props }: CodeBlockProps): JSX.Element;
@@ -1,6 +1,6 @@
1
- import React, { ComponentPropsWithoutRef } from "react";
2
- import { CodeBlockProps } from "./CodeBlock";
3
- import { CopyToClipboardResult } from "../utils/copyToClipboard";
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import { CopyToClipboardResult } from '../utils/copyToClipboard';
3
+ import { CodeBlockProps } from './CodeBlock';
4
4
  export type CodeGroupPropsBase = {
5
5
  /**
6
6
  * Color of the filename text and the border underneath it when the content is being shown
@@ -10,10 +10,6 @@ export type CodeGroupPropsBase = {
10
10
  * Background color for the tooltip saying `Click to Copy` when hovering the clipboard button.
11
11
  */
12
12
  tooltipColor?: string;
13
- /**
14
- * Background color for the tooltip saying `Copied` when clicking the clipboard button.
15
- */
16
- copiedTooltipColor?: string;
17
13
  /**
18
14
  * The callback function when a user clicks on the copied to clipboard button
19
15
  */
@@ -21,7 +17,7 @@ export type CodeGroupPropsBase = {
21
17
  isSmallText?: boolean;
22
18
  children?: React.ReactElement<CodeBlockProps>[] | React.ReactElement<CodeBlockProps>;
23
19
  };
24
- export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<"div">, keyof CodeGroupPropsBase>;
20
+ export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<'div'>, keyof CodeGroupPropsBase>;
25
21
  /**
26
22
  * Group multiple code blocks into a tabbed UI.
27
23
  * Uses CodeBlocks as children but does not render them directly. Instead,
@@ -29,4 +25,4 @@ export type CodeGroupProps = CodeGroupPropsBase & Omit<ComponentPropsWithoutRef<
29
25
  *
30
26
  * @param {CodeBlock[]} - children
31
27
  */
32
- export declare function CodeGroup({ children, selectedColor, tooltipColor, copiedTooltipColor, onCopied, isSmallText, }: CodeGroupProps): JSX.Element | null;
28
+ export declare function CodeGroup({ children, selectedColor, tooltipColor, onCopied, isSmallText, }: CodeGroupProps): JSX.Element | null;
@@ -1,8 +1,7 @@
1
- import { ComponentPropsWithoutRef } from "react";
2
- import { CopyToClipboardResult } from "../utils/copyToClipboard";
3
- export declare function CopyToClipboardButton({ textToCopy, tooltipColor, copiedTooltipColor, onCopied, className, ...props }: {
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { CopyToClipboardResult } from '../utils/copyToClipboard';
3
+ export declare function CopyToClipboardButton({ textToCopy, tooltipColor, onCopied, className, ...props }: {
4
4
  textToCopy: string;
5
5
  tooltipColor?: string;
6
- copiedTooltipColor?: string;
7
6
  onCopied?: (result: CopyToClipboardResult, textToCopy?: string) => void;
8
- } & ComponentPropsWithoutRef<"button">): JSX.Element | null;
7
+ } & ComponentPropsWithoutRef<'button'>): JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from "./CodeBlock";
2
- import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from "./CodeGroup";
3
- export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, };
1
+ import { CodeBlock, CodeBlockProps, CodeBlockPropsBase } from './CodeBlock';
2
+ import { CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './CodeGroup';
3
+ export type { CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps };
4
4
  export { CodeBlock, CodeGroup };
@@ -1,2 +1,2 @@
1
- import Expandable from "./Expandable";
1
+ import Expandable from './Expandable';
2
2
  export { Expandable };
package/dist/Frame.d.ts CHANGED
@@ -9,6 +9,6 @@ export declare function Frame({ as: Component, caption, style, className, contai
9
9
  html: any;
10
10
  children: any;
11
11
  hint: string;
12
- padding: "none" | "md";
12
+ padding: 'none' | 'md';
13
13
  lightOnly: boolean;
14
14
  }): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  export default function Tab({ title, isActive, children, }: {
3
3
  title: string;
4
4
  isActive?: boolean;
@@ -1,4 +1,4 @@
1
- import { ReactElement } from "react";
1
+ import { ReactElement } from 'react';
2
2
  export default function Tabs({ children }: {
3
3
  children: ReactElement[];
4
4
  }): JSX.Element;
@@ -1,3 +1,3 @@
1
- import Tab from "./Tab";
2
- import Tabs from "./Tabs";
1
+ import Tab from './Tab';
2
+ import Tabs from './Tabs';
3
3
  export { Tab, Tabs };
package/dist/Tooltip.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
- export declare function Tooltip({ tip, children, }: {
1
+ import { ReactNode } from 'react';
2
+ export declare function Tooltip({ tip, children }: {
3
3
  tip: string;
4
4
  children: ReactNode;
5
5
  }): JSX.Element | null;
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { Accordion, AccordionGroup } from "./Accordion";
2
- import { AppearFromTop } from "./AppearFromTop";
3
- import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from "./Api";
4
- import { Button, ButtonProps, ButtonPropsBase } from "./Button";
5
- import { Card, CardProps, CardPropsBase } from "./Card";
6
- import { CardGroup } from "./CardGroup";
7
- import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from "./Code";
8
- import { Info, Warning, Note, Tip, Check } from "./Callouts";
9
- import { Frame } from "./Frame";
10
- import { Param } from "./Param";
11
- import { PillSelect } from "./PillSelect";
12
- import { Tab, Tabs } from "./Tabs";
13
- import { Tooltip } from "./Tooltip";
14
- import { Expandable } from "./Expandable";
15
- import "./css/globals.css";
1
+ import { Accordion, AccordionGroup } from './Accordion';
2
+ import { ApiPlayground, RequestMethodBubble, RequestPathHeader } from './Api';
3
+ import { AppearFromTop } from './AppearFromTop';
4
+ import { Button, ButtonProps, ButtonPropsBase } from './Button';
5
+ import { Info, Warning, Note, Tip, Check } from './Callouts';
6
+ import { Card, CardProps, CardPropsBase } from './Card';
7
+ import { CardGroup } from './CardGroup';
8
+ import { CodeBlock, CodeBlockProps, CodeBlockPropsBase, CodeGroup, CodeGroupProps, CodeGroupPropsBase } from './Code';
9
+ import { Expandable } from './Expandable';
10
+ import { Frame } from './Frame';
11
+ import { Param } from './Param';
12
+ import { PillSelect } from './PillSelect';
13
+ import { Tab, Tabs } from './Tabs';
14
+ import { Tooltip } from './Tooltip';
15
+ import './css/globals.css';
16
16
  export type { CardProps, ButtonProps, ButtonPropsBase, CardPropsBase, CodeGroupPropsBase, CodeBlockPropsBase, CodeGroupProps, CodeBlockProps, };
17
17
  export { Accordion, AccordionGroup, AppearFromTop, ApiPlayground, Button, Card, CardGroup, CodeBlock, CodeGroup, Check, Expandable, Frame, Info, Warning, Note, Param, PillSelect, RequestMethodBubble, RequestPathHeader, Tabs, Tip, Tab, Tooltip, };