dumi 2.4.30 → 2.4.32

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.
Files changed (35) hide show
  1. package/compiled/crates/swc_plugin_react_demo.wasm +0 -0
  2. package/dist/assetParsers/block.d.ts +1 -1
  3. package/dist/client/theme-api/context.d.ts +1 -2
  4. package/dist/client/theme-api/useRenderer.d.ts +0 -1
  5. package/dist/client/theme-api/useRouteMeta.d.ts +4 -4
  6. package/dist/client/theme-api/utils.d.ts +7 -7
  7. package/dist/features/assets.d.ts +1 -1
  8. package/dist/features/autoAlias.d.ts +1 -1
  9. package/dist/features/compile/index.d.ts +1 -1
  10. package/dist/features/compile/makoHooks.d.ts +2 -3
  11. package/dist/features/compile/utoopackLoaders.d.ts +1 -1
  12. package/dist/features/configPlugins/index.d.ts +1 -1
  13. package/dist/features/derivative.d.ts +1 -1
  14. package/dist/features/exportStatic.d.ts +1 -1
  15. package/dist/features/exports.d.ts +1 -1
  16. package/dist/features/locales.d.ts +1 -1
  17. package/dist/features/meta.d.ts +1 -1
  18. package/dist/features/parser.d.ts +1 -1
  19. package/dist/features/routes.d.ts +1 -1
  20. package/dist/features/sitemap.d.ts +1 -1
  21. package/dist/features/tabs.d.ts +1 -1
  22. package/dist/features/theme/index.d.ts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/loaders/demo/index.d.ts +1 -1
  25. package/dist/loaders/markdown/index.d.ts +1 -1
  26. package/dist/loaders/markdown/transformer/index.d.ts +3 -3
  27. package/dist/loaders/markdown/transformer/remarkBreaks.d.ts +1 -1
  28. package/dist/preset.d.ts +1 -1
  29. package/dist/techStacks/react.d.ts +1 -1
  30. package/dist/types.d.ts +6 -6
  31. package/dist/utils.d.ts +0 -1
  32. package/package.json +11 -9
  33. package/theme-default/slots/SearchBar/Input.d.ts +1 -1
  34. package/theme-default/slots/SocialIcon/index.d.ts +1 -1
  35. package/theme-default/slots/SourceCodeEditor/index.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- import { parseCodeFrontmatter } from "../utils";
1
+ import { parseCodeFrontmatter } from '../utils';
2
2
  import type { ExampleBlockAsset } from 'dumi-assets-types';
3
3
  import type { sync } from 'enhanced-resolve';
4
4
  import { IDumiTechStack } from '../types';
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type { PICKED_PKG_FIELDS } from "../../constants";
1
+ import type { PICKED_PKG_FIELDS } from '@/constants';
3
2
  import type { AtomComponentAsset } from 'dumi-assets-types';
4
3
  import type { IDemoData, ILocalesConfig, IThemeConfig } from './types';
5
4
  export interface ISiteContext {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AgnosticComponentType, IDemoData } from './types';
