@purestack/ts-common 1.1.14 → 1.1.16
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/ts-common.d.mts +113 -21
- package/dist/ts-common.d.mts.map +1 -1
- package/dist/ts-common.mjs +237 -2
- package/dist/ts-common.mjs.map +1 -1
- package/package.json +4 -4
package/dist/ts-common.d.mts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
/*! @purestack/ts-common v1.1.
|
|
1
|
+
/*! @purestack/ts-common v1.1.16 | (c) 2026 Ahmed Yasin Koculu | MIT License */
|
|
2
2
|
|
|
3
3
|
import { SemanticTone, ThemeOptions, ThemeOptionsInput, ThemeStylesheetLink } from "@purestack/ts-style";
|
|
4
4
|
import { DeepPartial } from "@purestack/ts-util";
|
|
5
5
|
import { BasicHeadConfig, TSNode } from "@purestack/ts-html";
|
|
6
|
+
//#region packages/ts-common/src/code-highlighter.d.ts
|
|
7
|
+
/** Converts source code to highlighted pre/code HTML. */
|
|
8
|
+
interface MdxCodeHighlighter {
|
|
9
|
+
codeToHtml: (code: string, lang?: string) => string | Promise<string>;
|
|
10
|
+
/** Persist buffered computation results after a render batch. Await producers before calling. */
|
|
11
|
+
flush?: () => void | Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region packages/ts-common/src/codeLanguages.d.ts
|
|
15
|
+
export declare const DEFAULT_CODE_LANGUAGES: string[];
|
|
16
|
+
export declare const LANGUAGE_BY_EXTENSION: Record<string, string>;
|
|
17
|
+
export declare function normalizeCodeLanguage(value: string): string;
|
|
18
|
+
//#endregion
|
|
6
19
|
//#region packages/ts-common/src/consent-types.d.ts
|
|
7
20
|
interface ConsentCategory {
|
|
8
21
|
id: string;
|
|
@@ -164,29 +177,43 @@ interface PageNavigation {
|
|
|
164
177
|
}
|
|
165
178
|
//#endregion
|
|
166
179
|
//#region packages/ts-common/src/site-config-types.d.ts
|
|
167
|
-
|
|
180
|
+
/** Settings normalized by the builder before plugin configuration runs. */
|
|
181
|
+
interface CoreSiteConfig {
|
|
168
182
|
rootDir: string;
|
|
169
183
|
contentDir: string;
|
|
170
184
|
outDir: string;
|
|
171
185
|
publishDir: string;
|
|
172
186
|
basePath: string;
|
|
173
187
|
siteTitle: string;
|
|
174
|
-
favicon?: string;
|
|
175
|
-
logo: SiteLogoConfig;
|
|
176
|
-
docLayout: DocLayoutConfig;
|
|
177
|
-
style: SiteStyleConfig;
|
|
178
188
|
html: SiteHtmlConfig;
|
|
179
189
|
navigation: NavigationConfig;
|
|
180
|
-
pageToc: PageTocConfig;
|
|
181
|
-
auth: AuthConfig;
|
|
182
190
|
scripts: SiteScriptsConfig;
|
|
183
191
|
sitemap: SitemapConfig;
|
|
184
|
-
consent: ConsentConfig;
|
|
185
|
-
analytics: AnalyticsConfig;
|
|
186
|
-
pagefind: PagefindConfig;
|
|
187
|
-
preview: PreviewConfig;
|
|
188
192
|
i18n: I18nConfig;
|
|
189
193
|
mdx: SiteMdxConfig;
|
|
194
|
+
/**
|
|
195
|
+
* Whether plugins may read and write persistent caches outside the output
|
|
196
|
+
* directory. Set per run (`--no-cache`, `options.cache`), never by site settings.
|
|
197
|
+
*/
|
|
198
|
+
cache: boolean;
|
|
199
|
+
}
|
|
200
|
+
interface SiteConfig extends CoreSiteConfig {
|
|
201
|
+
/** Plugin-owned settings, normalized by the installed owners. */
|
|
202
|
+
extensions: SiteExtensions;
|
|
203
|
+
favicon?: string;
|
|
204
|
+
logo?: SiteLogoConfig;
|
|
205
|
+
docLayout?: DocLayoutConfig;
|
|
206
|
+
style?: SiteStyleConfig;
|
|
207
|
+
pageToc?: PageTocConfig;
|
|
208
|
+
auth?: AuthConfig;
|
|
209
|
+
consent?: ConsentConfig;
|
|
210
|
+
analytics?: AnalyticsConfig;
|
|
211
|
+
pagefind?: PagefindConfig;
|
|
212
|
+
preview?: PreviewConfig;
|
|
213
|
+
}
|
|
214
|
+
/** Plugins may augment this interface with optional, typed namespaces. */
|
|
215
|
+
interface SiteExtensions {
|
|
216
|
+
[plugin: string]: unknown;
|
|
190
217
|
}
|
|
191
218
|
interface DocLayoutConfig {
|
|
192
219
|
/** CSS length reserved above desktop navigation and TOC sidebars. */
|
|
@@ -274,16 +301,36 @@ interface I18nConfig {
|
|
|
274
301
|
cookieName: string;
|
|
275
302
|
}
|
|
276
303
|
interface SiteMdxConfig {
|
|
277
|
-
|
|
304
|
+
/** An optional provider-owned backend identifier. Core does not select an engine. */
|
|
305
|
+
highlighter?: string;
|
|
278
306
|
disableHighlighter: boolean;
|
|
279
307
|
compileMdAsMdx: boolean;
|
|
280
308
|
}
|
|
281
309
|
type SiteStyleConfigInput = DeepPartial<Omit<SiteStyleConfig, 'theme'>> & {
|
|
282
310
|
theme?: ThemeOptionsInput;
|
|
283
311
|
};
|
|
284
|
-
type SiteConfigInput = DeepPartial<Omit<SiteConfig, 'style'>> & {
|
|
312
|
+
type SiteConfigInput = DeepPartial<Omit<SiteConfig, 'style' | 'cache'>> & {
|
|
285
313
|
style?: SiteStyleConfigInput;
|
|
286
314
|
};
|
|
315
|
+
/** Core fields are ready; plugin sections may still contain partial input. */
|
|
316
|
+
type SiteConfigDraft = CoreSiteConfig & Omit<SiteConfigInput, keyof CoreSiteConfig | 'extensions'> & {
|
|
317
|
+
extensions: DeepPartial<SiteExtensions>;
|
|
318
|
+
};
|
|
319
|
+
/** Inputs for a pure configuration contribution, before build factories run. */
|
|
320
|
+
interface SiteConfigResolution<TConfig = SiteConfigDraft> {
|
|
321
|
+
config: TConfig;
|
|
322
|
+
input: SiteConfigInput;
|
|
323
|
+
file: SiteConfigInput;
|
|
324
|
+
}
|
|
325
|
+
type SiteConfigResolver = (source: SiteConfigResolution) => DeepPartial<SiteConfig>;
|
|
326
|
+
/** Runs after every installed owner's normalizer has completed. */
|
|
327
|
+
type SiteConfigFinalizer = (source: SiteConfigResolution<SiteConfig>) => DeepPartial<SiteConfig>;
|
|
328
|
+
/** Overrides, normalization, then dependent settings; all run before factories. */
|
|
329
|
+
interface SiteConfigContributions {
|
|
330
|
+
resolve?: SiteConfigResolver;
|
|
331
|
+
normalize?: SiteConfigResolver;
|
|
332
|
+
finalize?: SiteConfigFinalizer;
|
|
333
|
+
}
|
|
287
334
|
//#endregion
|
|
288
335
|
//#region packages/ts-common/src/frontmatter-types.d.ts
|
|
289
336
|
/**
|
|
@@ -536,6 +583,8 @@ interface PageOutlineItem {
|
|
|
536
583
|
depth?: number;
|
|
537
584
|
children?: PageOutlineItem[];
|
|
538
585
|
}
|
|
586
|
+
type RuntimeEmbedPosition = 'body' | 'head';
|
|
587
|
+
type RuntimeEmbeds = ReadonlyMap<string, RuntimeEmbedPosition>;
|
|
539
588
|
interface TsSsgNavigation {
|
|
540
589
|
folder?: string;
|
|
541
590
|
root?: string;
|
|
@@ -548,7 +597,7 @@ interface PageContext {
|
|
|
548
597
|
pageInfo: PageInfo;
|
|
549
598
|
navigation?: TsSsgNavigation;
|
|
550
599
|
outline?: PageOutlineItem[];
|
|
551
|
-
theme
|
|
600
|
+
theme?: ThemeOptions;
|
|
552
601
|
basePath: string;
|
|
553
602
|
locale?: string;
|
|
554
603
|
locales: string[];
|
|
@@ -557,7 +606,7 @@ interface PageContext {
|
|
|
557
606
|
resolvePublicHref: (href: string) => string;
|
|
558
607
|
recordScriptEntrypoint: (sourceRelPath: string) => void;
|
|
559
608
|
resolveScriptPublicPath?: (sourceRelPath: string) => string;
|
|
560
|
-
recordRuntimeEmbed: (name: string, position:
|
|
609
|
+
recordRuntimeEmbed: (name: string, position: RuntimeEmbedPosition) => void;
|
|
561
610
|
}
|
|
562
611
|
//#endregion
|
|
563
612
|
//#region packages/ts-common/src/isTocEnabled.d.ts
|
|
@@ -577,16 +626,20 @@ interface PageTranslationInfo {
|
|
|
577
626
|
urlPath: string;
|
|
578
627
|
relPath: string;
|
|
579
628
|
}
|
|
580
|
-
interface
|
|
629
|
+
interface PageHeadConfigInput {
|
|
630
|
+
site: SiteConfig;
|
|
631
|
+
pageInfo: PageInfo;
|
|
632
|
+
}
|
|
633
|
+
/** Supplies head defaults before explicit page frontmatter overrides. */
|
|
634
|
+
type PageHeadConfigTemplate = (input: PageHeadConfigInput) => BasicHeadConfig | Promise<BasicHeadConfig>;
|
|
635
|
+
interface PageTemplateInput extends PageHeadConfigInput {
|
|
581
636
|
head: TSNode<'head'>;
|
|
582
637
|
bodyHtml: string;
|
|
583
638
|
headConfig?: BasicHeadConfig;
|
|
584
639
|
styleLinks?: ThemeStylesheetLink[];
|
|
585
640
|
templateName: string;
|
|
586
|
-
site: SiteConfig;
|
|
587
641
|
navigation?: PageNavigation;
|
|
588
642
|
outline?: PageOutlineItem[];
|
|
589
|
-
pageInfo: PageInfo;
|
|
590
643
|
headerHtml?: string;
|
|
591
644
|
footerHtml?: string;
|
|
592
645
|
}
|
|
@@ -599,6 +652,45 @@ type PageHeadTemplate = (input: PageTemplateInput) => TSNode<'head'> | Promise<T
|
|
|
599
652
|
export declare function resolvePageContext(head: unknown): PageContext;
|
|
600
653
|
export declare function tryResolvePageContext(head: unknown): PageContext | undefined;
|
|
601
654
|
//#endregion
|
|
655
|
+
//#region packages/ts-common/src/site-assets.d.ts
|
|
656
|
+
/** A local source selected through the site's URL and locale resolution rules. */
|
|
657
|
+
interface AssetSource {
|
|
658
|
+
relPath: string;
|
|
659
|
+
absPath: string;
|
|
660
|
+
/** Root-relative URL, without the site's base path. */
|
|
661
|
+
publicPath: string;
|
|
662
|
+
}
|
|
663
|
+
interface PageAssetInput {
|
|
664
|
+
document: Document;
|
|
665
|
+
sourceRelPath: string;
|
|
666
|
+
/** Resolves original content assets and records dependencies. Generated outputs are not resolver inputs. */
|
|
667
|
+
resolveSource: (element: Element, url: string) => Promise<AssetSource | undefined>;
|
|
668
|
+
/** Records another content-root-relative input, including a file not yet created. */
|
|
669
|
+
dependOn: (relPath: string) => void;
|
|
670
|
+
/** Await writes before returning. Use immutable content-addressed names within this namespace. */
|
|
671
|
+
emit: (fileName: string, data: Uint8Array) => Promise<string>;
|
|
672
|
+
}
|
|
673
|
+
/** Each build/session owns its processors; core handles generated files and invalidation. */
|
|
674
|
+
interface SiteAssets {
|
|
675
|
+
/** A unique path segment under /_assets/. */
|
|
676
|
+
namespace: string;
|
|
677
|
+
/** Ordered within a page; different pages may run concurrently. Input methods expire when this call completes. */
|
|
678
|
+
processPage: (input: PageAssetInput) => void | Promise<void>;
|
|
679
|
+
}
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region packages/ts-common/src/site-search.d.ts
|
|
682
|
+
/** Search output owned by a plugin; the builder manages output invalidation. */
|
|
683
|
+
interface SiteSearch {
|
|
684
|
+
/** Whether a decoded, base-path-relative URL belongs to this search provider. */
|
|
685
|
+
ownsPath(pathname: string): boolean;
|
|
686
|
+
write(input: {
|
|
687
|
+
outDir: string;
|
|
688
|
+
excludeFiles: Iterable<string>;
|
|
689
|
+
/** Only these rendered pages are available during lazy development. */
|
|
690
|
+
onlyFiles?: Iterable<string>;
|
|
691
|
+
}): Promise<void>;
|
|
692
|
+
}
|
|
693
|
+
//#endregion
|
|
602
694
|
//#region packages/ts-common/src/site-styles.d.ts
|
|
603
695
|
interface WriteStylesResult {
|
|
604
696
|
revision: number;
|
|
@@ -606,7 +698,7 @@ interface WriteStylesResult {
|
|
|
606
698
|
outputs: string[];
|
|
607
699
|
signature: string;
|
|
608
700
|
}
|
|
609
|
-
/** A
|
|
701
|
+
/** A site's stylesheet output, initialized after config contributions and before component factories. */
|
|
610
702
|
interface SiteStyles {
|
|
611
703
|
readonly revision: number;
|
|
612
704
|
links(cacheKey?: string): ThemeStylesheetLink[];
|
|
@@ -616,5 +708,5 @@ interface SiteStyles {
|
|
|
616
708
|
}): Promise<WriteStylesResult>;
|
|
617
709
|
}
|
|
618
710
|
//#endregion
|
|
619
|
-
export type { AnalyticsConfig, AuthConfig, ClassicLogoConfig, ConsentCategory, ConsentConfig, ConsentScript, ConsentService, DocLayoutConfig, FrontmatterEmbedOptions, FrontmatterLayoutOptions, FrontmatterNavOptions, Ga4Config, I18nConfig, I18nUrlStrategy, LogoAppearance, LogoConfig, LogoLayout, LogoMarkStyle, LogoShape, LogoSize, LogoWordmarkStyle, NavItem, NavigationConfig, NavigationMode, NavigationSort, PageContext, PageFrontmatter, PageHeadTemplate, PageInfo, PageNavigation, PageNavigationLink, PageNavigationLinks, PageOutlineItem, PageTemplate, PageTemplateInput, PageTemplateMap, PageTocConfig, PageTranslationInfo, PagefindConfig, ParsedFrontmatterSource, PreviewConfig, RobotsConfig, SiteConfig, SiteConfigInput, SiteHtmlConfig, SiteLogoConfig, SiteMdxConfig, SiteScriptsConfig, SiteStyleConfig, SiteStyleConfigInput, SiteStyles, SitemapConfig, TsSsgNavigation, WriteStylesResult };
|
|
711
|
+
export type { AnalyticsConfig, AssetSource, AuthConfig, ClassicLogoConfig, ConsentCategory, ConsentConfig, ConsentScript, ConsentService, CoreSiteConfig, DocLayoutConfig, FrontmatterEmbedOptions, FrontmatterLayoutOptions, FrontmatterNavOptions, Ga4Config, I18nConfig, I18nUrlStrategy, LogoAppearance, LogoConfig, LogoLayout, LogoMarkStyle, LogoShape, LogoSize, LogoWordmarkStyle, MdxCodeHighlighter, NavItem, NavigationConfig, NavigationMode, NavigationSort, PageAssetInput, PageContext, PageFrontmatter, PageHeadConfigInput, PageHeadConfigTemplate, PageHeadTemplate, PageInfo, PageNavigation, PageNavigationLink, PageNavigationLinks, PageOutlineItem, PageTemplate, PageTemplateInput, PageTemplateMap, PageTocConfig, PageTranslationInfo, PagefindConfig, ParsedFrontmatterSource, PreviewConfig, RobotsConfig, RuntimeEmbedPosition, RuntimeEmbeds, SiteAssets, SiteConfig, SiteConfigContributions, SiteConfigDraft, SiteConfigFinalizer, SiteConfigInput, SiteConfigResolution, SiteConfigResolver, SiteExtensions, SiteHtmlConfig, SiteLogoConfig, SiteMdxConfig, SiteScriptsConfig, SiteSearch, SiteStyleConfig, SiteStyleConfigInput, SiteStyles, SitemapConfig, TsSsgNavigation, WriteStylesResult };
|
|
620
712
|
//# sourceMappingURL=ts-common.d.mts.map
|
package/dist/ts-common.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-common.d.mts","names":[],"sources":["../src/consent-types.ts","../src/logo-types.ts","../src/navMenu-types.ts","../src/site-config-types.ts","../src/frontmatter-types.ts","../src/ts-ssg-context.ts","../src/isTocEnabled.ts","../src/page-template-types.ts","../src/resolvePageContext.ts","../src/site-styles.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ts-common.d.mts","names":[],"sources":["../src/code-highlighter.ts","../src/codeLanguages.ts","../src/consent-types.ts","../src/logo-types.ts","../src/navMenu-types.ts","../src/site-config-types.ts","../src/frontmatter-types.ts","../src/ts-ssg-context.ts","../src/isTocEnabled.ts","../src/page-template-types.ts","../src/resolvePageContext.ts","../src/site-assets.ts","../src/site-search.ts","../src/site-styles.ts"],"mappings":";;;;;UACiB;EACf,aAAa,cAAc,2BAA2B;;EAEtD,qBAAqB;;;;qBCiFV;qBAQA,uBAAuB;wBAMpB,sBAAsB;;;UCnGrB;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf;EACA;EACA;EACA;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ,UAAU;;;;KCzCA;KACA;KACA;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT,OAAO;EACP,aAAa;EACb,YAAY;EACZ,gBAAgB;EAChB,QAAQ;EACR,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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C,oBACV,OAAO,sBACJ,iBAAiB,QAAQ;;;wBCnCd,mBAAmB,gBAAgB;wBASnC,sBAAsB,gBAAgB;;;;UC1BrC;EACf;EACA;;EAEA;;UAGe;EACf,UAAU;EACV;;EAEA,gBACE,SAAS,SACT,gBACG,QAAQ;;EAEb,WAAW;;EAEX,OAAO,kBAAkB,MAAM,eAAe;;;UAI/B;;EAEf;;EAEA,cAAc,OAAO,0BAA0B;;;;;UC1BhC;;EAEf,SAAS;EACT,MAAM;IACJ;IACA,cAAc;;IAEd,YAAY;MACV;;;;UCPW;EACf;EACA;EACA;EACA;;;UAIe;WACN;EACT,MAAM,oBAAoB;EAC1B,MAAM;IACJ;IACA;MACE,QAAQ"}
|
package/dist/ts-common.mjs
CHANGED
|
@@ -1,5 +1,240 @@
|
|
|
1
|
-
/*! @purestack/ts-common v1.1.
|
|
1
|
+
/*! @purestack/ts-common v1.1.16 | (c) 2026 Ahmed Yasin Koculu | MIT License */
|
|
2
2
|
|
|
3
|
+
//#region packages/ts-common/src/codeLanguages.ts
|
|
4
|
+
const codeLanguages = {
|
|
5
|
+
bash: {
|
|
6
|
+
aliases: [
|
|
7
|
+
"sh",
|
|
8
|
+
"shell",
|
|
9
|
+
"shellscript",
|
|
10
|
+
"zsh"
|
|
11
|
+
],
|
|
12
|
+
extensions: [
|
|
13
|
+
".sh",
|
|
14
|
+
".bash",
|
|
15
|
+
".zsh"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
bat: {
|
|
19
|
+
aliases: [
|
|
20
|
+
"batch",
|
|
21
|
+
"cmd",
|
|
22
|
+
"dos"
|
|
23
|
+
],
|
|
24
|
+
extensions: [".bat", ".cmd"]
|
|
25
|
+
},
|
|
26
|
+
c: { extensions: [".c", ".h"] },
|
|
27
|
+
cmake: { extensions: [".cmake"] },
|
|
28
|
+
cpp: {
|
|
29
|
+
aliases: [
|
|
30
|
+
"c++",
|
|
31
|
+
"cc",
|
|
32
|
+
"cxx",
|
|
33
|
+
"h++",
|
|
34
|
+
"hpp",
|
|
35
|
+
"hxx"
|
|
36
|
+
],
|
|
37
|
+
extensions: [
|
|
38
|
+
".cc",
|
|
39
|
+
".cpp",
|
|
40
|
+
".cxx",
|
|
41
|
+
".hh",
|
|
42
|
+
".hpp",
|
|
43
|
+
".hxx"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
csharp: {
|
|
47
|
+
aliases: ["c#", "cs"],
|
|
48
|
+
extensions: [".cs", ".csx"]
|
|
49
|
+
},
|
|
50
|
+
css: { extensions: [".css"] },
|
|
51
|
+
dart: { extensions: [".dart"] },
|
|
52
|
+
diff: {
|
|
53
|
+
aliases: ["patch"],
|
|
54
|
+
extensions: [".diff", ".patch"]
|
|
55
|
+
},
|
|
56
|
+
dockerfile: {
|
|
57
|
+
aliases: ["docker"],
|
|
58
|
+
extensions: [".dockerfile"]
|
|
59
|
+
},
|
|
60
|
+
elixir: {
|
|
61
|
+
aliases: ["ex", "exs"],
|
|
62
|
+
extensions: [".ex", ".exs"]
|
|
63
|
+
},
|
|
64
|
+
erlang: {
|
|
65
|
+
aliases: ["erl"],
|
|
66
|
+
extensions: [".erl", ".hrl"]
|
|
67
|
+
},
|
|
68
|
+
fsharp: {
|
|
69
|
+
aliases: ["f#", "fs"],
|
|
70
|
+
extensions: [
|
|
71
|
+
".fs",
|
|
72
|
+
".fsi",
|
|
73
|
+
".fsx"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
go: {
|
|
77
|
+
aliases: ["golang"],
|
|
78
|
+
extensions: [".go"]
|
|
79
|
+
},
|
|
80
|
+
graphql: {
|
|
81
|
+
aliases: ["gql"],
|
|
82
|
+
extensions: [".graphql", ".gql"]
|
|
83
|
+
},
|
|
84
|
+
groovy: { extensions: [".groovy", ".gradle"] },
|
|
85
|
+
html: {
|
|
86
|
+
aliases: ["htm"],
|
|
87
|
+
extensions: [".html", ".htm"]
|
|
88
|
+
},
|
|
89
|
+
http: {
|
|
90
|
+
aliases: ["https"],
|
|
91
|
+
extensions: [".http", ".rest"]
|
|
92
|
+
},
|
|
93
|
+
ini: {
|
|
94
|
+
aliases: ["properties"],
|
|
95
|
+
extensions: [
|
|
96
|
+
".ini",
|
|
97
|
+
".cfg",
|
|
98
|
+
".properties"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
java: { extensions: [".java"] },
|
|
102
|
+
javascript: {
|
|
103
|
+
aliases: [
|
|
104
|
+
"js",
|
|
105
|
+
"cjs",
|
|
106
|
+
"mjs"
|
|
107
|
+
],
|
|
108
|
+
extensions: [
|
|
109
|
+
".js",
|
|
110
|
+
".cjs",
|
|
111
|
+
".mjs"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
json: { extensions: [".json"] },
|
|
115
|
+
jsonc: { extensions: [".jsonc"] },
|
|
116
|
+
jsx: { extensions: [".jsx"] },
|
|
117
|
+
kotlin: {
|
|
118
|
+
aliases: ["kt", "kts"],
|
|
119
|
+
extensions: [".kt", ".kts"]
|
|
120
|
+
},
|
|
121
|
+
less: { extensions: [".less"] },
|
|
122
|
+
lua: { extensions: [".lua"] },
|
|
123
|
+
makefile: {
|
|
124
|
+
aliases: ["make", "mk"],
|
|
125
|
+
extensions: [".mk", ".mak"]
|
|
126
|
+
},
|
|
127
|
+
markdown: {
|
|
128
|
+
aliases: [
|
|
129
|
+
"md",
|
|
130
|
+
"mkd",
|
|
131
|
+
"mdown"
|
|
132
|
+
],
|
|
133
|
+
extensions: [
|
|
134
|
+
".md",
|
|
135
|
+
".markdown",
|
|
136
|
+
".mkd",
|
|
137
|
+
".mdown"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
mdx: {
|
|
141
|
+
aliases: ["rmdx"],
|
|
142
|
+
extensions: [".mdx", ".rmdx"]
|
|
143
|
+
},
|
|
144
|
+
"objective-c": {
|
|
145
|
+
aliases: ["objc", "objectivec"],
|
|
146
|
+
extensions: [".m"]
|
|
147
|
+
},
|
|
148
|
+
perl: {
|
|
149
|
+
aliases: ["pl", "pm"],
|
|
150
|
+
extensions: [".pl", ".pm"]
|
|
151
|
+
},
|
|
152
|
+
php: { extensions: [".php", ".phtml"] },
|
|
153
|
+
powershell: {
|
|
154
|
+
aliases: [
|
|
155
|
+
"ps",
|
|
156
|
+
"ps1",
|
|
157
|
+
"pwsh"
|
|
158
|
+
],
|
|
159
|
+
extensions: [
|
|
160
|
+
".ps1",
|
|
161
|
+
".psm1",
|
|
162
|
+
".psd1"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
python: {
|
|
166
|
+
aliases: [
|
|
167
|
+
"py",
|
|
168
|
+
"py3",
|
|
169
|
+
"python3"
|
|
170
|
+
],
|
|
171
|
+
extensions: [
|
|
172
|
+
".py",
|
|
173
|
+
".pyw",
|
|
174
|
+
".pyi"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
r: { extensions: [".r"] },
|
|
178
|
+
ruby: {
|
|
179
|
+
aliases: ["rb", "gemspec"],
|
|
180
|
+
extensions: [
|
|
181
|
+
".rb",
|
|
182
|
+
".rake",
|
|
183
|
+
".gemspec"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
rust: {
|
|
187
|
+
aliases: ["rs"],
|
|
188
|
+
extensions: [".rs"]
|
|
189
|
+
},
|
|
190
|
+
scala: { extensions: [".scala", ".sc"] },
|
|
191
|
+
scss: { extensions: [".scss"] },
|
|
192
|
+
sql: { extensions: [".sql"] },
|
|
193
|
+
swift: { extensions: [".swift"] },
|
|
194
|
+
text: {
|
|
195
|
+
aliases: ["txt", "plaintext"],
|
|
196
|
+
extensions: [".txt", ".text"]
|
|
197
|
+
},
|
|
198
|
+
toml: { extensions: [".toml"] },
|
|
199
|
+
"ts-tags": { aliases: ["lit"] },
|
|
200
|
+
tsx: { extensions: [".tsx"] },
|
|
201
|
+
typescript: {
|
|
202
|
+
aliases: [
|
|
203
|
+
"ts",
|
|
204
|
+
"cts",
|
|
205
|
+
"mts"
|
|
206
|
+
],
|
|
207
|
+
extensions: [
|
|
208
|
+
".ts",
|
|
209
|
+
".cts",
|
|
210
|
+
".mts"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
xml: {
|
|
214
|
+
aliases: ["svg", "xhtml"],
|
|
215
|
+
extensions: [
|
|
216
|
+
".xml",
|
|
217
|
+
".svg",
|
|
218
|
+
".xhtml",
|
|
219
|
+
".xsd",
|
|
220
|
+
".xsl",
|
|
221
|
+
".xslt"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
yaml: {
|
|
225
|
+
aliases: ["yml"],
|
|
226
|
+
extensions: [".yaml", ".yml"]
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
const DEFAULT_CODE_LANGUAGES = Object.keys(codeLanguages);
|
|
230
|
+
const languageAliases = new Map(Object.entries(codeLanguages).flatMap(([language, { aliases = [] }]) => aliases.map((alias) => [alias, language])));
|
|
231
|
+
const LANGUAGE_BY_EXTENSION = Object.fromEntries(Object.entries(codeLanguages).flatMap(([language, { extensions = [] }]) => extensions.map((extension) => [extension, language])));
|
|
232
|
+
function normalizeCodeLanguage(value) {
|
|
233
|
+
const normalized = value.trim().toLowerCase();
|
|
234
|
+
return languageAliases.get(normalized) ?? normalized;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
//#endregion
|
|
3
238
|
//#region packages/ts-common/src/isTocEnabled.ts
|
|
4
239
|
function isTocEnabled(frontmatter, outline) {
|
|
5
240
|
return frontmatter.layout.showToc && hasVisibleTocItems(outline ?? []);
|
|
@@ -39,5 +274,5 @@ function tryResolvePageContext(head) {
|
|
|
39
274
|
}
|
|
40
275
|
|
|
41
276
|
//#endregion
|
|
42
|
-
export { isTocEnabled, resolvePageContext, tryResolvePageContext };
|
|
277
|
+
export { DEFAULT_CODE_LANGUAGES, LANGUAGE_BY_EXTENSION, isTocEnabled, normalizeCodeLanguage, resolvePageContext, tryResolvePageContext };
|
|
43
278
|
//# sourceMappingURL=ts-common.mjs.map
|
package/dist/ts-common.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-common.mjs","names":[],"sources":["../src/isTocEnabled.ts","../src/resolvePageContext.ts"],"sourcesContent":["import type { PageFrontmatter } from './frontmatter-types'\nimport type { PageOutlineItem } from './ts-ssg-context'\n\nexport function isTocEnabled(\n frontmatter: PageFrontmatter,\n outline: PageOutlineItem[] | undefined,\n) {\n return frontmatter.layout.showToc && hasVisibleTocItems(outline ?? [])\n}\n\nfunction hasVisibleTocItems(outline: PageOutlineItem[]) {\n const [item] = outline\n if (!item) return false\n if (outline.length !== 1 || !isDocumentHeading(item)) return true\n return (item.children?.length ?? 0) > 0\n}\n\nfunction isDocumentHeading(item: PageOutlineItem) {\n return item.depth === 1\n}\n","import type { PageContext } from './ts-ssg-context'\n\ntype ContextCarrier = {\n pageContext?: PageContext\n}\n\ntype HeadLike = {\n ctx?: unknown[]\n}\n\nfunction hasPageContext(value: unknown): value is ContextCarrier {\n return typeof value === 'object' && value !== null && 'pageContext' in value\n}\n\nfunction hasContextStack(value: unknown): value is HeadLike {\n return typeof value === 'object' && value !== null && 'ctx' in value\n}\n\nexport function resolvePageContext(head: unknown): PageContext {\n const stack = hasContextStack(head) && Array.isArray(head.ctx) ? head.ctx : []\n for (const ctx of stack) {\n if (!hasPageContext(ctx)) continue\n if (ctx.pageContext) return ctx.pageContext\n }\n throw new Error('pageContext is not available in the Regor context stack.')\n}\n\nexport function tryResolvePageContext(head: unknown): PageContext | undefined {\n const stack = hasContextStack(head) && Array.isArray(head.ctx) ? head.ctx : []\n for (const ctx of stack) {\n if (!hasPageContext(ctx)) continue\n if (ctx.pageContext) return ctx.pageContext\n }\n return undefined\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"ts-common.mjs","names":[],"sources":["../src/codeLanguages.ts","../src/isTocEnabled.ts","../src/resolvePageContext.ts"],"sourcesContent":["interface CodeLanguage {\n aliases?: string[]\n extensions?: string[]\n}\n\n// Use Shiki names (including its aliases) as the common language identifiers.\nconst codeLanguages: Record<string, CodeLanguage> = {\n bash: {\n aliases: ['sh', 'shell', 'shellscript', 'zsh'],\n extensions: ['.sh', '.bash', '.zsh'],\n },\n bat: { aliases: ['batch', 'cmd', 'dos'], extensions: ['.bat', '.cmd'] },\n c: { extensions: ['.c', '.h'] },\n cmake: { extensions: ['.cmake'] },\n cpp: {\n aliases: ['c++', 'cc', 'cxx', 'h++', 'hpp', 'hxx'],\n extensions: ['.cc', '.cpp', '.cxx', '.hh', '.hpp', '.hxx'],\n },\n csharp: { aliases: ['c#', 'cs'], extensions: ['.cs', '.csx'] },\n css: { extensions: ['.css'] },\n dart: { extensions: ['.dart'] },\n diff: { aliases: ['patch'], extensions: ['.diff', '.patch'] },\n dockerfile: { aliases: ['docker'], extensions: ['.dockerfile'] },\n elixir: { aliases: ['ex', 'exs'], extensions: ['.ex', '.exs'] },\n erlang: { aliases: ['erl'], extensions: ['.erl', '.hrl'] },\n fsharp: { aliases: ['f#', 'fs'], extensions: ['.fs', '.fsi', '.fsx'] },\n go: { aliases: ['golang'], extensions: ['.go'] },\n graphql: { aliases: ['gql'], extensions: ['.graphql', '.gql'] },\n groovy: { extensions: ['.groovy', '.gradle'] },\n html: { aliases: ['htm'], extensions: ['.html', '.htm'] },\n http: { aliases: ['https'], extensions: ['.http', '.rest'] },\n ini: { aliases: ['properties'], extensions: ['.ini', '.cfg', '.properties'] },\n java: { extensions: ['.java'] },\n javascript: {\n aliases: ['js', 'cjs', 'mjs'],\n extensions: ['.js', '.cjs', '.mjs'],\n },\n json: { extensions: ['.json'] },\n jsonc: { extensions: ['.jsonc'] },\n jsx: { extensions: ['.jsx'] },\n kotlin: { aliases: ['kt', 'kts'], extensions: ['.kt', '.kts'] },\n less: { extensions: ['.less'] },\n lua: { extensions: ['.lua'] },\n makefile: { aliases: ['make', 'mk'], extensions: ['.mk', '.mak'] },\n markdown: {\n aliases: ['md', 'mkd', 'mdown'],\n extensions: ['.md', '.markdown', '.mkd', '.mdown'],\n },\n mdx: { aliases: ['rmdx'], extensions: ['.mdx', '.rmdx'] },\n 'objective-c': { aliases: ['objc', 'objectivec'], extensions: ['.m'] },\n perl: { aliases: ['pl', 'pm'], extensions: ['.pl', '.pm'] },\n php: { extensions: ['.php', '.phtml'] },\n powershell: {\n aliases: ['ps', 'ps1', 'pwsh'],\n extensions: ['.ps1', '.psm1', '.psd1'],\n },\n python: {\n aliases: ['py', 'py3', 'python3'],\n extensions: ['.py', '.pyw', '.pyi'],\n },\n r: { extensions: ['.r'] },\n ruby: {\n aliases: ['rb', 'gemspec'],\n extensions: ['.rb', '.rake', '.gemspec'],\n },\n rust: { aliases: ['rs'], extensions: ['.rs'] },\n scala: { extensions: ['.scala', '.sc'] },\n scss: { extensions: ['.scss'] },\n sql: { extensions: ['.sql'] },\n swift: { extensions: ['.swift'] },\n text: { aliases: ['txt', 'plaintext'], extensions: ['.txt', '.text'] },\n toml: { extensions: ['.toml'] },\n 'ts-tags': { aliases: ['lit'] },\n tsx: { extensions: ['.tsx'] },\n typescript: {\n aliases: ['ts', 'cts', 'mts'],\n extensions: ['.ts', '.cts', '.mts'],\n },\n xml: {\n aliases: ['svg', 'xhtml'],\n extensions: ['.xml', '.svg', '.xhtml', '.xsd', '.xsl', '.xslt'],\n },\n yaml: { aliases: ['yml'], extensions: ['.yaml', '.yml'] },\n}\n\nexport const DEFAULT_CODE_LANGUAGES = Object.keys(codeLanguages)\n\nconst languageAliases = new Map(\n Object.entries(codeLanguages).flatMap(([language, { aliases = [] }]) =>\n aliases.map((alias) => [alias, language] as const),\n ),\n)\n\nexport const LANGUAGE_BY_EXTENSION: Record<string, string> = Object.fromEntries(\n Object.entries(codeLanguages).flatMap(([language, { extensions = [] }]) =>\n extensions.map((extension) => [extension, language]),\n ),\n)\n\nexport function normalizeCodeLanguage(value: string): string {\n const normalized = value.trim().toLowerCase()\n return languageAliases.get(normalized) ?? normalized\n}\n","import type { PageFrontmatter } from './frontmatter-types'\nimport type { PageOutlineItem } from './ts-ssg-context'\n\nexport function isTocEnabled(\n frontmatter: PageFrontmatter,\n outline: PageOutlineItem[] | undefined,\n) {\n return frontmatter.layout.showToc && hasVisibleTocItems(outline ?? [])\n}\n\nfunction hasVisibleTocItems(outline: PageOutlineItem[]) {\n const [item] = outline\n if (!item) return false\n if (outline.length !== 1 || !isDocumentHeading(item)) return true\n return (item.children?.length ?? 0) > 0\n}\n\nfunction isDocumentHeading(item: PageOutlineItem) {\n return item.depth === 1\n}\n","import type { PageContext } from './ts-ssg-context'\n\ntype ContextCarrier = {\n pageContext?: PageContext\n}\n\ntype HeadLike = {\n ctx?: unknown[]\n}\n\nfunction hasPageContext(value: unknown): value is ContextCarrier {\n return typeof value === 'object' && value !== null && 'pageContext' in value\n}\n\nfunction hasContextStack(value: unknown): value is HeadLike {\n return typeof value === 'object' && value !== null && 'ctx' in value\n}\n\nexport function resolvePageContext(head: unknown): PageContext {\n const stack = hasContextStack(head) && Array.isArray(head.ctx) ? head.ctx : []\n for (const ctx of stack) {\n if (!hasPageContext(ctx)) continue\n if (ctx.pageContext) return ctx.pageContext\n }\n throw new Error('pageContext is not available in the Regor context stack.')\n}\n\nexport function tryResolvePageContext(head: unknown): PageContext | undefined {\n const stack = hasContextStack(head) && Array.isArray(head.ctx) ? head.ctx : []\n for (const ctx of stack) {\n if (!hasPageContext(ctx)) continue\n if (ctx.pageContext) return ctx.pageContext\n }\n return undefined\n}\n"],"mappings":";AAMA,MAAM,gBAA8C;CAClD,MAAM;EACJ,SAAS;GAAC;GAAM;GAAS;GAAe;EAAK;EAC7C,YAAY;GAAC;GAAO;GAAS;EAAM;CACrC;CACA,KAAK;EAAE,SAAS;GAAC;GAAS;GAAO;EAAK;EAAG,YAAY,CAAC,QAAQ,MAAM;CAAE;CACtE,GAAG,EAAE,YAAY,CAAC,MAAM,IAAI,EAAE;CAC9B,OAAO,EAAE,YAAY,CAAC,QAAQ,EAAE;CAChC,KAAK;EACH,SAAS;GAAC;GAAO;GAAM;GAAO;GAAO;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AC7D,QAAQ,KAAK,UAAU,UAAU,KAAK;AACxC;AAEA,SAAS,kBAAkB,MAAuB;CAChD,OAAO,KAAK,UAAU;AACxB;;;;ACTA,SAAS,eAAe,OAAyC;CAC/D,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,iBAAiB;AACzE;AAEA,SAAS,gBAAgB,OAAmC;CAC1D,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,SAAS;AACjE;AAEA,SAAgB,mBAAmB,MAA4B;CAC7D,MAAM,QAAQ,gBAAgB,IAAI,KAAK,MAAM,QAAQ,KAAK,GAAG,IAAI,KAAK,MAAM,CAAC;CAC7E,KAAK,MAAM,OAAO,OAAO;EACvB,IAAI,CAAC,eAAe,GAAG,GAAG;EAC1B,IAAI,IAAI,aAAa,OAAO,IAAI;CAClC;CACA,MAAM,IAAI,MAAM,0DAA0D;AAC5E;AAEA,SAAgB,sBAAsB,MAAwC;CAC5E,MAAM,QAAQ,gBAAgB,IAAI,KAAK,MAAM,QAAQ,KAAK,GAAG,IAAI,KAAK,MAAM,CAAC;CAC7E,KAAK,MAAM,OAAO,OAAO;EACvB,IAAI,CAAC,eAAe,GAAG,GAAG;EAC1B,IAAI,IAAI,aAAa,OAAO,IAAI;CAClC;AAEF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purestack/ts-common",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"packageManager": "yarn@4.9.2",
|
|
5
5
|
"module": "./dist/ts-common.mjs",
|
|
6
6
|
"types": "./dist/ts-common.d.mts",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@purestack/ts-html": "^1.1.
|
|
29
|
-
"@purestack/ts-style": "^1.1.
|
|
30
|
-
"@purestack/ts-util": "^1.1.
|
|
28
|
+
"@purestack/ts-html": "^1.1.16",
|
|
29
|
+
"@purestack/ts-style": "^1.1.16",
|
|
30
|
+
"@purestack/ts-util": "^1.1.16"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"files": [
|