starlight-fsharp-oracle 0.1.2 → 0.2.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.
@@ -40,7 +40,7 @@ export function FSharp_Oracle_Schema_TextNode__TextNode_get_Html(this$) {
40
40
  case 11:
41
41
  return wrapInKeyword(",");
42
42
  case 9:
43
- return " ";
43
+ return " ‌";
44
44
  case 17:
45
45
  return wrapInKeyword(">");
46
46
  case 16:
package/dist/Plugin.js CHANGED
@@ -58,7 +58,8 @@ function starlightFSharpDoc(pluginOptions) {
58
58
  });
59
59
  return createRenderer({}).then((_arg) => {
60
60
  let matchValue, matchValue_1, msg;
61
- const themesCss = generateCss(_arg);
61
+ const layerOrder = "@layer starlight.base, starlight.reset, starlight.core, starlight.content, starlight.components, starlight.utils;\n";
62
+ const themesCss = layerOrder + generateCss(_arg);
62
63
  const outputBase = defaultArg(pluginOptions.output, "api");
63
64
  const root = runExtractor(logger, outputBase, toList(pluginOptions.assemblies));
64
65
  const modules = collect((_arg_1) => _arg_1.Modules, root.Assemblies);
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { isEmpty } from "../fable_modules/fable-library-js.5.0.0-rc.7/List.js";
3
- import { tocH3, renderObsoleteBanner, escapeMdxInline, obsoleteInlineHtml, h2 } from "./Primitives.js";
3
+ import { tocH3, inlineSignatureHtml, renderObsoleteBanner, escapeMdxInline, obsoleteInlineHtml, h2 } from "./Primitives.js";
4
4
  import { System_Text_StringBuilder__StringBuilder_Write_Z721C83C5, System_Text_StringBuilder__StringBuilder_NewLine, System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5 } from "../Extensions/StringBuilder.js";
5
5
  import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.5.0.0-rc.7/Util.js";
6
6
  import { concat } from "../fable_modules/fable-library-js.5.0.0-rc.7/String.js";
@@ -45,9 +45,8 @@ export function renderEntityPage(htmlLinkGen, entity, parentModule) {
45
45
  System_Text_StringBuilder__StringBuilder_NewLine(sb);
46
46
  renderObsoleteBanner(sb, Entity__get_ObsoleteInfo(entity));
47
47
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, "<div class=\"not-content\">");
48
- System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, "<div class=\"fsharp-doc-sig\">");
49
- System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, FSharp_Oracle_Schema_TextNode__TextNode_get_Html(Entity__get_Declaration(entity)));
50
- System_Text_StringBuilder__StringBuilder_NewLine(sb);
48
+ System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, "<div class=\"fsharp-doc-sig\">");
49
+ System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, inlineSignatureHtml(FSharp_Oracle_Schema_TextNode__TextNode_get_Html(Entity__get_Declaration(entity))));
51
50
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, "</div>");
52
51
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, "</div>");
53
52
  System_Text_StringBuilder__StringBuilder_NewLine(sb);
@@ -15,14 +15,21 @@ export function escapeMdxText(text) {
15
15
  }
16
16
 
17
17
  /**
18
- * Escape text destined for an inline element such as `<dd>`. A blank line in
19
- * the source would be parsed by MDX as a paragraph break and close the
20
- * element early, so all whitespace runs are collapsed to single spaces first.
18
+ * Collapse whitespace runs before escaping, so a blank line can't be read as
19
+ * a paragraph break that closes an inline element like `<dd>` early.
21
20
  */
22
21
  export function escapeMdxInline(text) {
23
22
  return escapeMdxText(replace_1(text, "\\s+", " ").trim());
24
23
  }
25
24
 
