typerighter 0.6.0 → 0.7.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.

Potentially problematic release.


This version of typerighter might be problematic. Click here for more details.

@@ -1,5 +1,5 @@
1
- import { i as e, n as t, o as n, r, s as i, t as a } from "./constants-Dq357AVO.js";
2
- import { C as o, S as s, a as c, b as l, g as u, h as d, i as f, o as p, s as m, u as h, w as g } from "./shared-BoWAaUci.js";
1
+ import { i as e, n as t, o as n, r, s as i, t as a } from "./constants-DJbUAb1-.js";
2
+ import { C as o, S as s, a as c, b as l, g as u, h as d, i as f, o as p, s as m, u as h, w as g } from "./shared-CpPZZ8IH.js";
3
3
  import { o as _, r as v, s as y } from "./brand-BfamszbH.js";
4
4
  import { t as b } from "./es-ClqUVRJn.js";
5
5
  import { resolve as x } from "node:path";
@@ -108,7 +108,9 @@ function P() {
108
108
  function F(e) {
109
109
  let { contentDir: t } = e, n = `/${t}/**/*.{td,md}`, i = JSON.stringify({
110
110
  title: e.siteTitle,
111
- description: e.siteDescription
111
+ description: e.siteDescription,
112
+ basePath: e.basePath ?? "/",
113
+ repo: e.repo
112
114
  }), a = c(e.contentTree.children, e.siteTitle), o = JSON.stringify({
113
115
  contentTree: e.contentTree,
114
116
  schemas: e.schemas ?? {},
@@ -130,8 +132,6 @@ function findPage(base) {
130
132
  for (const ext of contentExts) {
131
133
  const key = base + ext;
132
134
  if (pages[key]) return pages[key];
133
- const indexKey = base + '/index' + ext;
134
- if (pages[indexKey]) return pages[indexKey];
135
135
  }
136
136
  }
137
137
 
@@ -140,11 +140,15 @@ async function loadPageModule(pagePath) {
140
140
  const loader = findPage(base);
141
141
  if (loader) return loader();
142
142
 
143
- const dir = siteData.directoryListings[pagePath] || siteData.directoryListings[pagePath + '/'];
144
- if (dir) return {
145
- default: { name: 'DirectoryIndex', render() { return h(TdDirectoryIndex); } },
146
- __pageData: { frontmatter: {}, headings: [], title: dir.title },
147
- };
143
+ // Only /xxx/index paths get the directory listing fallback
144
+ if (pagePath.endsWith('/index')) {
145
+ const dirPath = pagePath.slice(0, -'/index'.length) || '/';
146
+ const dir = siteData.directoryListings[dirPath] || siteData.directoryListings[dirPath + '/'];
147
+ if (dir) return {
148
+ default: { name: 'DirectoryIndex', render() { return h(TdDirectoryIndex); } },
149
+ __pageData: { frontmatter: {}, headings: [], title: dir.title },
150
+ };
151
+ }
148
152
 
149
153
  return undefined;
150
154
  }
package/dist/vite.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./vite-BrwFwz0T.js";
1
+ import { n as e, t } from "./vite-DnP-_NzR.js";
2
2
  export { t as generateClientAppEntry, e as typedown };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "typerighter",
4
- "version": "0.6.0",
4
+ "version": "0.7.0",
5
5
  "description": "Typedown: A typed content framework.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -81,8 +81,8 @@
81
81
  "tailwindcss": "^4.3.3",
82
82
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
83
83
  "vue": "^3.0.0",
84
- "@typerighter/rpc-client": "0.6.0",
85
- "@typerighter/rpc-server": "0.6.0"
84
+ "@typerighter/rpc-client": "0.7.0",
85
+ "@typerighter/rpc-server": "0.7.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@hdnax/nuclint": "^0.17.4",