myst-to-react 0.13.4 → 0.13.5

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/basic.d.ts CHANGED
@@ -34,6 +34,9 @@ type Keyboard = {
34
34
  type Include = {
35
35
  type: 'include';
36
36
  };
37
+ type Glossary = {
38
+ type: 'glossary';
39
+ };
37
40
  type BasicNodeRenderers = {
38
41
  text: NodeRenderer<spec.Text>;
39
42
  span: NodeRenderer<GenericNode>;
@@ -72,6 +75,7 @@ type BasicNodeRenderers = {
72
75
  definitionTerm: NodeRenderer<DefinitionTerm>;
73
76
  definitionDescription: NodeRenderer<DefinitionDescription>;
74
77
  include: NodeRenderer<Include>;
78
+ glossary: NodeRenderer<Glossary>;
75
79
  };
76
80
  declare const BASIC_RENDERERS: BasicNodeRenderers;
77
81
  export default BASIC_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../src/basic.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,KAAK,SAAS,GAAG;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AA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AAC,CAAC;IAChC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAEpD,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,WAAW,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAExC,aAAa,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC3C,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7B,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAEnC,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAC7C,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAC7C,qBAAqB,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAC3D,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC;AAEF,QAAA,MAAM,eAAe,EAAE,kBA4StB,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/dist/basic.js CHANGED
@@ -129,13 +129,13 @@ const BASIC_RENDERERS = {
129
129
  return null;
130
130
  },
131
131
  definitionList({ node }) {
132
- return (_jsx("dl", { className: "my-5", id: node.html_id, children: _jsx(MyST, { ast: node.children }) }));
132
+ return (_jsx("dl", { className: "my-5", id: node.html_id || node.identifier || node.key, children: _jsx(MyST, { ast: node.children }) }));
133
133
  },
134
134
  definitionTerm({ node }) {
135
135
  var _a, _b;
136
136
  const allowedStrongTypes = new Set(['text', 'emphasis']);
137
137
  const makeStrong = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.reduce((allowed, n) => allowed && allowedStrongTypes.has(n.type), true)) !== null && _b !== void 0 ? _b : false;
138
- return (_jsx("dt", { id: node.html_id, children: makeStrong ? (_jsx("strong", { children: _jsx(MyST, { ast: node.children }) })) : (_jsx(MyST, { ast: node.children })) }));
138
+ return (_jsx("dt", { id: node.html_id || node.identifier || node.key, children: makeStrong ? (_jsx("strong", { children: _jsx(MyST, { ast: node.children }) })) : (_jsx(MyST, { ast: node.children })) }));
139
139
  },
140
140
  definitionDescription({ node }) {
141
141
  return (_jsx("dd", { children: _jsx(MyST, { ast: node.children }) }));
@@ -147,5 +147,9 @@ const BASIC_RENDERERS = {
147
147
  // TODO, provider could give context about the filename
148
148
  return _jsx(MyST, { ast: node.children });
149
149
  },
150
+ glossary({ node }) {
151
+ // TODO, provider could give context about the filename
152
+ return (_jsx("div", { id: node.html_id || node.identifier || node.key, className: node.class, children: _jsx(MyST, { ast: node.children }) }));
153
+ },
150
154
  };
151
155
  export default BASIC_RENDERERS;
@@ -1 +1 @@
1
- {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAaF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CAiFrC;AAuDD,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../src/code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1D,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAaF,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,2CAiFrC;AA2DD,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/dist/code.js CHANGED
@@ -5,6 +5,7 @@ import classNames from 'classnames';
5
5
  import { CopyIcon } from './components/index.js';
6
6
  import { MyST } from './MyST.js';
7
7
  import { useMemo } from 'react';
8
+ import { Details } from './dropdown.js';
8
9
  function normalizeLanguage(lang) {
9
10
  switch (lang) {
10
11
  case 'html':
@@ -55,7 +56,11 @@ export function CodeBlock(props) {
55
56
  }), children: [filename && (_jsxs("div", { className: "flex flex-row pl-2 bg-white border-b dark:bg-slate-600 dark:border-slate-300", children: [_jsx(DocumentIcon, { width: "16px", height: "16px", className: "self-center flex-none inline-block text-gray-500 dark:text-gray-100" }), _jsx("div", { className: "self-center p-2 text-sm leading-3 prose text-slate-600 dark:text-white", children: filename })] })), _jsx(SyntaxHighlighter, Object.assign({}, highlighterProps, { className: "block p-3 hljs", children: value })), showCopy && (_jsx(CopyIcon, { text: value, className: classNames('absolute right-1', { 'top-[32px]': filename, 'top-1': !filename }) }))] }));
56
57
  }
