@refrakt-md/astro 0.14.2 → 0.14.4
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/integration.d.ts +5 -2
- package/dist/integration.d.ts.map +1 -1
- package/dist/integration.js +78 -8
- package/dist/integration.js.map +1 -1
- package/dist/seo.d.ts +12 -2
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +12 -1
- package/dist/seo.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/integration.d.ts
CHANGED
|
@@ -4,8 +4,11 @@ import type { RefraktAstroOptions } from './types.js';
|
|
|
4
4
|
* Astro integration for refrakt.
|
|
5
5
|
*
|
|
6
6
|
* Reads `refrakt.config.json`, resolves the requested site (or the lone site
|
|
7
|
-
* for single-site projects), configures SSR noExternal,
|
|
8
|
-
*
|
|
7
|
+
* for single-site projects), configures SSR noExternal, sets up content HMR
|
|
8
|
+
* in dev mode, serves `virtual:refrakt/site-tokens.css` carrying any
|
|
9
|
+
* site-level token / preset / mode / tint overrides (SPEC-048 + SPEC-056),
|
|
10
|
+
* and serves `virtual:refrakt/runes.css` carrying only the per-rune CSS
|
|
11
|
+
* blocks actually used by the content corpus (tree-shaken).
|
|
9
12
|
*/
|
|
10
13
|
export declare function refrakt(options?: RefraktAstroOptions): AstroIntegration;
|
|
11
14
|
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,OAAO,GAAE,mBAAwB,GAAG,gBAAgB,CA6H3E"}
|
package/dist/integration.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { resolve } from 'node:path';
|
|
1
|
+
import { resolve, dirname } from 'node:path';
|
|
2
2
|
import { CORE_PACKAGES } from '@refrakt-md/transform';
|
|
3
|
-
import { loadRefraktConfig, resolveSite } from '@refrakt-md/transform/node';
|
|
3
|
+
import { loadRefraktConfig, resolveSite, createSiteTokensVitePlugin, createRunesCssVitePlugin, computeUsedCssBlocks, setupContentHmr, SITE_TOKENS_VIRTUAL_ID, RUNES_VIRTUAL_ID, } from '@refrakt-md/transform/node';
|
|
4
4
|
import { getThemePackage } from '@refrakt-md/types';
|
|
5
5
|
/**
|
|
6
6
|
* Astro integration for refrakt.
|
|
7
7
|
*
|
|
8
8
|
* Reads `refrakt.config.json`, resolves the requested site (or the lone site
|
|
9
|
-
* for single-site projects), configures SSR noExternal,
|
|
10
|
-
*
|
|
9
|
+
* for single-site projects), configures SSR noExternal, sets up content HMR
|
|
10
|
+
* in dev mode, serves `virtual:refrakt/site-tokens.css` carrying any
|
|
11
|
+
* site-level token / preset / mode / tint overrides (SPEC-048 + SPEC-056),
|
|
12
|
+
* and serves `virtual:refrakt/runes.css` carrying only the per-rune CSS
|
|
13
|
+
* blocks actually used by the content corpus (tree-shaken).
|
|
11
14
|
*/
|
|
12
15
|
export function refrakt(options = {}) {
|
|
13
16
|
const configPath = options.configPath ?? './refrakt.config.json';
|
|
@@ -24,6 +27,60 @@ export function refrakt(options = {}) {
|
|
|
24
27
|
themePackage,
|
|
25
28
|
...(site.plugins ?? []),
|
|
26
29
|
];
|
|
30
|
+
// Capture configDir for the site-tokens Vite plugin — paths in
|
|
31
|
+
// `refrakt.config.json` resolve relative to the config file's
|
|
32
|
+
// directory, not Astro's project root.
|
|
33
|
+
const configDir = dirname(resolve(configPath));
|
|
34
|
+
// Callback the runes Vite plugin invokes in its `buildStart` hook
|
|
35
|
+
// to compute the tree-shaken rune set. Loads content via
|
|
36
|
+
// `createRefraktLoader` (cached internally) and runs the shared
|
|
37
|
+
// `computeUsedCssBlocks` helper. Also prints the standard Phase
|
|
38
|
+
// 1/2/3/4 + warnings summary to stderr (matches SvelteKit
|
|
39
|
+
// reference output). Falls back to the theme barrel when
|
|
40
|
+
// analysis fails.
|
|
41
|
+
let summaryPrinted = false;
|
|
42
|
+
const getUsedBlocks = async () => {
|
|
43
|
+
try {
|
|
44
|
+
const { createRefraktLoader, analyzeRuneUsage, formatPipelineSummary } = await import('@refrakt-md/content');
|
|
45
|
+
const themeModule = await import(themePackage + '/transform');
|
|
46
|
+
const themeConfig = themeModule.themeConfig ?? themeModule.luminaConfig ?? themeModule.default;
|
|
47
|
+
const loader = createRefraktLoader({
|
|
48
|
+
configPath,
|
|
49
|
+
site: options.site,
|
|
50
|
+
variables: options.variables,
|
|
51
|
+
security: options.security,
|
|
52
|
+
});
|
|
53
|
+
const loadedSite = await loader.getSite();
|
|
54
|
+
if (!summaryPrinted) {
|
|
55
|
+
process.stderr.write(formatPipelineSummary(loadedSite.pipelineStats, loadedSite.pipelineWarnings));
|
|
56
|
+
summaryPrinted = true;
|
|
57
|
+
}
|
|
58
|
+
const report = analyzeRuneUsage(loadedSite.pages);
|
|
59
|
+
const { usedBlocks } = await computeUsedCssBlocks(report.allTypes, themeConfig, themePackage);
|
|
60
|
+
return { usedBlocks, themePackage, themeConfig };
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
// eslint-disable-next-line no-console
|
|
64
|
+
console.warn('[refrakt] CSS tree-shaking skipped:', err.message);
|
|
65
|
+
return { themePackage, fallbackToBarrel: true };
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
// Resolve content + sandbox paths for the HMR watcher. The
|
|
69
|
+
// watcher is wired via the content-hmr Vite plugin below.
|
|
70
|
+
const contentDir = resolve(config.root.pathname, site.contentDir);
|
|
71
|
+
const examplesDir = site.sandbox?.examplesDir
|
|
72
|
+
? resolve(config.root.pathname, site.sandbox.examplesDir)
|
|
73
|
+
: undefined;
|
|
74
|
+
// Content-HMR Vite plugin — registers the watcher in
|
|
75
|
+
// `configureServer` so `.md` edits trigger a full browser reload
|
|
76
|
+
// during `astro dev`. Mirrors the SvelteKit reference behaviour.
|
|
77
|
+
const contentHmrPlugin = {
|
|
78
|
+
name: 'refrakt-md:content-hmr',
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
|
+
configureServer(server) {
|
|
81
|
+
setupContentHmr(server, contentDir, examplesDir);
|
|
82
|
+
},
|
|
83
|
+
};
|
|
27
84
|
updateConfig({
|
|
28
85
|
vite: {
|
|
29
86
|
ssr: {
|
|
@@ -32,12 +89,25 @@ export function refrakt(options = {}) {
|
|
|
32
89
|
include: ['@markdoc/markdoc'],
|
|
33
90
|
},
|
|
34
91
|
},
|
|
92
|
+
// Astro 5 ships its own copy of Vite's types; the
|
|
93
|
+
// version-pinned Plugin from our peer dep isn't
|
|
94
|
+
// assignable to Astro's PluginOption. The plugins are
|
|
95
|
+
// duck-typed and run identically at runtime — cast
|
|
96
|
+
// through `never` to satisfy both type universes.
|
|
97
|
+
plugins: [
|
|
98
|
+
createSiteTokensVitePlugin(site, configDir),
|
|
99
|
+
createRunesCssVitePlugin(getUsedBlocks),
|
|
100
|
+
contentHmrPlugin,
|
|
101
|
+
],
|
|
35
102
|
},
|
|
36
103
|
});
|
|
37
|
-
// Inject
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
104
|
+
// Inject the runes CSS *and* the site-tokens overrides. Order
|
|
105
|
+
// matters: per-rune CSS first (which includes base.css), site
|
|
106
|
+
// overrides second so the `--rf-*` cascade resolves to the
|
|
107
|
+
// override value last.
|
|
108
|
+
injectScript('page-ssr', `import '${RUNES_VIRTUAL_ID}';\nimport '${SITE_TOKENS_VIRTUAL_ID}';`);
|
|
109
|
+
// Tell Astro to restart the dev server if `refrakt.config.json`
|
|
110
|
+
// itself changes (content edits are handled by the HMR watcher above).
|
|
41
111
|
addWatchFile(contentDir);
|
|
42
112
|
},
|
|
43
113
|
},
|
package/dist/integration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACN,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,UAA+B,EAAE;IACxD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,uBAAuB,CAAC;IAEjE,OAAO;QACN,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE;YACN,oBAAoB,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE;gBACxE,MAAM,aAAa,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;gBACpD,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1D,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjD,MAAM,UAAU,GAAG;oBAClB,GAAG,aAAa;oBAChB,mBAAmB;oBACnB,YAAY;oBACZ,GAAG,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AAU;4BAChD,gBAAyB;yBACzB;qBACD;iBACD,CAAC,CAAC;gBAEH,8DAA8D;gBAC9D,8DAA8D;gBAC9D,2DAA2D;gBAC3D,uBAAuB;gBACvB,YAAY,CACX,UAAU,EACV,WAAW,gBAAgB,eAAe,sBAAsB,IAAI,CACpE,CAAC;gBAEF,gEAAgE;gBAChE,uEAAuE;gBACvE,YAAY,CAAC,UAAU,CAAC,CAAC;YAC1B,CAAC;SACD;KACD,CAAC;AACH,CAAC"}
|
package/dist/seo.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import type { SeoInput } from '@refrakt-md/transform';
|
|
2
|
-
|
|
1
|
+
import type { SeoInput, SeoToHtmlOptions } from '@refrakt-md/transform';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link buildSeoHead}. Combines page-level SEO input (title,
|
|
4
|
+
* frontmatter, per-page seo block) with site-level options (siteName,
|
|
5
|
+
* baseUrl, defaultImage, logo) — exactly the surface `seoToHtml` accepts.
|
|
6
|
+
*/
|
|
7
|
+
export type SeoHeadProps = SeoInput & SeoToHtmlOptions;
|
|
3
8
|
/**
|
|
4
9
|
* Build HTML strings for SEO meta tags suitable for injection into `<head>`.
|
|
5
10
|
*
|
|
6
11
|
* Returns an object with `title`, `metaTags` (OG + description), and
|
|
7
12
|
* `jsonLd` (structured data script tags).
|
|
13
|
+
*
|
|
14
|
+
* When `siteName`, `baseUrl`, `defaultImage`, or `logo` are passed, the
|
|
15
|
+
* output gains `og:site_name`, absolute canonical URLs, image fallback, and
|
|
16
|
+
* WebSite + Organization JSON-LD entries — matching the SvelteKit reference
|
|
17
|
+
* adapter's output.
|
|
8
18
|
*/
|
|
9
19
|
export declare function buildSeoHead(props: SeoHeadProps): {
|
|
10
20
|
title: string;
|
package/dist/seo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../src/seo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../src/seo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf,CAQA"}
|
package/dist/seo.js
CHANGED
|
@@ -4,8 +4,19 @@ import { extractSeoData, seoToHtml } from '@refrakt-md/transform';
|
|
|
4
4
|
*
|
|
5
5
|
* Returns an object with `title`, `metaTags` (OG + description), and
|
|
6
6
|
* `jsonLd` (structured data script tags).
|
|
7
|
+
*
|
|
8
|
+
* When `siteName`, `baseUrl`, `defaultImage`, or `logo` are passed, the
|
|
9
|
+
* output gains `og:site_name`, absolute canonical URLs, image fallback, and
|
|
10
|
+
* WebSite + Organization JSON-LD entries — matching the SvelteKit reference
|
|
11
|
+
* adapter's output.
|
|
7
12
|
*/
|
|
8
13
|
export function buildSeoHead(props) {
|
|
9
|
-
|
|
14
|
+
const { title, frontmatter, seo, siteName, baseUrl, defaultImage, logo } = props;
|
|
15
|
+
return seoToHtml(extractSeoData({ title, frontmatter, seo }), {
|
|
16
|
+
...(siteName && { siteName }),
|
|
17
|
+
...(baseUrl && { baseUrl }),
|
|
18
|
+
...(defaultImage && { defaultImage }),
|
|
19
|
+
...(logo && { logo }),
|
|
20
|
+
});
|
|
10
21
|
}
|
|
11
22
|
//# sourceMappingURL=seo.js.map
|
package/dist/seo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.js","sourceRoot":"","sources":["../src/seo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"seo.js","sourceRoot":"","sources":["../src/seo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAUlE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,KAAmB;IAK/C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACjF,OAAO,SAAS,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE;QAC7D,GAAG,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC7B,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC;QAC3B,GAAG,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,CAAC;QACrC,GAAG,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC;KACrB,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AdapterTheme } from '@refrakt-md/transform';
|
|
2
|
+
import type { SecurityPolicy } from '@refrakt-md/types';
|
|
2
3
|
/**
|
|
3
4
|
* Theme definition for the Astro adapter.
|
|
4
5
|
*
|
|
@@ -13,5 +14,14 @@ export interface RefraktAstroOptions {
|
|
|
13
14
|
/** Which site to use from the config. Required when the config declares
|
|
14
15
|
* multiple `sites.*`; optional (and resolves to the lone site) otherwise. */
|
|
15
16
|
site?: string;
|
|
17
|
+
/** Security policy for untrusted author content. Defaults to `'trusted'`
|
|
18
|
+
* (current behaviour — no sanitisation). Set `'strict'` for hosted-product
|
|
19
|
+
* use to strip author scripts and harden the sandbox iframe. */
|
|
20
|
+
security?: SecurityPolicy;
|
|
21
|
+
/** Markdoc variables available in content via `{% $name %}` syntax.
|
|
22
|
+
* Unlike the SvelteKit plugin's `variables: Record<string, string>` (which
|
|
23
|
+
* embeds raw JS expressions into a generated module), Astro consumes actual
|
|
24
|
+
* JavaScript values at runtime — pass the real value, not source text. */
|
|
25
|
+
variables?: Record<string, unknown>;
|
|
16
26
|
}
|
|
17
27
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC;AAEtC,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IACnC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;kFAC8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;qEAEiE;IACjE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;+EAG2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/astro",
|
|
3
3
|
"description": "Astro integration for refrakt.md — render Markdoc runes in Astro projects",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"build": "tsc"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@refrakt-md/behaviors": "0.14.
|
|
37
|
-
"@refrakt-md/content": "0.14.
|
|
38
|
-
"@refrakt-md/transform": "0.14.
|
|
39
|
-
"@refrakt-md/types": "0.14.
|
|
36
|
+
"@refrakt-md/behaviors": "0.14.4",
|
|
37
|
+
"@refrakt-md/content": "0.14.4",
|
|
38
|
+
"@refrakt-md/transform": "0.14.4",
|
|
39
|
+
"@refrakt-md/types": "0.14.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"astro": "^5.0.0"
|