3
2
  export interface UseRendererOptions {
4
3
  id: string;
@@ -5,11 +5,11 @@ import type { IRouteMeta } from './types';
5
5
  */
6
6
  export declare const useMatchedRoute: () => {
7
7
  [key: string]: any;
8
- path?: string | undefined;
9
- parentId?: string | undefined;
10
- meta?: IRouteMeta | undefined;
8
+ path?: string;
9
+ parentId?: string;
10
+ meta?: IRouteMeta;
11
11
  id: string;
12
- redirect?: string | undefined;
12
+ redirect?: string;
13
13
  };
14
14
  /**
15
15
  * hook for get matched route meta
@@ -1,5 +1,5 @@
1
1
  import { PluginManager } from 'dumi';
2
- import { useEffect } from 'react';
2
+ import { useLayoutEffect } from 'react';
3
3
  import type { AgnosticComponentModule, IDemoData, ILocale, INav, INavItem, IRouteMeta, IRoutesById, IUserNavValue } from './types';
4
4
  /**
5
5
  * private instance, do not use it in your code
@@ -13,19 +13,19 @@ export declare const useLocaleDocRoutes: () => IRoutesById;
13
13
  * @returns code string
14
14
  */
15
15
  export declare const genReactRenderCode: (version: string) => string;
16
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
16
+ export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
17
17
  /**
18
18
  * common comparer for sidebar/nav items
19
19
  */
20
20
  export declare const useRouteDataComparer: <T extends {
21
- order?: number | undefined;
22
- link?: string | undefined;
23
- path?: string | undefined;
24
- title?: string | undefined;
21
+ order?: number;
22
+ link?: string;
23
+ path?: string;
24
+ title?: string;
25
25
  }>() => (a: T, b: T) => number;
26
26
  /**
27
27
  * common util for pick meta to sort sidebar/nav items
28
28
  */
29
- export declare const pickRouteSortMeta: (original: Partial<Pick<INavItem, 'order' | 'title'>>, field: 'nav' | 'nav.second' | 'group', fm: IRouteMeta['frontmatter']) => Partial<Pick<INavItem, "title" | "order">>;
29
+ export declare const pickRouteSortMeta: (original: Partial<Pick<INavItem, 'order' | 'title'>>, field: 'nav' | 'nav.second' | 'group', fm: IRouteMeta['frontmatter']) => Partial<Pick<INavItem, "order" | "title">>;
30
30
  export declare function getLocaleNav(nav: IUserNavValue | INav, locale: ILocale): import("./types").IUserNavItems;
31
31
  export declare function getAgnosticComponentModule(component: IDemoData['component']): Promise<AgnosticComponentModule>;
@@ -1,4 +1,4 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  import type { AtomAsset, ExampleAsset } from 'dumi-assets-types';
3
3
  declare const examples: ExampleAsset[];
4
4
  /**
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { IApi, IDumiTechStack } from "../../types";
1
+ import type { IApi, IDumiTechStack } from '../../types';
2
2
  export declare const techStacks: IDumiTechStack[];
3
3
  declare const _default: (api: IApi) => void;
4
4
  export default _default;
@@ -1,8 +1,7 @@
1
- /// <reference types="node" />
2
- import type { IApi } from "../../types";
1
+ import type { IApi } from '../../types';
3
2
  export declare const getLoadHook: (api: IApi) => (filePath: string) => Promise<{
4
3
  content: Buffer | null;
5
- type: "css" | "jsx" | "js";
4
+ type: "css" | "js" | "jsx";
6
5
  } | {
7
6
  content: string;
8
7
  type: string;
@@ -1,4 +1,4 @@
1
- import type { IApi, IDumiTechStack } from "../../types";
1
+ import type { IApi, IDumiTechStack } from '../../types';
2
2
  export declare const UTOOPACK_LOADER_CTX_KEY = "__dumiLoaderContextPath";
3
3
  export declare const LOADER_CTX_FILENAME = "dumi-loader-ctx.cjs";
4
4
  export declare function buildLoaderContextContent(techStacks: IDumiTechStack[], builtins?: Record<string, {
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../../types";
1
+ import type { IApi } from '../../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  /**
3
3
  * exclude pre-compiling modules in mfsu mode
4
4
  * and make sure there has no multiple instances problem (such as react)
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  export declare const TABS_META_PATH = "dumi/meta/tabs.ts";
3
3
  export declare const ATOMS_META_PATH = "dumi/meta/atoms.ts";
4
4
  declare const _default: (api: IApi) => void;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { IApi } from "../types";
1
+ import type { IApi } from '../types';
2
2
  export interface IContentTab {
3
3
  key: string;
4
4
  id?: string;
@@ -1,3 +1,3 @@
1
- import type { IApi } from "../../types";
1
+ import type { IApi } from '../../types';
2
2
  declare const _default: (api: IApi) => void;
3
3
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IDumiTechStack, IDumiTechStackRuntimeOpts, IDumiUserConfig } from "./types";
1
+ import type { IDumiTechStack, IDumiTechStackRuntimeOpts, IDumiUserConfig } from './types';
2
2
  declare let unistUtilVisit: typeof import('unist-util-visit');
3
3
  export * from 'umi';
4
4
  export { getProjectRoot } from './utils';
@@ -1,4 +1,4 @@
1
- import type { IDumiTechStack } from "../../types";
1
+ import type { IDumiTechStack } from '../../types';
2
2
  export interface IDemoLoaderOptions {
3
3
  techStacks: IDumiTechStack[];
4
4
  cwd: string;
@@ -1,4 +1,4 @@
1
- import type { IThemeLoadResult } from "../../features/theme/loader";
1
+ import type { IThemeLoadResult } from '../../features/theme/loader';
2
2
  import { type IMdTransformerOptions, type IMdTransformerResult } from './transformer';
3
3
  interface IMdLoaderDefaultModeOptions extends Omit<IMdTransformerOptions, 'fileAbsPath'> {
4
4
  mode?: 'markdown';
@@ -1,6 +1,6 @@
1
- import type { IParsedBlockAsset } from "../../../assetParsers/block";
2
- import type { ILocalesConfig, IRouteMeta } from "../../../client/theme-api/types";
3
- import type { IApi, IDumiConfig, IDumiTechStack } from "../../../types";
1
+ import type { IParsedBlockAsset } from '../../../assetParsers/block';
2
+ import type { ILocalesConfig, IRouteMeta } from '@/client/theme-api/types';
3
+ import type { IApi, IDumiConfig, IDumiTechStack } from '../../../types';
4
4
  import { type ResolveOptions } from 'enhanced-resolve';
5
5
  import type { IRoute } from 'umi';
6
6
  import type { Data } from 'vfile';
@@ -1,3 +1,3 @@
1
- import type { IMdTransformerOptions } from "./index";
1
+ import type { IMdTransformerOptions } from './index';
2
2
  import type { Root } from 'mdast';
3
3
  export default function remarkBreaks(opts: Pick<IMdTransformerOptions, 'fileAbsPath'>): (tree: Root) => void;
package/dist/preset.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IApi } from "./types";
1
+ import type { IApi } from './types';
2
2
  declare const _default: (api: IApi) => {
3
3
  plugins: string[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { IDumiTechStack } from "../types";
1
+ import type { IDumiTechStack } from '../types';
2
2
  export default class ReactTechStack implements IDumiTechStack {
3
3
  name: string;
4
4
  runtimeOpts?: IDumiTechStack['runtimeOpts'];
package/dist/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { BaseAtomAssetsParser as IAtomAssetsParser } from "./assetParsers/BaseParser";
2
- import type { IParsedBlockAsset } from "./assetParsers/block";
3
- import type { IDumiDemoProps } from "./client/theme-api/DumiDemo";
4
- import type { ILocalesConfig, IThemeConfig } from "./client/theme-api/types";
5
- import type { IContentTab } from "./features/tabs";
6
- import type { IThemeLoadResult } from "./features/theme/loader";
1
+ import type { BaseAtomAssetsParser as IAtomAssetsParser } from './assetParsers/BaseParser';
2
+ import type { IParsedBlockAsset } from './assetParsers/block';
3
+ import type { IDumiDemoProps } from '@/client/theme-api/DumiDemo';
4
+ import type { ILocalesConfig, IThemeConfig } from '@/client/theme-api/types';
5
+ import type { IContentTab } from './features/tabs';
6
+ import type { IThemeLoadResult } from './features/theme/loader';
7
7
  import { OnLoadArgs, OnLoadResult } from '@umijs/bundler-utils/compiled/esbuild';
8
8
  import type { IModify } from '@umijs/core';
9
9
  import type { AssetsPackage, ExampleBlockAsset } from 'dumi-assets-types';
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Range, RangeOptions } from '@umijs/utils/compiled/semver';
3
2
  import Cache from 'file-system-cache';
4
3
  import type { RunLoaderOption as InternalRunLoaderOption, RunLoaderResult } from '../compiled/loader-runner';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dumi",
3
- "version": "2.4.30",
3
+ "version": "2.4.32",
4
4
  "description": "📖 Documentation Generator of React Component",
5
5
  "keywords": [
6
6
  "generator",
@@ -11,7 +11,8 @@
11
11
  "jamstack",
12
12
  "markdown",
13
13
  "components",
14
- "documentation"
14
+ "documentation",
15
+ "utoopack"
15
16
  ],
16
17
  "homepage": "https://d.umijs.org",
17
18
  "bugs": {
@@ -68,9 +69,9 @@
68
69
  "@swc/core": "1.9.2",
69
70
  "@types/hast": "^2.3.5",
70
71
  "@types/mdast": "^3.0.12",
71
- "@umijs/bundler-utils": "^4.6.61",
72
- "@umijs/core": "^4.6.61",
73
- "@umijs/utils": "^4.6.61",
72
+ "@umijs/bundler-utils": "^4.6.66",
73
+ "@umijs/core": "^4.6.66",
74
+ "@umijs/utils": "^4.6.66",
74
75
  "animated-scroll-to": "^2.3.0",
75
76
  "classnames": "2.3.2",
76
77
  "codesandbox-import-utils": "^2.2.3",
@@ -122,7 +123,7 @@
122
123
  "sass": "^1.64.1",
123
124
  "sitemap": "^7.1.1",
124
125
  "sucrase": "^3.34.0",
125
- "umi": "^4.6.61",
126
+ "umi": "^4.6.66",
126
127
  "unified": "^10.1.2",
127
128
  "unist-util-visit": "^4.1.2",
128
129
  "unist-util-visit-parents": "^5.1.3",
@@ -145,12 +146,13 @@
145
146
  "@types/react": "^18.2.17",
146
147
  "@types/react-copy-to-clipboard": "^5.0.4",
147
148
  "@types/react-dom": "^18.2.7",
148
- "@umijs/lint": "^4.6.61",
149
- "@umijs/plugins": "4.6.61",
149
+ "@typescript/native-preview": "7.0.0-dev.20260609.1",
150
+ "@umijs/lint": "^4.6.66",
151
+ "@umijs/plugins": "4.6.66",
150
152
  "eslint": "^8.46.0",
151
153
  "esno": "^4.7.0",
152
154
  "fast-glob": "^3.3.1",
153
- "father": "^4.6.21",
155
+ "father": "^4.6.23",
154
156
  "git-repo-info": "^2.1.1",
155
157
  "highlight-words-core": "^1.2.2",
156
158
  "husky": "^8.0.3",
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
3
  export declare const Input: React.ForwardRefExoticComponent<{
4
4
  onChange: (keywords: string) => void;
5
- } & Pick<NativeInputProps, "onMouseEnter" | "onFocus" | "onBlur"> & React.RefAttributes<HTMLInputElement>>;
5
+ } & Pick<NativeInputProps, "onBlur" | "onFocus" | "onMouseEnter"> & React.RefAttributes<HTMLInputElement>>;
6
6
  export {};
@@ -1,4 +1,4 @@
1
- import { SocialTypes } from "../../../theme-api/types";
1
+ import { SocialTypes } from '../../../dist/client/theme-api/types';
2
2
  import { FunctionComponent, SVGProps, type FC } from 'react';
3
3
  import './index.less';
4
4
  export type SocialIconProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="theme-modules" />
2
1
  import SourceCode from 'dumi/theme/builtins/SourceCode';
3
2
  import { type ComponentProps, type FC } from 'react';
4
3
  import './index.less';