typerighter 0.3.0 → 0.4.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.
Files changed (91) hide show
  1. package/dist/app-Bw90hv7G.js +266 -0
  2. package/dist/brand-BtMsUv5o.js +201 -0
  3. package/dist/{cli-CoyGXgR1.js → cli-s44ly0MH.js} +233 -172
  4. package/dist/cli.js +1 -1
  5. package/dist/client/app/index.d.ts +12 -4
  6. package/dist/client/app/index.d.ts.map +1 -1
  7. package/dist/client/app/router.d.ts.map +1 -1
  8. package/dist/client/theme-default.js +707 -149
  9. package/dist/client.js +2 -2
  10. package/dist/constants-E2UATqMm.js +32183 -0
  11. package/dist/es-ClqUVRJn.js +705 -0
  12. package/dist/index.js +4 -4
  13. package/dist/{init-CUo89E7j.js → init-0hKcjQtf.js} +10 -12
  14. package/dist/node/build/index.d.ts.map +1 -1
  15. package/dist/node/lib/markdown/index.d.ts.map +1 -1
  16. package/dist/node/lib/markdown/plugins/callout-container.d.ts +4 -0
  17. package/dist/node/lib/markdown/plugins/callout-container.d.ts.map +1 -0
  18. package/dist/node/lib/markdown/plugins/custom-container.d.ts +3 -0
  19. package/dist/node/lib/markdown/plugins/custom-container.d.ts.map +1 -0
  20. package/dist/node/lib/markdown/plugins/{highlight.d.ts → highlight/index.d.ts} +1 -1
  21. package/dist/node/lib/markdown/plugins/highlight/index.d.ts.map +1 -0
  22. package/dist/node/lib/markdown/plugins/highlight/language.d.ts +3 -0
  23. package/dist/node/lib/markdown/plugins/highlight/language.d.ts.map +1 -0
  24. package/dist/node/lib/progress.d.ts.map +1 -1
  25. package/dist/node/lib/render/vue.d.ts +2 -2
  26. package/dist/node/lib/render/vue.d.ts.map +1 -1
  27. package/dist/node/lib/typedown-context.d.ts +4 -4
  28. package/dist/node/lib/typedown-context.d.ts.map +1 -1
  29. package/dist/node/plugin/vite/constants.d.ts +2 -1
  30. package/dist/node/plugin/vite/constants.d.ts.map +1 -1
  31. package/dist/node/plugin/vite/index.d.ts +15 -1
  32. package/dist/node/plugin/vite/index.d.ts.map +1 -1
  33. package/dist/node/plugin/vite/search.d.ts +15 -0
  34. package/dist/node/plugin/vite/search.d.ts.map +1 -0
  35. package/dist/shared/constants.d.ts +6 -0
  36. package/dist/shared/constants.d.ts.map +1 -0
  37. package/dist/shared/index.d.ts +1 -0
  38. package/dist/shared/index.d.ts.map +1 -1
  39. package/dist/shared/types/content.d.ts +54 -4
  40. package/dist/shared/types/content.d.ts.map +1 -1
  41. package/dist/shared/types/ssg.d.ts +3 -1
  42. package/dist/shared/types/ssg.d.ts.map +1 -1
  43. package/dist/shared/utils/content.d.ts +5 -5
  44. package/dist/shared/utils/content.d.ts.map +1 -1
  45. package/dist/shared/utils/debounce.d.ts +2 -0
  46. package/dist/shared/utils/debounce.d.ts.map +1 -0
  47. package/dist/shared/utils/format.d.ts +5 -1
  48. package/dist/shared/utils/format.d.ts.map +1 -1
  49. package/dist/shared/utils/html.d.ts +1 -0
  50. package/dist/shared/utils/html.d.ts.map +1 -1
  51. package/dist/shared/utils/index.d.ts +6 -4
  52. package/dist/shared/utils/index.d.ts.map +1 -1
  53. package/dist/shared/utils/path.d.ts +8 -0
  54. package/dist/shared/utils/path.d.ts.map +1 -0
  55. package/dist/shared/utils/regex.d.ts +2 -0
  56. package/dist/shared/utils/regex.d.ts.map +1 -0
  57. package/dist/shared/utils/time.d.ts +6 -0
  58. package/dist/shared/utils/time.d.ts.map +1 -0
  59. package/dist/shared/utils/url.d.ts +6 -2
  60. package/dist/shared/utils/url.d.ts.map +1 -1
  61. package/dist/typerighter.css +1 -1
  62. package/dist/vite-nzhkELg7.js +309 -0
  63. package/dist/vite.js +2 -3
  64. package/package.json +9 -5
  65. package/dist/app-CM3biamr.js +0 -184
  66. package/dist/brand-CeSqpEQ2.js +0 -4
  67. package/dist/chunk-DfAF0w94-EwUSVR-h.js +0 -13
  68. package/dist/constants-B7b8AsH0.js +0 -9530
  69. package/dist/content-BM3UKxcc.js +0 -16
  70. package/dist/lib-CBtriEt5-Ch50D04V.js +0 -3309
  71. package/dist/liteDOM-Cp0aN3bP-YwW1TGWI.js +0 -741
  72. package/dist/node/lib/markdown/plugins/container.d.ts +0 -3
  73. package/dist/node/lib/markdown/plugins/container.d.ts.map +0 -1
  74. package/dist/node/lib/markdown/plugins/highlight.d.ts.map +0 -1
  75. package/dist/node/plugin/vite/codegen.d.ts +0 -27
  76. package/dist/node/plugin/vite/codegen.d.ts.map +0 -1
  77. package/dist/node/plugin/vite/codegen.test.d.ts +0 -2
  78. package/dist/node/plugin/vite/codegen.test.d.ts.map +0 -1
  79. package/dist/plugin-D2xuSVM4.js +0 -1
  80. package/dist/rolldown-runtime-Dqa2HsxW.js +0 -20
  81. package/dist/shared/utils/environment.d.ts +0 -2
  82. package/dist/shared/utils/environment.d.ts.map +0 -1
  83. package/dist/shared/utils/highlight.d.ts +0 -3
  84. package/dist/shared/utils/highlight.d.ts.map +0 -1
  85. package/dist/shared/utils/html.test.d.ts +0 -2
  86. package/dist/shared/utils/html.test.d.ts.map +0 -1
  87. package/dist/shared-DzTfF-_d.js +0 -14
  88. package/dist/tex-svg-full-BI3fonbT-CfoPQ3xc.js +0 -60224
  89. package/dist/vite-BxXQPieu.js +0 -228
  90. package/dist/wgxpath.install-node-Csk64Aj9-C0enUGLs.js +0 -1094
  91. package/dist/xypic-DrMJn58R-B4fw2rYo.js +0 -14846
