typerighter 0.11.4 → 0.12.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.
- package/dist/{cli-BpVRzZoy.js → cli-Be6WWIHS.js} +9 -9
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +104 -104
- package/dist/index.js +2 -2
- package/dist/{init-maHdUPKV.js → init-Cr4wOumz.js} +4 -5
- package/dist/node/lib/typedown-context.d.ts +0 -1
- package/dist/node/lib/typedown-context.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts +2 -2
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/typerighter.css +1 -1
- package/dist/{vite-ofOi3oqG.js → vite-sjqEapXH.js} +6 -9
- package/dist/vite.js +1 -1
- package/package.json +4 -3
|
@@ -10306,10 +10306,6 @@ var TypedownContext = class {
|
|
|
10306
10306
|
async getConfig() {
|
|
10307
10307
|
return this.cachedConfig ||= await this.rpc.getConfig(), this.cachedConfig;
|
|
10308
10308
|
}
|
|
10309
|
-
async getAssetDir(A) {
|
|
10310
|
-
let j = await this.getConfig();
|
|
10311
|
-
return path.join(path.dirname(A), j.assetsDir.path);
|
|
10312
|
-
}
|
|
10313
10309
|
async getSchema(A) {
|
|
10314
10310
|
let j = this.cachedSchemaMap.get(A);
|
|
10315
10311
|
if (j) return j;
|
|
@@ -10490,7 +10486,7 @@ var COMMON_MIME_TYPES = {
|
|
|
10490
10486
|
ttf: "font/ttf"
|
|
10491
10487
|
};
|
|
10492
10488
|
function generateClientAppEntry(A) {
|
|
10493
|
-
let {
|
|
10489
|
+
let { rootDir: j = "." } = A, M = j === "." ? "/**/*.{td,md}" : `/${j}/**/*.{td,md}`, N = JSON.stringify({
|
|
10494
10490
|
title: A.siteTitle,
|
|
10495
10491
|
description: A.siteDescription,
|
|
10496
10492
|
basePath: A.basePath ?? "/",
|
|
@@ -10594,6 +10590,7 @@ function typedown(A = {}) {
|
|
|
10594
10590
|
]), R = await Promise.all(L.map(async (A) => [A, (await j.getSchema(A)).properties])), z = Object.fromEntries(R), B = buildContentTree(Object.values(I).flat());
|
|
10595
10591
|
return generateClientAppEntry({
|
|
10596
10592
|
...M,
|
|
10593
|
+
rootDir: M.rootDir,
|
|
10597
10594
|
contentTree: B,
|
|
10598
10595
|
schemas: z
|
|
10599
10596
|
});
|
|
@@ -10606,7 +10603,7 @@ function typedown(A = {}) {
|
|
|
10606
10603
|
A && M && (N.addPage(A), invalidateSearchIndex(M));
|
|
10607
10604
|
}).catch(() => {}), j.getConfig().then((j) => {
|
|
10608
10605
|
if (!M) return;
|
|
10609
|
-
let N = normalizePath(resolve(M.config.root, j.
|
|
10606
|
+
let N = normalizePath(resolve(M.config.root, j.rootDir, A)), P = M.moduleGraph.getModulesByFile(N);
|
|
10610
10607
|
if (!P?.size) return;
|
|
10611
10608
|
let F = [...P].map((A) => (M?.moduleGraph.invalidateModule(A), makeHmrUpdate(A)));
|
|
10612
10609
|
M.hot.send({
|
|
@@ -10621,9 +10618,9 @@ function typedown(A = {}) {
|
|
|
10621
10618
|
}), hmrInvalidateAll(M));
|
|
10622
10619
|
}
|
|
10623
10620
|
j.rpc.onContentCreated(I), j.rpc.onContentDeleted(I), j.rpc.onSchemaChanged(() => M && hmrInvalidateAll(M)), j.rpc.onSchemaCreated(() => M && hmrInvalidateAll(M)), j.rpc.onSchemaDeleted(() => M && hmrInvalidateAll(M));
|
|
10624
|
-
let L = "vault
|
|
10621
|
+
let L = "vault";
|
|
10625
10622
|
return j.getConfig().then((A) => {
|
|
10626
|
-
L = A.
|
|
10623
|
+
L = A.rootDir;
|
|
10627
10624
|
}).catch(() => {}), A.middlewares.use((A, j, N) => {
|
|
10628
10625
|
if (!A.url || A.method !== "GET" || j.writableEnded || !M) return N();
|
|
10629
10626
|
let P = A.url.split("?")[0].split("#")[0];
|
|
@@ -10672,7 +10669,7 @@ function typedown(A = {}) {
|
|
|
10672
10669
|
async transform(A, j) {
|
|
10673
10670
|
let M = j.split("?")[0];
|
|
10674
10671
|
if (!isContentFile(M)) return;
|
|
10675
|
-
let N = await F(), P = (await N.getConfig()).
|
|
10672
|
+
let N = await F(), P = (await N.getConfig()).rootDir, I = M.includes(P) ? M.slice(M.indexOf(P) + P.length + 1) : M, { vueSrc: L } = await renderToVueSfc(N, await N.getFile(I), I);
|
|
10676
10673
|
return {
|
|
10677
10674
|
code: L,
|
|
10678
10675
|
map: null
|
package/dist/vite.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./vite-
|
|
1
|
+
import { n as e, t } from "./vite-sjqEapXH.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.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "Typedown: A typed content framework.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"tailwindcss": "^4.3.3",
|
|
86
86
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
87
87
|
"vue": "^3.0.0",
|
|
88
|
-
"@typerighter/rpc-client": "0.
|
|
89
|
-
"@typerighter/rpc-server": "0.
|
|
88
|
+
"@typerighter/rpc-client": "0.12.0",
|
|
89
|
+
"@typerighter/rpc-server": "0.12.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@hdnax/nuclint": "^0.17.4",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"vitest": "^4.1.5"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
|
+
"dev": "vite",
|
|
103
104
|
"build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
104
105
|
"lint": "eslint .",
|
|
105
106
|
"lint:fix": "eslint ./src --fix",
|