@xyd-js/content 0.1.0-xyd.13 → 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 +34 -0
- package/ISSUES.md +1 -0
- package/TODO.md +2 -0
- package/dist/index.d.ts +24 -5
- package/dist/index.js +1411 -21776
- package/dist/index.js.map +1 -1
- package/dist/md.d.ts +62 -7
- 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 +81 -2
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @xyd-js/content
|
|
2
2
|
|
|
3
|
+
## 0.1.0-xyd.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- test
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @xyd-js/components@0.1.0-xyd.13
|
|
10
|
+
- @xyd-js/context@0.1.0-xyd.2
|
|
11
|
+
- @xyd-js/core@0.1.0-xyd.15
|
|
12
|
+
- @xyd-js/gql@0.1.0-xyd.15
|
|
13
|
+
- @xyd-js/openapi@0.1.0-xyd.13
|
|
14
|
+
- @xyd-js/sources@0.1.1-xyd.5
|
|
15
|
+
|
|
16
|
+
## 0.1.0-xyd.15
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- update packages
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @xyd-js/components@0.1.0-xyd.12
|
|
23
|
+
- @xyd-js/context@0.1.0-xyd.1
|
|
24
|
+
- @xyd-js/core@0.1.0-xyd.14
|
|
25
|
+
- @xyd-js/gql@0.1.0-xyd.14
|
|
26
|
+
- @xyd-js/openapi@0.1.0-xyd.12
|
|
27
|
+
- @xyd-js/sources@0.1.1-xyd.4
|
|
28
|
+
|
|
29
|
+
## 0.1.0-xyd.14
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- version
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
- @xyd-js/core@0.1.0-xyd.13
|
|
36
|
+
|
|
3
37
|
## 0.1.0-xyd.13
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/ISSUES.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1. if we have uniform with type that is hidden by tree-shaking then its not exported
|
package/TODO.md
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluggableList } from 'unified';
|
|
2
|
+
import { Sidebar, MetadataMap, Header, Settings } from '@xyd-js/core';
|
|
3
|
+
import { HighlightedCode } from 'codehike/code';
|
|
2
4
|
|
|
3
|
-
declare function
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
declare function pageFrontMatters(navigation: Sidebar[], pagePathMapping: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
}): Promise<MetadataMap>;
|
|
6
8
|
declare function filterNavigationByLevels(headers: Header[], slug: string): (nav: Sidebar) => boolean;
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
type VarCode = [
|
|
11
|
+
[
|
|
12
|
+
string,
|
|
13
|
+
...(HighlightedCode)[]
|
|
14
|
+
] | HighlightedCode
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
declare class ContentFS {
|
|
18
|
+
private readonly settings;
|
|
19
|
+
private readonly remarkPlugins;
|
|
20
|
+
private readonly rehypePlugins;
|
|
21
|
+
constructor(settings: Settings, remarkPlugins: PluggableList, rehypePlugins: PluggableList);
|
|
22
|
+
compile(filePath: string): Promise<string>;
|
|
23
|
+
compileContent(content: string, filePath?: string): Promise<string>;
|
|
24
|
+
readRaw(filePath: string): Promise<string>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { ContentFS, type VarCode, filterNavigationByLevels, pageFrontMatters };
|