@myst-theme/landing-pages 0.0.0 → 0.14.3

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.
@@ -1,10 +1,9 @@
1
1
  import type { GenericParent } from 'myst-common';
2
- import React from 'react';
3
2
  export declare function BlockHeading({ node, className }: {
4
3
  node: GenericParent;
5
4
  className?: string;
6
- }): React.ReactElement<{
5
+ }): import("react").ReactElement<{
7
6
  className: string;
8
7
  id: any;
9
- }, string | React.JSXElementConstructor<any>>;
8
+ }, string | import("react").JSXElementConstructor<any>>;
10
9
  //# sourceMappingURL=BlockHeading.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockHeading.d.ts","sourceRoot":"","sources":["../src/BlockHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;8CAkB5F"}
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;;;wDAkB5F"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createElement as e } from 'react';
2
3
  import { MyST, HashLink } from 'myst-to-react';
3
4
  import classNames from 'classnames';
4
- import { createElement as e } from 'react';
5
5
  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
9
  className: classNames(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", className: "px-2 font-normal", hover: true, hideInPopup: true })] }));
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", className: "font-normal", hover: true, hideInPopup: true, noWidth: true })] }));
12
12
  }
@@ -1,6 +1,5 @@
1
1
  import type { NodeRenderers } from '@myst-theme/providers';
2
2
  import { type LandingBlockProps } from './LandingBlock.js';
3
3
  export declare function CenteredBlock(props: Omit<LandingBlockProps, 'children'>): import("react/jsx-runtime").JSX.Element;
4
- declare const CENTERED_RENDERERS: NodeRenderers;
5
- export default CENTERED_RENDERERS;
4
+ export declare const CENTERED_RENDERERS: NodeRenderers;
6
5
  //# sourceMappingURL=CenteredBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CenteredBlock.d.ts","sourceRoot":"","sources":["../src/CenteredBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CAuDvE;AAED,QAAA,MAAM,kBAAkB,EAAE,aAIzB,CAAC;AACF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"CenteredBlock.d.ts","sourceRoot":"","sources":["../src/CenteredBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CAuDvE;AAED,eAAO,MAAM,kBAAkB,EAAE,aAIhC,CAAC"}
@@ -26,11 +26,10 @@ 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: "font-semibold text-indigo-400 uppercase my-0", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "text-5xl font-semibold tracking-tight mt-2 mb-0" })), body && (_jsx("div", { className: "mt-6", children: _jsx(MyST, { ast: body }) })), links && (_jsx("div", { className: "mt-8 flex gap-4 items-center justify-center", children: _jsx(MyST, { ast: links }) }))] }) }) })));
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 items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) }) })));
30
30
  }
