timvir 0.2.39 → 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.
- package/CHANGELOG.md +20 -0
- package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
- package/blocks/Arbitrary/index.js +193 -48
- package/blocks/Arbitrary/styles.css +166 -6
- package/blocks/Code/Code.d.ts +0 -6
- package/blocks/Code/docs/index.mdx +0 -11
- package/blocks/Code/index.js +205 -112
- package/blocks/Code/styles.css +100 -15
- package/blocks/ColorBar/docs/index.mdx +8 -2
- package/blocks/ColorBar/index.js +198 -47
- package/blocks/ColorBar/styles.css +103 -4
- package/blocks/ColorBook/docs/index.mdx +1 -1
- package/blocks/ColorBook/index.js +198 -39
- package/blocks/ColorBook/styles.css +166 -6
- package/blocks/Cover/index.js +165 -36
- package/blocks/Cover/styles.css +18 -0
- package/blocks/Exhibit/index.js +192 -41
- package/blocks/Exhibit/styles.css +66 -3
- package/blocks/Font/index.js +188 -58
- package/blocks/Font/styles.css +82 -8
- package/blocks/Grid/docs/index.mdx +4 -4
- package/blocks/Grid/index.js +176 -33
- package/blocks/Grid/styles.css +20 -1
- package/blocks/Icon/docs/index.mdx +13 -13
- package/blocks/Icon/index.js +25 -43
- package/blocks/Icon/styles.css +117 -5
- package/blocks/Message/docs/index.mdx +5 -8
- package/blocks/Message/index.js +233 -54
- package/blocks/Message/styles.css +94 -6
- package/blocks/Swatch/docs/index.mdx +16 -16
- package/blocks/Swatch/index.js +180 -35
- package/blocks/Swatch/styles.css +82 -4
- package/blocks/Viewport/index.js +198 -91
- package/blocks/Viewport/styles.css +259 -14
- package/blocks/WebLink/index.js +192 -48
- package/blocks/WebLink/styles.css +170 -8
- package/blocks/styles.css +1460 -97
- package/builtins/components.d.ts +2 -2
- package/builtins/index.d.ts +0 -1
- package/builtins/index.js +300 -243
- package/builtins/styles.css +265 -25
- package/context/index.d.ts +6 -1
- package/core/components/Commands/Commands.d.ts +5 -1
- package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
- package/core/components/Page/Page.d.ts +12 -3
- package/core/components/Page/docs/index.mdx +44 -11
- package/core/index.d.ts +191 -2
- package/core/index.js +415 -256
- package/core/layout.d.ts +41 -0
- package/core/styles.css +857 -88
- package/global.css +79 -0
- package/internal/cx.d.ts +1 -0
- package/package.json +1 -2
- package/search/index.js +2 -223
- package/styles.css +2670 -235
- package/blocks/Code/theme.d.ts +0 -2
- package/bus/styles.css +0 -1
- package/context/styles.css +0 -1
- package/core/theme/index.d.ts +0 -1
- package/hooks/styles.css +0 -1
- package/search/Search/internal/Dialog.d.ts +0 -20
- package/search/Search/internal/index.d.ts +0 -1
- package/search/SearchBoxInput/SearchBoxInput.d.ts +0 -11
- package/search/SearchBoxInput/docs/api.mdx +0 -76
- package/search/SearchBoxInput/docs/index.mdx +0 -6
- package/search/SearchBoxInput/index.d.ts +0 -1
- package/search/SearchBoxInput/samples/basic.d.ts +0 -1
- package/search/SearchBoxListItem/SearchBoxListItem.d.ts +0 -13
- package/search/SearchBoxListItem/docs/api.mdx +0 -76
- package/search/SearchBoxListItem/docs/index.mdx +0 -30
- package/search/SearchBoxListItem/index.d.ts +0 -1
- package/search/SearchBoxListItem/samples/basic.d.ts +0 -1
- package/search/styles.css +0 -16
package/core/index.js
CHANGED
|
@@ -3,73 +3,34 @@ import { pipe, filter, subscribe } from 'wonka';
|
|
|
3
3
|
import { useContext, Provider } from 'timvir/context';
|
|
4
4
|
export { useContext } from 'timvir/context';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import * as builtins from 'timvir/builtins';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
8
|
import { useHotkeys } from 'react-hotkeys-hook';
|
|
9
9
|
import { makeBus } from 'timvir/bus';
|
|
10
|
-
import * as mdxComponentsBase from 'timvir/builtins';
|
|
11
10
|
import * as Icons from 'react-feather';
|
|
12
11
|
import * as ReactDOM from 'react-dom';
|
|
13
12
|
import { defaultSearch } from 'timvir/search';
|
|
14
13
|
|
|
15
|
-
// src/css.ts
|
|
16
|
-
|
|
17
|
-
// src/cx.ts
|
|
18
|
-
var cx = function cx2() {
|
|
19
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
-
const atomicClasses = {};
|
|
21
|
-
const nonAtomicClasses = [];
|
|
22
|
-
presentClassNames.forEach((arg) => {
|
|
23
|
-
const individualClassNames = arg ? arg.split(" ") : [];
|
|
24
|
-
individualClassNames.forEach((className) => {
|
|
25
|
-
if (className.startsWith("atm_")) {
|
|
26
|
-
const [, keyHash] = className.split("_");
|
|
27
|
-
atomicClasses[keyHash] = className;
|
|
28
|
-
} else {
|
|
29
|
-
nonAtomicClasses.push(className);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
const result = [];
|
|
34
|
-
for (const keyHash in atomicClasses) {
|
|
35
|
-
if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
|
|
36
|
-
result.push(atomicClasses[keyHash]);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
result.push(...nonAtomicClasses);
|
|
40
|
-
return result.join(" ");
|
|
41
|
-
};
|
|
42
|
-
var cx_default = cx;
|
|
43
|
-
|
|
44
|
-
const noLayout = "nc2e9vn";
|
|
45
|
-
const grid = "g1et32pl";
|
|
46
|
-
const extendedWidth = cx_default(noLayout, "en6sn9p");
|
|
47
|
-
const fullWidth = cx_default(noLayout, "f3c539b");
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The underlying DOM element which is rendered by this component.
|
|
51
|
-
*/
|
|
52
14
|
const Root$3 = "footer";
|
|
53
15
|
function Footer(props, ref) {
|
|
54
16
|
const {
|
|
55
|
-
className,
|
|
56
17
|
links,
|
|
57
18
|
...rest
|
|
58
19
|
} = props;
|
|
59
20
|
return /*#__PURE__*/jsxs(Root$3, {
|
|
60
21
|
ref: ref,
|
|
61
|
-
className: cx_default(className, classes$7.root),
|
|
62
22
|
...rest,
|
|
23
|
+
className: "timvir-s-v0thzw timvir-s-rvj5dj timvir-s-kcw01v timvir-s-qr9vqb",
|
|
63
24
|
children: [links && /*#__PURE__*/jsx("div", {
|
|
64
|
-
className:
|
|
25
|
+
className: "timvir-s-rvj5dj timvir-s-1hz7z82 timvir-s-1f9b50e timvir-s-3xbxsf timvir-s-12c0rpe timvir-s-1i3za4p timvir-s-9q0i6z timvir-s-1mxrek7",
|
|
65
26
|
children: /*#__PURE__*/jsx("div", {
|
|
66
|
-
className:
|
|
27
|
+
className: "timvir-s-htle6 timvir-s-euugli timvir-s-rvj5dj timvir-s-k629hk timvir-s-1rzw5jd",
|
|
67
28
|
children: links.map(({
|
|
68
29
|
group,
|
|
69
30
|
items
|
|
70
31
|
}, i) => /*#__PURE__*/jsxs("div", {
|
|
71
32
|
children: [/*#__PURE__*/jsx("div", {
|
|
72
|
-
className:
|
|
33
|
+
className: "timvir-s-1s688f timvir-s-od5an3",
|
|
73
34
|
children: group
|
|
74
35
|
}), /*#__PURE__*/jsx("div", {
|
|
75
36
|
children: items.map(({
|
|
@@ -77,20 +38,19 @@ function Footer(props, ref) {
|
|
|
77
38
|
href
|
|
78
39
|
}, j) => /*#__PURE__*/jsx("a", {
|
|
79
40
|
href: href,
|
|
80
|
-
className:
|
|
41
|
+
className: "timvir-s-1lliihq timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-gmrl4",
|
|
81
42
|
children: label
|
|
82
43
|
}, j))
|
|
83
44
|
})]
|
|
84
45
|
}, i))
|
|
85
46
|
})
|
|
86
47
|
}), /*#__PURE__*/jsx("div", {
|
|
87
|
-
className:
|
|
48
|
+
className: "timvir-s-rvj5dj timvir-s-1hz7z82 timvir-s-1f9b50e timvir-s-3xbxsf timvir-s-12c0rpe timvir-s-1i3za4p timvir-s-9q0i6z timvir-s-1mxrek7 timvir-s-vgvpxu",
|
|
88
49
|
children: /*#__PURE__*/jsxs("div", {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
children: ["Built with ", /*#__PURE__*/jsx("a", {
|
|
50
|
+
className: "timvir-s-htle6 timvir-s-euugli",
|
|
51
|
+
children: ["Built with", " ", /*#__PURE__*/jsx("a", {
|
|
93
52
|
href: "https://timvir.vercel.app",
|
|
53
|
+
className: "timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-1dlxito timvir-s-1j43nte timvir-s-odwsf6 timvir-s-1w3jsh0 timvir-s-g7t5vw",
|
|
94
54
|
children: "Timvir"
|
|
95
55
|
})]
|
|
96
56
|
})
|
|
@@ -98,15 +58,200 @@ function Footer(props, ref) {
|
|
|
98
58
|
});
|
|
99
59
|
}
|
|
100
60
|
var Footer$1 = /*#__PURE__*/React.forwardRef(Footer);
|
|
101
|
-
const classes$7 = {
|
|
102
|
-
root: "rwhrdvg",
|
|
103
|
-
linkGroups: "l1u1x7q7",
|
|
104
|
-
linkGroupTitle: "l1x5jo3a",
|
|
105
|
-
link: "l29wcr8",
|
|
106
|
-
meta: "m1ojti9g"
|
|
107
|
-
};
|
|
108
61
|
|
|
109
|
-
|
|
62
|
+
function cx(...args) {
|
|
63
|
+
let str = "";
|
|
64
|
+
for (let i = 0; i < args.length; i++) {
|
|
65
|
+
const arg = args[i];
|
|
66
|
+
if (typeof arg === "string") {
|
|
67
|
+
str += (str && " ") + arg;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return str;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
var styleq = {};
|
|
74
|
+
var hasRequiredStyleq;
|
|
75
|
+
function requireStyleq() {
|
|
76
|
+
if (hasRequiredStyleq) return styleq;
|
|
77
|
+
hasRequiredStyleq = 1;
|
|
78
|
+
Object.defineProperty(styleq, "__esModule", {
|
|
79
|
+
value: true
|
|
80
|
+
});
|
|
81
|
+
styleq.styleq = void 0;
|
|
82
|
+
var cache = new WeakMap();
|
|
83
|
+
var compiledKey = '$$css';
|
|
84
|
+
function createStyleq(options) {
|
|
85
|
+
var disableCache;
|
|
86
|
+
var disableMix;
|
|
87
|
+
var transform;
|
|
88
|
+
if (options != null) {
|
|
89
|
+
disableCache = options.disableCache === true;
|
|
90
|
+
disableMix = options.disableMix === true;
|
|
91
|
+
transform = options.transform;
|
|
92
|
+
}
|
|
93
|
+
return function styleq() {
|
|
94
|
+
var definedProperties = [];
|
|
95
|
+
var className = '';
|
|
96
|
+
var inlineStyle = null;
|
|
97
|
+
var debugString = '';
|
|
98
|
+
var nextCache = disableCache ? null : cache;
|
|
99
|
+
var styles = new Array(arguments.length);
|
|
100
|
+
for(var i = 0; i < arguments.length; i++){
|
|
101
|
+
styles[i] = arguments[i];
|
|
102
|
+
}
|
|
103
|
+
while(styles.length > 0){
|
|
104
|
+
var possibleStyle = styles.pop();
|
|
105
|
+
if (possibleStyle == null || possibleStyle === false) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (Array.isArray(possibleStyle)) {
|
|
109
|
+
for(var _i = 0; _i < possibleStyle.length; _i++){
|
|
110
|
+
styles.push(possibleStyle[_i]);
|
|
111
|
+
}
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
var style = transform != null ? transform(possibleStyle) : possibleStyle;
|
|
115
|
+
if (style.$$css != null) {
|
|
116
|
+
var classNameChunk = '';
|
|
117
|
+
if (nextCache != null && nextCache.has(style)) {
|
|
118
|
+
var cacheEntry = nextCache.get(style);
|
|
119
|
+
if (cacheEntry != null) {
|
|
120
|
+
classNameChunk = cacheEntry[0];
|
|
121
|
+
debugString = cacheEntry[2];
|
|
122
|
+
definedProperties.push.apply(definedProperties, cacheEntry[1]);
|
|
123
|
+
nextCache = cacheEntry[3];
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
var definedPropertiesChunk = [];
|
|
127
|
+
for(var prop in style){
|
|
128
|
+
var value = style[prop];
|
|
129
|
+
if (prop === compiledKey) {
|
|
130
|
+
var compiledKeyValue = style[prop];
|
|
131
|
+
if (compiledKeyValue !== true) {
|
|
132
|
+
debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
|
|
133
|
+
}
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (typeof value === 'string' || value === null) {
|
|
137
|
+
if (!definedProperties.includes(prop)) {
|
|
138
|
+
definedProperties.push(prop);
|
|
139
|
+
if (nextCache != null) {
|
|
140
|
+
definedPropertiesChunk.push(prop);
|
|
141
|
+
}
|
|
142
|
+
if (typeof value === 'string') {
|
|
143
|
+
classNameChunk += classNameChunk ? ' ' + value : value;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (nextCache != null) {
|
|
151
|
+
var weakMap = new WeakMap();
|
|
152
|
+
nextCache.set(style, [
|
|
153
|
+
classNameChunk,
|
|
154
|
+
definedPropertiesChunk,
|
|
155
|
+
debugString,
|
|
156
|
+
weakMap
|
|
157
|
+
]);
|
|
158
|
+
nextCache = weakMap;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (classNameChunk) {
|
|
162
|
+
className = className ? classNameChunk + ' ' + className : classNameChunk;
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
if (disableMix) {
|
|
166
|
+
if (inlineStyle == null) {
|
|
167
|
+
inlineStyle = {};
|
|
168
|
+
}
|
|
169
|
+
inlineStyle = Object.assign({}, style, inlineStyle);
|
|
170
|
+
} else {
|
|
171
|
+
var subStyle = null;
|
|
172
|
+
for(var _prop in style){
|
|
173
|
+
var _value = style[_prop];
|
|
174
|
+
if (_value !== undefined) {
|
|
175
|
+
if (!definedProperties.includes(_prop)) {
|
|
176
|
+
if (_value != null) {
|
|
177
|
+
if (inlineStyle == null) {
|
|
178
|
+
inlineStyle = {};
|
|
179
|
+
}
|
|
180
|
+
if (subStyle == null) {
|
|
181
|
+
subStyle = {};
|
|
182
|
+
}
|
|
183
|
+
subStyle[_prop] = _value;
|
|
184
|
+
}
|
|
185
|
+
definedProperties.push(_prop);
|
|
186
|
+
nextCache = null;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (subStyle != null) {
|
|
191
|
+
inlineStyle = Object.assign(subStyle, inlineStyle);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
var styleProps = [
|
|
197
|
+
className,
|
|
198
|
+
inlineStyle,
|
|
199
|
+
debugString
|
|
200
|
+
];
|
|
201
|
+
return styleProps;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
var styleq$1 = styleq.styleq = createStyleq();
|
|
205
|
+
styleq$1.factory = createStyleq;
|
|
206
|
+
return styleq;
|
|
207
|
+
}
|
|
208
|
+
var styleqExports = requireStyleq();
|
|
209
|
+
function props(...styles) {
|
|
210
|
+
const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
|
|
211
|
+
const result = {};
|
|
212
|
+
if (className != null && className !== '') {
|
|
213
|
+
result.className = className;
|
|
214
|
+
}
|
|
215
|
+
if (style != null && Object.keys(style).length > 0) {
|
|
216
|
+
result.style = style;
|
|
217
|
+
}
|
|
218
|
+
if (dataStyleSrc != null && dataStyleSrc !== '') {
|
|
219
|
+
result['data-style-src'] = dataStyleSrc;
|
|
220
|
+
}
|
|
221
|
+
return result;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const layoutStyles = {
|
|
225
|
+
grid: {
|
|
226
|
+
k1xSpc: "timvir-s-rvj5dj",
|
|
227
|
+
"--timvir-page-margin": "timvir-s-1hz7z82",
|
|
228
|
+
"--timvir-margin": "timvir-s-1f9b50e",
|
|
229
|
+
kJBjZk: "timvir-s-3xbxsf",
|
|
230
|
+
kumcoG: "timvir-s-12c0rpe",
|
|
231
|
+
kjffAg: "timvir-s-1i3za4p",
|
|
232
|
+
kymLvw: "timvir-s-9q0i6z",
|
|
233
|
+
kw3IWD: "timvir-s-1mxrek7",
|
|
234
|
+
$$css: true
|
|
235
|
+
},
|
|
236
|
+
block: {
|
|
237
|
+
kBCFzs: "timvir-s-htle6",
|
|
238
|
+
k7Eaqz: "timvir-s-euugli",
|
|
239
|
+
kogj98: "timvir-s-1t4wa6b",
|
|
240
|
+
$$css: true
|
|
241
|
+
},
|
|
242
|
+
extendedWidth: {
|
|
243
|
+
kBCFzs: "timvir-s-bldiei",
|
|
244
|
+
$$css: true
|
|
245
|
+
},
|
|
246
|
+
fullWidth: {
|
|
247
|
+
kBCFzs: "timvir-s-1ywaqmw",
|
|
248
|
+
$$css: true
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
const noLayout = "";
|
|
252
|
+
const grid = "";
|
|
253
|
+
const extendedWidth = "";
|
|
254
|
+
const fullWidth = "";
|
|
110
255
|
|
|
111
256
|
const Root$2 = "div";
|
|
112
257
|
function Action(props) {
|
|
@@ -114,12 +259,21 @@ function Action(props) {
|
|
|
114
259
|
label,
|
|
115
260
|
...rest
|
|
116
261
|
} = props;
|
|
262
|
+
const rootStyleProps = {
|
|
263
|
+
className: "timvir-s-jbqb8w timvir-s-vc674v timvir-s-uxw1ft timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-17zmd2n timvir-s-wvwv9b timvir-s-1q0g3np timvir-s-1iyjqo2 timvir-s-s83m0k timvir-s-dl72j9 timvir-s-b3r6kr timvir-s-qin4a2 timvir-s-cym7qx timvir-s-t0e3qv timvir-s-1d6mti2"
|
|
264
|
+
};
|
|
117
265
|
return /*#__PURE__*/jsxs(Root$2, {
|
|
118
|
-
className: classes$6.root,
|
|
119
266
|
...rest,
|
|
267
|
+
...rootStyleProps,
|
|
268
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
269
|
+
style: {
|
|
270
|
+
...rootStyleProps.style,
|
|
271
|
+
...rest.style
|
|
272
|
+
},
|
|
120
273
|
children: [/*#__PURE__*/jsx("div", {
|
|
121
|
-
className:
|
|
274
|
+
className: "timvir-s-1wsuqlk timvir-s-1kky2od",
|
|
122
275
|
children: /*#__PURE__*/jsxs("svg", {
|
|
276
|
+
className: "timvir-s-1lliihq timvir-s-1kky2od timvir-s-lup9mm",
|
|
123
277
|
viewBox: "0 0 24 24",
|
|
124
278
|
fill: "none",
|
|
125
279
|
stroke: "currentColor",
|
|
@@ -136,16 +290,11 @@ function Action(props) {
|
|
|
136
290
|
})]
|
|
137
291
|
})
|
|
138
292
|
}), /*#__PURE__*/jsx("div", {
|
|
139
|
-
className:
|
|
293
|
+
className: "timvir-s-1dcheo9 timvir-s-d85mq3",
|
|
140
294
|
children: label
|
|
141
295
|
})]
|
|
142
296
|
});
|
|
143
297
|
}
|
|
144
|
-
const classes$6 = {
|
|
145
|
-
root: "ru1mblv",
|
|
146
|
-
icon: "i1wyx06o",
|
|
147
|
-
label: "legxg01"
|
|
148
|
-
};
|
|
149
298
|
|
|
150
299
|
function Dialog(props) {
|
|
151
300
|
const {
|
|
@@ -199,15 +348,16 @@ function Dialog(props) {
|
|
|
199
348
|
})();
|
|
200
349
|
}, [toc, state.query]);
|
|
201
350
|
return /*#__PURE__*/jsxs("div", {
|
|
202
|
-
className:
|
|
351
|
+
className: "timvir-s-1n2onr6 timvir-s-78zum5 timvir-s-dt5ytf timvir-s-s83m0k timvir-s-1iyjqo2 timvir-s-13qp9f6 timvir-s-1so62im timvir-s-1jpgh95 timvir-s-1c4omy1 timvir-s-ur7f20 timvir-s-1j6rtzm timvir-s-11gisft timvir-s-vc674v timvir-s-b3r6kr timvir-s-hkombj",
|
|
203
352
|
style: state.style,
|
|
204
353
|
...rest,
|
|
205
354
|
children: [/*#__PURE__*/jsx("div", {
|
|
206
|
-
className:
|
|
355
|
+
className: "timvir-s-13g9wyj timvir-s-lrawln timvir-s-101yacv timvir-s-1xq1gxn timvir-s-sfzzmd timvir-s-2lah0s timvir-s-qcrz7y timvir-s-1bzjle timvir-s-1ivwqqu timvir-s-12oqio5 timvir-s-d0payo timvir-s-uxw1ft timvir-s-b3r6kr timvir-s-lyipyv",
|
|
207
356
|
children: "Context"
|
|
208
357
|
}), /*#__PURE__*/jsx("div", {
|
|
209
|
-
className:
|
|
358
|
+
className: "timvir-s-1wvxhgs timvir-s-rvj5dj timvir-s-1y6fwsi timvir-s-6s0dn4 timvir-s-1n2onr6 timvir-s-2lah0s timvir-s-1x0gksc",
|
|
210
359
|
children: /*#__PURE__*/jsx("input", {
|
|
360
|
+
className: "timvir-s-1qhigcl timvir-s-1heo4i2 timvir-s-1ghz6dp timvir-s-c342km timvir-s-jyslct timvir-s-1qlqyl8 timvir-s-1x0gksc timvir-s-jbqb8w timvir-s-vc674v timvir-s-1tyz1jm timvir-s-1a2a7pz timvir-s-h8yej3",
|
|
211
361
|
autoFocus: true,
|
|
212
362
|
placeholder: "Type a command or search\u2026",
|
|
213
363
|
value: state.query,
|
|
@@ -221,10 +371,10 @@ function Dialog(props) {
|
|
|
221
371
|
})
|
|
222
372
|
}), /*#__PURE__*/jsxs("div", {
|
|
223
373
|
children: [/*#__PURE__*/jsx("div", {
|
|
224
|
-
className:
|
|
374
|
+
className: "timvir-s-1yy59j4 timvir-s-xk0z11 timvir-s-qin4a2 timvir-s-boafo0 timvir-s-1flf930",
|
|
225
375
|
children: "Pages"
|
|
226
376
|
}), /*#__PURE__*/jsx("div", {
|
|
227
|
-
className:
|
|
377
|
+
className: "timvir-s-1vd4hg5 timvir-s-ysyzu8",
|
|
228
378
|
children: state.commands.map(({
|
|
229
379
|
node
|
|
230
380
|
}, index) => /*#__PURE__*/jsx(Action, {
|
|
@@ -238,45 +388,31 @@ function Dialog(props) {
|
|
|
238
388
|
})]
|
|
239
389
|
});
|
|
240
390
|
}
|
|
241
|
-
const classes$5 = {
|
|
242
|
-
root: "r1fo6voy",
|
|
243
|
-
context: "c185xiij",
|
|
244
|
-
prompt: "p1ky3ya3",
|
|
245
|
-
subheader: "snq1o7g",
|
|
246
|
-
commands: "cchvluj"
|
|
247
|
-
};
|
|
248
391
|
|
|
249
|
-
function Commands() {
|
|
392
|
+
function Commands(props) {
|
|
393
|
+
const {
|
|
394
|
+
open: _open,
|
|
395
|
+
onClose: _onClose
|
|
396
|
+
} = props;
|
|
250
397
|
const [state, setState] = React.useState({
|
|
251
|
-
/**
|
|
252
|
-
* Whether the command palette should be open or not. The command palette is
|
|
253
|
-
* opened by cmd+k, and closed by escape or clicking outside of the dialog.
|
|
254
|
-
*/
|
|
255
|
-
open: false,
|
|
256
|
-
/**
|
|
257
|
-
* If the dialog is visible (even during the closing transition), this
|
|
258
|
-
* object contains both the container element (a div appended to the end of
|
|
259
|
-
* the body) and the React Portal (that is returned by this component).
|
|
260
|
-
*/
|
|
261
398
|
dialog: null
|
|
262
399
|
});
|
|
263
400
|
function open() {
|
|
264
401
|
setState({
|
|
265
|
-
open: true,
|
|
266
402
|
dialog: (() => {
|
|
267
403
|
if (!state.dialog) {
|
|
268
404
|
const containerElement = document.createElement("div");
|
|
269
405
|
document.body.appendChild(containerElement);
|
|
270
406
|
const reactPortal = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
271
|
-
className:
|
|
407
|
+
className: "timvir-s-ixxii4 timvir-s-10a8y8t timvir-s-78zum5 timvir-s-oz0ns6 timvir-s-1cy8zhl timvir-s-l56j7k timvir-s-1tv4xqk timvir-s-1p7i66b timvir-s-dvd4st timvir-s-1746jcd timvir-s-1j61zf2 timvir-s-1wqqpke",
|
|
272
408
|
onClick: ev => {
|
|
273
409
|
if (ev.target === ev.currentTarget) {
|
|
274
|
-
|
|
410
|
+
_onClose();
|
|
275
411
|
}
|
|
276
412
|
},
|
|
277
413
|
children: /*#__PURE__*/jsx(Dialog, {
|
|
278
414
|
open: true,
|
|
279
|
-
onClose:
|
|
415
|
+
onClose: _onClose
|
|
280
416
|
})
|
|
281
417
|
}), containerElement);
|
|
282
418
|
return {
|
|
@@ -287,15 +423,15 @@ function Commands() {
|
|
|
287
423
|
return {
|
|
288
424
|
containerElement: state.dialog.containerElement,
|
|
289
425
|
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
290
|
-
className:
|
|
426
|
+
className: "timvir-s-ixxii4 timvir-s-10a8y8t timvir-s-78zum5 timvir-s-oz0ns6 timvir-s-1cy8zhl timvir-s-l56j7k timvir-s-1tv4xqk timvir-s-1p7i66b timvir-s-dvd4st timvir-s-1746jcd timvir-s-1j61zf2 timvir-s-1wqqpke",
|
|
291
427
|
onClick: ev => {
|
|
292
428
|
if (ev.target === ev.currentTarget) {
|
|
293
|
-
|
|
429
|
+
_onClose();
|
|
294
430
|
}
|
|
295
431
|
},
|
|
296
432
|
children: /*#__PURE__*/jsx(Dialog, {
|
|
297
433
|
open: true,
|
|
298
|
-
onClose:
|
|
434
|
+
onClose: _onClose
|
|
299
435
|
})
|
|
300
436
|
}), state.dialog.containerElement)
|
|
301
437
|
};
|
|
@@ -305,19 +441,17 @@ function Commands() {
|
|
|
305
441
|
}
|
|
306
442
|
function close() {
|
|
307
443
|
setState({
|
|
308
|
-
open: false,
|
|
309
444
|
dialog: (() => {
|
|
310
445
|
if (state.dialog) {
|
|
311
446
|
return {
|
|
312
447
|
containerElement: state.dialog.containerElement,
|
|
313
448
|
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
314
|
-
className:
|
|
449
|
+
className: "timvir-s-ixxii4 timvir-s-10a8y8t timvir-s-78zum5 timvir-s-oz0ns6 timvir-s-1cy8zhl timvir-s-l56j7k timvir-s-1tv4xqk timvir-s-1p7i66b timvir-s-dvd4st timvir-s-1746jcd timvir-s-1j61zf2 timvir-s-1wqqpke",
|
|
315
450
|
children: /*#__PURE__*/jsx(Dialog, {
|
|
316
451
|
onDispose: () => {
|
|
317
452
|
setState({
|
|
318
|
-
open: state.open,
|
|
319
453
|
dialog: (() => {
|
|
320
|
-
if (!
|
|
454
|
+
if (!_open && state.dialog) {
|
|
321
455
|
document.body.removeChild(state.dialog.containerElement);
|
|
322
456
|
return null;
|
|
323
457
|
} else {
|
|
@@ -335,97 +469,61 @@ function Commands() {
|
|
|
335
469
|
})()
|
|
336
470
|
});
|
|
337
471
|
}
|
|
338
|
-
useHotkeys("meta+k", ev => {
|
|
339
|
-
ev.preventDefault();
|
|
340
|
-
if (!state.open) {
|
|
341
|
-
open();
|
|
342
|
-
} else {
|
|
343
|
-
close();
|
|
344
|
-
}
|
|
345
|
-
}, {
|
|
346
|
-
enableOnFormTags: ["INPUT"]
|
|
347
|
-
});
|
|
348
|
-
useHotkeys("escape", () => {
|
|
349
|
-
close();
|
|
350
|
-
}, {
|
|
351
|
-
enableOnFormTags: ["INPUT"]
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
/*
|
|
355
|
-
* Crude body scroll lock when the dialog is open.
|
|
356
|
-
*/
|
|
357
472
|
React.useEffect(() => {
|
|
358
|
-
if (
|
|
473
|
+
if (_open) {
|
|
359
474
|
document.body.style.overflow = "hidden";
|
|
475
|
+
open();
|
|
360
476
|
return () => {
|
|
361
477
|
document.body.style.overflow = "";
|
|
362
478
|
};
|
|
479
|
+
} else {
|
|
480
|
+
close();
|
|
363
481
|
}
|
|
364
|
-
}, [
|
|
482
|
+
}, [_open]);
|
|
365
483
|
return state.dialog?.reactPortal ?? null;
|
|
366
484
|
}
|
|
367
|
-
const classes$4 = {
|
|
368
|
-
root: "rfei6z8"
|
|
369
|
-
};
|
|
370
485
|
|
|
371
|
-
/**
|
|
372
|
-
* The underlying DOM element which is rendered by this component.
|
|
373
|
-
*/
|
|
374
486
|
const Root$1 = "div";
|
|
375
|
-
function NavigationFooter(props
|
|
376
|
-
const {
|
|
377
|
-
Link
|
|
378
|
-
} = useContext();
|
|
487
|
+
function NavigationFooter(props) {
|
|
379
488
|
const {
|
|
489
|
+
Link,
|
|
380
490
|
prev,
|
|
381
491
|
next,
|
|
382
|
-
className,
|
|
383
492
|
...rest
|
|
384
493
|
} = props;
|
|
385
494
|
return /*#__PURE__*/jsx(Root$1, {
|
|
386
|
-
ref: ref,
|
|
387
495
|
...rest,
|
|
388
|
-
className:
|
|
496
|
+
className: "timvir-s-1dvi5bl timvir-s-rvj5dj timvir-s-3xbxsf timvir-s-12c0rpe timvir-s-9q0i6z timvir-s-1mxrek7",
|
|
389
497
|
children: /*#__PURE__*/jsxs("div", {
|
|
390
|
-
className: "
|
|
498
|
+
className: "timvir-s-htle6 timvir-s-78zum5 timvir-s-3ieub6 timvir-s-8fetqu timvir-s-kpwil5 timvir-s-1evy7pa timvir-s-1k046mz",
|
|
391
499
|
children: [prev && /*#__PURE__*/jsxs(Link, {
|
|
392
500
|
href: prev.href,
|
|
393
|
-
className: "
|
|
394
|
-
children: [/*#__PURE__*/jsxs(
|
|
395
|
-
|
|
396
|
-
|
|
501
|
+
className: "timvir-s-h8yej3 timvir-s-78zum5 timvir-s-1jnr06f timvir-s-ur7f20 timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-j7gikm timvir-s-1tamke2 timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-euugli timvir-s-1gtqa1q timvir-s-dt5ytf timvir-s-1cy8zhl timvir-s-13a6bvl timvir-s-dpxx8g",
|
|
502
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
503
|
+
className: "timvir-s-vgvpxu timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-e25avd",
|
|
504
|
+
children: [/*#__PURE__*/jsx(Icons.ChevronLeft, {
|
|
505
|
+
className: "timvir-s-1q3kd3q timvir-s-1n3ixbd"
|
|
506
|
+
}), " Previous"]
|
|
507
|
+
}), /*#__PURE__*/jsx("div", {
|
|
508
|
+
className: "timvir-s-k50ysn timvir-s-b3r6kr timvir-s-lyipyv timvir-s-193iq5w",
|
|
397
509
|
children: prev.label
|
|
398
510
|
})]
|
|
399
|
-
}), next && /*#__PURE__*/
|
|
511
|
+
}), next && /*#__PURE__*/jsxs(Link, {
|
|
400
512
|
href: next.href,
|
|
401
|
-
className: "
|
|
402
|
-
children: /*#__PURE__*/jsxs(
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
children: next.label
|
|
513
|
+
className: "timvir-s-h8yej3 timvir-s-78zum5 timvir-s-1jnr06f timvir-s-ur7f20 timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-j7gikm timvir-s-1tamke2 timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-euugli timvir-s-1gtqa1q timvir-s-dt5ytf timvir-s-uk3077 timvir-s-1nhvcw1 timvir-s-1hr2gdg",
|
|
514
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
515
|
+
className: "timvir-s-vgvpxu timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-e25avd",
|
|
516
|
+
children: ["Next ", /*#__PURE__*/jsx(Icons.ChevronRight, {
|
|
517
|
+
className: "timvir-s-1q3kd3q timvir-s-1n3ixbd"
|
|
407
518
|
})]
|
|
408
|
-
})
|
|
519
|
+
}), /*#__PURE__*/jsx("div", {
|
|
520
|
+
className: "timvir-s-k50ysn timvir-s-b3r6kr timvir-s-lyipyv timvir-s-193iq5w",
|
|
521
|
+
children: next.label
|
|
522
|
+
})]
|
|
409
523
|
})]
|
|
410
524
|
})
|
|
411
525
|
});
|
|
412
526
|
}
|
|
413
|
-
var NavigationFooter$1 = /*#__PURE__*/React.forwardRef(NavigationFooter);
|
|
414
|
-
function Label(props) {
|
|
415
|
-
return /*#__PURE__*/jsx("div", {
|
|
416
|
-
className: "dczrd9z",
|
|
417
|
-
...props
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
function Context(props) {
|
|
421
|
-
return /*#__PURE__*/jsx("div", {
|
|
422
|
-
className: "difnzb8",
|
|
423
|
-
...props
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
const classes$3 = {
|
|
427
|
-
root: "rymvrdu"
|
|
428
|
-
};
|
|
429
527
|
|
|
430
528
|
function SidebarItem(props) {
|
|
431
529
|
const {
|
|
@@ -440,48 +538,61 @@ function SidebarItem(props) {
|
|
|
440
538
|
location,
|
|
441
539
|
Link
|
|
442
540
|
} = useContext();
|
|
541
|
+
const iconStylexProps = {
|
|
542
|
+
className: "timvir-s-1iog12x timvir-s-y77lq4 timvir-s-1jpgh95 timvir-s-cdlrvm timvir-s-1l36t39 timvir-s-1nslcl8"
|
|
543
|
+
};
|
|
544
|
+
const iconStyle = {
|
|
545
|
+
...iconStylexProps.style,
|
|
546
|
+
transform: active ? "rotate(90deg)" : "rotate(0deg)"
|
|
547
|
+
};
|
|
443
548
|
const icon = children.length === 0 ? null : /*#__PURE__*/jsx(Icons.ChevronRight, {
|
|
444
|
-
className:
|
|
445
|
-
style:
|
|
446
|
-
transform: active ? "rotate(90deg)" : "rotate(0deg)"
|
|
447
|
-
},
|
|
549
|
+
className: iconStylexProps.className,
|
|
550
|
+
style: iconStyle,
|
|
448
551
|
size: 16
|
|
449
552
|
});
|
|
553
|
+
const isActive = location.asPath.replace(/#.*$/, "") === path;
|
|
554
|
+
const linkStylexProps = {
|
|
555
|
+
0: {
|
|
556
|
+
className: "timvir-s-euugli timvir-s-pau0pd timvir-s-12oqio5 timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1cdhzux timvir-s-k50ysn timvir-s-1k74hu9 timvir-s-1hl2dhg timvir-s-h8yej3 timvir-s-1xq1gxn timvir-s-1ks1olk timvir-s-8kob5h timvir-s-1dc5b4e timvir-s-1o7uuvo"
|
|
557
|
+
},
|
|
558
|
+
1: {
|
|
559
|
+
className: "timvir-s-euugli timvir-s-pau0pd timvir-s-12oqio5 timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1cdhzux timvir-s-k50ysn timvir-s-1hl2dhg timvir-s-h8yej3 timvir-s-1xq1gxn timvir-s-8kob5h timvir-s-1dc5b4e timvir-s-1o7uuvo timvir-s-6r7942 timvir-s-1hc1fzr"
|
|
560
|
+
}
|
|
561
|
+
}[!!isActive << 0];
|
|
562
|
+
const linkStyle = {
|
|
563
|
+
...linkStylexProps.style,
|
|
564
|
+
marginLeft: depth * 16
|
|
565
|
+
};
|
|
450
566
|
return /*#__PURE__*/jsx("div", {
|
|
451
|
-
className:
|
|
452
|
-
"data-active": location.asPath.replace(/#.*$/, "") === path,
|
|
567
|
+
className: "timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-3my8ay timvir-s-6u19be timvir-s-1ylh3l6 timvir-s-asi8qw",
|
|
453
568
|
children: path ? /*#__PURE__*/jsxs(Link, {
|
|
454
569
|
href: path,
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
},
|
|
570
|
+
className: linkStylexProps.className,
|
|
571
|
+
style: linkStyle,
|
|
458
572
|
children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
|
|
459
|
-
|
|
573
|
+
...{
|
|
574
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
575
|
+
}
|
|
460
576
|
}) : null, /*#__PURE__*/jsx("span", {
|
|
461
|
-
className:
|
|
577
|
+
className: "timvir-s-uxw1ft timvir-s-b3r6kr timvir-s-lyipyv timvir-s-ack27t",
|
|
462
578
|
children: label
|
|
463
579
|
}), icon]
|
|
464
580
|
}) : /*#__PURE__*/jsxs("a", {
|
|
465
|
-
style: {
|
|
466
|
-
marginLeft: depth * 16
|
|
467
|
-
},
|
|
468
581
|
href: "#",
|
|
582
|
+
className: linkStylexProps.className,
|
|
583
|
+
style: linkStyle,
|
|
469
584
|
onClick: () => setActive(x => !x),
|
|
470
585
|
children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
|
|
471
|
-
|
|
586
|
+
...{
|
|
587
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
588
|
+
}
|
|
472
589
|
}) : null, /*#__PURE__*/jsx("span", {
|
|
473
|
-
className:
|
|
590
|
+
className: "timvir-s-uxw1ft timvir-s-b3r6kr timvir-s-lyipyv timvir-s-ack27t",
|
|
474
591
|
children: label
|
|
475
592
|
}), icon]
|
|
476
593
|
})
|
|
477
594
|
});
|
|
478
595
|
}
|
|
479
|
-
const classes$2 = {
|
|
480
|
-
root: "r28qe6v",
|
|
481
|
-
icn: "i1ia823q",
|
|
482
|
-
label: "l13ixk6c",
|
|
483
|
-
icon: "i7wcd3g"
|
|
484
|
-
};
|
|
485
596
|
|
|
486
597
|
function Section(props) {
|
|
487
598
|
const {
|
|
@@ -509,7 +620,6 @@ function Section(props) {
|
|
|
509
620
|
}
|
|
510
621
|
}, [path, location.asPath]);
|
|
511
622
|
return /*#__PURE__*/jsxs("section", {
|
|
512
|
-
className: classes$1.root,
|
|
513
623
|
children: [/*#__PURE__*/jsx(SidebarItem, {
|
|
514
624
|
...props,
|
|
515
625
|
active: active,
|
|
@@ -522,18 +632,28 @@ function Section(props) {
|
|
|
522
632
|
})]
|
|
523
633
|
});
|
|
524
634
|
}
|
|
525
|
-
const classes$1 = {
|
|
526
|
-
root: "ruyt2hq"
|
|
527
|
-
};
|
|
528
635
|
|
|
529
636
|
function Sidebar(props) {
|
|
530
637
|
const {
|
|
531
638
|
location
|
|
532
639
|
} = useContext();
|
|
640
|
+
const [isMenuOpen, setMenuOpen] = React.useState(false);
|
|
641
|
+
React.useEffect(() => {
|
|
642
|
+
const scrollLockClassList = {
|
|
643
|
+
className: "timvir-s-1rife3k timvir-s-ixxii4 timvir-s-13vifvy timvir-s-h8yej3"
|
|
644
|
+
}.className.split(" ");
|
|
645
|
+
for (const className of scrollLockClassList) {
|
|
646
|
+
document.body.classList.toggle(className, isMenuOpen);
|
|
647
|
+
}
|
|
648
|
+
return () => {
|
|
649
|
+
for (const className of scrollLockClassList) {
|
|
650
|
+
document.body.classList.remove(className);
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
}, [isMenuOpen]);
|
|
533
654
|
const {
|
|
534
655
|
toc,
|
|
535
656
|
search,
|
|
536
|
-
className,
|
|
537
657
|
...rest
|
|
538
658
|
} = props;
|
|
539
659
|
const node = function find(nodes) {
|
|
@@ -549,53 +669,60 @@ function Sidebar(props) {
|
|
|
549
669
|
}
|
|
550
670
|
}
|
|
551
671
|
}(toc);
|
|
672
|
+
const rootStyleProps = {
|
|
673
|
+
className: "timvir-s-78zum5 timvir-s-dt5ytf timvir-s-1fsrbvp"
|
|
674
|
+
};
|
|
552
675
|
return /*#__PURE__*/jsxs("nav", {
|
|
553
|
-
className: cx_default(className, classes.root),
|
|
554
676
|
...rest,
|
|
677
|
+
...rootStyleProps,
|
|
678
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
555
679
|
children: [/*#__PURE__*/jsxs("header", {
|
|
556
|
-
className: "
|
|
680
|
+
className: "timvir-s-7uxsod timvir-s-1pizb70 timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1d813ht timvir-s-1m2nq6k timvir-s-1vptubt",
|
|
557
681
|
children: [/*#__PURE__*/jsxs("div", {
|
|
558
|
-
className: "
|
|
682
|
+
className: "timvir-s-kpwil5 timvir-s-1xet1wb timvir-s-78zum5 timvir-s-ou54vl",
|
|
559
683
|
children: [/*#__PURE__*/jsx("div", {
|
|
560
|
-
className: "
|
|
684
|
+
className: "timvir-s-kjxd12",
|
|
561
685
|
children: "Timvir"
|
|
562
686
|
}), /*#__PURE__*/jsx("div", {
|
|
563
|
-
className: "
|
|
687
|
+
className: "timvir-s-uqj7gu timvir-s-1i1rx1s timvir-s-mll18r"
|
|
564
688
|
}), /*#__PURE__*/jsx("div", {
|
|
565
689
|
children: "Docs"
|
|
566
690
|
})]
|
|
567
691
|
}), search && /*#__PURE__*/jsx("div", {
|
|
568
|
-
className:
|
|
692
|
+
className: "timvir-s-2lah0s timvir-s-zhuw26 timvir-s-w7yly9 timvir-s-1s85apg timvir-s-1m2nq6k",
|
|
569
693
|
children: /*#__PURE__*/jsx(Search, {
|
|
570
694
|
...search
|
|
571
695
|
})
|
|
572
696
|
})]
|
|
573
|
-
}), /*#__PURE__*/jsxs("
|
|
574
|
-
|
|
575
|
-
|
|
697
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
698
|
+
role: "button",
|
|
699
|
+
onClick: () => setMenuOpen(!isMenuOpen),
|
|
700
|
+
className: "timvir-s-1qg66n7 timvir-s-7uxsod timvir-s-1pizb70 timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1ypdohk timvir-s-1yn2rt8",
|
|
576
701
|
children: [node?.icon ? /*#__PURE__*/React.cloneElement(node.icon, {
|
|
577
|
-
|
|
702
|
+
...{
|
|
703
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
704
|
+
}
|
|
578
705
|
}) : null, /*#__PURE__*/jsx("span", {
|
|
579
706
|
children: node?.label ?? "Menu"
|
|
580
707
|
}), /*#__PURE__*/jsx(Icons.Menu, {
|
|
581
708
|
size: 16,
|
|
582
|
-
className: "
|
|
709
|
+
className: "timvir-s-8x9d4c"
|
|
583
710
|
})]
|
|
584
|
-
}), /*#__PURE__*/jsx("input", {
|
|
585
|
-
type: "checkbox",
|
|
586
|
-
id: "menu",
|
|
587
|
-
className: "iu06l76",
|
|
588
|
-
onChange: ev => {
|
|
589
|
-
document.body.classList.toggle(classes.scrollLock, ev.currentTarget.checked);
|
|
590
|
-
}
|
|
591
711
|
}), /*#__PURE__*/jsx("div", {
|
|
592
|
-
|
|
712
|
+
...{
|
|
713
|
+
0: {
|
|
714
|
+
className: "timvir-s-1s85apg timvir-s-1b7vwdu timvir-s-1j2yrl1 timvir-s-1azbkut timvir-s-1fsrbvp timvir-s-etmjmr timvir-s-1ccyb2m"
|
|
715
|
+
},
|
|
716
|
+
1: {
|
|
717
|
+
className: "timvir-s-1b7vwdu timvir-s-1j2yrl1 timvir-s-1azbkut timvir-s-1fsrbvp timvir-s-etmjmr timvir-s-1ccyb2m timvir-s-78zum5 timvir-s-ixxii4 timvir-s-is09m7 timvir-s-u96u03 timvir-s-3m8u43 timvir-s-1ey2m1c"
|
|
718
|
+
}
|
|
719
|
+
}[!!isMenuOpen << 0],
|
|
593
720
|
children: /*#__PURE__*/jsx("div", {
|
|
594
|
-
className:
|
|
721
|
+
className: "timvir-s-1bd1j73 timvir-s-1odjw0f timvir-s-1iyjqo2 timvir-s-xqldzo timvir-s-rz96y6 timvir-s-1ijhxuk",
|
|
595
722
|
children: /*#__PURE__*/jsx("div", {
|
|
596
|
-
className:
|
|
723
|
+
className: "timvir-s-158hnoc timvir-s-1ator1a",
|
|
597
724
|
onClick: () => {
|
|
598
|
-
|
|
725
|
+
setMenuOpen(false);
|
|
599
726
|
},
|
|
600
727
|
children: toc.map((c, i) => /*#__PURE__*/jsx(Section, {
|
|
601
728
|
depth: 0,
|
|
@@ -606,23 +733,16 @@ function Sidebar(props) {
|
|
|
606
733
|
})]
|
|
607
734
|
});
|
|
608
735
|
}
|
|
609
|
-
const classes = {
|
|
610
|
-
scrollLock: "s56darb",
|
|
611
|
-
root: "rwbgl5x",
|
|
612
|
-
content: "c15aig6x",
|
|
613
|
-
sections: "svou0q5",
|
|
614
|
-
nav: "n1ibjf0n"
|
|
615
|
-
};
|
|
616
736
|
function Search(props) {
|
|
617
737
|
const {
|
|
618
738
|
open,
|
|
619
739
|
label
|
|
620
740
|
} = props;
|
|
621
741
|
return /*#__PURE__*/jsx("div", {
|
|
622
|
-
className: "
|
|
742
|
+
className: "timvir-s-gcpwm9",
|
|
623
743
|
children: /*#__PURE__*/jsxs("div", {
|
|
624
744
|
role: "button",
|
|
625
|
-
className: "
|
|
745
|
+
className: "timvir-s-1cdhzux timvir-s-1dcheo9 timvir-s-1ylh3l6 timvir-s-o1l8bm timvir-s-1ypdohk timvir-s-u0aao5 timvir-s-ur7f20 timvir-s-84vhe8 timvir-s-mkeg23 timvir-s-1y0btm7 timvir-s-j7gikm timvir-s-1d0dlzq timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1dc5b4e",
|
|
626
746
|
onClick: open,
|
|
627
747
|
children: [/*#__PURE__*/jsx("svg", {
|
|
628
748
|
x: "0px",
|
|
@@ -630,6 +750,7 @@ function Search(props) {
|
|
|
630
750
|
width: "12px",
|
|
631
751
|
height: "12px",
|
|
632
752
|
viewBox: "0 0 12 12",
|
|
753
|
+
className: "timvir-s-1lliihq timvir-s-1db2dqx timvir-s-1jw3ynk timvir-s-vle69y",
|
|
633
754
|
children: /*#__PURE__*/jsx("path", {
|
|
634
755
|
d: "M11.707 10.293l-2.54-2.54a5.015 5.015 0 10-1.414 1.414l2.54 2.54a1 1 0 001.414-1.414zM2 5a3 3 0 113 3 3 3 0 01-3-3z",
|
|
635
756
|
fill: "currentColor"
|
|
@@ -639,23 +760,19 @@ function Search(props) {
|
|
|
639
760
|
});
|
|
640
761
|
}
|
|
641
762
|
|
|
642
|
-
/**
|
|
643
|
-
* The underlying DOM element which is rendered by this component.
|
|
644
|
-
*/
|
|
645
763
|
const Root = "div";
|
|
646
|
-
function Page(props, ref) {
|
|
764
|
+
function Page(props$1, ref) {
|
|
647
765
|
const {
|
|
648
766
|
location,
|
|
649
767
|
toc,
|
|
650
768
|
Link,
|
|
651
|
-
className,
|
|
652
769
|
search,
|
|
653
770
|
mdxComponents,
|
|
654
771
|
Footer,
|
|
655
772
|
blocks,
|
|
656
773
|
children,
|
|
657
774
|
...rest
|
|
658
|
-
} = props;
|
|
775
|
+
} = props$1;
|
|
659
776
|
const [state, setState] = React.useState({
|
|
660
777
|
search: {
|
|
661
778
|
open: false
|
|
@@ -664,11 +781,15 @@ function Page(props, ref) {
|
|
|
664
781
|
const [bus] = React.useState(makeBus);
|
|
665
782
|
const context = React.useMemo(() => ({
|
|
666
783
|
bus,
|
|
784
|
+
articleComponents: {
|
|
785
|
+
...builtins,
|
|
786
|
+
...mdxComponents
|
|
787
|
+
},
|
|
667
788
|
location,
|
|
668
789
|
Link,
|
|
669
790
|
blocks,
|
|
670
791
|
toc
|
|
671
|
-
}), [bus, location, Link, blocks, toc]);
|
|
792
|
+
}), [bus, mdxComponents, location, Link, blocks, toc]);
|
|
672
793
|
useHotkeys("meta+p", ev => {
|
|
673
794
|
ev.preventDefault();
|
|
674
795
|
setState({
|
|
@@ -679,23 +800,44 @@ function Page(props, ref) {
|
|
|
679
800
|
}, {
|
|
680
801
|
enableOnFormTags: true
|
|
681
802
|
});
|
|
682
|
-
useHotkeys("
|
|
803
|
+
useHotkeys("meta+k", ev => {
|
|
804
|
+
ev.preventDefault();
|
|
683
805
|
setState({
|
|
684
806
|
search: {
|
|
685
|
-
open:
|
|
807
|
+
open: !state.search.open
|
|
686
808
|
}
|
|
687
809
|
});
|
|
810
|
+
}, {
|
|
811
|
+
enableOnFormTags: ["INPUT"]
|
|
812
|
+
});
|
|
813
|
+
useHotkeys("escape", ev => {
|
|
814
|
+
if (state.search.open) {
|
|
815
|
+
ev.preventDefault();
|
|
816
|
+
setState({
|
|
817
|
+
search: {
|
|
818
|
+
open: false
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
688
822
|
}, {
|
|
689
823
|
enableOnFormTags: true
|
|
690
824
|
});
|
|
825
|
+
const rootStyleProps = {
|
|
826
|
+
className: "timvir-s-g6iff7 timvir-s-1hz7z82 timvir-s-rvj5dj timvir-s-c0s83b timvir-s-1i3za4p timvir-s-oxwh6b timvir-s-1w3eerp"
|
|
827
|
+
};
|
|
691
828
|
return /*#__PURE__*/jsxs(Provider, {
|
|
692
829
|
value: context,
|
|
693
830
|
children: [/*#__PURE__*/jsxs(Root, {
|
|
694
831
|
ref: ref,
|
|
695
832
|
...rest,
|
|
696
|
-
|
|
833
|
+
...rootStyleProps,
|
|
834
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
835
|
+
style: {
|
|
836
|
+
...rest.style,
|
|
837
|
+
...rootStyleProps.style
|
|
838
|
+
},
|
|
697
839
|
children: [/*#__PURE__*/jsx(Sidebar, {
|
|
698
|
-
className: "
|
|
840
|
+
className: "timvir-s-1nkj2r4 timvir-s-13tdkmf timvir-s-1b7vwdu timvir-s-7wzq59 timvir-s-13vifvy timvir-s-1b3g1kt timvir-s-1uk07ai timvir-s-bvzrs5 timvir-s-1i1dbpq timvir-s-zfhgub timvir-s-3f8au3",
|
|
699
841
|
toc: toc,
|
|
700
842
|
search: search && {
|
|
701
843
|
open: () => {
|
|
@@ -708,18 +850,12 @@ function Page(props, ref) {
|
|
|
708
850
|
...search
|
|
709
851
|
}
|
|
710
852
|
}), /*#__PURE__*/jsxs("div", {
|
|
711
|
-
className: "
|
|
853
|
+
className: "timvir-s-78zum5 timvir-s-dt5ytf timvir-s-1fdo2jl",
|
|
712
854
|
children: [/*#__PURE__*/jsx("div", {
|
|
713
|
-
|
|
714
|
-
children:
|
|
715
|
-
components: {
|
|
716
|
-
...mdxComponentsBase,
|
|
717
|
-
...mdxComponents
|
|
718
|
-
},
|
|
719
|
-
children: children
|
|
720
|
-
})
|
|
855
|
+
...props(styles.content, layoutStyles.grid),
|
|
856
|
+
children: children
|
|
721
857
|
}), /*#__PURE__*/jsxs("div", {
|
|
722
|
-
className: "
|
|
858
|
+
className: "timvir-s-r1yuqi",
|
|
723
859
|
children: [(() => {
|
|
724
860
|
function flatten(n, parents) {
|
|
725
861
|
let ret = [];
|
|
@@ -753,28 +889,35 @@ function Page(props, ref) {
|
|
|
753
889
|
}
|
|
754
890
|
}
|
|
755
891
|
return /*#__PURE__*/jsx("div", {
|
|
756
|
-
className: "
|
|
757
|
-
children: /*#__PURE__*/jsx(NavigationFooter
|
|
892
|
+
className: "timvir-s-r1yuqi timvir-s-11408do",
|
|
893
|
+
children: /*#__PURE__*/jsx(NavigationFooter, {
|
|
894
|
+
Link: Link,
|
|
758
895
|
prev: toLink(index - 1),
|
|
759
896
|
next: toLink(index + 1)
|
|
760
897
|
})
|
|
761
898
|
});
|
|
762
899
|
})(), Footer && /*#__PURE__*/jsx(Footer, {})]
|
|
763
900
|
})]
|
|
764
|
-
}), search && /*#__PURE__*/jsx(search.Component, {
|
|
765
|
-
...state.search,
|
|
766
|
-
onClose: () => {
|
|
767
|
-
setState({
|
|
768
|
-
search: {
|
|
769
|
-
open: false
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
901
|
})]
|
|
774
|
-
}), /*#__PURE__*/jsx(Commands, {
|
|
902
|
+
}), /*#__PURE__*/jsx(Commands, {
|
|
903
|
+
open: state.search.open,
|
|
904
|
+
onClose: () => {
|
|
905
|
+
setState({
|
|
906
|
+
search: {
|
|
907
|
+
open: false
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
})]
|
|
775
912
|
});
|
|
776
913
|
}
|
|
777
914
|
var Page$1 = /*#__PURE__*/React.forwardRef(Page);
|
|
915
|
+
const styles = {
|
|
916
|
+
content: {
|
|
917
|
+
kTgw9: "timvir-s-13faqbe",
|
|
918
|
+
$$css: true
|
|
919
|
+
}
|
|
920
|
+
};
|
|
778
921
|
|
|
779
922
|
/**
|
|
780
923
|
* A mailbox is a wonka source which receives messages for one specific block (identified by its id).
|
|
@@ -829,4 +972,20 @@ function useBlock(props) {
|
|
|
829
972
|
};
|
|
830
973
|
}
|
|
831
974
|
|
|
832
|
-
|
|
975
|
+
/**
|
|
976
|
+
* This React hook returns a set of components that meant for use within a
|
|
977
|
+
* Timvir page or custom block. The components are styled so that they fit
|
|
978
|
+
* within the Timvir design system. You should use them to make the page
|
|
979
|
+
* appear styled consistently.
|
|
980
|
+
*
|
|
981
|
+
* The set of components includes all the built-in components, as well as
|
|
982
|
+
* any overrides and additions you have provided to the '<Page>' component.
|
|
983
|
+
*/
|
|
984
|
+
function useArticleComponents() {
|
|
985
|
+
return {
|
|
986
|
+
...builtins,
|
|
987
|
+
...useContext().articleComponents
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
export { Footer$1 as Footer, Page$1 as Page, extendedWidth, fullWidth, grid, layoutStyles, noLayout, useArticleComponents, useBlock, useMailbox };
|