@@ -1,9 +1,7 @@
1
- import { t as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import "./shared-DzTfF-_d.js";
3
- import { i as t, n, s as r } from "./constants-B7b8AsH0.js";
4
- import { r as i } from "./brand-CeSqpEQ2.js";
5
- import "node:fs";
1
+ import { a as e, c as t, i as n } from "./constants-E2UATqMm.js";
2
+ import { l as r, r as i } from "./brand-BtMsUv5o.js";
6
3
  import a from "node:path";
4
+ import "node:fs";
7
5
  import o from "node:fs/promises";
8
6
  import { styleText as s } from "node:util";
9
7
  import c, { stdin as l, stdout as u } from "node:process";
@@ -1674,7 +1672,7 @@ function ur(e, t, n) {
1674
1672
  }
1675
1673
  //#endregion
1676
1674
  //#region ../../node_modules/.pnpm/@clack+core@1.4.3/node_modules/@clack/core/dist/index.mjs
1677
- var q = (/* @__PURE__ */ e(((e, t) => {
1675
+ var q = (/* @__PURE__ */ t(((e, t) => {
1678
1676
  var n = "\x1B", r = `${n}[`, i = "\x07", a = {
1679
1677
  to(e, t) {
1680
1678
  return t ? `${r}${t + 1};${e + 1}H` : `${r}${e + 1}G`;
@@ -2245,22 +2243,22 @@ async function Zr() {
2245
2243
  });
2246
2244
  (hr(e) || e === "cancel") && (Hr("Cancelled."), process.exit(0));
2247
2245
  }
2248
- async function Qr(e) {
2246
+ async function Qr(t) {
2249
2247
  let n = {
2250
2248
  hasPackageJson: !1,
2251
2249
  hasTypedownYaml: !1,
2252
2250
  packageName: void 0,
2253
2251
  siteTitle: void 0,
2254
2252
  siteDescription: void 0
2255
- }, r = a.join(e, "package.json");
2253
+ }, r = a.join(t, "package.json");
2256
2254
  try {
2257
2255
  let e = await o.readFile(r, "utf-8"), t = JSON.parse(e);
2258
2256
  n.hasPackageJson = !0, typeof t.name == "string" && 0 < t.name.length && (n.packageName = t.name);
2259
2257
  } catch {}
2260
- for (let r of t) try {
2261
- let t = Nn(await o.readFile(a.join(e, r), "utf-8"));
2258
+ for (let r of e) try {
2259
+ let e = Nn(await o.readFile(a.join(t, r), "utf-8"));
2262
2260
  n.hasTypedownYaml = !0;
2263
- let i = t?.site;
2261
+ let i = e?.site;
2264
2262
  typeof i?.title == "string" && (n.siteTitle = i.title), typeof i?.description == "string" && (n.siteDescription = i.description);
2265
2263
  break;
2266
2264
  } catch {}
@@ -2300,7 +2298,7 @@ function ei(e) {
2300
2298
  build: "typerighter build",
2301
2299
  preview: "typerighter preview"
2302
2300
  },
2303
- devDependencies: { typerighter: "^0.3.0" }
2301
+ devDependencies: { typerighter: "^0.4.0" }
2304
2302
  }, void 0, 2) + "\n";
2305
2303
  }
2306
2304
  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;AAad,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,CAgJ3F"}
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,CA+J3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/markdown/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,YAAY,EACb,MAAM,yBAAyB,CAAC;AA2BjC,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CA4G3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/markdown/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EACV,YAAY,EACb,MAAM,yBAAyB,CAAC;AA8BjC,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAmH3B"}
@@ -0,0 +1,4 @@
1
+ import type { MarkdownItAsync } from 'markdown-it-async';
2
+ export declare function calloutContainerPlugin(md: MarkdownItAsync): void;
3
+ export declare const DEFAULT_TITLES: Record<string, string>;
4
+ //# sourceMappingURL=callout-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callout-container.d.ts","sourceRoot":"","sources":["../../../../../src/node/lib/markdown/plugins/callout-container.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAK3B,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,eAAe,GAClB,IAAI,CAQN;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CASjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MarkdownItAsync } from 'markdown-it-async';
2
+ export declare function componentContainerPlugin(md: MarkdownItAsync): void;
3
+ //# sourceMappingURL=custom-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-container.d.ts","sourceRoot":"","sources":["../../../../../src/node/lib/markdown/plugins/custom-container.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,mBAAmB,CAAC;AA8B3B,wBAAgB,wBAAwB,CAAE,EAAE,EAAE,eAAe,GAAG,IAAI,CA8LnE"}
@@ -1,2 +1,2 @@
1
1
  export declare function createHighlighter(): Promise<(string_: string, language: string, attrs: string) => Promise<string>>;
2
- //# sourceMappingURL=highlight.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/node/lib/markdown/plugins/highlight/index.ts"],"names":[],"mappings":"AAqCA,wBAAsB,iBAAiB,IAAK,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAuIzH"}
@@ -0,0 +1,3 @@
1
+ export declare function isShellLanguage(language: string): boolean;
2
+ export declare function extractLanguage(info: string): string;
3
+ //# sourceMappingURL=language.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../../../src/node/lib/markdown/plugins/highlight/language.ts"],"names":[],"mappings":"AASA,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE1D;AAKD,wBAAgB,eAAe,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/node/lib/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACT,MAAM,UAAU,CAAC;AAKlB,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAS;gBAET,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;IAO5C,MAAM,CAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQtC,IAAI,CAAE,OAAO,EAAE,MAAM;CAStB"}
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/node/lib/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAS;gBAET,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;IAO5C,MAAM,CAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQtC,IAAI,CAAE,OAAO,EAAE,MAAM;CAStB"}
@@ -1,5 +1,5 @@
1
1
  import type { TdBuiltResource } from '@typerighter/rpc-client';
2
- import type { MarkdownRenderer } from '../markdown';
2
+ import type { TypedownContext } from '../typedown-context';
3
3
  import type { PageData } from '@/shared';
4
4
  export interface VueRenderResult {
5
5
  /** The rendered Vue SFC string */
@@ -7,5 +7,5 @@ export interface VueRenderResult {
7
7
  /** Page metadata */
8
8
  pageData: PageData;
9
9
  }
10
- export declare function renderToVueSfc(md: MarkdownRenderer, resource: TdBuiltResource, filePath: string): Promise<VueRenderResult>;
10
+ export declare function renderToVueSfc(context: TypedownContext, resource: TdBuiltResource, filepath: string): Promise<VueRenderResult>;
11
11
  //# sourceMappingURL=vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/render/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEV,QAAQ,EACT,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAGD,wBAAsB,cAAc,CAClC,EAAE,EAAE,gBAAgB,EACpB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAkC1B"}
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/render/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAEV,QAAQ,EACT,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAGD,wBAAsB,cAAc,CAClC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
@@ -1,6 +1,6 @@
1
1
  import type { RpcClient, TdBuiltResource, TdSiteConfig, TdSchemaInfo } from '@typerighter/rpc-client';
2
2
  import { type MarkdownRenderer } from './markdown';
3
- import type { SidebarGroups } from '@/shared';
3
+ import type { SchemaGroups } from '@/shared';
4
4
  export declare class TypedownContext {
5
5
  private client;
6
6
  private _md;
@@ -14,12 +14,12 @@ export declare class TypedownContext {
14
14
  private configVersion;
15
15
  private registerNotificationHandlers;
16
16
  get rpc(): RpcClient;
17
- getFile(filePath: string): Promise<TdBuiltResource>;
17
+ getFile(filepath: string): Promise<TdBuiltResource>;
18
18
  getFiles(paths: string[]): Promise<TdBuiltResource[]>;
19
19
  listFiles(): Promise<string[]>;
20
- listFilesGroupedBySchema(): Promise<SidebarGroups>;
20
+ listFilesGroupedBySchema(): Promise<SchemaGroups>;
21
21
  getConfig(): Promise<TdSiteConfig>;
22
- getAssetDir(filePath: string): Promise<string>;
22
+ getAssetDir(filepath: string): Promise<string>;
23
23
  getSchema(schema: string): Promise<TdSchemaInfo>;
24
24
  listSchemas(): Promise<string[]>;
25
25
  get md(): MarkdownRenderer;
@@ -1 +1 @@
1
- {"version":3,"file":"typedown-context.d.ts","sourceRoot":"","sources":["../../../src/node/lib/typedown-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EAAE,YAAY,EAAE,YAAY,EAC5C,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACmB,KAAK,gBAAgB,EAC9C,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,aAAa,EACd,MAAM,UAAU,CAAC;AAIlB,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,GAAG,CAAmB;gBAEjB,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,gBAAgB;IAMpD,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,0BAA0B,CAA4B;IAC9D,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,aAAa,CAAsC;IAE3D,OAAO,CAAC,aAAa,CAAK;IAE1B,OAAO,CAAC,4BAA4B;IA8DpC,IAAI,GAAG,IAAK,SAAS,CAEpB;IAIK,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIpD,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAatD,SAAS,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ/B,wBAAwB,IAAK,OAAO,CAAC,aAAa,CAAC;IAgBnD,SAAS,IAAK,OAAO,CAAC,YAAY,CAAC;IASnC,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/C,SAAS,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAYjD,WAAW,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQvC,IAAI,EAAE,IAAK,gBAAgB,CAE1B;CACF"}
1
+ {"version":3,"file":"typedown-context.d.ts","sourceRoot":"","sources":["../../../src/node/lib/typedown-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EAAE,YAAY,EAAE,YAAY,EAC5C,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACmB,KAAK,gBAAgB,EAC9C,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,YAAY,EACb,MAAM,UAAU,CAAC;AAIlB,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,GAAG,CAAmB;gBAEjB,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,gBAAgB;IAMpD,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,0BAA0B,CAA2B;IAC7D,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,aAAa,CAAsC;IAE3D,OAAO,CAAC,aAAa,CAAK;IAE1B,OAAO,CAAC,4BAA4B;IA8DpC,IAAI,GAAG,IAAK,SAAS,CAEpB;IAIK,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIpD,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAatD,SAAS,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ/B,wBAAwB,IAAK,OAAO,CAAC,YAAY,CAAC;IAgBlD,SAAS,IAAK,OAAO,CAAC,YAAY,CAAC;IASnC,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/C,SAAS,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAYjD,WAAW,IAAK,OAAO,CAAC,MAAM,EAAE,CAAC;IAQvC,IAAI,EAAE,IAAK,gBAAgB,CAE1B;CACF"}
@@ -1,4 +1,5 @@
1
1
  export declare const VIRTUAL_APP_ID = "@typedown/app";
2
2
  export declare const RESOLVED_VIRTUAL_APP_ID: string;
3
- export declare const VIRTUAL_INDEX_ID = "__typedown_index__.td";
3
+ export declare const SEARCH_INDEX_ID = "@typedown/search-index";
4
+ export declare const RESOLVED_SEARCH_INDEX_ID: string;
4
5
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,uBAAuB,QAAwB,CAAC;AAC7D,eAAO,MAAM,gBAAgB,0BAA0B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,uBAAuB,QAAwB,CAAC;AAE7D,eAAO,MAAM,eAAe,2BAA2B,CAAC;AACxD,eAAO,MAAM,wBAAwB,QAAyB,CAAC"}
@@ -1,7 +1,21 @@
1
- import type { Plugin } from 'vite';
1
+ import { type Plugin } from 'vite';
2
2
  import { type AppContext } from '../../context';
3
+ import type { ContentTree } from '@/shared';
4
+ export interface ClientAppEntryOptions {
5
+ /** Content directory relative to project root */
6
+ contentDir: string;
7
+ /** Site title */
8
+ siteTitle: string;
9
+ /** Site description */
10
+ siteDescription: string;
11
+ /** Content files as a recursive directory tree */
12
+ contentTree: ContentTree;
13
+ /** Schema definitions keyed by schema name */
14
+ schemas: Record<string, unknown>;
15
+ }
3
16
  export interface TypedownPluginOptions {
4
17
  context?: AppContext;
5
18
  }
19
+ export declare function generateClientAppEntry(options: ClientAppEntryOptions): string;
6
20
  export declare function typedown(options?: TypedownPluginOptions): Plugin[];
7
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,EACP,MAAM,MAAM,CAAC;AAId,OAAO,EACiC,KAAK,UAAU,EACtD,MAAM,eAAe,CAAC;AAkBvB,MAAM,WAAW,qBAAqB;IAEpC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CA2LvE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,MAAM,EACZ,MAAM,MAAM,CAAC;AAId,OAAO,EACiC,KAAK,UAAU,EACtD,MAAM,eAAe,CAAC;AAuBvB,OAAO,KAAK,EACV,WAAW,EACZ,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,WAAW,EAAE,WAAW,CAAC;IACzB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAGD,MAAM,WAAW,qBAAqB;IAEpC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAgE9E;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CA8OvE"}
@@ -0,0 +1,15 @@
1
+ export interface PageIndexInput {
2
+ id: string;
3
+ title: string;
4
+ html: string;
5
+ }
6
+ export declare class SearchIndexer {
7
+ private index;
8
+ private pageDocIds;
9
+ constructor();
10
+ addAll(pages: PageIndexInput[]): void;
11
+ addPage(page: PageIndexInput): void;
12
+ discardPage(pageId: string): void;
13
+ serialize(): string;
14
+ }
15
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/search.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAeD,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAA+B;IAE5C,OAAO,CAAC,UAAU,CAA+B;;IAUjD,MAAM,CAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI;IAatC,OAAO,CAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IA2BpC,WAAW,CAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAUlC,SAAS,IAAK,MAAM;CAGrB"}
@@ -0,0 +1,6 @@
1
+ export declare const INDEX_FILENAME = "index";
2
+ export declare const CONTENT_EXTENSIONS: readonly string[];
3
+ export declare const CONTENT_GLOB = "**/*.{td,md}";
4
+ export declare const SEARCH_FIELDS: string[];
5
+ export declare const SEARCH_STORE_FIELDS: string[];
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAC;AACF,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAG3C,eAAO,MAAM,aAAa,EAAE,MAAM,EAIjC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAGvC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './constants';
1
2
  export * from './regexes';
2
3
  export * from './types';
3
4
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1,10 +1,60 @@
1
1
  export interface ContentSummary {
2
- /** Path relative to content dir, with extension */
3
- path: string;
2
+ /** File path relative to content dir, with extension */
3
+ filepath: string;
4
4
  /** Schema type name */
5
- schema: string;
5
+ schema?: string;
6
6
  /** Frontmatter header */
7
7
  header: Record<string, unknown>;
8
+ /** File metadata */
9
+ metadata: FileMetadata;
10
+ }
11
+ export interface ContentTree {
12
+ /** Files at the content root */
13
+ rootItems: ContentSummary[];
14
+ /** Top-level directory nodes */
15
+ children: ContentTreeNode[];
16
+ }
17
+ export interface ContentTreeNode {
18
+ name: string;
19
+ children: ContentTreeNode[];
20
+ items: ContentSummary[];
21
+ }
22
+ export interface DirectoryEntry {
23
+ name: string;
24
+ url: string;
25
+ }
26
+ export interface DirectoryListing {
27
+ title: string;
28
+ url: string;
29
+ subdirectories: SubdirectoryEntry[];
30
+ items: DirectoryEntry[];
31
+ }
32
+ export interface FileMetadata {
33
+ /** Last modification time as seconds since UNIX epoch */
34
+ mtime: number;
35
+ /** Creation time as seconds since UNIX epoch */
36
+ ctime: number;
37
+ }
38
+ export interface PropertyDescriptor {
39
+ /** UI widget hint for rendering this property */
40
+ widget: PropertyWidget;
41
+ /** Whether this property is optional */
42
+ optional?: boolean;
43
+ /** Allowed values for select/multi_select widgets */
44
+ options?: string[];
45
+ /** Target schema name for relation widgets */
46
+ schema?: string;
47
+ /** Item descriptor for list widgets */
48
+ items?: PropertyDescriptor;
49
+ }
50
+ export type PropertyWidget = 'text' | 'number' | 'checkbox' | 'date' | 'select' | 'multiSelect' | 'relation' | 'list';
51
+ export interface SchemaDefinition {
52
+ [property: string]: PropertyDescriptor;
53
+ }
54
+ export type SchemaGroups = Record<string, ContentSummary[]>;
55
+ export interface SubdirectoryEntry {
56
+ name: string;
57
+ url: string;
58
+ count: number;
8
59
  }
9
- export type SidebarGroups = Record<string, ContentSummary[]>;
10
60
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/types/content.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/types/content.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,oBAAoB;IACpB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,gCAAgC;IAChC,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,MAAM,EAAE,cAAc,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACxC;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,10 +1,12 @@
1
1
  import type { Component, Ref } from 'vue';
2
+ import type { FileMetadata } from './content';
2
3
  import type { MarkdownHeading } from './markdown';
3
4
  export interface PageData {
4
- schema: string;
5
+ schema?: string;
5
6
  frontmatter: Record<string, unknown>;
6
7
  headings: MarkdownHeading[];
7
8
  title: string;
9
+ metadata?: FileMetadata;
8
10
  }
9
11
  export interface PageModule {
10
12
  __pageData: PageData;
@@ -1 +1 @@
1
- {"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../../src/shared/types/ssg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,GAAG,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpB,yBAAyB;IACzB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,iBAAiB;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,sBAAsB;IACtB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACtB"}
1
+ {"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../../src/shared/types/ssg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,GAAG,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EACV,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpB,yBAAyB;IACzB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,iBAAiB;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,sBAAsB;IACtB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACtB"}
@@ -1,6 +1,6 @@
1
- import type { ContentSummary } from '../types/content';
2
- export declare function contentDisplayName(item: ContentSummary): string;
3
- export declare function contentHref(item: ContentSummary): string;
4
- export declare function getResourceTitle(header: Record<string, unknown>, path: string): string;
5
- export declare function unslugify(slug: string): string;
1
+ import type { ContentSummary, ContentTree, ContentTreeNode, DirectoryListing } from '../types/content';
2
+ export declare function buildContentTree(items: ContentSummary[]): ContentTree;
3
+ export declare function buildDirectoryListingMap(tree: ContentTreeNode[], rootTitle: string): Record<string, DirectoryListing>;
4
+ export declare function getTdIndexTitle(filepath: string, siteTitle: string): string;
5
+ export declare function getTdResourceTitle(header: Record<string, unknown>, filepath: string): string;
6
6
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACf,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAEhE;AAED,wBAAgB,WAAW,CAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAEzD;AAGD,wBAAgB,gBAAgB,CAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQvF;AAID,wBAAgB,SAAS,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ/C"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/content.ts"],"names":[],"mappings":"AAAA,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,CAK7F"}
@@ -0,0 +1,2 @@
1
+ export declare function debounce<T extends (...args: any[]) => any>(fn: T, ms: number): (...args: Parameters<T>) => void;
2
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,GACT,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAOlC"}
@@ -1,2 +1,6 @@
1
- export declare function formatMs(ms: number): string;
1
+ export declare function parseNumericPrefix(name: string): {
2
+ order: number;
3
+ rest: string;
4
+ };
5
+ export declare function unslugify(slug: string): string;
2
6
  //# sourceMappingURL=format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/format.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE5C"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/format.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,MAAM,GAAG;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAYA;AAID,wBAAgB,SAAS,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAW/C"}
@@ -1,2 +1,3 @@
1
1
  export declare function escapeHtml(value: string): string;
2
+ export declare function stripHtml(html: string): string;
2
3
  //# sourceMappingURL=html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/html.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMjD"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/html.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,SAAS,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/C"}
@@ -1,7 +1,9 @@
1
1
  export * from './content';
2
- export * from './environment';
3
- export * from './highlight';
4
- export * from './url';
5
- export * from './html';
2
+ export * from './debounce';
6
3
  export * from './format';
4
+ export * from './html';
5
+ export * as path from './path';
6
+ export * from './regex';
7
+ export * from './time';
8
+ export * from './url';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare function basename(filepath: string, extension?: string): string;
2
+ export declare function dirname(filepath: string): string;
3
+ export declare function extname(filepath: string): string;
4
+ export declare function filestem(filepath: string): string;
5
+ export declare function isContentFile(filepath: string): boolean;
6
+ export declare function join(...segments: string[]): string;
7
+ export declare function stripExtension(filepath: string): string;
8
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/path.ts"],"names":[],"mappings":"AAOA,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAStE;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,QAAQ,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,wBAAgB,aAAa,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,IAAI,CAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAOnD;AAED,wBAAgB,cAAc,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIxD"}
@@ -0,0 +1,2 @@
1
+ export declare function escapeRegex(value: string): string;
2
+ //# sourceMappingURL=regex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/regex.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD"}
@@ -0,0 +1,6 @@
1
+ export declare function formatAbsoluteTime(epochSecs: number): string;
2
+ export declare function formatEditTime(epochSecs: number, prefix: string): string;
3
+ export declare function formatRelativeTime(epochSecs: number): string;
4
+ export declare function formatDateString(value: string): string;
5
+ export declare function formatTime(epochSecs: number): string;
6
+ //# sourceMappingURL=time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/time.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM7D;AAED,wBAAgB,cAAc,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMzE;AAED,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAW7D;AAQD,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,UAAU,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIrD"}
@@ -1,3 +1,7 @@
1
- export declare function isExternal(path: string): boolean;
2
- export declare function isLinkToPage(filename: string): boolean;
1
+ export declare function isUrlExternal(path: string): boolean;
2
+ export declare function getDirectoryUrl(urlPrefix: string, name: string): string;
3
+ export declare function getParentUrl(urlPath: string): string;
4
+ export declare function getTdContentUrl(filepath: string): string;
5
+ export declare function isUrlAncestorOf(directoryUrl: string, path: string): boolean;
6
+ export declare function isUrlToPage(filename: string): boolean;
3
7
  //# sourceMappingURL=url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/url.ts"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAgBD,wBAAgB,YAAY,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIvD"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/url.ts"],"names":[],"mappings":"AAWA,wBAAgB,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAeD,wBAAgB,eAAe,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,YAAY,CAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED,wBAAgB,eAAe,CAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5E;AAGD,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAItD"}