@autoguru/overdrive 4.51.0 → 4.52.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/components/DropDown/DropDown.d.ts.map +1 -1
- package/dist/components/MarkdownRenderer/MarkdownRenderer.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.css.js +18 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts +14 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.js +45 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.css.js +23 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownBlockquote.js +23 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.css.d.ts +3 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.css.js +34 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownCodeBlock.js +30 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.css.js +14 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownEmphasis.js +23 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHeading.d.ts +30 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHeading.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHeading.js +43 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHorizontalRule.d.ts +9 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHorizontalRule.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownHorizontalRule.js +21 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.css.js +17 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.d.ts +11 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownImage.js +24 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.css.js +19 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownInlineCode.js +23 -0
- package/dist/components/MarkdownRenderer/components/MarkdownLink.d.ts +11 -0
- package/dist/components/MarkdownRenderer/components/MarkdownLink.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownLink.js +28 -0
- package/dist/components/MarkdownRenderer/components/MarkdownListItem.d.ts +11 -0
- package/dist/components/MarkdownRenderer/components/MarkdownListItem.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownListItem.js +35 -0
- package/dist/components/MarkdownRenderer/components/MarkdownOrderedList.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownOrderedList.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownOrderedList.js +27 -0
- package/dist/components/MarkdownRenderer/components/MarkdownParagraph.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownParagraph.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownParagraph.js +25 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.css.d.ts +2 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.css.js +14 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrikethrough.js +23 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrong.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrong.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownStrong.js +24 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.css.d.ts +5 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.css.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.css.js +45 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.d.ts +18 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownTable.js +54 -0
- package/dist/components/MarkdownRenderer/components/MarkdownUnorderedList.d.ts +10 -0
- package/dist/components/MarkdownRenderer/components/MarkdownUnorderedList.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/MarkdownUnorderedList.js +27 -0
- package/dist/components/MarkdownRenderer/components/index.d.ts +3 -0
- package/dist/components/MarkdownRenderer/components/index.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/components/index.js +43 -0
- package/dist/components/MarkdownRenderer/index.d.ts +2 -0
- package/dist/components/MarkdownRenderer/index.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer/index.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/themes/base/index.d.ts +2 -0
- package/dist/themes/base/index.d.ts.map +1 -1
- package/dist/themes/base/tokens.d.ts +1 -0
- package/dist/themes/base/tokens.d.ts.map +1 -1
- package/dist/themes/base/tokens.js +1 -0
- package/dist/themes/flat_red/index.d.ts +2 -0
- package/dist/themes/flat_red/index.d.ts.map +1 -1
- package/dist/themes/flat_red/tokens.d.ts +1 -0
- package/dist/themes/flat_red/tokens.d.ts.map +1 -1
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/makeTheme.d.ts +1 -0
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/neutral/index.d.ts +2 -0
- package/dist/themes/neutral/index.d.ts.map +1 -1
- package/dist/themes/neutral/tokens.d.ts +1 -0
- package/dist/themes/neutral/tokens.d.ts.map +1 -1
- package/dist/themes/theme.css.d.ts +1 -0
- package/dist/themes/theme.css.d.ts.map +1 -1
- package/dist/themes/theme.css.js +1 -0
- package/package.json +13 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EACN,cAAc,EACd,iBAAiB,EAEjB,SAAS,EAIT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,KAAK,WAAW,GAAG,IAAI,CACtB,cAAc,CAAC,OAAO,MAAM,CAAC,EAC7B,IAAI,GAAG,UAAU,GAAG,SAAS,CAC7B,CAAC;AACF,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC;AAEpE,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,WAAW;IAC9D,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../../lib/components/DropDown/DropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EACN,cAAc,EACd,iBAAiB,EAEjB,SAAS,EAIT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,KAAK,WAAW,GAAG,IAAI,CACtB,cAAc,CAAC,OAAO,MAAM,CAAC,EAC7B,IAAI,GAAG,UAAU,GAAG,SAAS,CAC7B,CAAC;AACF,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC;AAEpE,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,WAAW;IAC9D,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CA4DrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.css.d.ts","sourceRoot":"","sources":["../../../lib/components/MarkdownRenderer/MarkdownRenderer.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,QASf,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/MarkdownRenderer.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../styles/layers.css.js";
|
|
7
|
+
import { overdriveTokens as tokens } from "../../themes/theme.css.js";
|
|
8
|
+
export const root = style({
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
fontFamily: tokens.typography.fontFamily,
|
|
12
|
+
fontSize: tokens.typography.size[4].fontSize,
|
|
13
|
+
lineHeight: tokens.typography.size[4].lineHeight,
|
|
14
|
+
wordBreak: 'break-word'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}, "root");
|
|
18
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ClassValue as ClassName } from 'clsx';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TestIdProp } from '../../types';
|
|
4
|
+
export interface MarkdownRendererProps extends TestIdProp {
|
|
5
|
+
/** The markdown string to render */
|
|
6
|
+
content: string;
|
|
7
|
+
/** Optional additional class name */
|
|
8
|
+
className?: ClassName;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders GitHub Flavored Markdown content using Overdrive design tokens and components.
|
|
12
|
+
*/
|
|
13
|
+
export declare const MarkdownRenderer: React.ForwardRefExoticComponent<MarkdownRendererProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=MarkdownRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../lib/components/MarkdownRenderer/MarkdownRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACxD,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB;AAID;;GAEG;AACH,eAAO,MAAM,gBAAgB,8FAsB3B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["content", "className", "testId"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import ReactMarkdown from 'react-markdown';
|
|
10
|
+
import remarkGfm from 'remark-gfm';
|
|
11
|
+
import { useBox } from "../Box/useBox/useBox.js";
|
|
12
|
+
import * as styles from "./MarkdownRenderer.css.js";
|
|
13
|
+
import { createComponentMap } from "./components/index.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const componentMap = createComponentMap();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Renders GitHub Flavored Markdown content using Overdrive design tokens and components.
|
|
19
|
+
*/
|
|
20
|
+
export const MarkdownRenderer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
21
|
+
let {
|
|
22
|
+
content,
|
|
23
|
+
className,
|
|
24
|
+
testId
|
|
25
|
+
} = _ref,
|
|
26
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
const {
|
|
28
|
+
Component,
|
|
29
|
+
componentProps
|
|
30
|
+
} = useBox(_objectSpread(_objectSpread({}, props), {}, {
|
|
31
|
+
as: 'div',
|
|
32
|
+
className: [styles.root, className],
|
|
33
|
+
odComponent: 'markdown-renderer',
|
|
34
|
+
testId
|
|
35
|
+
}));
|
|
36
|
+
return /*#__PURE__*/_jsx(Component, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
37
|
+
ref: ref,
|
|
38
|
+
children: /*#__PURE__*/_jsx(ReactMarkdown, {
|
|
39
|
+
remarkPlugins: [remarkGfm],
|
|
40
|
+
components: componentMap,
|
|
41
|
+
children: content
|
|
42
|
+
})
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
MarkdownRenderer.displayName = 'MarkdownRenderer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownBlockquote.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownBlockquote.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,QAcrB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/components/MarkdownBlockquote.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../../styles/layers.css.js";
|
|
7
|
+
import { overdriveTokens as tokens } from "../../../themes/theme.css.js";
|
|
8
|
+
export const blockquote = style({
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
backgroundColor: tokens.color.gamut.gray[100],
|
|
12
|
+
borderLeft: `${tokens.border.width['3']} solid ${tokens.color.gamut.gray[400]}`,
|
|
13
|
+
color: tokens.color.gamut.gray[700],
|
|
14
|
+
marginBottom: tokens.space[3],
|
|
15
|
+
marginLeft: 0,
|
|
16
|
+
marginRight: 0,
|
|
17
|
+
marginTop: tokens.space[3],
|
|
18
|
+
padding: tokens.space[4],
|
|
19
|
+
paddingLeft: tokens.space[4]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, "blockquote");
|
|
23
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownBlockquoteProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
node?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkdownBlockquote: {
|
|
7
|
+
({ children, node: _node, ...props }: MarkdownBlockquoteProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=MarkdownBlockquote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownBlockquote.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownBlockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB;0CAI5B,uBAAuB;;CAIzB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import * as styles from "./MarkdownBlockquote.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownBlockquote = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
node: _node
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_jsx("blockquote", _objectSpread(_objectSpread({
|
|
18
|
+
className: styles.blockquote
|
|
19
|
+
}, props), {}, {
|
|
20
|
+
children: children
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
MarkdownBlockquote.displayName = 'MarkdownBlockquote';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownCodeBlock.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAepB,CAAC;AAEH,eAAO,MAAM,cAAc,QASzB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/components/MarkdownCodeBlock.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../../styles/layers.css.js";
|
|
7
|
+
import { overdriveTokens as tokens } from "../../../themes/theme.css.js";
|
|
8
|
+
export const codeBlock = style({
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
backgroundColor: tokens.color.gamut.gray[900],
|
|
12
|
+
borderRadius: tokens.border.radius.md,
|
|
13
|
+
color: tokens.color.gamut.white,
|
|
14
|
+
fontFamily: tokens.typography.fontFamilyMono,
|
|
15
|
+
fontSize: tokens.typography.size[3].fontSize,
|
|
16
|
+
lineHeight: tokens.typography.size[3].lineHeight,
|
|
17
|
+
marginBottom: tokens.space[3],
|
|
18
|
+
marginTop: tokens.space[3],
|
|
19
|
+
overflowX: 'auto',
|
|
20
|
+
padding: tokens.space[4]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, "codeBlock");
|
|
24
|
+
export const codeBlockInner = style({
|
|
25
|
+
'@layer': {
|
|
26
|
+
[cssLayerComponent]: {
|
|
27
|
+
backgroundColor: 'transparent',
|
|
28
|
+
fontFamily: 'inherit',
|
|
29
|
+
fontSize: 'inherit',
|
|
30
|
+
padding: 0
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, "codeBlockInner");
|
|
34
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownCodeBlockProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
node?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkdownCodeBlock: {
|
|
7
|
+
({ children, node: _node, ...props }: MarkdownCodeBlockProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=MarkdownCodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownCodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB;0CAI3B,sBAAsB;;CAcxB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import * as styles from "./MarkdownCodeBlock.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownCodeBlock = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
node: _node
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_jsx("pre", _objectSpread(_objectSpread({
|
|
18
|
+
className: styles.codeBlock
|
|
19
|
+
}, props), {}, {
|
|
20
|
+
children: React.Children.map(children, child => {
|
|
21
|
+
if (/*#__PURE__*/React.isValidElement(child) && child.type === 'code') {
|
|
22
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
23
|
+
className: styles.codeBlockInner
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return child;
|
|
27
|
+
})
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
MarkdownCodeBlock.displayName = 'MarkdownCodeBlock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownEmphasis.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownEmphasis.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,QAMnB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/components/MarkdownEmphasis.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../../styles/layers.css.js";
|
|
7
|
+
export const emphasis = style({
|
|
8
|
+
'@layer': {
|
|
9
|
+
[cssLayerComponent]: {
|
|
10
|
+
fontStyle: 'italic'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}, "emphasis");
|
|
14
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownEmphasisProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
node?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkdownEmphasis: {
|
|
7
|
+
({ children, node: _node, ...props }: MarkdownEmphasisProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=MarkdownEmphasis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownEmphasis.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownEmphasis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB;0CAI1B,qBAAqB;;CAIvB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import * as styles from "./MarkdownEmphasis.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownEmphasis = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
node: _node
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_jsx("em", _objectSpread(_objectSpread({
|
|
18
|
+
className: styles.emphasis
|
|
19
|
+
}, props), {}, {
|
|
20
|
+
children: children
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
MarkdownEmphasis.displayName = 'MarkdownEmphasis';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownHeadingProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
node?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkdownH1: {
|
|
7
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const MarkdownH2: {
|
|
11
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const MarkdownH3: {
|
|
15
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const MarkdownH4: {
|
|
19
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const MarkdownH5: {
|
|
23
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const MarkdownH6: {
|
|
27
|
+
({ children, node: _node, ...props }: MarkdownHeadingProps): React.JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=MarkdownHeading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownHeading.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM9C,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAyBD,eAAO,MAAM,UAAU;0CATnB,oBAAoB;;CAS8B,CAAC;AACvD,eAAO,MAAM,UAAU;0CAVnB,oBAAoB;;CAU8B,CAAC;AACvD,eAAO,MAAM,UAAU;0CAXnB,oBAAoB;;CAW8B,CAAC;AACvD,eAAO,MAAM,UAAU;0CAZnB,oBAAoB;;CAY8B,CAAC;AACvD,eAAO,MAAM,UAAU;0CAbnB,oBAAoB;;CAa8B,CAAC;AACvD,eAAO,MAAM,UAAU;0CAdnB,oBAAoB;;CAc8B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Heading } from "../../Heading/Heading.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
function createHeadingComponent(level) {
|
|
12
|
+
const sizeMap = {
|
|
13
|
+
h1: '9',
|
|
14
|
+
h2: '8',
|
|
15
|
+
h3: '7',
|
|
16
|
+
h4: '6',
|
|
17
|
+
h5: '5',
|
|
18
|
+
h6: '4'
|
|
19
|
+
};
|
|
20
|
+
const Component = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
children,
|
|
23
|
+
node: _node
|
|
24
|
+
} = _ref,
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
return /*#__PURE__*/_jsx(Heading, _objectSpread(_objectSpread({
|
|
27
|
+
as: level,
|
|
28
|
+
size: sizeMap[level],
|
|
29
|
+
mb: "3",
|
|
30
|
+
mt: "5"
|
|
31
|
+
}, props), {}, {
|
|
32
|
+
children: children
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
Component.displayName = `MarkdownHeading(${level})`;
|
|
36
|
+
return Component;
|
|
37
|
+
}
|
|
38
|
+
export const MarkdownH1 = createHeadingComponent('h1');
|
|
39
|
+
export const MarkdownH2 = createHeadingComponent('h2');
|
|
40
|
+
export const MarkdownH3 = createHeadingComponent('h3');
|
|
41
|
+
export const MarkdownH4 = createHeadingComponent('h4');
|
|
42
|
+
export const MarkdownH5 = createHeadingComponent('h5');
|
|
43
|
+
export const MarkdownH6 = createHeadingComponent('h6');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MarkdownHorizontalRuleProps {
|
|
3
|
+
node?: unknown;
|
|
4
|
+
}
|
|
5
|
+
export declare const MarkdownHorizontalRule: {
|
|
6
|
+
({ node: _node, ...props }: MarkdownHorizontalRuleProps): React.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=MarkdownHorizontalRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownHorizontalRule.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownHorizontalRule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,2BAA2B;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB;gCAGhC,2BAA2B;;CAE7B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { DividerLine } from "../../DividerLine/DividerLine.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownHorizontalRule = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
node: _node
|
|
14
|
+
} = _ref,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
return /*#__PURE__*/_jsx(DividerLine, _objectSpread({
|
|
17
|
+
space: "4",
|
|
18
|
+
colour: "neutral"
|
|
19
|
+
}, props));
|
|
20
|
+
};
|
|
21
|
+
MarkdownHorizontalRule.displayName = 'MarkdownHorizontalRule';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownImage.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownImage.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,QAQhB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/components/MarkdownImage.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../../styles/layers.css.js";
|
|
7
|
+
import { overdriveTokens as tokens } from "../../../themes/theme.css.js";
|
|
8
|
+
export const image = style({
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
borderRadius: tokens.border.radius.md,
|
|
12
|
+
height: 'auto',
|
|
13
|
+
maxWidth: '100%'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, "image");
|
|
17
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MarkdownImageProps {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
node?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare const MarkdownImage: {
|
|
8
|
+
({ src, alt, node: _node, ...props }: MarkdownImageProps): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=MarkdownImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownImage.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,kBAAkB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,aAAa;0CAKvB,kBAAkB;;CAEpB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["src", "alt", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import * as styles from "./MarkdownImage.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownImage = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
src,
|
|
14
|
+
alt,
|
|
15
|
+
node: _node
|
|
16
|
+
} = _ref,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/_jsx("img", _objectSpread({
|
|
19
|
+
src: src,
|
|
20
|
+
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
21
|
+
className: styles.image
|
|
22
|
+
}, props));
|
|
23
|
+
};
|
|
24
|
+
MarkdownImage.displayName = 'MarkdownImage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownInlineCode.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownInlineCode.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,QAUrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/components/MarkdownRenderer/components/MarkdownInlineCode.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { cssLayerComponent } from "../../../styles/layers.css.js";
|
|
7
|
+
import { overdriveTokens as tokens } from "../../../themes/theme.css.js";
|
|
8
|
+
export const inlineCode = style({
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
backgroundColor: tokens.color.gamut.gray[200],
|
|
12
|
+
borderRadius: tokens.border.radius.sm,
|
|
13
|
+
fontFamily: tokens.typography.fontFamilyMono,
|
|
14
|
+
fontSize: tokens.typography.size[3].fontSize,
|
|
15
|
+
padding: `${tokens.space[1]} ${tokens.space[1]}`
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, "inlineCode");
|
|
19
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownInlineCodeProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
node?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkdownInlineCode: {
|
|
7
|
+
({ children, node: _node, ...props }: MarkdownInlineCodeProps): React.JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=MarkdownInlineCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownInlineCode.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownInlineCode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB;0CAI5B,uBAAuB;;CAIzB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
const _excluded = ["children", "node"];
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import * as styles from "./MarkdownInlineCode.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const MarkdownInlineCode = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
node: _node
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_jsx("code", _objectSpread(_objectSpread({
|
|
18
|
+
className: styles.inlineCode
|
|
19
|
+
}, props), {}, {
|
|
20
|
+
children: children
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
MarkdownInlineCode.displayName = 'MarkdownInlineCode';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface MarkdownLinkProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
node?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare const MarkdownLink: {
|
|
8
|
+
({ children, href, node: _node, ...props }: MarkdownLinkProps): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=MarkdownLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownLink.d.ts","sourceRoot":"","sources":["../../../../lib/components/MarkdownRenderer/components/MarkdownLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,YAAY;gDAKtB,iBAAiB;;CAanB,CAAC"}
|