timvir 0.2.38 → 0.2.42

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
  3. package/blocks/Arbitrary/index.js +232 -78
  4. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  5. package/blocks/Arbitrary/styles.css +166 -6
  6. package/blocks/Code/Code.d.ts +0 -6
  7. package/blocks/Code/docs/index.mdx +0 -11
  8. package/blocks/Code/index.js +213 -112
  9. package/blocks/Code/samples/basic.d.ts +1 -1
  10. package/blocks/Code/samples/toggle.d.ts +1 -2
  11. package/blocks/Code/styles.css +100 -15
  12. package/blocks/ColorBar/docs/index.mdx +8 -2
  13. package/blocks/ColorBar/index.js +223 -68
  14. package/blocks/ColorBar/samples/basic.d.ts +1 -2
  15. package/blocks/ColorBar/styles.css +103 -4
  16. package/blocks/ColorBook/docs/index.mdx +1 -1
  17. package/blocks/ColorBook/index.js +222 -60
  18. package/blocks/ColorBook/samples/basic.d.ts +1 -2
  19. package/blocks/ColorBook/styles.css +166 -6
  20. package/blocks/Cover/index.js +177 -48
  21. package/blocks/Cover/samples/basic.d.ts +1 -2
  22. package/blocks/Cover/styles.css +18 -0
  23. package/blocks/Exhibit/index.js +205 -50
  24. package/blocks/Exhibit/samples/basic.d.ts +1 -2
  25. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  26. package/blocks/Exhibit/samples/usage.d.ts +1 -2
  27. package/blocks/Exhibit/styles.css +66 -3
  28. package/blocks/Font/index.js +239 -98
  29. package/blocks/Font/samples/basic.d.ts +1 -1
  30. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  31. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  32. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  33. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  34. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  35. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  36. package/blocks/Font/styles.css +82 -8
  37. package/blocks/Grid/docs/index.mdx +4 -4
  38. package/blocks/Grid/index.js +181 -36
  39. package/blocks/Grid/samples/basic.d.ts +1 -2
  40. package/blocks/Grid/styles.css +20 -1
  41. package/blocks/Icon/docs/index.mdx +13 -13
  42. package/blocks/Icon/index.js +93 -100
  43. package/blocks/Icon/internal/Canvas.d.ts +1 -1
  44. package/blocks/Icon/samples/basic.d.ts +1 -2
  45. package/blocks/Icon/styles.css +117 -5
  46. package/blocks/Icon/types.d.ts +3 -2
  47. package/blocks/Message/docs/index.mdx +5 -8
  48. package/blocks/Message/index.js +238 -55
  49. package/blocks/Message/samples/basic.d.ts +1 -1
  50. package/blocks/Message/styles.css +94 -6
  51. package/blocks/Swatch/docs/index.mdx +16 -16
  52. package/blocks/Swatch/index.js +199 -45
  53. package/blocks/Swatch/samples/basic.d.ts +1 -2
  54. package/blocks/Swatch/styles.css +82 -4
  55. package/blocks/Viewport/index.js +360 -237
  56. package/blocks/Viewport/internal/Caption.d.ts +1 -1
  57. package/blocks/Viewport/internal/Handle.d.ts +1 -1
  58. package/blocks/Viewport/internal/Ruler.d.ts +1 -2
  59. package/blocks/Viewport/samples/basic.d.ts +1 -2
  60. package/blocks/Viewport/styles.css +259 -14
  61. package/blocks/WebLink/index.js +217 -62
  62. package/blocks/WebLink/samples/basic.d.ts +1 -1
  63. package/blocks/WebLink/styles.css +170 -8
  64. package/blocks/styles.css +1460 -97
  65. package/builtins/components.d.ts +2 -2
  66. package/builtins/index.js +306 -239
  67. package/builtins/styles.css +267 -14
  68. package/context/index.d.ts +6 -1
  69. package/core/components/Commands/Commands.d.ts +2 -0
  70. package/core/components/Commands/internal/Action.d.ts +1 -1
  71. package/core/components/Commands/internal/Dialog.d.ts +1 -2
  72. package/core/components/Commands/internal/index.d.ts +0 -1
  73. package/core/components/Footer/samples/basic.d.ts +1 -1
  74. package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
  75. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  76. package/core/components/Page/Page.d.ts +12 -3
  77. package/core/components/Page/docs/index.mdx +44 -11
  78. package/core/components/Page/internal/Section.d.ts +1 -2
  79. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  80. package/core/components/Page/internal/SidebarItem.d.ts +1 -2
  81. package/core/components/Page/internal/index.d.ts +0 -1
  82. package/core/components/Page/samples/basic.d.ts +1 -2
  83. package/core/components/Page/samples/layout.d.ts +1 -2
  84. package/core/index.d.ts +191 -2
  85. package/core/index.js +674 -449
  86. package/core/layout.d.ts +40 -0
  87. package/core/styles.css +857 -88
  88. package/core/theme/detector.js +1 -1
  89. package/global.css +79 -0
  90. package/internal/cx.d.ts +1 -0
  91. package/knip.config.d.ts +5 -0
  92. package/package.json +1 -2
  93. package/search/Search/samples/basic.d.ts +1 -2
  94. package/search/index.js +2 -208
  95. package/styles.css +2670 -222
  96. package/blocks/Code/theme.d.ts +0 -2
  97. package/bus/styles.css +0 -1
  98. package/context/styles.css +0 -1
  99. package/core/theme/index.d.ts +0 -1
  100. package/hooks/styles.css +0 -1
  101. package/search/Search/internal/Dialog.d.ts +0 -20
  102. package/search/Search/internal/index.d.ts +0 -1
  103. package/search/SearchBoxInput/SearchBoxInput.d.ts +0 -11
  104. package/search/SearchBoxInput/docs/api.mdx +0 -76
  105. package/search/SearchBoxInput/docs/index.mdx +0 -6
  106. package/search/SearchBoxInput/index.d.ts +0 -1
  107. package/search/SearchBoxInput/samples/basic.d.ts +0 -2
  108. package/search/SearchBoxListItem/SearchBoxListItem.d.ts +0 -13
  109. package/search/SearchBoxListItem/docs/api.mdx +0 -76
  110. package/search/SearchBoxListItem/docs/index.mdx +0 -30
  111. package/search/SearchBoxListItem/index.d.ts +0 -1
  112. package/search/SearchBoxListItem/samples/basic.d.ts +0 -2
  113. package/search/styles.css +0 -16
