@alloy-js/markdown 0.25.0-dev.1 → 0.25.0
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 +4 -0
- package/dist/dev/src/components/Code.js.map +1 -1
- package/dist/dev/src/components/Frontmatter.js +2 -2
- package/dist/dev/src/components/Frontmatter.js.map +1 -1
- package/dist/dev/src/components/Heading.js.map +1 -1
- package/dist/dev/src/components/Link.js.map +1 -1
- package/dist/dev/src/components/List.js +3 -3
- package/dist/dev/src/components/List.js.map +1 -1
- package/dist/dev/src/components/Section.js +5 -5
- package/dist/dev/src/components/Section.js.map +1 -1
- package/dist/dev/src/components/SourceFile.js +2 -2
- package/dist/dev/src/components/SourceFile.js.map +1 -1
- package/dist/dev/src/components/index.js.map +1 -1
- package/dist/dev/src/context/section.js.map +1 -1
- package/dist/dev/src/index.js.map +1 -1
- package/dist/dev/test/Code.test.js +3 -3
- package/dist/dev/test/Code.test.js.map +1 -1
- package/dist/dev/test/Frontmatter.test.js +2 -2
- package/dist/dev/test/Frontmatter.test.js.map +1 -1
- package/dist/dev/test/list.test.js +6 -6
- package/dist/dev/test/list.test.js.map +1 -1
- package/dist/dev/test/paragraph.test.js +3 -3
- package/dist/dev/test/paragraph.test.js.map +1 -1
- package/dist/dev/test/section.test.js +6 -6
- package/dist/dev/test/section.test.js.map +1 -1
- package/dist/dev/test/utils.js +2 -2
- package/dist/dev/test/utils.js.map +1 -1
- package/dist/dev/test/vitest.d.js.map +1 -1
- package/dist/dev/test/vitest.setup.js.map +1 -1
- package/dist/src/components/Code.d.ts +1 -1
- package/dist/src/components/Code.d.ts.map +1 -1
- package/dist/src/components/Code.js.map +1 -1
- package/dist/src/components/Frontmatter.d.ts +1 -1
- package/dist/src/components/Frontmatter.d.ts.map +1 -1
- package/dist/src/components/Frontmatter.js.map +1 -1
- package/dist/src/components/Heading.d.ts +2 -2
- package/dist/src/components/Heading.d.ts.map +1 -1
- package/dist/src/components/Heading.js.map +1 -1
- package/dist/src/components/Link.d.ts +1 -1
- package/dist/src/components/Link.d.ts.map +1 -1
- package/dist/src/components/Link.js.map +1 -1
- package/dist/src/components/List.d.ts +1 -1
- package/dist/src/components/List.d.ts.map +1 -1
- package/dist/src/components/List.js.map +1 -1
- package/dist/src/components/Section.d.ts +1 -1
- package/dist/src/components/Section.d.ts.map +1 -1
- package/dist/src/components/Section.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts +1 -1
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/context/section.d.ts +1 -1
- package/dist/src/context/section.d.ts.map +1 -1
- package/dist/src/context/section.js.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/test/Code.test.js.map +1 -1
- package/dist/test/Frontmatter.test.js.map +1 -1
- package/dist/test/list.test.js.map +1 -1
- package/dist/test/paragraph.test.js.map +1 -1
- package/dist/test/section.test.js.map +1 -1
- package/dist/test/utils.d.ts +1 -1
- package/dist/test/utils.d.ts.map +1 -1
- package/dist/test/utils.js.map +1 -1
- package/dist/test/vitest.d.js.map +1 -1
- package/dist/test/vitest.setup.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/Code.tsx +1 -1
- package/src/components/Frontmatter.tsx +5 -3
- package/src/components/Heading.tsx +3 -2
- package/src/components/Link.tsx +1 -1
- package/src/components/List.tsx +3 -4
- package/src/components/Section.tsx +2 -1
- package/src/components/SourceFile.tsx +3 -1
- package/src/context/section.ts +2 -1
- package/temp/api.json +1 -1
- package/test/Code.test.tsx +1 -0
- package/test/Frontmatter.test.tsx +1 -0
- package/test/list.test.tsx +1 -0
- package/test/paragraph.test.tsx +1 -0
- package/test/section.test.tsx +1 -0
- package/test/utils.tsx +3 -1
- package/tsdoc-metadata.json +1 -1
- package/vitest.config.ts +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alloy-js/markdown",
|
|
3
|
-
"version": "0.25.0
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Alloy components for generating markdown",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"author": "brian.terlson@microsoft.com",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"yaml": "^2.7.1",
|
|
24
|
+
"@alloy-js/core": "~0.25.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@alloy-js/cli": "~0.24.0 || >= 0.25.0-dev.0",
|
|
28
|
-
"@alloy-js/rollup-plugin": "~0.1.2 || >= 0.1.3-dev.3",
|
|
29
27
|
"@microsoft/api-extractor": "~7.58.8",
|
|
30
|
-
"@types/node": "^
|
|
31
|
-
"typescript": "^
|
|
32
|
-
"vitest": "4.1.
|
|
28
|
+
"@types/node": "^26.1.1",
|
|
29
|
+
"typescript": "^7.0.2",
|
|
30
|
+
"vitest": "4.1.10",
|
|
31
|
+
"@alloy-js/cli": "~0.25.0",
|
|
32
|
+
"@alloy-js/rollup-plugin": "~0.2.0"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
35
|
"scripts": {
|
package/src/components/Code.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { List } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import type { Children } from "@alloy-js/core/jsx-runtime";
|
|
3
3
|
import { stringify } from "yaml";
|
|
4
4
|
|
|
5
5
|
export interface FrontmatterProps {
|
|
@@ -23,9 +23,11 @@ export function Frontmatter(props: FrontmatterProps) {
|
|
|
23
23
|
return (
|
|
24
24
|
<List>
|
|
25
25
|
{"---"}
|
|
26
|
-
{props.jsValue ?
|
|
26
|
+
{props.jsValue ? (
|
|
27
27
|
stringify(props.jsValue).trim()
|
|
28
|
-
:
|
|
28
|
+
) : (
|
|
29
|
+
<List children={props.children} />
|
|
30
|
+
)}
|
|
29
31
|
{"---"}
|
|
30
32
|
</List>
|
|
31
33
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Refkey } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import type { Refkey } from "@alloy-js/core";
|
|
2
|
+
import type { Children } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
|
|
3
4
|
import { useSectionContext } from "../context/section.js";
|
|
4
5
|
|
|
5
6
|
export interface HeadingProps {
|
package/src/components/Link.tsx
CHANGED
package/src/components/List.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { childrenArray, For } from "@alloy-js/core";
|
|
2
|
-
import { Children
|
|
2
|
+
import type { Children } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
import { memo } from "@alloy-js/core/jsx-runtime";
|
|
3
4
|
|
|
4
5
|
export interface CommonListProps {
|
|
5
6
|
children: Children;
|
|
@@ -37,9 +38,7 @@ export function List(props: ListProps) {
|
|
|
37
38
|
|
|
38
39
|
return (
|
|
39
40
|
<align width={alignSize}>
|
|
40
|
-
{props.ordered ?
|
|
41
|
-
<>{index + start}.</>
|
|
42
|
-
: props.bullet}{" "}
|
|
41
|
+
{props.ordered ? <>{index + start}.</> : props.bullet}{" "}
|
|
43
42
|
{props.tasks && "[ ] "}
|
|
44
43
|
{child}
|
|
45
44
|
</align>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { List } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import type { Children } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
|
|
3
4
|
import { SectionContext, useSectionContext } from "../context/section.js";
|
|
4
5
|
import { Heading } from "./Heading.jsx";
|
|
5
6
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Children
|
|
1
|
+
import type { Children } from "@alloy-js/core";
|
|
2
|
+
import { SourceFile as CoreSourceFile, List } from "@alloy-js/core";
|
|
3
|
+
|
|
2
4
|
import { Link } from "./Link.jsx";
|
|
3
5
|
|
|
4
6
|
export interface SourceFileProps {
|
package/src/context/section.ts
CHANGED
package/temp/api.json
CHANGED
package/test/Code.test.tsx
CHANGED
package/test/list.test.tsx
CHANGED
package/test/paragraph.test.tsx
CHANGED
package/test/section.test.tsx
CHANGED
package/test/utils.tsx
CHANGED
package/tsdoc-metadata.json
CHANGED
package/vitest.config.ts
CHANGED
|
@@ -2,18 +2,6 @@ import alloyPlugin from "@alloy-js/rollup-plugin";
|
|
|
2
2
|
import { defineConfig } from "vitest/config";
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
|
-
resolve: {
|
|
6
|
-
conditions: ["source"],
|
|
7
|
-
},
|
|
8
|
-
ssr: {
|
|
9
|
-
resolve: {
|
|
10
|
-
conditions: ["source"],
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
esbuild: {
|
|
14
|
-
jsx: "preserve",
|
|
15
|
-
sourcemap: "both",
|
|
16
|
-
},
|
|
17
5
|
test: {
|
|
18
6
|
exclude: ["**/dist/**", "**/node_modules/**"],
|
|
19
7
|
setupFiles: ["./test/vitest.setup.ts"],
|