@myst-theme/landing-pages 0.14.2 → 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 +1 @@
|
|
|
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,
|
|
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"}
|
package/dist/LandingBlock.js
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/landing-pages",
|
|
3
|
-
"version": "0.14.
|
|
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.
|
|
23
|
+
"@myst-theme/providers": "^0.14.3",
|
|
24
24
|
"classnames": "^2.5.1",
|
|
25
25
|
"myst-common": "^1.7.9",
|
|
26
26
|
"myst-config": "^1.7.9",
|
|
27
27
|
"myst-frontmatter": "^1.7.9",
|
|
28
28
|
"myst-spec": "^0.0.5",
|
|
29
29
|
"myst-spec-ext": "^1.7.9",
|
|
30
|
-
"myst-to-react": "^0.14.
|
|
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
|
},
|