25
+ /**
26
+ * MDX reflows multi-line raw HTML as a markdown paragraph, collapsing layout.
27
+ * Convert newlines to <br/> so the signature block renders verbatim.
28
+ */
29
+ export function inlineSignatureHtml(html) {
30
+ return replace(html, "\n", "<br/>");
31
+ }
32
+
26
33
  export function h2(sb, toc, slug, text) {
27
34
  void (toc.push(new TocEntry(2, slug, text)));
28
35
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, `<h2 id="${slug}">${text}</h2>`);
@@ -37,7 +44,7 @@ export function renderDocEntry(sb, name, signatureHtml, obsoleteInfo, renderDocu
37
44
  const patternInput = (obsoleteInfo.tag === 1) ? [" obsolete", ""] : ((obsoleteInfo.tag === 2) ? [" obsolete", concat(" obsoleteMessage=\"", replace(obsoleteInfo.fields[0], "\"", "&quot;"), ..."\"")] : ["", ""]);
38
45
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, `<DocEntry name="${name}"${patternInput[0]}${patternInput[1]}>`);
39
46
  System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, "<div class=\"fsharp-doc-sig\" slot=\"signature\">");
40
- System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, signatureHtml);
47
+ System_Text_StringBuilder__StringBuilder_Write_Z721C83C5(sb, inlineSignatureHtml(signatureHtml));
41
48
  System_Text_StringBuilder__StringBuilder_WriteLine_Z721C83C5(sb, "</div>");
42
49
  System_Text_StringBuilder__StringBuilder_NewLine(sb);
43
50
  renderDocumentation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-fsharp-oracle",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dist/Plugin.js",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@hideoo/tsconfig": "^2.0.3",
30
- "@types/node": "^25.6.0",
31
- "astro-expressive-code": "^0.41.7",
32
- "typescript": "^5.8.0"
30
+ "@types/node": "^26.1.1",
31
+ "astro-expressive-code": "^0.44.1",
32
+ "typescript": "^7.0.2"
33
33
  },
34
34
  "scripts": {
35
35
  "postinstall": "dotnet publish packages/FSharp.Oracle/FSharp.Oracle.fsproj -c Release --nologo -o oracle-bin"
@@ -10,7 +10,7 @@ open System.Reflection
10
10
  [<assembly: System.Reflection.AssemblyCompanyAttribute("Maxime Mangel")>]
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
12
12
  [<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
13
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f31138d32fcf52eeae38e3ddc3a7f7d85a4b2282")>]
13
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9cf322dca5c1f2a47e07d303280038721094e741")>]
14
14
  [<assembly: System.Reflection.AssemblyProductAttribute("Oracle")>]
15
15
  [<assembly: System.Reflection.AssemblyTitleAttribute("Oracle")>]
16
16
  [<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
@@ -10,7 +10,7 @@ open System.Reflection
10
10
  [<assembly: System.Reflection.AssemblyCompanyAttribute("Maxime Mangel")>]
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Release")>]
12
12
  [<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
13
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1b716c695b7f73a88a6ebd13af6637880f9c0325")>]
13
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7bfb354a69169aaa8967d3a82c2709db0ffc2d75")>]
14
14
  [<assembly: System.Reflection.AssemblyProductAttribute("Oracle")>]
15
15
  [<assembly: System.Reflection.AssemblyTitleAttribute("Oracle")>]
16
16
  [<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
@@ -10,7 +10,7 @@ open System.Reflection
10
10
  [<assembly: System.Reflection.AssemblyCompanyAttribute("Maxime Mangel")>]
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
12
12
  [<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
13
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f31138d32fcf52eeae38e3ddc3a7f7d85a4b2282")>]
13
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7bfb354a69169aaa8967d3a82c2709db0ffc2d75")>]
14
14
  [<assembly: System.Reflection.AssemblyProductAttribute("FSharp.Oracle.Schema")>]
15
15
  [<assembly: System.Reflection.AssemblyTitleAttribute("FSharp.Oracle.Schema")>]
16
16
  [<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
@@ -10,7 +10,7 @@ open System.Reflection
10
10
  [<assembly: System.Reflection.AssemblyCompanyAttribute("Maxime Mangel")>]
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Release")>]
12
12
  [<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
13
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+004b2222784b8ccac32bf46e91832b4f92d55505")>]
13
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7bfb354a69169aaa8967d3a82c2709db0ffc2d75")>]
14
14
  [<assembly: System.Reflection.AssemblyProductAttribute("FSharp.Oracle.Schema")>]
15
15
  [<assembly: System.Reflection.AssemblyTitleAttribute("FSharp.Oracle.Schema")>]
16
16
  [<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]