@mui/internal-docs-infra 0.12.1-canary.4 → 0.12.1-canary.5
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/ChunkProvider/PreloadProvider.mjs +1 -2
- package/ChunkProvider/usePreload.d.mts +1 -1
- package/ChunkProvider/usePreload.mjs +0 -1
- package/CodeHighlighter/CodeHighlighterClient.d.mts +1 -1
- package/CodeHighlighter/CodeHighlighterContext.d.mts +2 -2
- package/CodeHighlighter/buildStringFallback.d.mts +1 -1
- package/CodeHighlighter/codeToFallbackProps.d.mts +1 -1
- package/CodeHighlighter/fallbackCompression.d.mts +1 -1
- package/abstractCreateDemo/abstractCreateDemo.d.mts +1 -1
- package/abstractCreateTypes/abstractCreateTypes.d.mts +1 -1
- package/createDemoData/createDemoData.d.mts +1 -1
- package/package.json +2 -2
- package/pipeline/hastUtils/hastUtils.d.mts +1 -1
- package/pipeline/hastUtils/hastUtils.mjs +0 -1
- package/pipeline/loadIsomorphicCodeSource/loadIsomorphicCodeSource.d.mts +1 -1
- package/pipeline/loadIsomorphicCodeVariant/applyCodeTransform.mjs +0 -1
- package/pipeline/loadIsomorphicCodeVariant/diffHast.d.mts +1 -1
- package/pipeline/loadIsomorphicCodeVariant/hasAllCodeVariants.d.mts +1 -1
- package/pipeline/loadIsomorphicCodeVariant/maybeCodeInitialData.d.mts +1 -1
- package/pipeline/loadServerCodeMeta/resolveModulePathWithFs.d.mts +1 -1
- package/pipeline/loadServerCodeMeta/resolveModulePathWithFs.mjs +0 -1
- package/pipeline/loadServerTypes/highlightTypes.d.mts +3 -3
- package/pipeline/loadServerTypes/highlightTypesMeta.d.mts +4 -4
- package/pipeline/loadServerTypes/loadServerTypes.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/createOptimizedProgram.d.mts +2 -1
- package/pipeline/loadServerTypesMeta/formatClass.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/formatComponent.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/formatFunction.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/formatHook.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/formatRaw.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/formatType.d.mts +1 -1
- package/pipeline/loadServerTypesMeta/loadServerTypesMeta.d.mts +7 -7
- package/pipeline/loadServerTypesMeta/processTypes.d.mts +2 -2
- package/pipeline/loadServerTypesMeta/worker.d.mts +1 -1
- package/pipeline/loadServerTypesText/loadServerTypesText.d.mts +1 -1
- package/pipeline/parseCreateFactoryCall/parseCreateFactoryCall.d.mts +2 -2
- package/pipeline/syncPageIndex/mergeMetadataMarkdown.d.mts +1 -1
- package/pipeline/syncPageIndex/metadataToMarkdown.d.mts +1 -1
- package/pipeline/syncTypes/generateTypesMarkdown.d.mts +2 -2
- package/pipeline/transformMarkdownMetadata/types.d.mts +1 -1
- package/useCode/EditableEngine.d.mts +1 -1
- package/useCode/Pre.d.mts +1 -1
- package/useCode/TransformEngine.d.mts +1 -1
- package/useCode/useCode.d.mts +1 -1
- package/useCode/useCopyFunctionality.d.mts +2 -2
- package/useCode/useEditable.browser.mjs +0 -1
- package/useCode/useTransformManagement.d.mts +2 -2
- package/useCode/useTransformManagement.mjs +0 -1
- package/useCode/useVariantSelection.d.mts +1 -1
- package/useCoordinated/useCoordinated.d.mts +1 -1
- package/useCoordinated/useCoordinatedLocalStorage.d.mts +1 -1
- package/useCoordinated/useCoordinatedLocalStorage.mjs +0 -1
- package/useCoordinated/useCoordinatedPreference.d.mts +1 -1
- package/useCoordinated/useCoordinatedPreference.mjs +0 -1
- package/useDemo/exportVariantAsCra.d.mts +1 -1
- package/useDemo/exportVariantAsCra.mjs +0 -1
- package/useDemo/useDemo.d.mts +1 -1
- package/useSearch/types.d.mts +1 -1
- package/useType/TypesDataProvider.mjs +1 -2
- package/useType/useType.d.mts +1 -1
- package/useType/useTypeProp.d.mts +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { PreloadContext } from "./PreloadContext.mjs";
|
|
5
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
/**
|
|
7
7
|
* Scopes a cross-instance preload cache (typically at a layout). Descendants
|
|
8
8
|
* call `usePreload` to start dynamic imports of shared helpers keyed by a
|
|
@@ -10,7 +10,6 @@ import { PreloadContext } from "./PreloadContext.mjs";
|
|
|
10
10
|
* instance reuses its promise - so a helper a chunk's data implies (a transform
|
|
11
11
|
* fn, say) is fetched once, in parallel with the content, across the page.
|
|
12
12
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
export function PreloadProvider({
|
|
15
14
|
children
|
|
16
15
|
}) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CodeHighlighterClientProps } from "./types.mjs";
|
|
2
2
|
export declare function CodeHighlighterClient(props: CodeHighlighterClientProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Code, ControlledCode, Fallbacks, HastRoot } from "./types.mjs";
|
|
3
|
+
import type { Selection } from "../CodeControllerContext/index.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* One cached pre-parsed file. Stored per-fileName: each new write replaces
|
|
6
6
|
* any previous entry for that file. The `source` string is the cache key —
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SourceComments, SourceEnhancers } from "./types.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { FallbackNode } from "./fallbackFormat.mjs";
|
|
3
3
|
export interface StringFallbackResult {
|
|
4
4
|
/** Compact, windowed fallback frames (text only — `.line` spans stripped). */
|
|
5
5
|
fallback: FallbackNode[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseContentLoadingProps, Code, Fallbacks } from "./types.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { SourceLineCounts } from "../useCode/sourceLineCounts.mjs";
|
|
3
3
|
/** Per-variant → per-file line metadata threaded for the fallback. */
|
|
4
4
|
export type LineCountsByVariant = Record<string, Record<string, SourceLineCounts>>;
|
|
5
5
|
export declare function codeToFallbackProps(variant: string, code?: Code, _fileName?: string, _needsAllFiles?: boolean, needsAllVariants?: boolean, allFallbackHasts?: Record<string, Fallbacks>, allLineCounts?: LineCountsByVariant): BaseContentLoadingProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Code, CodeHighlighterProps, ContentLoadingProps, ContentProps, LoadCodeMeta, LoadSource, LoadVariantMeta, ParseSource, SourceEnhancers } from "../CodeHighlighter/types.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { DemoGlobalData } from "../createDemoData/types.mjs";
|
|
4
4
|
type CreateDemoMeta = {
|
|
5
5
|
name?: string;
|
|
6
6
|
slug?: string;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { PluggableList } from 'unified';
|
|
3
3
|
import type { HighlightedTypesMeta } from '@mui/internal-docs-infra/pipeline/loadServerTypes';
|
|
4
4
|
import type { ModuleLinkMapEntry } from "../pipeline/enhanceCodeTypes/scanState.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import type { TypesJsxOptions } from "./typesToJsx.mjs";
|
|
6
6
|
import type { TypesTableProps } from "../useTypes/useTypes.mjs";
|
|
7
7
|
/**
|
|
8
8
|
* Export data structure containing a main type and its related additional types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { CreateDemoDataMeta, DemoData, DemoGlobalData, DemoGlobalProvider } from "./types.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Creates demo data for displaying code examples with syntax highlighting.
|
|
5
5
|
* A variant is a different implementation style of the same component.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-docs-infra",
|
|
3
|
-
"version": "0.12.1-canary.
|
|
3
|
+
"version": "0.12.1-canary.5",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "MUI Infra - internal documentation creation tools.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -775,5 +775,5 @@
|
|
|
775
775
|
"bin": {
|
|
776
776
|
"docs-infra": "./cli/index.mjs"
|
|
777
777
|
},
|
|
778
|
-
"gitSha": "
|
|
778
|
+
"gitSha": "cb672accc6b61d455e18ce874f99ea841831a734"
|
|
779
779
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { Nodes as HastNodes } from 'hast';
|
|
3
3
|
import type { Components } from 'hast-util-to-jsx-runtime';
|
|
4
|
-
import {
|
|
4
|
+
import type { FallbackNode } from "./fallbackFormat.mjs";
|
|
5
5
|
export declare function hastToJsx(hast: HastNodes, components?: Partial<Components>): React.ReactNode;
|
|
6
6
|
export declare function hastOrJsonToJsx(hastOrJson: HastNodes | {
|
|
7
7
|
hastJson: string;
|
|
@@ -3,7 +3,6 @@ import { toText } from 'hast-util-to-text';
|
|
|
3
3
|
import { toJsxRuntime } from 'hast-util-to-jsx-runtime';
|
|
4
4
|
import { decompressHast } from "./hastCompression.mjs";
|
|
5
5
|
import { fallbackToText } from "./fallbackFormat.mjs";
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Resolve the DEFLATE dictionary text for a `hastCompressed` payload from a
|
|
9
8
|
* compact `fallback`. The loader compresses each file with its own fallback
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LoadSource } from "../../CodeHighlighter/types.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { StoreAtMode } from "../loaderUtils/processRelativeImports.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Imports record passed to {@link LoadIsomorphicCodeSourceOptions.resolveImports}.
|
|
5
5
|
*
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
import { decodeHastSource } from "./decodeHastSource.mjs";
|
|
11
11
|
import { frameFallbackFromSpans } from "../hastUtils/index.mjs";
|
|
12
12
|
import { applyCodeTransformWithComments as applyCodeTransformWithCommentsCore, applyCodeTransformsWithComments as applyCodeTransformsWithCommentsCore } from "./applyCodeTransformWithComments.mjs";
|
|
13
|
-
|
|
14
13
|
// The built-in hast helpers, bound once for callers that don't inject their own
|
|
15
14
|
// (the `loadIsomorphicCodeVariant` server/build pipeline, tests, etc.).
|
|
16
15
|
const builtinDeps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Nodes } from 'hast';
|
|
2
|
-
import {
|
|
2
|
+
import type { SourceComments, Transforms } from "../../CodeHighlighter/types.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Async-friendly variant of {@link ParseSource}. The build-time diff path
|
|
5
5
|
* may wrap the synchronous highlighter with enhancers that need to run
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Code, VariantExtraFiles, VariantSource } from "../../CodeHighlighter/types.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Type guard function that determines if we have sufficient data to render a code highlighter
|
|
4
4
|
* component immediately, or if we need to start loading data first.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DirectoryEntry, DirectoryReader, ResolveModulePathOptions, TypeAwareResolveResult } from "../loaderUtils/resolveModulePath.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Resolves a module path using Node.js filesystem APIs.
|
|
4
4
|
* This is a convenience wrapper around the generic resolveModulePath function.
|
|
@@ -4,7 +4,6 @@ import { readdir } from 'fs/promises';
|
|
|
4
4
|
// eslint-disable-next-line n/prefer-node-protocol
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { resolveModulePath, resolveModulePaths, resolveImportResult, resolveVariantPaths } from "../loaderUtils/resolveModulePath.mjs";
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Node.js filesystem-based directory reader that converts Dirent objects
|
|
10
9
|
* to the DirectoryEntry interface expected by the resolver functions.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Root as HastRoot } from 'hast';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { TransformHtmlCodeBlockOptions } from "../transformHtmlCodeBlock/transformHtmlCodeBlock.mjs";
|
|
3
|
+
import type { TypesMeta } from "../loadServerTypesMeta/index.mjs";
|
|
4
|
+
import type { TypesOutputFormat } from "./hastTypeUtils.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* Result of the highlightTypes function.
|
|
7
7
|
*/
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* 4. Converts defaultText to syntax-highlighted HAST (default field)
|
|
9
9
|
*/
|
|
10
10
|
import type { Root as HastRoot } from 'hast';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import type { TransformHtmlCodeBlockOptions } from "../transformHtmlCodeBlock/transformHtmlCodeBlock.mjs";
|
|
12
|
+
import type { TypesMeta, ComponentTypeMeta, HookTypeMeta, FunctionTypeMeta, ClassTypeMeta, RawTypeMeta, FormattedProperty, FormattedParameter } from "../loadServerTypesMeta/index.mjs";
|
|
13
13
|
import type { FormattedMethod } from "../loadServerTypesMeta/formatClass.mjs";
|
|
14
14
|
import type { EnumMemberMeta } from "../loadServerTypesMeta/formatRaw.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import type { FormatInlineTypeOptions } from "./typeHighlighting.mjs";
|
|
16
|
+
import type { SerializedHastRoot, SerializedHastCompressed, TypesOutputFormat } from "./hastTypeUtils.mjs";
|
|
17
17
|
/** A HAST root or its serialized/compressed wrapper. */
|
|
18
18
|
type HastField = HastRoot | SerializedHastRoot | SerializedHastCompressed;
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { HighlightedTypesMeta, HighlightedComponentTypeMeta, HighlightedHookTypeMeta, HighlightedFunctionTypeMeta, HighlightedClassTypeMeta, HighlightedMethod, HighlightedRawTypeMeta, HighlightedEnumMemberMeta, HighlightedProperty, HighlightedParameter, HighlightedClassProperty } from "./highlightTypesMeta.mjs";
|
|
2
|
+
import type { SyncTypesOptions } from "../syncTypes/index.mjs";
|
|
3
3
|
import type { ExportData } from "../../abstractCreateTypes/index.mjs";
|
|
4
4
|
import type { TypesOutputFormat } from "./hastTypeUtils.mjs";
|
|
5
5
|
import type { TransformHtmlCodeBlockOptions } from "../transformHtmlCodeBlock/transformHtmlCodeBlock.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FormattedParameter, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
3
|
+
import type { TypeRewriteContext } from "./rewriteTypes.mjs";
|
|
4
4
|
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
5
5
|
import type { HastRoot } from "../../CodeHighlighter/types.mjs";
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FormattedProperty, FormattedEnumMember, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
3
|
+
import type { TypeRewriteContext } from "./rewriteTypes.mjs";
|
|
4
4
|
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
5
5
|
import type { HastRoot } from "../../CodeHighlighter/types.mjs";
|
|
6
6
|
import type { OrderingConfig } from "../loadServerTypesText/order.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FormattedParameter, FormattedProperty, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
3
|
+
import type { TypeRewriteContext } from "./rewriteTypes.mjs";
|
|
4
4
|
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
5
5
|
import type { HastRoot } from "../../CodeHighlighter/types.mjs";
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FormattedProperty, FormattedParameter, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
3
|
+
import type { TypeRewriteContext } from "./rewriteTypes.mjs";
|
|
4
4
|
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
5
5
|
import type { HastRoot } from "../../CodeHighlighter/types.mjs";
|
|
6
6
|
export type HookTypeMeta = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { FormattedProperty, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
3
|
+
import type { TypeRewriteContext } from "./rewriteTypes.mjs";
|
|
4
4
|
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
5
5
|
import type { HastRoot } from "../../CodeHighlighter/types.mjs";
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as tae from 'typescript-api-extractor';
|
|
2
|
-
import {
|
|
2
|
+
import type { ExternalTypesCollector } from "./externalTypes.mjs";
|
|
3
3
|
export interface FormatTypeOptions {
|
|
4
4
|
removeUndefined?: boolean;
|
|
5
5
|
jsdocTags?: tae.DocumentationTag[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import type { ClassTypeMeta as ClassType } from "./formatClass.mjs";
|
|
2
|
+
import type { ComponentTypeMeta as ComponentType } from "./formatComponent.mjs";
|
|
3
|
+
import type { HookTypeMeta as HookType } from "./formatHook.mjs";
|
|
4
|
+
import type { FunctionTypeMeta as FunctionType } from "./formatFunction.mjs";
|
|
5
|
+
import type { RawTypeMeta as RawType, ReExportInfo } from "./formatRaw.mjs";
|
|
6
|
+
import type { FormattedProperty, FormattedEnumMember, FormattedParameter, FormatInlineTypeOptions, DescriptionReplacement } from "./format.mjs";
|
|
7
7
|
import type { OrderingConfig } from "../loadServerTypesText/order.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import type { OrganizeTypesResult } from "../loadServerTypesText/organizeTypesByExport.mjs";
|
|
9
9
|
export type ClassTypeMeta = ClassType;
|
|
10
10
|
export type ComponentTypeMeta = ComponentType;
|
|
11
11
|
export type HookTypeMeta = HookType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CompilerOptions } from 'typescript';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ExportNode } from 'typescript-api-extractor';
|
|
3
|
+
import type { PerformanceLog } from "./performanceTracking.mjs";
|
|
4
4
|
export interface VariantResult {
|
|
5
5
|
exports: ExportNode[];
|
|
6
6
|
allTypes: ExportNode[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WorkerRequest, WorkerResponse, VariantResult } from "./processTypes.mjs";
|
|
2
2
|
export type { WorkerRequest, WorkerResponse, VariantResult };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypesMeta } from "../loadServerTypesMeta/index.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { OrganizeTypesResult } from "./organizeTypesByExport.mjs";
|
|
3
3
|
import type { OrderingConfig } from "./order.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Common data returned by both syncTypes and loadServerTypesText.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ImportsAndComments } from "../loaderUtils/index.mjs";
|
|
2
|
+
import type { SplitArguments } from "./parseFunctionArguments.mjs";
|
|
3
3
|
import type { Externals } from "../../CodeHighlighter/types.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Parse options for create* factory call parsing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Root } from 'mdast';
|
|
2
2
|
import type { ExtractedMetadata } from "../transformMarkdownMetadata/types.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { Audience } from "../../createSitemap/types.mjs";
|
|
4
4
|
export interface PageMetadata extends ExtractedMetadata {
|
|
5
5
|
/** The slug/path for this page (e.g., 'button', 'checkbox') */
|
|
6
6
|
slug: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { TypesMeta } from "../loadServerTypesMeta/index.mjs";
|
|
2
|
+
import type { OrganizeTypesResult } from "../loadServerTypesText/organizeTypesByExport.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Options for generating types markdown.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PhrasingContent } from 'mdast';
|
|
2
|
-
import {
|
|
2
|
+
import type { Audience } from "../../createSitemap/types.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Base options for syncing page indexes.
|
|
5
5
|
* Shared between extractToIndex (markdown metadata) and updateParentIndex (types).
|
package/useCode/Pre.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { SetSource } from "./useSourceEditing.mjs";
|
|
3
3
|
import type { VariantSource } from "../CodeHighlighter/types.mjs";
|
|
4
4
|
import type { FallbackNode } from "../CodeHighlighter/fallbackFormat.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import type { SourceLineCounts } from "./sourceLineCounts.mjs";
|
|
6
6
|
export declare function Pre({
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TransformRuntimeDeps } from "../pipeline/loadIsomorphicCodeVariant/applyCodeTransformWithComments.mjs";
|
|
2
2
|
import type { VariantSource, VariantCode, Transforms, SourceComments, Fallbacks } from "../CodeHighlighter/types.mjs";
|
|
3
3
|
import type { FallbackNode } from "../CodeHighlighter/fallbackFormat.mjs";
|
|
4
4
|
import type { TransformedFiles } from "./useCodeUtils.mjs";
|
package/useCode/useCode.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ContentProps, SourceEnhancers } from "../CodeHighlighter/types.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { UseCopierOpts } from "../useCopier/index.mjs";
|
|
4
4
|
export type UseCodeOpts = {
|
|
5
5
|
preClassName?: string;
|
|
6
6
|
copy?: UseCopierOpts;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { UseCopierOpts } from "../useCopier/index.mjs";
|
|
3
3
|
import type { Fallbacks, VariantCode, VariantSource } from "../CodeHighlighter/types.mjs";
|
|
4
4
|
import type { FallbackNode } from "../CodeHighlighter/fallbackFormat.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import type { MarkdownFile } from "./generateVariantMarkdown.mjs";
|
|
6
6
|
import type { TransformedFiles } from "./useCodeUtils.mjs";
|
|
7
7
|
interface UseCopyFunctionalityProps {
|
|
8
8
|
selectedFile: VariantSource | null;
|
|
@@ -2,7 +2,6 @@ import { describe, it, expect, vi, afterEach, beforeAll } from 'vitest';
|
|
|
2
2
|
import { renderHook, act } from '@testing-library/react';
|
|
3
3
|
import { userEvent } from 'vitest/browser';
|
|
4
4
|
import { useEditable, preloadEditableEngine } from "./useEditable.mjs";
|
|
5
|
-
|
|
6
5
|
// `useEditable` loads its heavy runtime (the `EditableEngine` chunk) on demand
|
|
7
6
|
// and only applies `contentEditable` once it resolves. Warm that load once so
|
|
8
7
|
// the synchronous assertions below see `contentEditable` applied within `act`,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Code, VariantCode } from "../CodeHighlighter/types.mjs";
|
|
2
2
|
import type { CreateTransformedFiles } from "./TransformEngine.mjs";
|
|
3
3
|
import { preloadTransformEngine, resetTransformEngineCache } from "./transformEngineCache.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { CodeHighlighterContextType } from "../CodeHighlighter/CodeHighlighterContext.mjs";
|
|
5
|
+
import type { TransitionPhase } from "./useTransitionPhase.mjs";
|
|
6
6
|
export { preloadTransformEngine, resetTransformEngineCache };
|
|
7
7
|
interface UseTransformManagementProps {
|
|
8
8
|
context?: CodeHighlighterContextType;
|
|
@@ -13,7 +13,6 @@ import { usePreference } from "../usePreference/index.mjs";
|
|
|
13
13
|
import { useCoordinated } from "../useCoordinated/index.mjs";
|
|
14
14
|
import { useHighlightGate } from "./useHighlightGate.mjs";
|
|
15
15
|
import { useTransitionPhase } from "./useTransitionPhase.mjs";
|
|
16
|
-
|
|
17
16
|
// Stable identity for the hast helpers handed to the transform engine; both are
|
|
18
17
|
// module-level functions, so this never needs to change.
|
|
19
18
|
const transformRuntimeDeps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Code, VariantCode } from "../CodeHighlighter/types.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { TransitionPhase } from "./useTransitionPhase.mjs";
|
|
4
4
|
interface UseVariantSelectionProps {
|
|
5
5
|
effectiveCode: Code;
|
|
6
6
|
initialVariant?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { ChannelKey, PeerId } from "./coordinatePreference.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Options for {@link useCoordinated}. See `coordinatePreference` for
|
|
5
5
|
* the underlying semantics; only React-specific behaviors are
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { UseCoordinatedExtras, UseCoordinatedOptions } from "./useCoordinated.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* `useLocalStorageState` + coordination in one call. Cross-tab sync
|
|
5
5
|
* happens via the underlying storage events; the coordinator handles
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import useLocalStorageState from "../useLocalStorageState/index.mjs";
|
|
4
4
|
import { useCoordinated } from "./useCoordinated.mjs";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* `useLocalStorageState` + coordination in one call. Cross-tab sync
|
|
8
7
|
* happens via the underlying storage events; the coordinator handles
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { UseCoordinatedExtras, UseCoordinatedOptions } from "./useCoordinated.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* `usePreference` + {@link useCoordinated} in one call.
|
|
5
5
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* without library-specific dependencies
|
|
5
5
|
*/
|
|
6
6
|
import type { VariantCode } from "../CodeHighlighter/types.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import type { ExportConfig } from "./exportVariant.mjs";
|
|
8
8
|
/**
|
|
9
9
|
* Export a VariantCode as a Create React App template
|
|
10
10
|
* Returns an object with the exported VariantCode and entrypoint path
|
package/useDemo/useDemo.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { UseCodeOpts } from "../useCode/index.mjs";
|
|
3
3
|
import type { ContentProps } from "../CodeHighlighter/types.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import type { ExportConfig } from "./exportVariant.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* Demo templates use the exportVariant/exportVariantAsCra with flattenCodeVariant pattern:
|
|
7
7
|
*
|
package/useSearch/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ElapsedTime, Orama, Result, SearchParams } from '@orama/orama';
|
|
2
2
|
import type { Sitemap, SitemapPage, SitemapSection, SitemapPart, SitemapExport, SitemapSectionData } from "../createSitemap/types.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Base search result structure that can be extended by consumers
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { TypesDataContext } from "./TypesDataContext.mjs";
|
|
5
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
/**
|
|
7
7
|
* Provider that collects type data from all `useTypes()` calls within its subtree.
|
|
8
8
|
* This enables `useType(name)` to look up individual type data anywhere in the tree,
|
|
9
9
|
* and `useTypeProp(typeName, propName)` to look up individual properties.
|
|
10
10
|
*/
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
11
|
export function TypesDataProvider({
|
|
13
12
|
children
|
|
14
13
|
}) {
|
package/useType/useType.d.mts
CHANGED