@myst-theme/landing-pages 0.17.0 → 0.18.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.
- package/dist/BlockHeading.d.ts.map +1 -1
- package/dist/BlockHeading.js +2 -2
- package/dist/CenteredBlock.js +1 -1
- package/dist/InvalidBlock.js +1 -1
- package/dist/JustifiedBlock.js +1 -1
- package/dist/LandingBlock.js +1 -1
- package/dist/LogoCloudBlock.js +1 -1
- package/dist/SplitImageBlock.js +1 -1
- package/dist/UnknownBlock.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockHeading.d.ts","sourceRoot":"","sources":["../src/BlockHeading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;
|
|
1
|
+
{"version":3,"file":"BlockHeading.d.ts","sourceRoot":"","sources":["../src/BlockHeading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;wDAyB5F"}
|
package/dist/BlockHeading.js
CHANGED
|
@@ -6,7 +6,7 @@ export function BlockHeading({ node, className }) {
|
|
|
6
6
|
const { enumerator, depth, key, identifier, html_id } = node;
|
|
7
7
|
const id = html_id || identifier || key;
|
|
8
8
|
return e(`h${depth}`, {
|
|
9
|
-
className: classNames(node.class, className, 'group'),
|
|
9
|
+
className: classNames('myst-landing-heading', node.class, className, 'group'),
|
|
10
10
|
id: id,
|
|
11
|
-
}, _jsxs(_Fragment, { children: [enumerator && _jsx("span", { className: "mr-3 select-none", children: enumerator }), _jsx("span", { className: "heading-text", children: _jsx(MyST, { ast: node.children }) }), _jsx(HashLink, { id: id, kind: "Section",
|
|
11
|
+
}, _jsxs(_Fragment, { children: [enumerator && _jsx("span", { className: "myst-landing-enumerator mr-3 select-none", children: enumerator }), _jsx("span", { className: "myst-landing-text heading-text", children: _jsx(MyST, { ast: node.children }) }), _jsx(HashLink, { className: "myst-landing-link font-normal", id: id, kind: "Section", hover: true, hideInPopup: true, noWidth: true })] }));
|
|
12
12
|
}
|
package/dist/CenteredBlock.js
CHANGED
|
@@ -26,7 +26,7 @@ export function CenteredBlock(props) {
|
|
|
26
26
|
if (!body) {
|
|
27
27
|
return _jsx(InvalidBlock, Object.assign({}, props, { blockName: "centered" }));
|
|
28
28
|
}
|
|
29
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsx("div", { className: "relative text-center", children: _jsxs("div", { className: "py-20 sm:py-28", children: [subtitle && (_jsx("p", { className: "my-0 font-semibold text-indigo-400 uppercase", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "mt-2 mb-0 text-5xl font-semibold tracking-tight" })), body && (_jsx("div", { className: "mt-6", children: _jsx(MyST, { ast: body }) })), links && (_jsx("div", { className: "flex flex-row flex-wrap items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) }) })));
|
|
29
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsx("div", { className: "myst-landing-centered relative text-center", children: _jsxs("div", { className: "myst-landing-centered-inner py-20 sm:py-28", children: [subtitle && (_jsx("p", { className: "myst-landing-centered-subtitle my-0 font-semibold text-indigo-400 uppercase", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "myst-landing-centered-heading mt-2 mb-0 text-5xl font-semibold tracking-tight" })), body && (_jsx("div", { className: "myst-landing-centered-body mt-6", children: _jsx(MyST, { ast: body }) })), links && (_jsx("div", { className: "myst-landing-centered-links flex flex-row flex-wrap items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) }) })));
|
|
30
30
|
}
|
|
31
31
|
export const CENTERED_RENDERERS = {
|
|
32
32
|
block: {
|
package/dist/InvalidBlock.js
CHANGED
|
@@ -3,5 +3,5 @@ import { MyST } from 'myst-to-react';
|
|
|
3
3
|
import { LandingBlock } from './LandingBlock.js';
|
|
4
4
|
export function InvalidBlock(props) {
|
|
5
5
|
const { node, blockName } = props;
|
|
6
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "relative", role: "alert", children: [_jsxs("div", { className: "px-4 py-2 font-bold text-white bg-red-500 rounded-t", children: ["Invalid block ", _jsx("span", { className: "font-mono", children: blockName })] }), _jsxs("div", { className: "border border-t-0 border-red-400 rounded-b ", children: [_jsx("div", { className: "px-4 py-3 text-red-700 bg-red-100", children: _jsxs("p", { children: ["This '", blockName, "' block does not conform to the expected AST structure."] }) }), _jsx("div", { className: "px-4 py-3", children: _jsx(MyST, { ast: node.children }) })] })] }) })));
|
|
6
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "myst-landing-invalid relative", role: "alert", children: [_jsxs("div", { className: "myst-landing-invalid-header px-4 py-2 font-bold text-white bg-red-500 rounded-t", children: ["Invalid block ", _jsx("span", { className: "font-mono", children: blockName })] }), _jsxs("div", { className: "myst-landing-invalid-border border border-t-0 border-red-400 rounded-b ", children: [_jsx("div", { className: "myst-landing-invalid-message px-4 py-3 text-red-700 bg-red-100", children: _jsxs("p", { children: ["This '", blockName, "' block does not conform to the expected AST structure."] }) }), _jsx("div", { className: "myst-landing-invalid-content px-4 py-3", children: _jsx(MyST, { ast: node.children }) })] })] }) })));
|
|
7
7
|
}
|
package/dist/JustifiedBlock.js
CHANGED
|
@@ -26,7 +26,7 @@ export function JustifiedBlock(props) {
|
|
|
26
26
|
if (!body) {
|
|
27
27
|
return _jsx(InvalidBlock, Object.assign({}, props, { blockName: "justified" }));
|
|
28
28
|
}
|
|
29
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "grid-areas-just-narrow md:grid-areas-just-wide grid grid-cols-[auto_1fr_auto] justify-between gap-2 py-20 sm:py-28 lg:px-8", children: [subtitle && (_jsx("p", { className: "grid-area-subtitle my-0 font-semibold text-indigo-400 uppercase", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "grid-area-title mt-2 mb-0 text-5xl font-semibold tracking-tight" })), body && (_jsx("div", { className: "grid-area-body mt-6", children: _jsx(MyST, { ast: body }) })), links && (_jsx("div", { className: "grid-area-links flex flex-row flex-wrap items-center gap-4", children: _jsx(MyST, { ast: links }) }))] }) })));
|
|
29
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "myst-landing-justified grid-areas-just-narrow md:grid-areas-just-wide grid grid-cols-[auto_1fr_auto] justify-between gap-2 py-20 sm:py-28 lg:px-8", children: [subtitle && (_jsx("p", { className: "myst-landing-justified-subtitle grid-area-subtitle my-0 font-semibold text-indigo-400 uppercase", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "myst-landing-justified-heading grid-area-title mt-2 mb-0 text-5xl font-semibold tracking-tight" })), body && (_jsx("div", { className: "myst-landing-justified-body grid-area-body mt-6", children: _jsx(MyST, { ast: body }) })), links && (_jsx("div", { className: "myst-landing-justified-links grid-area-links flex flex-row flex-wrap items-center gap-4", children: _jsx(MyST, { ast: links }) }))] }) })));
|
|
30
30
|
}
|
|
31
31
|
export const JUSTIFIED_RENDERERS = {
|
|
32
32
|
block: {
|
package/dist/LandingBlock.js
CHANGED
|
@@ -6,7 +6,7 @@ export function LandingBlock({ node, className, children }) {
|
|
|
6
6
|
const { key } = node;
|
|
7
7
|
const externalClassNames = classNames(className, node.class);
|
|
8
8
|
const subGrid = node.visibility === 'hide' ? '' : `${grid} subgrid-gap col-page [&>*]:col-page`;
|
|
9
|
-
return (_jsx("div", { id: key, className: classNames('relative group/block py-6', externalClassNames, {
|
|
9
|
+
return (_jsx("div", { id: key, className: classNames('myst-landing-block relative group/block py-6', externalClassNames, {
|
|
10
10
|
// Hide the subgrid if either the dataClass or the className exists and includes `col-`
|
|
11
11
|
[subGrid]: !(externalClassNames && externalClassNames.includes('col-')),
|
|
12
12
|
hidden: node.visibility === 'remove',
|
package/dist/LogoCloudBlock.js
CHANGED
|
@@ -22,7 +22,7 @@ export function LogoCloudBlock(props) {
|
|
|
22
22
|
if (!grid) {
|
|
23
23
|
return _jsx(InvalidBlock, Object.assign({}, props, { blockName: "logo-cloud" }));
|
|
24
24
|
}
|
|
25
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "py-20 text-center sm:py-28", children: [_jsx("div", { className: "font-semibold", children: _jsx(MyST, { ast: body }) }), grid && _jsx(MyST, { ast: grid }), links && (_jsx("div", { className: "flex flex-row flex-wrap items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) })));
|
|
25
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "myst-landing-logo-cloud py-20 text-center sm:py-28", children: [_jsx("div", { className: "myst-landing-logo-cloud-body font-semibold", children: _jsx(MyST, { ast: body }) }), grid && _jsx(MyST, { ast: grid }), links && (_jsx("div", { className: "myst-landing-logo-cloud-links flex flex-row flex-wrap items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) })));
|
|
26
26
|
}
|
|
27
27
|
export const LOGO_CLOUD_RENDERERS = {
|
|
28
28
|
block: {
|
package/dist/SplitImageBlock.js
CHANGED
|
@@ -28,7 +28,7 @@ export function SplitImageBlock(props) {
|
|
|
28
28
|
if (!image || !body) {
|
|
29
29
|
return _jsx(InvalidBlock, Object.assign({}, props, { blockName: "split-image" }));
|
|
30
30
|
}
|
|
31
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "relative rounded-md bg-stone-900 dark:bg-stone-800", children: [_jsx("div", { className: "lg:absolute lg:h-full lg:w-[calc(50%)] md:absolute md:h-full md:w-[calc(100%/3)] h-80 relative [&_img]:h-full [&_img]:w-full [&_img]:object-cover [&_img]:m-0 [&_picture]:m-0 [&_picture]:inline", children: _jsx(MyST, { ast: image }) }), _jsx("div", { className: "relative py-24", children: _jsxs("div", { className: "lg:ml-auto lg:w-[calc(50%)] lg:p-8 lg:pl-24 md:ml-auto md:w-[calc(2*100%/3)] md:pl-16 md:p-8 px-6", children: [subtitle && (_jsx("p", { className: "my-0 font-semibold prose text-indigo-400 uppercase prose-invert", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "mt-2 mb-0 text-5xl font-semibold tracking-tight text-white" })), _jsx("div", { className: "mt-6", children: _jsx(MyST, { ast: body, className: "prose prose-invert" }) }), links && (_jsx("div", { className: "flex flex-row flex-wrap items-center gap-4 mt-8", children: _jsx(MyST, { ast: links, className: "prose prose-invert" }) }))] }) })] }) })));
|
|
31
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "myst-landing-split-img relative rounded-md bg-stone-900 dark:bg-stone-800", children: [_jsx("div", { className: "myst-landing-split-img-image lg:absolute lg:h-full lg:w-[calc(50%)] md:absolute md:h-full md:w-[calc(100%/3)] h-80 relative [&_img]:h-full [&_img]:w-full [&_img]:object-cover [&_img]:m-0 [&_picture]:m-0 [&_picture]:inline", children: _jsx(MyST, { ast: image }) }), _jsx("div", { className: "myst-landing-split-img-content-wrapper relative py-24", children: _jsxs("div", { className: "myst-landing-split-img-content lg:ml-auto lg:w-[calc(50%)] lg:p-8 lg:pl-24 md:ml-auto md:w-[calc(2*100%/3)] md:pl-16 md:p-8 px-6", children: [subtitle && (_jsx("p", { className: "myst-landing-split-img-subtitle my-0 font-semibold prose text-indigo-400 uppercase prose-invert", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "myst-landing-split-img-heading mt-2 mb-0 text-5xl font-semibold tracking-tight text-white" })), _jsx("div", { className: "myst-landing-split-img-body mt-6", children: _jsx(MyST, { ast: body, className: "prose prose-invert" }) }), links && (_jsx("div", { className: "myst-landing-split-img-links flex flex-row flex-wrap items-center gap-4 mt-8", children: _jsx(MyST, { ast: links, className: "prose prose-invert" }) }))] }) })] }) })));
|
|
32
32
|
}
|
|
33
33
|
export const SPLIT_IMAGE_RENDERERS = {
|
|
34
34
|
block: {
|
package/dist/UnknownBlock.js
CHANGED
|
@@ -3,5 +3,5 @@ import { MyST } from 'myst-to-react';
|
|
|
3
3
|
import { LandingBlock } from './LandingBlock.js';
|
|
4
4
|
export function UnknownBlock(props) {
|
|
5
5
|
const { node, blockName } = props;
|
|
6
|
-
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "relative", role: "alert", children: [_jsxs("div", { className: "px-4 py-2 font-bold text-white bg-red-500 rounded-t", children: ["Unknown block ", _jsx("span", { className: "font-mono", children: blockName })] }), _jsx("div", { className: "px-4 py-3 border border-t-0 border-red-400 rounded-b", children: _jsx(MyST, { ast: node }) })] }) })));
|
|
6
|
+
return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "myst-landing-unknown relative", role: "alert", children: [_jsxs("div", { className: "myst-landing-unknown-header px-4 py-2 font-bold text-white bg-red-500 rounded-t", children: ["Unknown block ", _jsx("span", { className: "font-mono", children: blockName })] }), _jsx("div", { className: "myst-landing-unknown-content px-4 py-3 border border-t-0 border-red-400 rounded-b", children: _jsx(MyST, { ast: node }) })] }) })));
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/landing-pages",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"build": "npm-run-all -l clean -p build:esm"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@myst-theme/providers": "^0.
|
|
23
|
+
"@myst-theme/providers": "^0.18.0",
|
|
24
24
|
"classnames": "^2.5.1",
|
|
25
25
|
"myst-common": "^1.8.1",
|
|
26
26
|
"myst-config": "^1.7.9",
|
|
27
27
|
"myst-frontmatter": "^1.8.1",
|
|
28
28
|
"myst-spec": "^0.0.5",
|
|
29
29
|
"myst-spec-ext": "^1.8.1",
|
|
30
|
-
"myst-to-react": "^0.
|
|
30
|
+
"myst-to-react": "^0.18.0",
|
|
31
31
|
"unist-util-select": "^4.0.3",
|
|
32
32
|
"unist-util-filter": "^4.0.0"
|
|
33
33
|
},
|