@alloy-js/markdown 0.25.0-dev.1 → 0.26.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/dev/src/components/Code.js.map +1 -1
  3. package/dist/dev/src/components/Frontmatter.js +2 -2
  4. package/dist/dev/src/components/Frontmatter.js.map +1 -1
  5. package/dist/dev/src/components/Heading.js.map +1 -1
  6. package/dist/dev/src/components/Link.js.map +1 -1
  7. package/dist/dev/src/components/List.js +3 -3
  8. package/dist/dev/src/components/List.js.map +1 -1
  9. package/dist/dev/src/components/Section.js +5 -5
  10. package/dist/dev/src/components/Section.js.map +1 -1
  11. package/dist/dev/src/components/SourceFile.js +2 -2
  12. package/dist/dev/src/components/SourceFile.js.map +1 -1
  13. package/dist/dev/src/components/index.js.map +1 -1
  14. package/dist/dev/src/context/section.js.map +1 -1
  15. package/dist/dev/src/index.js.map +1 -1
  16. package/dist/dev/test/Code.test.js +3 -3
  17. package/dist/dev/test/Code.test.js.map +1 -1
  18. package/dist/dev/test/Frontmatter.test.js +2 -2
  19. package/dist/dev/test/Frontmatter.test.js.map +1 -1
  20. package/dist/dev/test/list.test.js +6 -6
  21. package/dist/dev/test/list.test.js.map +1 -1
  22. package/dist/dev/test/paragraph.test.js +3 -3
  23. package/dist/dev/test/paragraph.test.js.map +1 -1
  24. package/dist/dev/test/section.test.js +6 -6
  25. package/dist/dev/test/section.test.js.map +1 -1
  26. package/dist/dev/test/utils.js +2 -2
  27. package/dist/dev/test/utils.js.map +1 -1
  28. package/dist/dev/test/vitest.d.js.map +1 -1
  29. package/dist/dev/test/vitest.setup.js.map +1 -1
  30. package/dist/src/components/Code.d.ts +1 -1
  31. package/dist/src/components/Code.d.ts.map +1 -1
  32. package/dist/src/components/Code.js.map +1 -1
  33. package/dist/src/components/Frontmatter.d.ts +1 -1
  34. package/dist/src/components/Frontmatter.d.ts.map +1 -1
  35. package/dist/src/components/Frontmatter.js.map +1 -1
  36. package/dist/src/components/Heading.d.ts +2 -2
  37. package/dist/src/components/Heading.d.ts.map +1 -1
  38. package/dist/src/components/Heading.js.map +1 -1
  39. package/dist/src/components/Link.d.ts +1 -1
  40. package/dist/src/components/Link.d.ts.map +1 -1
  41. package/dist/src/components/Link.js.map +1 -1
  42. package/dist/src/components/List.d.ts +1 -1
  43. package/dist/src/components/List.d.ts.map +1 -1
  44. package/dist/src/components/List.js.map +1 -1
  45. package/dist/src/components/Section.d.ts +1 -1
  46. package/dist/src/components/Section.d.ts.map +1 -1
  47. package/dist/src/components/Section.js.map +1 -1
  48. package/dist/src/components/SourceFile.d.ts +1 -1
  49. package/dist/src/components/SourceFile.d.ts.map +1 -1
  50. package/dist/src/components/SourceFile.js.map +1 -1
  51. package/dist/src/components/index.js.map +1 -1
  52. package/dist/src/context/section.d.ts +1 -1
  53. package/dist/src/context/section.d.ts.map +1 -1
  54. package/dist/src/context/section.js.map +1 -1
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/test/Code.test.js.map +1 -1
  57. package/dist/test/Frontmatter.test.js.map +1 -1
  58. package/dist/test/list.test.js.map +1 -1
  59. package/dist/test/paragraph.test.js.map +1 -1
  60. package/dist/test/section.test.js.map +1 -1
  61. package/dist/test/utils.d.ts +1 -1
  62. package/dist/test/utils.d.ts.map +1 -1
  63. package/dist/test/utils.js.map +1 -1
  64. package/dist/test/vitest.d.js.map +1 -1
  65. package/dist/test/vitest.setup.js.map +1 -1
  66. package/dist/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +8 -8
  68. package/src/components/Code.tsx +1 -1
  69. package/src/components/Frontmatter.tsx +5 -3
  70. package/src/components/Heading.tsx +3 -2
  71. package/src/components/Link.tsx +1 -1
  72. package/src/components/List.tsx +3 -4
  73. package/src/components/Section.tsx +2 -1
  74. package/src/components/SourceFile.tsx +3 -1
  75. package/src/context/section.ts +2 -1
  76. package/temp/api.json +1 -1
  77. package/test/Code.test.tsx +1 -0
  78. package/test/Frontmatter.test.tsx +1 -0
  79. package/test/list.test.tsx +1 -0
  80. package/test/paragraph.test.tsx +1 -0
  81. package/test/section.test.tsx +1 -0
  82. package/test/utils.tsx +3 -1
  83. package/tsdoc-metadata.json +1 -1
  84. 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-dev.1",