31
- const CENTERED_RENDERERS = {
31
+ export const CENTERED_RENDERERS = {
32
32
  block: {
33
33
  'block[kind=centered]': CenteredBlock,
34
34
  },
35
35
  };
36
- export default CENTERED_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidBlock.d.ts","sourceRoot":"","sources":["../src/InvalidBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAoB9F"}
1
+ {"version":3,"file":"InvalidBlock.d.ts","sourceRoot":"","sources":["../src/InvalidBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAoB9F"}
@@ -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: "bg-red-500 text-white font-bold rounded-t px-4 py-2", 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: "bg-red-100 text-red-700 px-4 py-3", 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: "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 }) })] })] }) })));
7
7
  }
@@ -1,6 +1,5 @@
1
1
  import type { NodeRenderers } from '@myst-theme/providers';
2
2
  import { type LandingBlockProps } from './LandingBlock.js';
3
3
  export declare function JustifiedBlock(props: Omit<LandingBlockProps, 'children'>): import("react/jsx-runtime").JSX.Element;
4
- declare const JUSTIFIED_RENDERERS: NodeRenderers;
5
- export default JUSTIFIED_RENDERERS;
4
+ export declare const JUSTIFIED_RENDERERS: NodeRenderers;
6
5
  //# sourceMappingURL=JustifiedBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JustifiedBlock.d.ts","sourceRoot":"","sources":["../src/JustifiedBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CA4DxE;AAED,QAAA,MAAM,mBAAmB,EAAE,aAI1B,CAAC;AACF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"JustifiedBlock.d.ts","sourceRoot":"","sources":["../src/JustifiedBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CA4DxE;AAED,eAAO,MAAM,mBAAmB,EAAE,aAIjC,CAAC"}
@@ -26,11 +26,10 @@ 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: "py-20 sm:py-28 lg:px-8", children: [subtitle && (_jsx("p", { className: "font-semibold text-indigo-400 uppercase my-0", children: _jsx(MyST, { ast: subtitle.children }) })), _jsxs("div", { className: "flex flex-col lg:content-center lg:justify-between lg:flex-row", children: [_jsxs("div", { className: "flex flex-col", children: [heading && (_jsx(BlockHeading, { node: heading, className: "text-5xl font-semibold tracking-tight mt-2 mb-0" })), body && (_jsx("div", { className: "mt-6", children: _jsx(MyST, { ast: body }) }))] }), _jsx("div", { className: "flex flex-col mt-8 lg:mt-0", children: links && (_jsx("div", { className: "flex flex-row gap-4 items-center", children: _jsx(MyST, { ast: links }) })) })] })] }) })));
29
+ return (_jsx(LandingBlock, Object.assign({}, props, { children: _jsxs("div", { className: "py-20 sm:py-28 lg:px-8", children: [subtitle && (_jsx("p", { className: "my-0 font-semibold text-indigo-400 uppercase", children: _jsx(MyST, { ast: subtitle.children }) })), _jsxs("div", { className: "flex flex-col lg:content-center lg:justify-between lg:flex-row", children: [_jsxs("div", { className: "flex flex-col", 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 }) }))] }), _jsx("div", { className: "flex flex-col mt-8 lg:mt-0", children: links && (_jsx("div", { className: "flex flex-row items-center gap-4", children: _jsx(MyST, { ast: links }) })) })] })] }) })));
30
30
  }
31
- const JUSTIFIED_RENDERERS = {
31
+ export const JUSTIFIED_RENDERERS = {
32
32
  block: {
33
33
  'block[kind=justified]': JustifiedBlock,
34
34
  },
35
35
  };
36
- export default JUSTIFIED_RENDERERS;
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  import type { GenericParent } from 'myst-common';
3
3
  export type LandingBlockProps = {
4
4
  node: GenericParent;
5
5
  className?: string;
6
- children: React.ReactNode;
6
+ children: ReactNode;
7
7
  };
8
8
  export declare function LandingBlock({ node, className, children }: LandingBlockProps): import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=LandingBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LandingBlock.d.ts","sourceRoot":"","sources":["../src/LandingBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAsB5E"}
1
+ {"version":3,"file":"LandingBlock.d.ts","sourceRoot":"","sources":["../src/LandingBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAoB5E"}
@@ -2,15 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useGridSystemProvider } from '@myst-theme/providers';
3
3
  import classNames from 'classnames';
4
4
  export function LandingBlock({ node, className, children }) {
5
- var _a, _b;
6
5
  const grid = useGridSystemProvider();
7
6
  const { key } = node;
7
+ const externalClassNames = classNames(className, node.class);
8
8
  const subGrid = node.visibility === 'hide' ? '' : `${grid} subgrid-gap col-page [&>*]:col-page`;
9
- const dataClassName = typeof ((_a = node.data) === null || _a === void 0 ? void 0 : _a.class) === 'string' ? (_b = node.data) === null || _b === void 0 ? void 0 : _b.class : undefined;
10
- // Hide the subgrid if either the dataClass or the className exists and includes `col-`
11
- const noSubGrid = (dataClassName && dataClassName.includes('col-')) || (className && className.includes('col-'));
12
- return (_jsx("div", { id: key, className: classNames('relative group/block py-6', className, dataClassName, {
13
- [subGrid]: !noSubGrid,
9
+ return (_jsx("div", { id: key, className: classNames('relative group/block py-6', externalClassNames, {
10
+ // Hide the subgrid if either the dataClass or the className exists and includes `col-`
11
+ [subGrid]: !(externalClassNames && externalClassNames.includes('col-')),
14
12
  hidden: node.visibility === 'remove',
15
13
  }), children: children }, `block-${key}`));
16
14
  }
@@ -1,6 +1,5 @@
1
1
  import type { NodeRenderers } from '@myst-theme/providers';
2
2
  import { type LandingBlockProps } from './LandingBlock.js';
3
3
  export declare function LogoCloudBlock(props: Omit<LandingBlockProps, 'children'>): import("react/jsx-runtime").JSX.Element;
4
- declare const LOGO_CLOUD_RENDERERS: NodeRenderers;
5
- export default LOGO_CLOUD_RENDERERS;
4
+ export declare const LOGO_CLOUD_RENDERERS: NodeRenderers;
6
5
  //# sourceMappingURL=LogoCloudBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogoCloudBlock.d.ts","sourceRoot":"","sources":["../src/LogoCloudBlock.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CAwCxE;AAED,QAAA,MAAM,oBAAoB,EAAE,aAI3B,CAAC;AACF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"LogoCloudBlock.d.ts","sourceRoot":"","sources":["../src/LogoCloudBlock.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CAwCxE;AAED,eAAO,MAAM,oBAAoB,EAAE,aAIlC,CAAC"}
@@ -22,11 +22,10 @@ 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: "text-center py-20 sm:py-28", children: [_jsx("div", { className: "font-semibold", children: _jsx(MyST, { ast: body }) }), grid && _jsx(MyST, { ast: grid }), links && (_jsx("div", { className: "mt-8 flex gap-4 items-center justify-center", children: _jsx(MyST, { ast: links }) }))] }) })));
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 items-center justify-center gap-4 mt-8", children: _jsx(MyST, { ast: links }) }))] }) })));
26
26
  }
