specra 0.1.10 → 0.1.12
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/{chunk-WSQZILUA.mjs → chunk-WMCO2UX5.mjs} +15 -9
- package/dist/chunk-WMCO2UX5.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +462 -386
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +428 -353
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +477 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -162
- package/dist/index.mjs.map +1 -1
- package/dist/layouts/index.d.mts +1 -1
- package/dist/layouts/index.d.ts +1 -1
- package/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +15 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +3 -1
- package/dist/{config.types-Ccp3jN5U.d.mts → mdx-ColN3Cyg.d.mts} +58 -57
- package/dist/{config.types-Ccp3jN5U.d.ts → mdx-ColN3Cyg.d.ts} +58 -57
- package/package.json +2 -2
- package/dist/chunk-WSQZILUA.mjs.map +0 -1
package/dist/layouts/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { D as DocMeta, S as SpecraConfig, a as Doc } from '../
|
|
2
|
+
import { D as DocMeta, S as SpecraConfig, a as Doc } from '../mdx-ColN3Cyg.mjs';
|
|
3
3
|
|
|
4
4
|
interface DocLayoutProps {
|
|
5
5
|
meta: DocMeta;
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { D as DocMeta, S as SpecraConfig, a as Doc } from '../
|
|
2
|
+
import { D as DocMeta, S as SpecraConfig, a as Doc } from '../mdx-ColN3Cyg.js';
|
|
3
3
|
|
|
4
4
|
interface DocLayoutProps {
|
|
5
5
|
meta: DocMeta;
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Doc, S as SpecraConfig } from '../
|
|
2
|
-
export { A as AnalyticsConfig, B as BannerConfig,
|
|
1
|
+
import { a as Doc, S as SpecraConfig } from '../mdx-ColN3Cyg.mjs';
|
|
2
|
+
export { A as AnalyticsConfig, B as BannerConfig, q as DeploymentConfig, D as DocMeta, E as EnvironmentVariables, p as FeaturesConfig, F as FooterBranding, o as FooterConfig, I as I18nConfig, N as NavigationConfig, n as SearchConfig, j as SiteConfig, m as SocialLinks, l as TabGroup, k as ThemeConfig, T as TocItem, h as defaultConfig, f as extractTableOfContents, e as getAdjacentDocs, d as getAllDocs, c as getDocBySlug, b as getI18nConfig, g as getVersions, i as isCategoryPage } from '../mdx-ColN3Cyg.mjs';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
import '../components/index.ts';
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ declare function getCachedVersions(): string[];
|
|
|
18
18
|
/**
|
|
19
19
|
* Cached version of getAllDocs()
|
|
20
20
|
*/
|
|
21
|
-
declare function getCachedAllDocs(version?: string): Promise<Doc[]>;
|
|
21
|
+
declare function getCachedAllDocs(version?: string, locale?: string): Promise<Doc[]>;
|
|
22
22
|
/**
|
|
23
23
|
* Cached version of getDocBySlug()
|
|
24
24
|
*/
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Doc, S as SpecraConfig } from '../
|
|
2
|
-
export { A as AnalyticsConfig, B as BannerConfig,
|
|
1
|
+
import { a as Doc, S as SpecraConfig } from '../mdx-ColN3Cyg.js';
|
|
2
|
+
export { A as AnalyticsConfig, B as BannerConfig, q as DeploymentConfig, D as DocMeta, E as EnvironmentVariables, p as FeaturesConfig, F as FooterBranding, o as FooterConfig, I as I18nConfig, N as NavigationConfig, n as SearchConfig, j as SiteConfig, m as SocialLinks, l as TabGroup, k as ThemeConfig, T as TocItem, h as defaultConfig, f as extractTableOfContents, e as getAdjacentDocs, d as getAllDocs, c as getDocBySlug, b as getI18nConfig, g as getVersions, i as isCategoryPage } from '../mdx-ColN3Cyg.js';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
import '../components/index.ts';
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ declare function getCachedVersions(): string[];
|
|
|
18
18
|
/**
|
|
19
19
|
* Cached version of getAllDocs()
|
|
20
20
|
*/
|
|
21
|
-
declare function getCachedAllDocs(version?: string): Promise<Doc[]>;
|
|
21
|
+
declare function getCachedAllDocs(version?: string, locale?: string): Promise<Doc[]>;
|
|
22
22
|
/**
|
|
23
23
|
* Cached version of getDocBySlug()
|
|
24
24
|
*/
|
package/dist/lib/index.js
CHANGED
|
@@ -59,6 +59,7 @@ __export(lib_exports, {
|
|
|
59
59
|
getConfig: () => getConfig,
|
|
60
60
|
getConfigValue: () => getConfigValue,
|
|
61
61
|
getDocBySlug: () => getDocBySlug,
|
|
62
|
+
getI18nConfig: () => getI18nConfig,
|
|
62
63
|
getVersions: () => getVersions,
|
|
63
64
|
initConfig: () => initConfig,
|
|
64
65
|
isCategoryPage: () => isCategoryPage,
|
|
@@ -739,7 +740,7 @@ async function getAllDocs(version = "v1.0.0", locale) {
|
|
|
739
740
|
originalFilePath = parts.slice(0, -1).join(".");
|
|
740
741
|
}
|
|
741
742
|
}
|
|
742
|
-
const doc = await getDocBySlug(
|
|
743
|
+
const doc = await getDocBySlug(originalFilePath, version, isLocalized ? fileLocale : void 0);
|
|
743
744
|
if (!doc) return null;
|
|
744
745
|
doc.filePath = originalFilePath;
|
|
745
746
|
const folderPath = import_path3.default.dirname(originalFilePath).replace(/\\/g, "/");
|
|
@@ -761,6 +762,10 @@ async function getAllDocs(version = "v1.0.0", locale) {
|
|
|
761
762
|
const uniqueDocs = /* @__PURE__ */ new Map();
|
|
762
763
|
const validDocs = docs.filter((doc) => doc !== null && (isDevelopment3 || !doc.meta.draft));
|
|
763
764
|
validDocs.forEach((doc) => {
|
|
765
|
+
if (locale === "all") {
|
|
766
|
+
uniqueDocs.set(doc.slug, doc);
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
764
769
|
let logicalSlug = doc.slug;
|
|
765
770
|
if (i18nConfig) {
|
|
766
771
|
const parts = logicalSlug.split("/");
|
|
@@ -973,18 +978,19 @@ function getCachedVersions() {
|
|
|
973
978
|
versionsCache.timestamp = Date.now();
|
|
974
979
|
return versions;
|
|
975
980
|
}
|
|
976
|
-
async function getCachedAllDocs(version = "v1.0.0") {
|
|
981
|
+
async function getCachedAllDocs(version = "v1.0.0", locale) {
|
|
977
982
|
initializeWatchers();
|
|
978
|
-
const
|
|
983
|
+
const cacheKey = locale ? `${version}:${locale}` : version;
|
|
984
|
+
const cached = allDocsCache.get(cacheKey);
|
|
979
985
|
if (cached && isCacheValid(cached.timestamp)) {
|
|
980
|
-
logCacheOperation("hit", `getAllDocs:${
|
|
986
|
+
logCacheOperation("hit", `getAllDocs:${cacheKey}`);
|
|
981
987
|
return cached.data;
|
|
982
988
|
}
|
|
983
|
-
logCacheOperation("miss", `getAllDocs:${
|
|
984
|
-
const timer = new PerfTimer(`getAllDocs(${
|
|
985
|
-
const docs = await getAllDocs(version);
|
|
989
|
+
logCacheOperation("miss", `getAllDocs:${cacheKey}`);
|
|
990
|
+
const timer = new PerfTimer(`getAllDocs(${cacheKey})`);
|
|
991
|
+
const docs = await getAllDocs(version, locale);
|
|
986
992
|
timer.end();
|
|
987
|
-
allDocsCache.set(
|
|
993
|
+
allDocsCache.set(cacheKey, {
|
|
988
994
|
data: docs,
|
|
989
995
|
timestamp: Date.now()
|
|
990
996
|
});
|
|
@@ -1564,6 +1570,7 @@ async function findRedirect(path4) {
|
|
|
1564
1570
|
getConfig,
|
|
1565
1571
|
getConfigValue,
|
|
1566
1572
|
getDocBySlug,
|
|
1573
|
+
getI18nConfig,
|
|
1567
1574
|
getVersions,
|
|
1568
1575
|
initConfig,
|
|
1569
1576
|
isCategoryPage,
|