@xyd-js/content 0.1.0-xyd.14 → 0.1.0-xyd.16
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/CHANGELOG.md +26 -0
- package/ISSUES.md +1 -0
- package/TODO.md +2 -0
- package/dist/index.d.ts +24 -5
- package/dist/index.js +1409 -21933
- package/dist/index.js.map +1 -1
- package/dist/md.d.ts +60 -5
- package/dist/md.js +18071 -15085
- package/dist/md.js.map +1 -1
- package/dist/{mdToc-CYxzibVZ.d.ts → mdToc-NBBxMJ4l.d.ts} +1 -0
- package/dist/vite.d.ts +80 -1
- package/dist/vite.js +9716 -10090
- package/dist/vite.js.map +1 -1
- package/example.txt +0 -0
- package/package.json +24 -6
- package/packages/md/index.ts +17 -8
- package/packages/md/plugins/component-directives/index.ts +3 -0
- package/packages/md/plugins/component-directives/mdComponentDirective.ts +524 -0
- package/packages/md/plugins/component-directives/types.ts +1 -0
- package/packages/md/plugins/component-directives/utils.ts +27 -0
- package/packages/md/plugins/composer/__fixtures__/1.single-example/input.md +7 -0
- package/packages/md/plugins/composer/__fixtures__/1.single-example/output.json +63 -0
- package/packages/md/plugins/composer/__fixtures__/2.single-example-with-name/input.md +7 -0
- package/packages/md/plugins/composer/__fixtures__/2.single-example-with-name/output.json +63 -0
- package/packages/md/plugins/composer/__fixtures__/3.multiple-examples/input.md +15 -0
- package/packages/md/plugins/composer/__fixtures__/3.multiple-examples/output.json +122 -0
- package/packages/md/plugins/composer/__fixtures__/4.example-groups/input.md +23 -0
- package/packages/md/plugins/composer/__fixtures__/4.example-groups/output.json +184 -0
- package/packages/md/plugins/composer/__tests__/mdComposer.test.ts +41 -0
- package/packages/md/plugins/composer/__tests__/testHelpers.ts +48 -0
- package/packages/md/plugins/composer/index.ts +1 -0
- package/packages/md/plugins/composer/mdComposer.ts +146 -0
- package/packages/md/plugins/developer-writing/index.ts +3 -0
- package/packages/md/plugins/developer-writing/mdCodeRehype.ts +78 -0
- package/packages/md/plugins/functions/__fixtures__/external.ts +4 -0
- package/packages/md/plugins/functions/__fixtures__/test.js +11 -0
- package/packages/md/plugins/functions/__fixtures__/test.py +9 -0
- package/packages/md/plugins/functions/__fixtures__/test.ts +18 -0
- package/packages/md/plugins/functions/__tests__/mdFunctionImportCode.test.ts +295 -0
- package/packages/md/plugins/functions/__tests__/parseFunctionCall.test.ts +47 -0
- package/packages/md/plugins/functions/__tests__/testHelpers.ts +71 -0
- package/packages/md/plugins/functions/index.ts +11 -0
- package/packages/md/plugins/functions/mdFunctionChangelog.ts +124 -0
- package/packages/md/plugins/functions/mdFunctionImportCode.ts +83 -0
- package/packages/md/plugins/functions/mdFunctionUniform.ts +79 -0
- package/packages/md/plugins/functions/types.ts +6 -0
- package/packages/md/plugins/functions/uniformProcessor.ts +349 -0
- package/packages/md/plugins/functions/utils.ts +423 -0
- package/packages/md/plugins/index.ts +56 -11
- package/packages/md/plugins/mdCode.ts +52 -4
- package/packages/md/plugins/mdHeadingId.ts +47 -0
- package/packages/md/plugins/mdPage.ts +3 -0
- package/packages/md/plugins/mdThemeSettings.ts +4 -0
- package/packages/md/plugins/mdToc.ts +108 -17
- package/packages/md/plugins/meta/index.ts +1 -0
- package/packages/md/plugins/meta/mdMeta.ts +189 -0
- package/packages/md/plugins/output-variables/__fixtures__/1.simple/input.md +22 -0
- package/packages/md/plugins/output-variables/__fixtures__/1.simple/output.json +191 -0
- package/packages/md/plugins/output-variables/__fixtures__/2.multiple-vars/input.md +21 -0
- package/packages/md/plugins/output-variables/__fixtures__/2.multiple-vars/output.json +127 -0
- package/packages/md/plugins/output-variables/__tests__/index.test.ts +28 -0
- package/packages/md/plugins/output-variables/__tests__/testHelpers.ts +36 -0
- package/packages/md/plugins/output-variables/index.ts +1 -0
- package/packages/md/plugins/output-variables/lib/const.ts +4 -0
- package/packages/md/plugins/output-variables/lib/factoryAttributes.ts +350 -0
- package/packages/md/plugins/output-variables/lib/factoryLabel.ts +135 -0
- package/packages/md/plugins/output-variables/lib/factoryName.ts +59 -0
- package/packages/md/plugins/output-variables/lib/index.ts +21 -0
- package/packages/md/plugins/output-variables/lib/outputVarsContainer.ts +328 -0
- package/packages/md/plugins/output-variables/lib/util.ts +494 -0
- package/packages/md/plugins/output-variables/remarkOutputVars.ts +22 -0
- package/packages/md/plugins/rehypeHeading.ts +50 -0
- package/packages/md/plugins/types.ts +15 -0
- package/packages/md/plugins/utils/componentLike.ts +72 -0
- package/packages/md/plugins/utils/index.ts +2 -0
- package/packages/md/plugins/utils/mdParameters.test.ts +114 -0
- package/packages/md/plugins/utils/mdParameters.ts +249 -0
- package/packages/md/plugins/utils/mdastTypes.ts +42 -0
- package/packages/md/search/index.ts +251 -0
- package/packages/md/search/types.ts +36 -0
- package/packages/vite/index.ts +8 -2
- package/src/fs.ts +51 -36
- package/src/index.ts +4 -4
- package/src/navigation.ts +50 -38
- package/src/types.ts +8 -0
- package/tsconfig.json +31 -8
- package/vitest.config.ts +17 -0
- package/packages/md/plugins/mdCodeGroup.ts +0 -40
- package/packages/md/plugins/mdComponentDirective.ts +0 -141
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as estree from 'estree';
|
|
2
|
-
import {
|
|
2
|
+
import { Settings } from '@xyd-js/core';
|
|
3
|
+
import { R as RemarkMdxTocOptions } from './mdToc-NBBxMJ4l.js';
|
|
3
4
|
|
|
4
5
|
declare module 'estree' {
|
|
5
6
|
export interface Decorator extends estree.BaseNode {
|
|
@@ -238,6 +239,7 @@ interface PluginContext extends MinimalPluginContext {
|
|
|
238
239
|
debug: LoggingFunction;
|
|
239
240
|
emitFile: EmitFile;
|
|
240
241
|
error: (error: RollupError | string) => never;
|
|
242
|
+
fs: RollupFsModule;
|
|
241
243
|
getFileName: (fileReferenceId: string) => string;
|
|
242
244
|
getModuleIds: () => IterableIterator<string>;
|
|
243
245
|
getModuleInfo: GetModuleInfo;
|
|
@@ -649,6 +651,7 @@ interface InputOptions {
|
|
|
649
651
|
experimentalCacheExpiry?: number;
|
|
650
652
|
experimentalLogSideEffects?: boolean;
|
|
651
653
|
external?: ExternalOption;
|
|
654
|
+
fs?: RollupFsModule;
|
|
652
655
|
input?: InputOption;
|
|
653
656
|
jsx?: false | JsxPreset | JsxOptions;
|
|
654
657
|
logLevel?: LogLevelOption;
|
|
@@ -673,6 +676,7 @@ interface NormalizedInputOptions {
|
|
|
673
676
|
experimentalCacheExpiry: number;
|
|
674
677
|
experimentalLogSideEffects: boolean;
|
|
675
678
|
external: IsExternal;
|
|
679
|
+
fs: RollupFsModule;
|
|
676
680
|
input: string[] | Record<string, string>;
|
|
677
681
|
jsx: false | NormalizedJsxOptions;
|
|
678
682
|
logLevel: LogLevelOption;
|
|
@@ -953,6 +957,7 @@ interface ChokidarOptions {
|
|
|
953
957
|
}
|
|
954
958
|
|
|
955
959
|
interface WatcherOptions {
|
|
960
|
+
allowInputInsideOutputPath?: boolean;
|
|
956
961
|
buildDelay?: number;
|
|
957
962
|
chokidar?: ChokidarOptions;
|
|
958
963
|
clearScreen?: boolean;
|
|
@@ -979,8 +984,82 @@ type RollupAstNode<T> = Omit<T, OmittedEstreeKeys> & AstNodeLocation;
|
|
|
979
984
|
type ProgramNode = RollupAstNode<estree.Program>;
|
|
980
985
|
type AstNode = RollupAstNode<estree.Node>;
|
|
981
986
|
|
|
987
|
+
interface RollupFsModule {
|
|
988
|
+
appendFile(
|
|
989
|
+
path: string,
|
|
990
|
+
data: string | Uint8Array,
|
|
991
|
+
options?: { encoding?: BufferEncoding | null; mode?: string | number; flag?: string | number }
|
|
992
|
+
): Promise<void>;
|
|
993
|
+
|
|
994
|
+
copyFile(source: string, destination: string, mode?: string | number): Promise<void>;
|
|
995
|
+
|
|
996
|
+
mkdir(path: string, options?: { recursive?: boolean; mode?: string | number }): Promise<void>;
|
|
997
|
+
|
|
998
|
+
mkdtemp(prefix: string): Promise<string>;
|
|
999
|
+
|
|
1000
|
+
readdir(path: string, options?: { withFileTypes?: false }): Promise<string[]>;
|
|
1001
|
+
readdir(path: string, options?: { withFileTypes: true }): Promise<RollupDirectoryEntry[]>;
|
|
1002
|
+
|
|
1003
|
+
readFile(
|
|
1004
|
+
path: string,
|
|
1005
|
+
options?: { encoding?: null; flag?: string | number; signal?: AbortSignal }
|
|
1006
|
+
): Promise<Uint8Array>;
|
|
1007
|
+
readFile(
|
|
1008
|
+
path: string,
|
|
1009
|
+
options?: { encoding: BufferEncoding; flag?: string | number; signal?: AbortSignal }
|
|
1010
|
+
): Promise<string>;
|
|
1011
|
+
|
|
1012
|
+
realpath(path: string): Promise<string>;
|
|
1013
|
+
|
|
1014
|
+
rename(oldPath: string, newPath: string): Promise<void>;
|
|
1015
|
+
|
|
1016
|
+
rmdir(path: string, options?: { recursive?: boolean }): Promise<void>;
|
|
1017
|
+
|
|
1018
|
+
stat(path: string): Promise<RollupFileStats>;
|
|
1019
|
+
|
|
1020
|
+
lstat(path: string): Promise<RollupFileStats>;
|
|
1021
|
+
|
|
1022
|
+
unlink(path: string): Promise<void>;
|
|
1023
|
+
|
|
1024
|
+
writeFile(
|
|
1025
|
+
path: string,
|
|
1026
|
+
data: string | Uint8Array,
|
|
1027
|
+
options?: { encoding?: BufferEncoding | null; mode?: string | number; flag?: string | number }
|
|
1028
|
+
): Promise<void>;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
type BufferEncoding =
|
|
1032
|
+
| 'ascii'
|
|
1033
|
+
| 'utf8'
|
|
1034
|
+
| 'utf16le'
|
|
1035
|
+
| 'ucs2'
|
|
1036
|
+
| 'base64'
|
|
1037
|
+
| 'base64url'
|
|
1038
|
+
| 'latin1'
|
|
1039
|
+
| 'binary'
|
|
1040
|
+
| 'hex';
|
|
1041
|
+
|
|
1042
|
+
interface RollupDirectoryEntry {
|
|
1043
|
+
isFile(): boolean;
|
|
1044
|
+
isDirectory(): boolean;
|
|
1045
|
+
isSymbolicLink(): boolean;
|
|
1046
|
+
name: string;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
interface RollupFileStats {
|
|
1050
|
+
isFile(): boolean;
|
|
1051
|
+
isDirectory(): boolean;
|
|
1052
|
+
isSymbolicLink(): boolean;
|
|
1053
|
+
size: number;
|
|
1054
|
+
mtime: Date;
|
|
1055
|
+
ctime: Date;
|
|
1056
|
+
atime: Date;
|
|
1057
|
+
birthtime: Date;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
982
1060
|
interface VitePluginInterface {
|
|
983
1061
|
toc: RemarkMdxTocOptions;
|
|
1062
|
+
settings: Settings;
|
|
984
1063
|
}
|
|
985
1064
|
declare function vitePlugins(options: VitePluginInterface): Plugin[];
|
|
986
1065
|
|