@@ -9,8 +9,8 @@ export declare const table: React.FunctionComponent<React.TableHTMLAttributes<HT
9
9
  export declare const thead: React.FunctionComponent<React.HTMLAttributes<HTMLTableSectionElement>>;
10
10
  export declare const tbody: React.FunctionComponent<React.HTMLAttributes<HTMLTableSectionElement>>;
11
11
  export declare const tr: React.FunctionComponent<React.HTMLAttributes<HTMLTableRowElement>>;
12
- export declare const th: React.FunctionComponent<React.ThHTMLAttributes<HTMLTableHeaderCellElement>>;
13
- export declare const td: React.FunctionComponent<React.TdHTMLAttributes<HTMLTableDataCellElement>>;
12
+ export declare const th: React.FunctionComponent<React.ThHTMLAttributes<HTMLTableCellElement>>;
13
+ export declare const td: React.FunctionComponent<React.TdHTMLAttributes<HTMLTableCellElement>>;
14
14
  export declare const code: React.FunctionComponent<React.HTMLAttributes<HTMLElement>>;
15
15
  export declare const a: React.FunctionComponent<React.AnchorHTMLAttributes<HTMLAnchorElement>>;
16
16
  export declare const p: React.FunctionComponent<React.HTMLAttributes<HTMLParagraphElement>>;
package/builtins/index.js CHANGED
@@ -1,160 +1,158 @@
1
1
  import * as React from 'react';
2
- import { forwardRef, createElement } from 'react';
3
2
  import * as Icons from 'react-feather';
3
+ import { layoutStyles } from 'timvir/core';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
5
 
