@readme/markdown 6.75.0-beta.40 → 6.75.0-beta.41

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/enums.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export declare enum NodeTypes {
2
2
  callout = "rdme-callout",
3
3
  codeTabs = "code-tabs",
4
- emoji = "emoji",
4
+ emoji = "gemoji",
5
5
  i = "i",
6
6
  image = "image",
7
7
  htmlBlock = "html-block",
package/dist/main.js CHANGED
@@ -61409,7 +61409,7 @@ var NodeTypes;
61409
61409
  (function (NodeTypes) {
61410
61410
  NodeTypes["callout"] = "rdme-callout";
61411
61411
  NodeTypes["codeTabs"] = "code-tabs";
61412
- NodeTypes["emoji"] = "emoji";
61412
+ NodeTypes["emoji"] = "gemoji";
61413
61413
  NodeTypes["i"] = "i";
61414
61414
  NodeTypes["image"] = "image";
61415
61415
  NodeTypes["htmlBlock"] = "html-block";
@@ -78513,10 +78513,12 @@ const readme_components_types = {
78513
78513
  Callout: NodeTypes['callout'],
78514
78514
  Code: 'code',
78515
78515
  CodeTabs: NodeTypes['codeTabs'],
78516
+ Glossary: NodeTypes['glossary'],
78516
78517
  Image: 'image',
78517
78518
  Table: 'table',
78518
- tr: 'tableRow',
78519
+ Variable: NodeTypes['variable'],
78519
78520
  td: 'tableCell',
78521
+ tr: 'tableRow',
78520
78522
  };
78521
78523
  const attributes = (jsx) => jsx.attributes.reduce((memo, attr) => {
78522
78524
  if ('name' in attr) {
@@ -78544,13 +78546,13 @@ const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
78544
78546
  }
78545
78547
  else if (node.name === 'Image') {
78546
78548
  const { position } = node;
78547
- const { alt = '', src, title = null } = attributes(node);
78549
+ const { alt = '', url, title = null } = attributes(node);
78548
78550
  const mdNode = {
78549
78551
  alt,
78550
78552
  position,
78551
78553
  title,
78552
78554
  type: 'image',
78553
- url: src,
78555
+ url,
78554
78556
  };
78555
78557
  parent.children[index] = mdNode;
78556
78558
  }
@@ -78679,7 +78681,9 @@ const compile_image_image = (node) => {
78679
78681
  const { align, className, width } = ((_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties) || {};
78680
78682
  const complexImage = Boolean(width) || Boolean(className) || Boolean(align);
78681
78683
  if (complexImage) {
78682
- const attributes = Object.keys((_b = node.data) === null || _b === void 0 ? void 0 : _b.hProperties).map(key => { var _a; return `${key}="${(_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties[key]}"`; }).join(' ');
78684
+ const attributes = Object.keys((_b = node.data) === null || _b === void 0 ? void 0 : _b.hProperties)
78685
+ .map(key => { var _a; return `${key}="${(_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties[key]}"`; })
78686
+ .join(' ');
78683
78687
  return `<Image ${attributes} />`;
78684
78688
  }
78685
78689
  return `![${node.alt}](${node.url}${node.title ? ` "${node.title}")` : ')'}`;
package/dist/main.node.js CHANGED
@@ -63549,7 +63549,7 @@ var NodeTypes;
63549
63549
  (function (NodeTypes) {
63550
63550
  NodeTypes["callout"] = "rdme-callout";
63551
63551
  NodeTypes["codeTabs"] = "code-tabs";
63552
- NodeTypes["emoji"] = "emoji";
63552
+ NodeTypes["emoji"] = "gemoji";
63553
63553
  NodeTypes["i"] = "i";
63554
63554
  NodeTypes["image"] = "image";
63555
63555
  NodeTypes["htmlBlock"] = "html-block";
@@ -80653,10 +80653,12 @@ const readme_components_types = {
80653
80653
  Callout: NodeTypes['callout'],
80654
80654
  Code: 'code',
80655
80655
  CodeTabs: NodeTypes['codeTabs'],
80656
+ Glossary: NodeTypes['glossary'],
80656
80657
  Image: 'image',
80657
80658
  Table: 'table',
80658
- tr: 'tableRow',
80659
+ Variable: NodeTypes['variable'],
80659
80660
  td: 'tableCell',
80661
+ tr: 'tableRow',
80660
80662
  };
80661
80663
  const attributes = (jsx) => jsx.attributes.reduce((memo, attr) => {
80662
80664
  if ('name' in attr) {
@@ -80684,13 +80686,13 @@ const coerceJsxToMd = ({ components = {} } = {}) => (node, index, parent) => {
80684
80686
  }
80685
80687
  else if (node.name === 'Image') {
80686
80688
  const { position } = node;
80687
- const { alt = '', src, title = null } = attributes(node);
80689
+ const { alt = '', url, title = null } = attributes(node);
80688
80690
  const mdNode = {
80689
80691
  alt,
80690
80692
  position,
80691
80693
  title,
80692
80694
  type: 'image',
80693
- url: src,
80695
+ url,
80694
80696
  };
80695
80697
  parent.children[index] = mdNode;
80696
80698
  }
@@ -80819,7 +80821,9 @@ const compile_image_image = (node) => {
80819
80821
  const { align, className, width } = ((_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties) || {};
80820
80822
  const complexImage = Boolean(width) || Boolean(className) || Boolean(align);
80821
80823
  if (complexImage) {
80822
- const attributes = Object.keys((_b = node.data) === null || _b === void 0 ? void 0 : _b.hProperties).map(key => { var _a; return `${key}="${(_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties[key]}"`; }).join(' ');
80824
+ const attributes = Object.keys((_b = node.data) === null || _b === void 0 ? void 0 : _b.hProperties)
80825
+ .map(key => { var _a; return `${key}="${(_a = node.data) === null || _a === void 0 ? void 0 : _a.hProperties[key]}"`; })
80826
+ .join(' ');
80823
80827
  return `<Image ${attributes} />`;
80824
80828
  }
80825
80829
  return `![${node.alt}](${node.url}${node.title ? ` "${node.title}")` : ')'}`;
@@ -1,3 +1,3 @@
1
- import type { Image } from "mdast";
1
+ import type { Image } from 'mdast';
2
2
  declare const image: (node: Image) => string;
3
3
  export default image;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "6.75.0-beta.40",
5
+ "version": "6.75.0-beta.41",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",