@readme/markdown 9.1.1 → 9.1.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.
@@ -1,5 +1,5 @@
1
- import type { RMDXModuleProps, RunOpts } from '../lib/run';
1
+ import type { RunOpts } from '../lib/run';
2
2
  import React from 'react';
3
- type Props = Pick<RMDXModuleProps, 'theme'> & Pick<RunOpts, 'baseUrl' | 'terms' | 'variables'> & React.PropsWithChildren;
3
+ type Props = Pick<RunOpts, 'baseUrl' | 'terms' | 'theme' | 'variables'> & React.PropsWithChildren;
4
4
  declare const Contexts: ({ children, terms, variables, baseUrl, theme }: Props) => React.ReactNode;
5
5
  export default Contexts;
package/dist/lib/run.d.ts CHANGED
@@ -2,16 +2,13 @@ import type { GlossaryTerm } from '../contexts/GlossaryTerms';
2
2
  import type { CustomComponents, RMDXModule } from '../types';
3
3
  import type { Variables } from '../utils/user';
4
4
  import type { RunOptions } from '@mdx-js/mdx';
5
- import type { MDXProps } from 'mdx/types';
6
5
  export type RunOpts = Omit<RunOptions, 'Fragment'> & {
7
6
  baseUrl?: string;
8
7
  components?: CustomComponents;
9
8
  imports?: Record<string, unknown>;
10
9
  terms?: GlossaryTerm[];
10
+ theme?: 'dark' | 'light';
11
11
  variables?: Variables;
12
12
  };
13
- export type RMDXModuleProps = MDXProps & {
14
- theme: 'dark' | 'light';
15
- };
16
13
  declare const run: (string: string, _opts?: RunOpts) => Promise<RMDXModule>;
17
14
  export default run;
package/dist/main.js CHANGED
@@ -99283,7 +99283,7 @@ const makeUseMDXComponents = (more = {}) => {
99283
99283
 
99284
99284
  const run_run = async (string, _opts = {}) => {
99285
99285
  const { Fragment } = jsx_runtime_namespaceObject;
99286
- const { components = {}, terms, variables, baseUrl, imports = {}, ...opts } = _opts;
99286
+ const { components = {}, terms, variables, baseUrl, imports = {}, theme, ...opts } = _opts;
99287
99287
  const tocsByTag = {};
99288
99288
  const exportedComponents = Object.entries(components).reduce((memo, [tag, mod]) => {
99289
99289
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -99317,7 +99317,7 @@ const run_run = async (string, _opts = {}) => {
99317
99317
  Toc = tocModule.default;
99318
99318
  }
99319
99319
  return {
99320
- default: (props) => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { baseUrl: baseUrl, terms: terms, theme: props.theme, variables: variables },
99320
+ default: (props) => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { baseUrl: baseUrl, terms: terms, theme: theme, variables: variables },
99321
99321
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Content, { ...props }))),
99322
99322
  toc,
99323
99323
  Toc: props => Toc ? (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(components_TableOfContents, null,
package/dist/main.node.js CHANGED
@@ -103875,7 +103875,7 @@ const makeUseMDXComponents = (more = {}) => {
103875
103875
 
103876
103876
  const run_run = async (string, _opts = {}) => {
103877
103877
  const { Fragment } = jsx_runtime_namespaceObject;
103878
- const { components = {}, terms, variables, baseUrl, imports = {}, ...opts } = _opts;
103878
+ const { components = {}, terms, variables, baseUrl, imports = {}, theme, ...opts } = _opts;
103879
103879
  const tocsByTag = {};
103880
103880
  const exportedComponents = Object.entries(components).reduce((memo, [tag, mod]) => {
103881
103881
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -103909,7 +103909,7 @@ const run_run = async (string, _opts = {}) => {
103909
103909
  Toc = tocModule.default;
103910
103910
  }
103911
103911
  return {
103912
- default: (props) => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { baseUrl: baseUrl, terms: terms, theme: props.theme, variables: variables },
103912
+ default: (props) => (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(contexts, { baseUrl: baseUrl, terms: terms, theme: theme, variables: variables },
103913
103913
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(Content, { ...props }))),
103914
103914
  toc,
103915
103915
  Toc: props => Toc ? (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement(components_TableOfContents, null,