@skbkontur/markdown 1.3.5 → 1.4.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.
@@ -2,7 +2,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
- import styled from '../styles/styled-components';
5
+ import styled from 'styled-components';
6
6
  export var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow-wrap: break-word;\n word-wrap: break-word;\n\n word-break: break-word;\n\n p,\n table,\n blockquote {\n margin-bottom: 16px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n ul,\n ol,\n li {\n p {\n margin: 0;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n margin-bottom: 8px;\n }\n\n img {\n max-width: 100%;\n }\n\n button {\n text-align: left;\n color: ", ";\n }\n\n table {\n background: transparent;\n }\n"], ["\n overflow-wrap: break-word;\n word-wrap: break-word;\n\n word-break: break-word;\n\n p,\n table,\n blockquote {\n margin-bottom: 16px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n ul,\n ol,\n li {\n p {\n margin: 0;\n }\n }\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n margin-bottom: 8px;\n }\n\n img {\n max-width: 100%;\n }\n\n button {\n text-align: left;\n color: ", ";\n }\n\n table {\n background: transparent;\n }\n"])), function (p) { var _a, _b; return (_b = (_a = p.theme) === null || _a === void 0 ? void 0 : _a.colors) === null || _b === void 0 ? void 0 : _b.link; });
7
7
  export var ListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n list-style: none;\n margin-inline-start: -20px;\n"], ["\n list-style: none;\n margin-inline-start: -20px;\n"])));
8
8
  export var Paragraph = styled.p(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
@@ -0,0 +1,6 @@
1
+ import 'styled-components';
2
+ import { MarkdownTheme } from './theme';
3
+
4
+ declare module 'styled-components' {
5
+ export interface DefaultTheme extends MarkdownTheme {}
6
+ }
@@ -1,3 +1,5 @@
1
+ import { Consumer, PropsWithChildren } from 'react';
2
+ import { MarkdownTheme } from './theme';
1
3
  export interface ColorScheme {
2
4
  brand: string;
3
5
  disabledButton: string;
@@ -7,3 +9,7 @@ export interface ColorScheme {
7
9
  white: string;
8
10
  }
9
11
  export type ThemeMode = 'dark' | 'light';
12
+ export type MarkdownThemeProviderType = ({ children, theme, }: PropsWithChildren<{
13
+ theme: MarkdownTheme;
14
+ }>) => JSX.Element | null;
15
+ export type MarkdownThemeConsumerType = Consumer<MarkdownTheme | undefined>;
@@ -1,5 +0,0 @@
1
- import * as styledComponents from 'styled-components';
2
- import { MarkdownTheme } from './theme';
3
- declare const styled: styledComponents.ThemedStyledInterface<MarkdownTheme>, css: styledComponents.ThemedCssFunction<MarkdownTheme>, MarkdownThemeProvider: styledComponents.BaseThemeProviderComponent<MarkdownTheme, MarkdownTheme>, MarkdownThemeConsumer: import("react").Consumer<MarkdownTheme>;
4
- export { css, MarkdownThemeProvider, MarkdownThemeConsumer };
5
- export default styled;
@@ -1,4 +0,0 @@
1
- import * as styledComponents from 'styled-components';
2
- var _a = styledComponents, styled = _a.default, css = _a.css, MarkdownThemeProvider = _a.ThemeProvider, MarkdownThemeConsumer = _a.ThemeConsumer;
3
- export { css, MarkdownThemeProvider, MarkdownThemeConsumer };
4
- export default styled;