3
+ "version": "0.26.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
- "@alloy-js/core": "~0.24.1 || >= 0.25.0-dev.2",
24
- "yaml": "^2.7.1"
23
+ "yaml": "^2.7.1",
24
+ "@alloy-js/core": "~0.26.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": "^25.9.2",
31
- "typescript": "^6.0.3",
32
- "vitest": "4.1.8"
28
+ "@types/node": "^26.1.1",
29
+ "typescript": "^7.0.2",
30
+ "vitest": "4.1.10",
31
+ "@alloy-js/cli": "~0.26.0",
32
+ "@alloy-js/rollup-plugin": "~0.2.0"
33
33
  },
34
34
  "type": "module",
35
35
  "scripts": {
@@ -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
 
4
4
  export interface CodeProps {
5
5
  /** Language of the code block */
@@ -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
- : <List children={props.children} />}
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 {
@@ -1,4 +1,4 @@
1
- import { Refkey } from "@alloy-js/core";
1
+ import type { Refkey } from "@alloy-js/core";
2
2
 
3
3
  export interface LinkPropsWithRefkey {
4
4
  refkey: Refkey;
@@ -1,5 +1,6 @@
1
1
  import { childrenArray, For } from "@alloy-js/core";
2
- import { Children, memo } from "@alloy-js/core/jsx-runtime";
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, SourceFile as CoreSourceFile, List } from "@alloy-js/core";
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 {
@@ -1,4 +1,5 @@
1
- import { ComponentContext, createContext, useContext } from "@alloy-js/core";
1
+ import type { ComponentContext } from "@alloy-js/core";
2
+ import { createContext, useContext } from "@alloy-js/core";
2
3
 
3
4
  export interface SectionContext {
4
5
  level: number;
package/temp/api.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.58.8",
4
+ "toolVersion": "7.58.11",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -1,6 +1,7 @@
1
1
  import { List } from "@alloy-js/core";
2
2
  import { d } from "@alloy-js/core/testing";
3
3
  import { expect, it } from "vitest";
4
+
4
5
  import { Code } from "../src/components/Code.jsx";
5
6
  import { mdTest } from "./utils.jsx";
6
7
 
@@ -1,5 +1,6 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { expect, it } from "vitest";
3
+
3
4
  import { Frontmatter } from "../src/components/Frontmatter.jsx";
4
5
  import { mdTest } from "./utils.jsx";
5
6
 
@@ -1,5 +1,6 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { expect, it } from "vitest";
3
+
3
4
  import { List } from "../src/components/List.jsx";
4
5
  import { mdTest } from "./utils.jsx";
5
6
 
@@ -1,5 +1,6 @@
1
1
  import { Prose } from "@alloy-js/core";
2
2
  import { expect, it } from "vitest";
3
+
3
4
  import { Section } from "../src/components/Section.jsx";
4
5
  import { mdTest } from "./utils.jsx";
5
6
 
@@ -1,4 +1,5 @@
1
1
  import { expect, it } from "vitest";
2
+
2
3
  import { Section } from "../src/components/Section.jsx";
3
4
  import { mdTest } from "./utils.jsx";
4
5
 
package/test/utils.tsx CHANGED
@@ -1,4 +1,6 @@
1
- import { Children, Output } from "@alloy-js/core";
1
+ import type { Children } from "@alloy-js/core";
2
+ import { Output } from "@alloy-js/core";
3
+
2
4
  import { SourceFile } from "../src/components/SourceFile.jsx";
3
5
 
4
6
  export function mdTest(children: Children) {
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.8"
8
+ "packageVersion": "7.58.11"
9
9
  }
10
10
  ]
11
11
  }
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"],