5
- function memoize(fn) {
6
- var cache = Object.create(null);
7
- return function (arg) {
8
- if (cache[arg] === undefined) cache[arg] = fn(arg);
9
- return cache[arg];
10
- };
11
- }
12
-
13
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
14
-
15
- var isPropValid = /* #__PURE__ */memoize(function (prop) {
16
- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
17
- /* o */ && prop.charCodeAt(1) === 110
18
- /* n */ && prop.charCodeAt(2) < 91;
19
- }
20
- /* Z+1 */);
21
-
22
- // src/css.ts
23
-
24
- // src/cx.ts
25
- var cx = function cx2() {
26
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
27
- const atomicClasses = {};
28
- const nonAtomicClasses = [];
29
- presentClassNames.forEach((arg) => {
30
- const individualClassNames = arg ? arg.split(" ") : [];
31
- individualClassNames.forEach((className) => {
32
- if (className.startsWith("atm_")) {
33
- const [, keyHash] = className.split("_");
34
- atomicClasses[keyHash] = className;
35
- } else {
36
- nonAtomicClasses.push(className);
37
- }
6
+ var styleq = {};
7
+ var hasRequiredStyleq;
8
+ function requireStyleq() {
9
+ if (hasRequiredStyleq) return styleq;
10
+ hasRequiredStyleq = 1;
11
+ Object.defineProperty(styleq, "__esModule", {
12
+ value: true
38
13
  });
39
- });
40
- const result = [];
41
- for (const keyHash in atomicClasses) {
42
- if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
43
- result.push(atomicClasses[keyHash]);
14
+ styleq.styleq = void 0;
15
+ var cache = new WeakMap();
16
+ var compiledKey = '$$css';
17
+ function createStyleq(options) {
18
+ var disableCache;
19
+ var disableMix;
20
+ var transform;
21
+ if (options != null) {
22
+ disableCache = options.disableCache === true;
23
+ disableMix = options.disableMix === true;
24
+ transform = options.transform;
25
+ }
26
+ return function styleq() {
27
+ var definedProperties = [];
28
+ var className = '';
29
+ var inlineStyle = null;
30
+ var debugString = '';
31
+ var nextCache = disableCache ? null : cache;
32
+ var styles = new Array(arguments.length);
33
+ for(var i = 0; i < arguments.length; i++){
34
+ styles[i] = arguments[i];
35
+ }
36
+ while(styles.length > 0){
37
+ var possibleStyle = styles.pop();
38
+ if (possibleStyle == null || possibleStyle === false) {
39
+ continue;
40
+ }
41
+ if (Array.isArray(possibleStyle)) {
42
+ for(var _i = 0; _i < possibleStyle.length; _i++){
43
+ styles.push(possibleStyle[_i]);
44
+ }
45
+ continue;
46
+ }
47
+ var style = transform != null ? transform(possibleStyle) : possibleStyle;
48
+ if (style.$$css != null) {
49
+ var classNameChunk = '';
50
+ if (nextCache != null && nextCache.has(style)) {
51
+ var cacheEntry = nextCache.get(style);
52
+ if (cacheEntry != null) {
53
+ classNameChunk = cacheEntry[0];
54
+ debugString = cacheEntry[2];
55
+ definedProperties.push.apply(definedProperties, cacheEntry[1]);
56
+ nextCache = cacheEntry[3];
57
+ }
58
+ } else {
59
+ var definedPropertiesChunk = [];
60
+ for(var prop in style){
61
+ var value = style[prop];
62
+ if (prop === compiledKey) {
63
+ var compiledKeyValue = style[prop];
64
+ if (compiledKeyValue !== true) {
65
+ debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
66
+ }
67
+ continue;
68
+ }
69
+ if (typeof value === 'string' || value === null) {
70
+ if (!definedProperties.includes(prop)) {
71
+ definedProperties.push(prop);
72
+ if (nextCache != null) {
73
+ definedPropertiesChunk.push(prop);
74
+ }
75
+ if (typeof value === 'string') {
76
+ classNameChunk += classNameChunk ? ' ' + value : value;
77
+ }
78
+ }
79
+ } else {
80
+ console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
81
+ }
82
+ }
83
+ if (nextCache != null) {
84
+ var weakMap = new WeakMap();
85
+ nextCache.set(style, [
86
+ classNameChunk,
87
+ definedPropertiesChunk,
88
+ debugString,
89
+ weakMap
90
+ ]);
91
+ nextCache = weakMap;
92
+ }
93
+ }
94
+ if (classNameChunk) {
95
+ className = className ? classNameChunk + ' ' + className : classNameChunk;
96
+ }
97
+ } else {
98
+ if (disableMix) {
99
+ if (inlineStyle == null) {
100
+ inlineStyle = {};
101
+ }
102
+ inlineStyle = Object.assign({}, style, inlineStyle);
103
+ } else {
104
+ var subStyle = null;
105
+ for(var _prop in style){
106
+ var _value = style[_prop];
107
+ if (_value !== undefined) {
108
+ if (!definedProperties.includes(_prop)) {
109
+ if (_value != null) {
110
+ if (inlineStyle == null) {
111
+ inlineStyle = {};
112
+ }
113
+ if (subStyle == null) {
114
+ subStyle = {};
115
+ }
116
+ subStyle[_prop] = _value;
117
+ }
118
+ definedProperties.push(_prop);
119
+ nextCache = null;
120
+ }
121
+ }
122
+ }
123
+ if (subStyle != null) {
124
+ inlineStyle = Object.assign(subStyle, inlineStyle);
125
+ }
126
+ }
127
+ }
128
+ }
129
+ var styleProps = [
130
+ className,
131
+ inlineStyle,
132
+ debugString
133
+ ];
134
+ return styleProps;
135
+ };
44
136
  }
45
- }
46
- result.push(...nonAtomicClasses);
47
- return result.join(" ");
48
- };
49
- var cx_default = cx;
50
-
51
- // src/styled.ts
52
- var isCapital = (ch) => ch.toUpperCase() === ch;
53
- var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
54
- var omit = (obj, keys) => {
55
- const res = {};
56
- Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
57
- res[key] = obj[key];
58
- });
59
- return res;
60
- };
61
- function filterProps(asIs, props, omitKeys) {
62
- const filteredProps = omit(props, omitKeys);
63
- if (!asIs) {
64
- const interopValidAttr = typeof isPropValid === "function" ? { default: isPropValid } : isPropValid;
65
- Object.keys(filteredProps).forEach((key) => {
66
- if (!interopValidAttr.default(key)) {
67
- delete filteredProps[key];
68
- }
69
- });
70
- }
71
- return filteredProps;
137
+ var styleq$1 = styleq.styleq = createStyleq();
138
+ styleq$1.factory = createStyleq;
139
+ return styleq;
72
140
  }
73
- var warnIfInvalid = (value, componentName) => {
74
- if (process.env.NODE_ENV !== "production") {
75
- if (typeof value === "string" || // eslint-disable-next-line no-self-compare,no-restricted-globals
76
- typeof value === "number" && isFinite(value)) {
77
- return;
141
+ var styleqExports = requireStyleq();
142
+ function props(...styles) {
143
+ const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
144
+ const result = {};
145
+ if (className != null && className !== '') {
146
+ result.className = className;
78
147
  }
79
- const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
80
- console.warn(
81
- `An interpolation evaluated to '${stringified}' in the component '${componentName}', which is probably a mistake. You should explicitly cast or transform the value to a string.`
82
- );
83
- }
84
- };
85
- var idx = 0;
86
- function styled(tag) {
87
- let mockedClass = "";
88
- if (process.env.NODE_ENV === "test") {
89
- mockedClass += `mocked-styled-${idx++}`;
90
- if (tag && tag.__wyw_meta && tag.__wyw_meta.className) {
91
- mockedClass += ` ${tag.__wyw_meta.className}`;
148
+ if (style != null && Object.keys(style).length > 0) {
149
+ result.style = style;
92
150
  }
93
- }
94
- return (options) => {
95
- if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test") {
96
- if (Array.isArray(options)) {
97
- throw new Error(
98
- 'Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup'
99
- );
100
- }
151
+ if (dataStyleSrc != null && dataStyleSrc !== '') {
152
+ result['data-style-src'] = dataStyleSrc;
101
153
  }
102
- const render = (props, ref) => {
103
- const { as: component = tag, class: className = mockedClass } = props;
104
- const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
105
- const filteredProps = filterProps(shouldKeepProps, props, [
106
- "as",
107
- "class"
108
- ]);
109
- filteredProps.ref = ref;
110
- filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
111
- const { vars } = options;
112
- if (vars) {
113
- const style = {};
114
- for (const name in vars) {
115
- const variable = vars[name];
116
- const result = variable[0];
117
- const unit = variable[1] || "";
118
- const value = typeof result === "function" ? result(props) : result;
119
- warnIfInvalid(value, options.name);
120
- style[`--${name}`] = `${value}${unit}`;
121
- }
122
- const ownStyle = filteredProps.style || {};
123
- const keys = Object.keys(ownStyle);
124
- if (keys.length > 0) {
125
- keys.forEach((key) => {
126
- style[key] = ownStyle[key];
127
- });
128
- }
129
- filteredProps.style = style;
130
- }
131
- if (tag.__wyw_meta && tag !== component) {
132
- filteredProps.as = component;
133
- return createElement(tag, filteredProps);
134
- }
135
- return createElement(component, filteredProps);
136
- };
137
- const Result = forwardRef ? forwardRef(render) : (
138
- // React.forwardRef won't available on older React versions and in Preact
139
- // Fallback to a innerRef prop in that case
140
- (props) => {
141
- const rest = omit(props, ["innerRef"]);
142
- return render(rest, props.innerRef);
143
- }
144
- );
145
- Result.displayName = options.name;
146
- Result.__wyw_meta = {
147
- className: options.class || mockedClass,
148
- extends: tag
149
- };
150
- return Result;
151
- };
154
+ return result;
152
155
  }
153
- var styled_default = process.env.NODE_ENV !== "production" ? new Proxy(styled, {
154
- get(o, prop) {
155
- return o(prop);
156
- }
157
- }) : styled;
158
156
 
159
157
  const anchorize = children => {
160
158
  if (typeof children === "string") {
@@ -165,114 +163,183 @@ const anchorize = children => {
165
163
  };
166
164
  function Heading(Component) {
167
165
  return function Heading(props) {
168
- const id = anchorize(props.children);
169
- return /*#__PURE__*/React.createElement(Component, {
166
+ const {
167
+ children,
168
+ ...rest
169
+ } = props;
170
+ const id = anchorize(children);
171
+ return /*#__PURE__*/jsx(Component, {
172
+ ...rest,
170
173
  id: id,
171
- ...props
172
- }, /*#__PURE__*/React.createElement("a", {
173
- className: "a1yepc47",
174
- href: id && `#${id}`
175
- }, props.children, /*#__PURE__*/React.createElement(Icons.Link, {
176
- className: "calmbc7"
177
- })));
174
+ children: /*#__PURE__*/jsxs("a", {
175
+ className: "timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-bok0fy timvir-s-158d8ml timvir-s-1rb6emv timvir-s-1xi2g7t",
176
+ href: id && `#${id}`,
177
+ children: [children, /*#__PURE__*/jsx(Icons.Link, {
178
+ className: "timvir-s-1rg5ohu timvir-s-16vho4v timvir-s-vgvpxu timvir-s-1pazyae timvir-s-1y6pbyt timvir-s-xymvpz timvir-s-2r93rw timvir-s-1i3gk9 timvir-s-o5ics5 timvir-s-6ah1hw"
179
+ })]
180
+ })
181
+ });
178
182
  };
179
183
  }
180
- const h1 = /*#__PURE__*/styled_default('h1')({
181
- name: "h1",
182
- class: "hryzf2k",
183
- propsAsIs: false
184
+ const h1 = props$1 => /*#__PURE__*/jsx("h1", {
185
+ ...props(layoutStyles.block, styles.h1),
186
+ ...props$1
184
187
  });
185
- const h2 = Heading(/*#__PURE__*/styled_default('h2')({
186
- name: "h2",
187
- class: "h1r910l8",
188
- propsAsIs: false
188
+ const h2 = Heading(props$1 => /*#__PURE__*/jsx("h2", {
189
+ ...props(layoutStyles.block, styles.h2),
190
+ ...props$1
189
191
  }));
190
- const h3 = Heading(/*#__PURE__*/styled_default('h3')({
191
- name: "h3",
192
- class: "hmqldzl",
193
- propsAsIs: false
192
+ const h3 = Heading(props$1 => /*#__PURE__*/jsx("h3", {
193
+ ...props(layoutStyles.block, styles.h3),
194
+ ...props$1
194
195
  }));
195
- const h4 = Heading(/*#__PURE__*/styled_default('h4')({
196
- name: "h4",
197
- class: "hpw7qeo",
198
- propsAsIs: false
196
+ const h4 = Heading(props$1 => /*#__PURE__*/jsx("h4", {
197
+ ...props(layoutStyles.block, styles.h4),
198
+ ...props$1
199
199
  }));
200
- const blockquote = /*#__PURE__*/styled_default('blockquote')({
201
- name: "blockquote",
202
- class: "b1gfctk0",
203
- propsAsIs: false
204
- });
205
- const hr = /*#__PURE__*/styled_default('hr')({
206
- name: "hr",
207
- class: "h1kfhyug",
208
- propsAsIs: false
209
- });
210
- const table = /*#__PURE__*/styled_default('table')({
211
- name: "table",
212
- class: "t11kzh9g",
213
- propsAsIs: false
200
+ const blockquote = props$1 => {
201
+ const {
202
+ children,
203
+ ...rest
204
+ } = props$1;
205
+ return /*#__PURE__*/jsx("blockquote", {
206
+ ...rest,
207
+ ...props(layoutStyles.block, styles.blockquote),
208
+ children: React.Children.toArray(children).filter(x => x !== "\n").map((child, index, self) => {
209
+ if (! /*#__PURE__*/React.isValidElement(child)) {
210
+ return child;
211
+ }
212
+ const style = {
213
+ marginTop: index === 0 ? "0" : undefined,
214
+ marginBottom: index === self.length - 1 ? "0" : undefined
215
+ };
216
+ return /*#__PURE__*/React.cloneElement(child, {
217
+ style
218
+ });
219
+ })
220
+ });
221
+ };
222
+ const hr = props$1 => /*#__PURE__*/jsx("hr", {
223
+ ...props(layoutStyles.block, styles.hr),
224
+ ...props$1
214
225
  });
215
- const thead = /*#__PURE__*/styled_default('thead')({
216
- name: "thead",
217
- class: "t15na2yl",
218
- propsAsIs: false
226
+ const table = props$1 => /*#__PURE__*/jsx("table", {
227
+ ...props(layoutStyles.block, styles.table),
228
+ ...props$1
219
229
  });
220
- const tbody = /*#__PURE__*/styled_default('tbody')({
221
- name: "tbody",
222
- class: "t80peu3",
223
- propsAsIs: false
230
+ const thead = props => /*#__PURE__*/jsx("thead", {
231
+ ...props
224
232
  });
225
- const tr = /*#__PURE__*/styled_default('tr')({
226
- name: "tr",
227
- class: "t1ichb2u",
228
- propsAsIs: false
233
+ const tbody = props => /*#__PURE__*/jsx("tbody", {
234
+ ...props
229
235
  });
230
- const _exp = () => props => props.align || "center";
231
- const th = /*#__PURE__*/styled_default('th')({
232
- name: "th",
233
- class: "tynrygb",
234
- propsAsIs: false,
235
- vars: {
236
- "tynrygb-0": [_exp()]
237
- }
236
+ const tr = props => /*#__PURE__*/jsx("tr", {
237
+ className: "timvir-s-83z2og timvir-s-178xt8z timvir-s-13fuv20 timvir-s-1r4gg6b timvir-s-7kswos",
238
+ ...props
238
239
  });
239
- const _exp2 = () => props => props.align || "left";
240
- const td = /*#__PURE__*/styled_default('td')({
241
- name: "td",
242
- class: "ta24p8f",
243
- propsAsIs: false,
244
- vars: {
245
- "ta24p8f-0": [_exp2()]
246
- }
247
- });
248
- const code = /*#__PURE__*/styled_default('code')({
249
- name: "code",
250
- class: "ctk2u2p",
251
- propsAsIs: false
240
+ const th = props => {
241
+ const {
242
+ align,
243
+ ...rest
244
+ } = props;
245
+ const style = {
246
+ textAlign: align || "center"
247
+ };
248
+ return /*#__PURE__*/jsx("th", {
249
+ className: "timvir-s-12ek6fo timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-1kgrkcs",
250
+ style: style,
251
+ ...rest
252
+ });
253
+ };
254
+ const td = props => {
255
+ const {
256
+ align,
257
+ ...rest
258
+ } = props;
259
+ const style = {
260
+ textAlign: align || "left"
261
+ };
262
+ return /*#__PURE__*/jsx("td", {
263
+ className: "timvir-s-12ek6fo timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-1kgrkcs",
264
+ style: style,
265
+ ...rest
266
+ });
267
+ };
268
+ const code = props => /*#__PURE__*/jsx("code", {
269
+ className: "timvir-s-1sxf85j timvir-s-1jnxms5 timvir-s-sfzzmd timvir-s-bspb1j timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-j7gikm timvir-s-1vhptj2",
270
+ ...props
252
271
  });
253
- const _exp4 = () => code;
254
- const a = /*#__PURE__*/styled_default('a')({
255
- name: "a",
256
- class: "az92cdb",
257
- propsAsIs: false,
258
- vars: {
259
- "az92cdb-0": [_exp4()]
260
- }
272
+ const a = props => /*#__PURE__*/jsx("a", {
273
+ className: "timvir-s-15rks2t timvir-s-1hl2dhg timvir-s-1dlxito timvir-s-1j43nte timvir-s-odwsf6 timvir-s-1w3jsh0 timvir-s-g7t5vw timvir-s-1v02d47 timvir-s-ene6ev timvir-s-15m0p1m timvir-s-1bezv82",
274
+ ...props
261
275
  });
262
- const p = /*#__PURE__*/styled_default('p')({
263
- name: "p",
264
- class: "ptugcwl",
265
- propsAsIs: false
276
+ const p = props$1 => /*#__PURE__*/jsx("p", {
277
+ ...props(layoutStyles.block),
278
+ ...props$1
266
279
  });
267
- const ul = /*#__PURE__*/styled_default('ul')({
268
- name: "ul",
269
- class: "ufjqxlv",
270
- propsAsIs: false
280
+ const ul = props$1 => /*#__PURE__*/jsx("ul", {
281
+ ...props(layoutStyles.block),
282
+ ...props$1
271
283
  });
272
- const ol = /*#__PURE__*/styled_default('ol')({
273
- name: "ol",
274
- class: "op4zsja",
275
- propsAsIs: false
284
+ const ol = props$1 => /*#__PURE__*/jsx("ol", {
285
+ ...props(layoutStyles.block),
286
+ ...props$1
276
287
  });
288
+ const styles = {
289
+ h1: {
290
+ keoZOQ: "timvir-s-1hpjnmm",
291
+ k1K539: "timvir-s-yi6m4r",
292
+ kGuDYH: "timvir-s-579bpy",
293
+ kLWn49: "timvir-s-2sqz4w",
294
+ k63SB2: "timvir-s-kjxd12",
295
+ kTHuQy: "timvir-s-zqbfd8",
296
+ $$css: true
297
+ },
298
+ h2: {
299
+ kVAEAm: "timvir-s-1n2onr6",
300
+ kogj98: "timvir-s-gv6dkq",
301
+ kGuDYH: "timvir-s-ngnso2",
302
+ kLWn49: "timvir-s-1gst2wd",
303
+ k63SB2: "timvir-s-kjxd12",
304
+ $$css: true
305
+ },
306
+ h3: {
307
+ kVAEAm: "timvir-s-1n2onr6",
308
+ kogj98: "timvir-s-2ijy0e",
309
+ kGuDYH: "timvir-s-1lkfr7t",
310
+ kLWn49: "timvir-s-1c40qdn",
311
+ k63SB2: "timvir-s-kjxd12",
312
+ $$css: true
313
+ },
314
+ h4: {
315
+ kVAEAm: "timvir-s-1n2onr6",
316
+ kogj98: "timvir-s-2ijy0e",
317
+ kGuDYH: "timvir-s-6u19be",
318
+ kLWn49: "timvir-s-1k2ygyi",
319
+ k63SB2: "timvir-s-kjxd12",
320
+ $$css: true
321
+ },
322
+ hr: {
323
+ k1xSpc: "timvir-s-1lliihq",
324
+ ksu8eU: "timvir-s-ng3xce",
325
+ kZKoxP: "timvir-s-jm9jq1",
326
+ kzqmXN: "timvir-s-h8yej3",
327
+ kWkggS: "timvir-s-twfq29",
328
+ kSiTet: "timvir-s-vpkmg4",
329
+ $$css: true
330
+ },
331
+ table: {
332
+ kheTzg: "timvir-s-1gukg7c",
333
+ kLvRdT: "timvir-s-1mwwwfo",
334
+ kzqmXN: "timvir-s-h8yej3",
335
+ kVQacm: "timvir-s-ysyzu8",
336
+ $$css: true
337
+ },
338
+ blockquote: {
339
+ koQZXg: "timvir-s-j3b58b",
340
+ kGuDYH: "timvir-s-1hptrd9",
341
+ $$css: true
342
+ }
343
+ };
277
344
 
278
345
  export { a, blockquote, code, h1, h2, h3, h4, hr, ol, p, table, tbody, td, th, thead, tr, ul };