57
58
  const code = ({ node }) => {
58
- return (_jsx(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, filename: node.filename, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable, className: classNames({ hidden: node.visibility === 'remove' }, node.class) }));
59
+ const child = (_jsx(CodeBlock, { identifier: node.html_id, "data-mdast-node-type": node.type, "data-mdast-node-id": node.key, value: node.value || '', lang: node.lang, filename: node.filename, emphasizeLines: node.emphasizeLines, showLineNumbers: node.showLineNumbers, startingLineNumber: node.startingLineNumber, shadow: true, border: node.executable, background: !node.executable, className: classNames({ hidden: node.visibility === 'remove' }, node.class) }));
60
+ if (node.visibility === 'hide') {
61
+ return _jsx(Details, { title: "Source", children: child });
62
+ }
63
+ return child;
59
64
  };
60
65
  function isColor(maybeColorHash) {
61
66
  if (!maybeColorHash || maybeColorHash.length > 9)
@@ -8,10 +8,11 @@ type SummarySpec = {
8
8
  type: 'summary';
9
9
  };
10
10
  export declare const SummaryTitle: NodeRenderer<SummarySpec>;
11
- export declare function Details({ title, children, open, }: {
11
+ export declare function Details({ title, children, open, className, }: {
12
12
  title: React.ReactNode;
13
13
  children: React.ReactNode;
14
14
  open?: boolean;
15
+ className?: string;
15
16
  }): import("react/jsx-runtime").JSX.Element;
16
17
  export declare const DetailsRenderer: NodeRenderer<DropdownSpec>;
17
18
  declare const DROPDOWN_RENDERERS: {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../src/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,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,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CA+BA;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,YAAY,CAOtD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/dist/dropdown.js CHANGED
@@ -6,12 +6,12 @@ const iconClass = 'inline-block pl-2 mr-2 -translate-y-[1px]';
6
6
  export const SummaryTitle = ({ node }) => {
7
7
  return _jsx(MyST, { ast: node.children });
8
8
  };
9
- export function Details({ title, children, open, }) {
10
- return (_jsxs("details", { className: classNames('rounded-md my-5 shadow dark:shadow-2xl dark:shadow-neutral-900 overflow-hidden', 'bg-gray-50 dark:bg-stone-800'), open: open, children: [_jsx("summary", { className: classNames('m-0 text-lg font-medium py-1 min-h-[2em] pl-3', 'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]', 'bg-gray-100 dark:bg-slate-900'), children: _jsxs("span", { className: "text-neutral-900 dark:text-white", children: [_jsx("span", { className: "block float-right text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'details-toggle', 'transition-transform') }) }), title] }) }), _jsx("div", { className: "px-4 py-1 details-body", children: children })] }));
9
+ export function Details({ title, children, open, className, }) {
10
+ return (_jsxs("details", { className: classNames('rounded-md my-5 shadow dark:shadow-2xl dark:shadow-neutral-900 overflow-hidden', 'bg-gray-50 dark:bg-stone-800', className), open: open, children: [_jsx("summary", { className: classNames('m-0 text-lg font-medium py-1 min-h-[2em] pl-3', 'cursor-pointer hover:shadow-[inset_0_0_0px_30px_#00000003] dark:hover:shadow-[inset_0_0_0px_30px_#FFFFFF03]', 'bg-gray-100 dark:bg-slate-900'), children: _jsxs("span", { className: "text-neutral-900 dark:text-white", children: [_jsx("span", { className: "block float-right text-sm font-thin text-neutral-700 dark:text-neutral-200", children: _jsx(ChevronRightIcon, { width: "1.5rem", height: "1.5rem", className: classNames(iconClass, 'details-toggle', 'transition-transform') }) }), title] }) }), _jsx("div", { className: "px-4 py-1 details-body", children: children })] }));
11
11
  }
12
12
  export const DetailsRenderer = ({ node }) => {
13
13
  const [title, ...rest] = node.children;
14
- return (_jsx(Details, { title: _jsx(MyST, { ast: [title] }), open: node.open, children: _jsx(MyST, { ast: rest }) }));
14
+ return (_jsx(Details, { title: _jsx(MyST, { ast: [title] }), open: node.open, className: node.class, children: _jsx(MyST, { ast: rest }) }));
15
15
  };
16
16
  const DROPDOWN_RENDERERS = {
17
17
  details: DetailsRenderer,
package/dist/grid.js CHANGED
@@ -91,7 +91,7 @@ function gridColumnClasses(columns) {
91
91
  }
92
92
  return [
93
93
  // getColumnClassName(gridClassNames.main, columns[0]),
94
- getColumnClassName(gridClassNames.sm, columns[0]),
94
+ getColumnClassName(gridClassNames.main, columns[0]),
95
95
  getColumnClassName(gridClassNames.md, columns[1]),
96
96
  getColumnClassName(gridClassNames.lg, columns[2]),
97
97
  getColumnClassName(gridClassNames.xl, columns[3]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myst-to-react",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "type": "module",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@heroicons/react": "^2.0.18",
24
- "@myst-theme/providers": "^0.13.4",
24
+ "@myst-theme/providers": "^0.13.5",
25
25
  "@scienceicons/react": "^0.0.11",
26
26
  "@radix-ui/react-hover-card": "^1.0.6",
27
27
  "buffer": "^6.0.3",