27
- const LOGO_CLOUD_RENDERERS = {
27
+ export const LOGO_CLOUD_RENDERERS = {
28
28
  block: {
29
29
  'block[kind=logo-cloud]': LogoCloudBlock,
30
30
  },
31
31
  };
32
- export default LOGO_CLOUD_RENDERERS;
@@ -1,6 +1,5 @@
1
1
  import type { NodeRenderers } from '@myst-theme/providers';
2
2
  import { type LandingBlockProps } from './LandingBlock.js';
3
3
  export declare function SplitImageBlock(props: Omit<LandingBlockProps, 'children'>): import("react/jsx-runtime").JSX.Element;
4
- declare const SPLIT_IMAGE_RENDERERS: NodeRenderers;
5
- export default SPLIT_IMAGE_RENDERERS;
4
+ export declare const SPLIT_IMAGE_RENDERERS: NodeRenderers;
6
5
  //# sourceMappingURL=SplitImageBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplitImageBlock.d.ts","sourceRoot":"","sources":["../src/SplitImageBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CA6DzE;AAED,QAAA,MAAM,qBAAqB,EAAE,aAI5B,CAAC;AACF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"SplitImageBlock.d.ts","sourceRoot":"","sources":["../src/SplitImageBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,2CA6DzE;AAED,eAAO,MAAM,qBAAqB,EAAE,aAInC,CAAC"}
@@ -28,11 +28,10 @@ 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 bg-stone-900 dark:bg-stone-800 rounded-md", 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: " prose prose-invert font-semibold text-indigo-400 uppercase my-0", children: _jsx(MyST, { ast: subtitle.children }) })), heading && (_jsx(BlockHeading, { node: heading, className: "text-white text-5xl font-semibold tracking-tight mt-2 mb-0" })), _jsx("div", { className: "mt-6", children: _jsx(MyST, { ast: body, className: "prose prose-invert" }) }), links && (_jsx("div", { className: "mt-8 flex gap-4 items-center", children: _jsx(MyST, { ast: links, className: "prose prose-invert" }) }))] }) })] }) })));
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 items-center gap-4 mt-8", children: _jsx(MyST, { ast: links, className: "prose prose-invert" }) }))] }) })] }) })));
32
32
  }
