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.
- package/dist/{app-BZKg-fe3.js → app-Bf0aLzaG.js} +19 -13
- package/dist/{cli-D5-gYw26.js → cli-CDd4TNg1.js} +14 -12
- package/dist/cli.js +1 -1
- package/dist/client/app/composables/useUrl.d.ts +6 -0
- package/dist/client/app/composables/useUrl.d.ts.map +1 -0
- package/dist/client/app/index.d.ts +5 -0
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +378 -312
- package/dist/client.js +1 -1
- package/dist/{constants-Dq357AVO.js → constants-DJbUAb1-.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-CzF7lqKE.js → init-Bfnl0t1B.js} +3 -3
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts +4 -0
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/shared/utils/content.d.ts.map +1 -1
- package/dist/{shared-BoWAaUci.js → shared-CpPZZ8IH.js} +30 -26
- package/dist/typerighter.css +1 -1
- package/dist/{vite-BrwFwz0T.js → vite-DnP-_NzR.js} +14 -10
- package/dist/vite.js +1 -1
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, o as i, t as a, u as o } from "./app-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, o as i, t as a, u as o } from "./app-Bf0aLzaG.js";
|
|
2
2
|
export { t as Content, a as createTypedownApp, r as useRoute, o as useRouter, n as useSiteConfig, e as useSiteData, i as useTdContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as isUrlExternal, p as isUrlToPage, y as EXTERNAL_URL_RE } from "./shared-
|
|
1
|
+
import { f as isUrlExternal, p as isUrlToPage, y as EXTERNAL_URL_RE } from "./shared-CpPZZ8IH.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import pc from "picocolors";
|
|
4
4
|
import { createLogger } from "vite";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "./vite-
|
|
1
|
+
import { n as e, t } from "./vite-DnP-_NzR.js";
|
|
2
2
|
import "./vite.js";
|
|
3
|
-
import { n, t as r } from "./cli-
|
|
3
|
+
import { n, t as r } from "./cli-CDd4TNg1.js";
|
|
4
4
|
export { n as buildSite, r as cli, t as generateClientAppEntry, e as typedown };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, i as n } from "./constants-
|
|
2
|
-
import "./shared-
|
|
1
|
+
import { a as e, c as t, i as n } from "./constants-DJbUAb1-.js";
|
|
2
|
+
import "./shared-CpPZZ8IH.js";
|
|
3
3
|
import { o as r, r as i } from "./brand-BfamszbH.js";
|
|
4
4
|
import a from "node:path";
|
|
5
5
|
import "node:fs";
|
|
@@ -2299,7 +2299,7 @@ function ei(e) {
|
|
|
2299
2299
|
build: "typerighter build",
|
|
2300
2300
|
preview: "typerighter preview"
|
|
2301
2301
|
},
|
|
2302
|
-
devDependencies: { typerighter: "^0.
|
|
2302
|
+
devDependencies: { typerighter: "^0.7.0" }
|
|
2303
2303
|
}, void 0, 2) + "\n";
|
|
2304
2304
|
}
|
|
2305
2305
|
function ti() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgK3F"}
|
|
@@ -4,10 +4,14 @@ import type { ContentTree } from '@/shared';
|
|
|
4
4
|
export interface ClientAppEntryOptions {
|
|
5
5
|
/** Content directory relative to project root */
|
|
6
6
|
contentDir: string;
|
|
7
|
+
/** URL base path */
|
|
8
|
+
basePath?: string;
|
|
7
9
|
/** Site title */
|
|
8
10
|
siteTitle: string;
|
|
9
11
|
/** Site description */
|
|
10
12
|
siteDescription: string;
|
|
13
|
+
/** Repository URL */
|
|
14
|
+
repo?: string;
|
|
11
15
|
/** Content files as a recursive directory tree */
|
|
12
16
|
contentTree: ContentTree;
|
|
13
17
|
/** Schema definitions keyed by schema name */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,MAAM,EACZ,MAAM,MAAM,CAAC;AAId,OAAO,EACiC,KAAK,UAAU,EACtD,MAAM,eAAe,CAAC;AAuBvB,OAAO,KAAK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AED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CAuQvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/content.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAC/D,MAAM,kBAAkB,CAAC;AAY1B,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,CAqCtE;AAGD,wBAAgB,wBAAwB,CAAE,IAAI,EAAE,eAAe,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/content.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAC/D,MAAM,kBAAkB,CAAC;AAY1B,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,cAAc,EAAE,GAAG,WAAW,CAqCtE;AAGD,wBAAgB,wBAAwB,CAAE,IAAI,EAAE,eAAe,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CA6DtH;AAED,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAI5E;AAGD,wBAAgB,kBAAkB,CAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAa7F"}
|
|
@@ -103,54 +103,58 @@ function w(e) {
|
|
|
103
103
|
children: t.children
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function T(
|
|
107
|
-
let
|
|
108
|
-
function
|
|
106
|
+
function T(t, n) {
|
|
107
|
+
let r = {};
|
|
108
|
+
function i(e) {
|
|
109
109
|
let t = e.items.length;
|
|
110
|
-
for (let n of e.children) t +=
|
|
110
|
+
for (let n of e.children) t += i(n);
|
|
111
111
|
return t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
let r = y(n.filepath);
|
|
117
|
-
return d(n.filepath) === "index" ? r : v(r);
|
|
113
|
+
function a(t, n) {
|
|
114
|
+
let r = t.items.find((t) => d(t.filepath) === e);
|
|
115
|
+
return r ? y(r.filepath) : `${n}/${t.name}/index`;
|
|
118
116
|
}
|
|
119
|
-
function
|
|
120
|
-
for (let
|
|
121
|
-
let e = t ? `${t}/${
|
|
122
|
-
|
|
123
|
-
title: s(
|
|
117
|
+
function o(e, t) {
|
|
118
|
+
for (let n of e) {
|
|
119
|
+
let e = t ? `${t}/${n.name}` : `/${n.name}`;
|
|
120
|
+
r[e] = {
|
|
121
|
+
title: s(n.name),
|
|
124
122
|
url: e,
|
|
125
|
-
subdirectories:
|
|
123
|
+
subdirectories: n.children.map((t) => ({
|
|
126
124
|
name: s(t.name),
|
|
127
|
-
url:
|
|
128
|
-
count:
|
|
125
|
+
url: a(t, e),
|
|
126
|
+
count: i(t)
|
|
129
127
|
})),
|
|
130
|
-
items:
|
|
128
|
+
items: n.items.map((e) => ({
|
|
131
129
|
name: D(e.header, e.filepath),
|
|
132
130
|
url: y(e.filepath)
|
|
133
131
|
}))
|
|
134
|
-
},
|
|
132
|
+
}, o(n.children, e);
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
|
-
return
|
|
138
|
-
title:
|
|
135
|
+
return r["/"] = {
|
|
136
|
+
title: n,
|
|
139
137
|
url: "/",
|
|
140
|
-
subdirectories:
|
|
138
|
+
subdirectories: t.map((e) => ({
|
|
141
139
|
name: s(e.name),
|
|
142
|
-
url:
|
|
143
|
-
count:
|
|
140
|
+
url: a(e, ""),
|
|
141
|
+
count: i(e)
|
|
144
142
|
})),
|
|
145
143
|
items: []
|
|
146
|
-
},
|
|
144
|
+
}, o(t, ""), r;
|
|
147
145
|
}
|
|
148
146
|
function E(e, t) {
|
|
149
147
|
let n = c(l(e));
|
|
150
148
|
return n ? s(n) : t;
|
|
151
149
|
}
|
|
152
150
|
function D(e, t) {
|
|
153
|
-
|
|
151
|
+
if (e._label !== void 0) return String(e._label);
|
|
152
|
+
let n = d(t);
|
|
153
|
+
if (n === "index") {
|
|
154
|
+
let e = c(l(t));
|
|
155
|
+
return e ? s(e) : n;
|
|
156
|
+
}
|
|
157
|
+
return s(n);
|
|
154
158
|
}
|
|
155
159
|
function O(e) {
|
|
156
160
|
e.children.sort((e, t) => {
|