typerighter 0.57.4 → 0.57.5
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/dist/{app-BQYETY9F.js → app-DN_CSjCr.js} +21 -21
- package/dist/{cli-MA8-6Usn.js → cli-qLoiInH7.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/app/index.d.ts +1 -1
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +1 -1
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-BND13fc5.js → init-C7wSvwll.js} +1 -1
- package/dist/node/lib/codegen/app-entry.d.ts.map +1 -1
- package/dist/node/plugin/vite/virtual/pages.d.ts.map +1 -1
- package/dist/{vite-l2QQKyhl.js → vite-BW7e5WmY.js} +15 -10
- package/dist/vite.js +1 -1
- package/package.json +3 -3
|
@@ -7749,15 +7749,15 @@ function df() {
|
|
|
7749
7749
|
// src/client/app/index.ts
|
|
7750
7750
|
var ff = Symbol("typedown-site-config"), pf = Symbol("typedown-site-data"), mf = Symbol("typedown-page-loader"), hf = Symbol("typedown-search-index");
|
|
7751
7751
|
async function gf(e, n) {
|
|
7752
|
-
let { theme: i } = e
|
|
7753
|
-
function
|
|
7752
|
+
let { theme: i } = e;
|
|
7753
|
+
function a(e) {
|
|
7754
7754
|
for (let t of h) {
|
|
7755
|
-
let r = e + t;
|
|
7756
|
-
|
|
7755
|
+
let r = n.value.pages[e + t];
|
|
7756
|
+
if (r) return r;
|
|
7757
7757
|
}
|
|
7758
7758
|
}
|
|
7759
|
-
async function
|
|
7760
|
-
let r =
|
|
7759
|
+
async function o(e) {
|
|
7760
|
+
let r = a(e);
|
|
7761
7761
|
if (r) return r();
|
|
7762
7762
|
if (y(e)) {
|
|
7763
7763
|
let r = t(e), i = n.value.directoryListings[r];
|
|
@@ -7779,35 +7779,35 @@ async function gf(e, n) {
|
|
|
7779
7779
|
}
|
|
7780
7780
|
}
|
|
7781
7781
|
typeof document < "u" && e.lang && (document.documentElement.lang = e.lang);
|
|
7782
|
-
let
|
|
7782
|
+
let s = ki(o, {
|
|
7783
7783
|
basePath: e.basePath,
|
|
7784
7784
|
fallbackComponent: i.NotFound
|
|
7785
7785
|
});
|
|
7786
7786
|
q(n, (e, t) => {
|
|
7787
7787
|
if (t.pages === e.pages) return;
|
|
7788
|
-
let n =
|
|
7789
|
-
!i &&
|
|
7788
|
+
let n = s.route.path, i = h.some((e) => t.pages[n + e] !== void 0), o = !!a(n);
|
|
7789
|
+
!i && o ? s.go(n) : i && !o && s.go(r(n));
|
|
7790
7790
|
});
|
|
7791
|
-
let
|
|
7791
|
+
let c = I({
|
|
7792
7792
|
name: "TypedownApp",
|
|
7793
7793
|
setup() {
|
|
7794
|
-
return uf(
|
|
7794
|
+
return uf(s.route), () => pe(i.Layout);
|
|
7795
7795
|
}
|
|
7796
|
-
}),
|
|
7797
|
-
|
|
7798
|
-
let
|
|
7799
|
-
return
|
|
7800
|
-
app:
|
|
7801
|
-
router:
|
|
7796
|
+
}), l = de(c);
|
|
7797
|
+
l.provide(Di, s), l.provide(ff, e), l.provide(pf, n), l.provide(mf, o);
|
|
7798
|
+
let u = ke(n.value.searchIndex);
|
|
7799
|
+
return l.provide(hf, u), l.component("TypedownContent", Fi), l.component("DirectoryIndex", Dd), l.component("GlossaryIndex", Yd), l.component("Flashcard", af), l.component("Grid", sf), l.component("GridCell", cf), l.component("LucideIcon", ws), i.enhanceApp && await i.enhanceApp({
|
|
7800
|
+
app: l,
|
|
7801
|
+
router: s,
|
|
7802
7802
|
siteConfig: e,
|
|
7803
7803
|
siteData: n
|
|
7804
|
-
}), typeof window < "u" && await
|
|
7804
|
+
}), typeof window < "u" && await s.go(location.href, {
|
|
7805
7805
|
replace: !0,
|
|
7806
7806
|
initialLoad: !0
|
|
7807
7807
|
}), {
|
|
7808
|
-
app:
|
|
7809
|
-
router:
|
|
7810
|
-
searchIndex:
|
|
7808
|
+
app: l,
|
|
7809
|
+
router: s,
|
|
7810
|
+
searchIndex: u
|
|
7811
7811
|
};
|
|
7812
7812
|
}
|
|
7813
7813
|
function _f() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as e, t } from "./vite-
|
|
1
|
+
import { s as e, t } from "./vite-BW7e5WmY.js";
|
|
2
2
|
import { n } from "./context-CLKZYp4U.js";
|
|
3
3
|
import r from "node:path";
|
|
4
4
|
import i from "picocolors";
|
|
@@ -370,7 +370,7 @@ function A() {
|
|
|
370
370
|
}), process.on("unhandledRejection", (e) => {
|
|
371
371
|
j("runtime", e instanceof Error ? e : Error(String(e)));
|
|
372
372
|
}), i.command("[root]", "Start dev server").alias("dev").option("--port <port>", "Port to listen on").option("--host", "Expose to network").option("--fresh", "Start fresh, ignore cache from previous session").option("--verbose", "Print version and build info").action(async (e, n) => {
|
|
373
|
-
n.verbose && console.log(`${k} cli v0.57.
|
|
373
|
+
n.verbose && console.log(`${k} cli v0.57.5 (built 11/10/2026, 5:45:36 AM)\n`), n.fresh && (process.env.TYPEDOWN_NO_CACHE = "1");
|
|
374
374
|
let r = await a({
|
|
375
375
|
root: N(e),
|
|
376
376
|
configFile: !1,
|
|
@@ -396,7 +396,7 @@ function A() {
|
|
|
396
396
|
}
|
|
397
397
|
process.exit(0);
|
|
398
398
|
}), i.command("init [root]", "Scaffold a new project").option("--name <name>", "Project name").option("--title <title>", "Site title").option("--description <description>", "Site description").option("--yes", "Skip confirmation for existing projects").action(async (e, t) => {
|
|
399
|
-
let { initialize: n } = await import("./init-
|
|
399
|
+
let { initialize: n } = await import("./init-C7wSvwll.js");
|
|
400
400
|
await n(N(e), t);
|
|
401
401
|
}), i.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
|
|
402
402
|
let r = N(e), i = n(r);
|
|
@@ -435,7 +435,7 @@ function A() {
|
|
|
435
435
|
} finally {
|
|
436
436
|
i.dispose();
|
|
437
437
|
}
|
|
438
|
-
}), i.help(), i.version("0.57.
|
|
438
|
+
}), i.help(), i.version("0.57.5"), i.parse();
|
|
439
439
|
}
|
|
440
440
|
function j(e, t) {
|
|
441
441
|
let n = t instanceof Error ? t.message : String(t);
|
|
@@ -443,7 +443,7 @@ function j(e, t) {
|
|
|
443
443
|
}
|
|
444
444
|
async function M(e) {
|
|
445
445
|
let t = await (await e.getTdContext()).rpc.getVersion();
|
|
446
|
-
console.log(`${k} cli v0.57.
|
|
446
|
+
console.log(`${k} cli v0.57.5 (built 11/10/2026, 5:45:36 AM)`), console.log(`${k} rpc v${t}`), console.log("");
|
|
447
447
|
}
|
|
448
448
|
function N(e) {
|
|
449
449
|
return r.resolve(e ?? process.cwd());
|
package/dist/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as cli } from "./cli-
|
|
1
|
+
export { t as cli } from "./cli-qLoiInH7.js";
|
|
@@ -39,7 +39,7 @@ export interface TypedownSiteConfig {
|
|
|
39
39
|
export interface TypedownSiteData {
|
|
40
40
|
/** Whether the data has been fetched from the server */
|
|
41
41
|
ready: boolean;
|
|
42
|
-
/** Page loaders keyed by
|
|
42
|
+
/** Page loaders keyed by route path (e.g. "/notes/intro.td") */
|
|
43
43
|
pages: Record<string, () => Promise<PageModule>>;
|
|
44
44
|
/** Content files as a recursive directory tree */
|
|
45
45
|
contentTree: ContentTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,GAAG,EACR,KAAK,SAAS,EAEd,KAAK,GAAG,EACR,KAAK,UAAU,EAChB,MAAM,KAAK,CAAC;AAcb,OAAO,EACuB,KAAK,MAAM,EACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EAML,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EAAE,QAAQ,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,GACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,QAAQ,EACR,KAAK,KAAK,GACX,MAAM,0DAA0D,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,IAAI,CAAC,EAAE;QACL,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,mBAAmB;IACnB,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,GAAG,EACR,KAAK,SAAS,EAEd,KAAK,GAAG,EACR,KAAK,UAAU,EAChB,MAAM,KAAK,CAAC;AAcb,OAAO,EACuB,KAAK,MAAM,EACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EAML,KAAK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AM;IACf,0BAA0B;WACnB,MAAM;IACb,wBAAwB;WACjB;QACL,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd;IACD,kBAAkB;aACT,MAAM;IACf,mBAAmB;cACT,MAAM;IAChB,qGAAqG;cAC3F,MAAM;IAChB,uBAAuB;UACjB;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE;IACH,mBAAmB;WACZ,aAAa;EA+MrB;AAYD,wBAAgB,WAAW,IAAK,GAAG,CAAC,gBAAgB,CAAC,CAEpD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as e, l as t, n, o as r, r as i, s as a, t as o } from "../useSidebarConfig-0kMemgUS.js";
|
|
2
|
-
import { S as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, l as g, m as _, o as v, p as y, s as b, u as x, v as S, x as C, y as w } from "../app-
|
|
2
|
+
import { S as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, l as g, m as _, o as v, p as y, s as b, u as x, v as S, x as C, y as w } from "../app-DN_CSjCr.js";
|
|
3
3
|
export { o as SIDEBAR_COLLAPSED_WIDTH, n as SIDEBAR_DEFAULT_WIDTH, i as SIDEBAR_MAX_WIDTH, e as SIDEBAR_MIN_WIDTH, s as TdBrandIcon, w as TdContentNav, b as TdDirectoryIndex, S as TdFooter, v as TdGlossaryIndex, u as TdKbdShortcut, C as TdKeyName, g as TdLayout, d as TdNotFound, _ as TdPreviousNext, p as TdRail, f as TdThemeToggle, y as TdToc, l as default, h as isTypingTarget, a as useClientPreferences, x as useCopyCode, m as useGlobalHotkey, c as useLocalHotkeys, r as useSidebarConfig, t as useTheme };
|
package/dist/client.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { l as e } from "./useSidebarConfig-0kMemgUS.js";
|
|
2
|
-
import { C as t, T as n, i as r, n as i, r as a, t as o, w as s } from "./app-
|
|
2
|
+
import { C as t, T as n, i as r, n as i, r as a, t as o, w as s } from "./app-DN_CSjCr.js";
|
|
3
3
|
export { t as Content, o as createTypedownApp, s as useRoute, n as useRouter, i as useSiteConfig, a as useSiteData, r as useTdContent, e as useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-
|
|
2
|
-
import { t as s } from "./cli-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-BW7e5WmY.js";
|
|
2
|
+
import { t as s } from "./cli-qLoiInH7.js";
|
|
3
3
|
export { n as PAGES_ID, i as PAGE_DATA_EVENT, t as SEARCH_INDEX_ID, e as SITE_DATA_ID, r as THEME_ID, a as buildSite, s as cli, o as typedown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-entry.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/app-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE;QACL,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,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,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAgB,gBAAgB,CAAE,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,GAAG,MAAM,CA4EzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAKd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAKrC,qBAAa,YAAa,YAAW,aAAa;IAEnC,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,MAAW;IAE9C,IAAI,CAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAKd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAKrC,qBAAa,YAAa,YAAW,aAAa;IAEnC,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,MAAW;IAE9C,IAAI,CAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAmBtD,eAAe,CAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMhD,gBAAgB,CAAE,UAAU,EAAE,MAAM,GAAG,OAAO;IAIxC,YAAY,CAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAQlF,kBAAkB,CAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKlE,YAAY,CAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAmBtF,UAAU,CAAE,MAAM,EAAE,aAAa,GAAG,IAAI;CAGzC"}
|
|
@@ -196,7 +196,7 @@ async function Ne(e) {
|
|
|
196
196
|
}
|
|
197
197
|
// src/node/lib/codegen/app-entry.ts
|
|
198
198
|
function Pe(e, t) {
|
|
199
|
-
let { rootDir: n = ".",
|
|
199
|
+
let { rootDir: n = ".", userComponents: r = [] } = e, i = r.map((e) => `import ${e.name} from ${JSON.stringify(e.absolutePath)};`).join("\n"), a = r.map((e) => `app.component(${JSON.stringify(e.name)}, ${e.name});`).join("\n"), o = JSON.stringify({
|
|
200
200
|
title: e.siteTitle,
|
|
201
201
|
description: e.siteDescription,
|
|
202
202
|
basePath: e.basePath ?? "/",
|
|
@@ -209,7 +209,7 @@ function Pe(e, t) {
|
|
|
209
209
|
nav: e.nav
|
|
210
210
|
});
|
|
211
211
|
return `
|
|
212
|
-
${[
|
|
212
|
+
${[i, "import 'typerighter/style.css';"].filter(Boolean).join("\n")}
|
|
213
213
|
import 'typerighter/fonts.css';
|
|
214
214
|
import('typerighter/math.css');
|
|
215
215
|
import { createTypedownApp } from 'typerighter/client';
|
|
@@ -220,8 +220,8 @@ import { pages as initialPages } from '${t.pages}';
|
|
|
220
220
|
import initialSiteData from '${t.siteData}';
|
|
221
221
|
|
|
222
222
|
const siteData = shallowRef({ ...initialSiteData, pages: initialPages });
|
|
223
|
-
const { app, router, searchIndex: searchIndexRef } = await createTypedownApp({ ...${
|
|
224
|
-
${
|
|
223
|
+
const { app, router, searchIndex: searchIndexRef } = await createTypedownApp({ ...${o}, theme }, siteData);
|
|
224
|
+
${a}
|
|
225
225
|
app.mount('#app');
|
|
226
226
|
|
|
227
227
|
// Load search index in the background after the app is mounted
|
|
@@ -243,9 +243,8 @@ if (import.meta.hot) {
|
|
|
243
243
|
|
|
244
244
|
// Update route.data directly when content changes - Vue SFC setup only re-runs on script block changes
|
|
245
245
|
import.meta.hot.on('${t.pageDataEvent}', ({ filepath, pageData }) => {
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
if (eventBase === routeBase) {
|
|
246
|
+
const eventRoute = '/' + path.stripExtension(filepath);
|
|
247
|
+
if (eventRoute === router.route.path) {
|
|
249
248
|
router.route.data = pageData;
|
|
250
249
|
}
|
|
251
250
|
});
|
|
@@ -521,7 +520,8 @@ import { shallowRef } from 'vue';
|
|
|
521
520
|
import theme from ${JSON.stringify(e.themeModulePath)};
|
|
522
521
|
|
|
523
522
|
const rawPages = import.meta.glob('${t}', { eager: true });
|
|
524
|
-
const
|
|
523
|
+
const prefix = '/${e.rootDir}';
|
|
524
|
+
const pages = Object.fromEntries(Object.entries(rawPages).map(([k, v]) => [k.slice(prefix.length), () => Promise.resolve(v)]));
|
|
525
525
|
const siteData = shallowRef({ ...${o}, pages });
|
|
526
526
|
|
|
527
527
|
export async function createRenderer() {
|
|
@@ -1161,8 +1161,13 @@ var Bt = class {
|
|
|
1161
1161
|
this.mountPath = e;
|
|
1162
1162
|
}
|
|
1163
1163
|
async load(e) {
|
|
1164
|
-
let t = (await e.getConfig()).rootDir ?? ".", n = [this.mountPath, t === "." ? "" : t].filter(Boolean);
|
|
1165
|
-
return
|
|
1164
|
+
let t = (await e.getConfig()).rootDir ?? ".", n = [this.mountPath, t === "." ? "" : t].filter(Boolean), r = 0 < n.length ? "/" + n.join("/") : "";
|
|
1165
|
+
return [
|
|
1166
|
+
`const raw = import.meta.glob('${r ? `${r}/**/*.{td,md}` : "/**/*.{td,md}"}');`,
|
|
1167
|
+
"export const pages = Object.fromEntries(",
|
|
1168
|
+
` Object.entries(raw).map(([k, v]) => [k.slice(${r.length}), v])`,
|
|
1169
|
+
");"
|
|
1170
|
+
].join("\n");
|
|
1166
1171
|
}
|
|
1167
1172
|
resolvePageData(e) {
|
|
1168
1173
|
if (e.startsWith("@typedown/pages?resource=")) return "\0" + e;
|
package/dist/vite.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PAGES_ID, r as PAGE_DATA_EVENT, i as SEARCH_INDEX_ID, a as SITE_DATA_ID, o as THEME_ID, t as typedown } from "./vite-
|
|
1
|
+
export { n as PAGES_ID, r as PAGE_DATA_EVENT, i as SEARCH_INDEX_ID, a as SITE_DATA_ID, o as THEME_ID, t as typedown } from "./vite-BW7e5WmY.js";
|
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.57.
|
|
4
|
+
"version": "0.57.5",
|
|
5
5
|
"description": "Typedown: A typed content framework.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@lucide/vue": "^1.47.0",
|
|
62
62
|
"@shikijs/transformers": "^4.4.3",
|
|
63
63
|
"@tailwindcss/vite": "^4.3.3",
|
|
64
|
-
"@typerighter/rpc-client": "0.57.
|
|
65
|
-
"@typerighter/rpc-server": "0.57.
|
|
64
|
+
"@typerighter/rpc-client": "0.57.5",
|
|
65
|
+
"@typerighter/rpc-server": "0.57.5",
|
|
66
66
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
67
67
|
"cac": "^7.1.0",
|
|
68
68
|
"picocolors": "^1.1.1",
|