33
- const SPLIT_IMAGE_RENDERERS = {
33
+ export const SPLIT_IMAGE_RENDERERS = {
34
34
  block: {
35
35
  'block[kind=split-image]': SplitImageBlock,
36
36
  },
37
37
  };
38
- export default SPLIT_IMAGE_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"UnknownBlock.d.ts","sourceRoot":"","sources":["../src/UnknownBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAc9F"}
1
+ {"version":3,"file":"UnknownBlock.d.ts","sourceRoot":"","sources":["../src/UnknownBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,2CAc9F"}
@@ -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: "bg-red-500 text-white font-bold rounded-t px-4 py-2", children: ["Unknown block ", _jsx("span", { className: "font-mono", children: blockName })] }), _jsx("div", { className: "border border-t-0 border-red-400 rounded-b px-4 py-3", children: _jsx(MyST, { ast: node }) })] }) })));
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 }) })] }) })));
7
7
  }
package/dist/index.d.ts CHANGED
@@ -3,6 +3,5 @@ export * from './SplitImageBlock.js';
3
3
  export * from './CenteredBlock.js';
4
4
  export * from './JustifiedBlock.js';
5
5
  export * from './LogoCloudBlock.js';
6
- declare const BLOCK_RENDERERS: NodeRenderers;
7
- export default BLOCK_RENDERERS;
6
+ export declare const LANDING_PAGE_RENDERERS: NodeRenderers;
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAO3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,QAAA,MAAM,eAAe,EAAE,aAKrB,CAAC;AACH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAO3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAEpC,eAAO,MAAM,sBAAsB,EAAE,aAKnC,CAAC"}
package/dist/index.js CHANGED
@@ -1,16 +1,15 @@
1
- import SPLIT_IMAGE_RENDERERS from './SplitImageBlock.js';
2
- import CENTERED_RENDERERS from './CenteredBlock.js';
3
- import JUSTIFIED_RENDERERS from './JustifiedBlock.js';
4
- import LOGO_CLOUD_RENDERERS from './LogoCloudBlock.js';
1
+ import { SPLIT_IMAGE_RENDERERS } from './SplitImageBlock.js';
2
+ import { CENTERED_RENDERERS } from './CenteredBlock.js';
3
+ import { JUSTIFIED_RENDERERS } from './JustifiedBlock.js';
4
+ import { LOGO_CLOUD_RENDERERS } from './LogoCloudBlock.js';
5
5
  import { mergeRenderers } from '@myst-theme/providers';
6
6
  export * from './SplitImageBlock.js';
7
7
  export * from './CenteredBlock.js';
8
8
  export * from './JustifiedBlock.js';
9
9
  export * from './LogoCloudBlock.js';
10
- const BLOCK_RENDERERS = mergeRenderers([
10
+ export const LANDING_PAGE_RENDERERS = mergeRenderers([
11
11
  SPLIT_IMAGE_RENDERERS,
12
12
  CENTERED_RENDERERS,
13
13
  JUSTIFIED_RENDERERS,
14
14
  LOGO_CLOUD_RENDERERS,
15
15
  ]);
16
- export default BLOCK_RENDERERS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/landing-pages",
3
- "version": "0.0.0",
3
+ "version": "0.14.3",
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.14.1",
23
+ "@myst-theme/providers": "^0.14.3",
24
24
  "classnames": "^2.5.1",
25
- "myst-common": "^1.7.8",
26
- "myst-config": "^1.7.8",
27
- "myst-frontmatter": "^1.7.8",
25
+ "myst-common": "^1.7.9",
26
+ "myst-config": "^1.7.9",
27
+ "myst-frontmatter": "^1.7.9",
28
28
  "myst-spec": "^0.0.5",
29
- "myst-spec-ext": "^1.7.8",
30
- "myst-to-react": "^0.14.1",
29
+ "myst-spec-ext": "^1.7.9",
30
+ "myst-to-react": "^0.14.3",
31
31
  "unist-util-select": "^4.0.3",
32
32
  "unist-util-filter": "^4.0.0"
33
33
  },