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.
- package/CHANGELOG.md +29 -0
- package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
- package/blocks/Arbitrary/index.js +232 -78
- package/blocks/Arbitrary/samples/basic.d.ts +1 -1
- 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 +213 -112
- package/blocks/Code/samples/basic.d.ts +1 -1
- package/blocks/Code/samples/toggle.d.ts +1 -2
- package/blocks/Code/styles.css +100 -15
- package/blocks/ColorBar/docs/index.mdx +8 -2
- package/blocks/ColorBar/index.js +223 -68
- package/blocks/ColorBar/samples/basic.d.ts +1 -2
- package/blocks/ColorBar/styles.css +103 -4
- package/blocks/ColorBook/docs/index.mdx +1 -1
- package/blocks/ColorBook/index.js +222 -60
- package/blocks/ColorBook/samples/basic.d.ts +1 -2
- package/blocks/ColorBook/styles.css +166 -6
- package/blocks/Cover/index.js +177 -48
- package/blocks/Cover/samples/basic.d.ts +1 -2
- package/blocks/Cover/styles.css +18 -0
- package/blocks/Exhibit/index.js +205 -50
- package/blocks/Exhibit/samples/basic.d.ts +1 -2
- package/blocks/Exhibit/samples/bleed.d.ts +1 -1
- package/blocks/Exhibit/samples/usage.d.ts +1 -2
- package/blocks/Exhibit/styles.css +66 -3
- package/blocks/Font/index.js +239 -98
- package/blocks/Font/samples/basic.d.ts +1 -1
- package/blocks/Font/samples/timvir/body1.d.ts +1 -1
- package/blocks/Font/samples/timvir/caption.d.ts +1 -1
- package/blocks/Font/samples/timvir/h1.d.ts +1 -1
- package/blocks/Font/samples/timvir/h2.d.ts +1 -1
- package/blocks/Font/samples/timvir/h3.d.ts +1 -1
- package/blocks/Font/samples/timvir/h4.d.ts +1 -1
- package/blocks/Font/styles.css +82 -8
- package/blocks/Grid/docs/index.mdx +4 -4
- package/blocks/Grid/index.js +181 -36
- package/blocks/Grid/samples/basic.d.ts +1 -2
- package/blocks/Grid/styles.css +20 -1
- package/blocks/Icon/docs/index.mdx +13 -13
- package/blocks/Icon/index.js +93 -100
- package/blocks/Icon/internal/Canvas.d.ts +1 -1
- package/blocks/Icon/samples/basic.d.ts +1 -2
- package/blocks/Icon/styles.css +117 -5
- package/blocks/Icon/types.d.ts +3 -2
- package/blocks/Message/docs/index.mdx +5 -8
- package/blocks/Message/index.js +238 -55
- package/blocks/Message/samples/basic.d.ts +1 -1
- package/blocks/Message/styles.css +94 -6
- package/blocks/Swatch/docs/index.mdx +16 -16
- package/blocks/Swatch/index.js +199 -45
- package/blocks/Swatch/samples/basic.d.ts +1 -2
- package/blocks/Swatch/styles.css +82 -4
- package/blocks/Viewport/index.js +360 -237
- package/blocks/Viewport/internal/Caption.d.ts +1 -1
- package/blocks/Viewport/internal/Handle.d.ts +1 -1
- package/blocks/Viewport/internal/Ruler.d.ts +1 -2
- package/blocks/Viewport/samples/basic.d.ts +1 -2
- package/blocks/Viewport/styles.css +259 -14
- package/blocks/WebLink/index.js +217 -62
- package/blocks/WebLink/samples/basic.d.ts +1 -1
- package/blocks/WebLink/styles.css +170 -8
- package/blocks/styles.css +1460 -97
- package/builtins/components.d.ts +2 -2
- package/builtins/index.js +306 -239
- package/builtins/styles.css +267 -14
- package/context/index.d.ts +6 -1
- package/core/components/Commands/Commands.d.ts +2 -0
- package/core/components/Commands/internal/Action.d.ts +1 -1
- package/core/components/Commands/internal/Dialog.d.ts +1 -2
- package/core/components/Commands/internal/index.d.ts +0 -1
- package/core/components/Footer/samples/basic.d.ts +1 -1
- package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
- package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
- package/core/components/Page/Page.d.ts +12 -3
- package/core/components/Page/docs/index.mdx +44 -11
- package/core/components/Page/internal/Section.d.ts +1 -2
- package/core/components/Page/internal/Sidebar.d.ts +1 -1
- package/core/components/Page/internal/SidebarItem.d.ts +1 -2
- package/core/components/Page/internal/index.d.ts +0 -1
- package/core/components/Page/samples/basic.d.ts +1 -2
- package/core/components/Page/samples/layout.d.ts +1 -2
- package/core/index.d.ts +191 -2
- package/core/index.js +674 -449
- package/core/layout.d.ts +40 -0
- package/core/styles.css +857 -88
- package/core/theme/detector.js +1 -1
- package/global.css +79 -0
- package/internal/cx.d.ts +1 -0
- package/knip.config.d.ts +5 -0
- package/package.json +1 -2
- package/search/Search/samples/basic.d.ts +1 -2
- package/search/index.js +2 -208
- package/styles.css +2670 -222
- 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 -2
- 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 -2
- package/search/styles.css +0 -16
package/core/index.js
CHANGED
|
@@ -3,100 +3,255 @@ 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
|
|
6
|
+
import * as builtins from 'timvir/builtins';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
8
|
import { useHotkeys } from 'react-hotkeys-hook';
|
|
8
9
|
import { makeBus } from 'timvir/bus';
|
|
9
|
-
import * as mdxComponentsBase from 'timvir/builtins';
|
|
10
10
|
import * as Icons from 'react-feather';
|
|
11
11
|
import * as ReactDOM from 'react-dom';
|
|
12
12
|
import { defaultSearch } from 'timvir/search';
|
|
13
13
|
|
|
14
|
-
// src/css.ts
|
|
15
|
-
|
|
16
|
-
// src/cx.ts
|
|
17
|
-
var cx = function cx2() {
|
|
18
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
-
const atomicClasses = {};
|
|
20
|
-
const nonAtomicClasses = [];
|
|
21
|
-
presentClassNames.forEach((arg) => {
|
|
22
|
-
const individualClassNames = arg ? arg.split(" ") : [];
|
|
23
|
-
individualClassNames.forEach((className) => {
|
|
24
|
-
if (className.startsWith("atm_")) {
|
|
25
|
-
const [, keyHash] = className.split("_");
|
|
26
|
-
atomicClasses[keyHash] = className;
|
|
27
|
-
} else {
|
|
28
|
-
nonAtomicClasses.push(className);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
const result = [];
|
|
33
|
-
for (const keyHash in atomicClasses) {
|
|
34
|
-
if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
|
|
35
|
-
result.push(atomicClasses[keyHash]);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
result.push(...nonAtomicClasses);
|
|
39
|
-
return result.join(" ");
|
|
40
|
-
};
|
|
41
|
-
var cx_default = cx;
|
|
42
|
-
|
|
43
|
-
const noLayout = "nc2e9vn";
|
|
44
|
-
const grid = "g1et32pl";
|
|
45
|
-
const extendedWidth = cx_default(noLayout, "en6sn9p");
|
|
46
|
-
const fullWidth = cx_default(noLayout, "f3c539b");
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The underlying DOM element which is rendered by this component.
|
|
50
|
-
*/
|
|
51
14
|
const Root$3 = "footer";
|
|
52
15
|
function Footer(props, ref) {
|
|
53
16
|
const {
|
|
54
|
-
className,
|
|
55
17
|
links,
|
|
56
18
|
...rest
|
|
57
19
|
} = props;
|
|
58
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/jsxs(Root$3, {
|
|
59
21
|
ref: ref,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
22
|
+
...rest,
|
|
23
|
+
className: "timvir-s-v0thzw timvir-s-rvj5dj timvir-s-kcw01v timvir-s-qr9vqb",
|
|
24
|
+
children: [links && /*#__PURE__*/jsx("div", {
|
|
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",
|
|
26
|
+
children: /*#__PURE__*/jsx("div", {
|
|
27
|
+
className: "timvir-s-htle6 timvir-s-euugli timvir-s-rvj5dj timvir-s-k629hk timvir-s-1rzw5jd",
|
|
28
|
+
children: links.map(({
|
|
29
|
+
group,
|
|
30
|
+
items
|
|
31
|
+
}, i) => /*#__PURE__*/jsxs("div", {
|
|
32
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
33
|
+
className: "timvir-s-1s688f timvir-s-od5an3",
|
|
34
|
+
children: group
|
|
35
|
+
}), /*#__PURE__*/jsx("div", {
|
|
36
|
+
children: items.map(({
|
|
37
|
+
label,
|
|
38
|
+
href
|
|
39
|
+
}, j) => /*#__PURE__*/jsx("a", {
|
|
40
|
+
href: href,
|
|
41
|
+
className: "timvir-s-1lliihq timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-gmrl4",
|
|
42
|
+
children: label
|
|
43
|
+
}, j))
|
|
44
|
+
})]
|
|
45
|
+
}, i))
|
|
46
|
+
})
|
|
47
|
+
}), /*#__PURE__*/jsx("div", {
|
|
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",
|
|
49
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
50
|
+
className: "timvir-s-htle6 timvir-s-euugli",
|
|
51
|
+
children: ["Built with", " ", /*#__PURE__*/jsx("a", {
|
|
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",
|
|
54
|
+
children: "Timvir"
|
|
55
|
+
})]
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
89
59
|
}
|
|
90
60
|
var Footer$1 = /*#__PURE__*/React.forwardRef(Footer);
|
|
91
|
-
const classes$7 = {
|
|
92
|
-
root: "rwhrdvg",
|
|
93
|
-
linkGroups: "l1u1x7q7",
|
|
94
|
-
linkGroupTitle: "l1x5jo3a",
|
|
95
|
-
link: "l29wcr8",
|
|
96
|
-
meta: "m1ojti9g"
|
|
97
|
-
};
|
|
98
61
|
|
|
99
|
-
|
|
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 = "";
|
|
100
255
|
|
|
101
256
|
const Root$2 = "div";
|
|
102
257
|
function Action(props) {
|
|
@@ -104,34 +259,42 @@ function Action(props) {
|
|
|
104
259
|
label,
|
|
105
260
|
...rest
|
|
106
261
|
} = props;
|
|
107
|
-
|
|
108
|
-
className:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
+
};
|
|
265
|
+
return /*#__PURE__*/jsxs(Root$2, {
|
|
266
|
+
...rest,
|
|
267
|
+
...rootStyleProps,
|
|
268
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
269
|
+
style: {
|
|
270
|
+
...rootStyleProps.style,
|
|
271
|
+
...rest.style
|
|
272
|
+
},
|
|
273
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
274
|
+
className: "timvir-s-1wsuqlk timvir-s-1kky2od",
|
|
275
|
+
children: /*#__PURE__*/jsxs("svg", {
|
|
276
|
+
className: "timvir-s-1lliihq timvir-s-1kky2od timvir-s-lup9mm",
|
|
277
|
+
viewBox: "0 0 24 24",
|
|
278
|
+
fill: "none",
|
|
279
|
+
stroke: "currentColor",
|
|
280
|
+
strokeWidth: "2",
|
|
281
|
+
strokeLinecap: "round",
|
|
282
|
+
strokeLinejoin: "round",
|
|
283
|
+
children: [/*#__PURE__*/jsx("line", {
|
|
284
|
+
x1: "5",
|
|
285
|
+
y1: "12",
|
|
286
|
+
x2: "19",
|
|
287
|
+
y2: "12"
|
|
288
|
+
}), /*#__PURE__*/jsx("polyline", {
|
|
289
|
+
points: "12 5 19 12 12 19"
|
|
290
|
+
})]
|
|
291
|
+
})
|
|
292
|
+
}), /*#__PURE__*/jsx("div", {
|
|
293
|
+
className: "timvir-s-1dcheo9 timvir-s-d85mq3",
|
|
294
|
+
children: label
|
|
295
|
+
})]
|
|
296
|
+
});
|
|
129
297
|
}
|
|
130
|
-
const classes$6 = {
|
|
131
|
-
root: "ru1mblv",
|
|
132
|
-
icon: "i1wyx06o",
|
|
133
|
-
label: "legxg01"
|
|
134
|
-
};
|
|
135
298
|
|
|
136
299
|
function Dialog(props) {
|
|
137
300
|
const {
|
|
@@ -172,7 +335,7 @@ function Dialog(props) {
|
|
|
172
335
|
onDispose?.();
|
|
173
336
|
}, 200);
|
|
174
337
|
}
|
|
175
|
-
}, [open]);
|
|
338
|
+
}, [open, onDispose]);
|
|
176
339
|
React.useEffect(() => {
|
|
177
340
|
(async () => {
|
|
178
341
|
const {
|
|
@@ -183,81 +346,75 @@ function Dialog(props) {
|
|
|
183
346
|
commands: edges
|
|
184
347
|
}));
|
|
185
348
|
})();
|
|
186
|
-
}, [state.query]);
|
|
187
|
-
return /*#__PURE__*/
|
|
188
|
-
className:
|
|
349
|
+
}, [toc, state.query]);
|
|
350
|
+
return /*#__PURE__*/jsxs("div", {
|
|
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",
|
|
189
352
|
style: state.style,
|
|
190
|
-
...rest
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
353
|
+
...rest,
|
|
354
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
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",
|
|
356
|
+
children: "Context"
|
|
357
|
+
}), /*#__PURE__*/jsx("div", {
|
|
358
|
+
className: "timvir-s-1wvxhgs timvir-s-rvj5dj timvir-s-1y6fwsi timvir-s-6s0dn4 timvir-s-1n2onr6 timvir-s-2lah0s timvir-s-1x0gksc",
|
|
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",
|
|
361
|
+
autoFocus: true,
|
|
362
|
+
placeholder: "Type a command or search\u2026",
|
|
363
|
+
value: state.query,
|
|
364
|
+
onChange: ev => {
|
|
365
|
+
const query = ev.currentTarget.value;
|
|
366
|
+
setState(state => ({
|
|
367
|
+
...state,
|
|
368
|
+
query
|
|
369
|
+
}));
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
373
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
374
|
+
className: "timvir-s-1yy59j4 timvir-s-xk0z11 timvir-s-qin4a2 timvir-s-boafo0 timvir-s-1flf930",
|
|
375
|
+
children: "Pages"
|
|
376
|
+
}), /*#__PURE__*/jsx("div", {
|
|
377
|
+
className: "timvir-s-1vd4hg5 timvir-s-ysyzu8",
|
|
378
|
+
children: state.commands.map(({
|
|
379
|
+
node
|
|
380
|
+
}, index) => /*#__PURE__*/jsx(Action, {
|
|
381
|
+
label: node.label,
|
|
382
|
+
onClick: () => {
|
|
383
|
+
onClose?.();
|
|
384
|
+
window.location.href = node.path;
|
|
385
|
+
}
|
|
386
|
+
}, index))
|
|
387
|
+
})]
|
|
388
|
+
})]
|
|
389
|
+
});
|
|
220
390
|
}
|
|
221
|
-
const classes$5 = {
|
|
222
|
-
root: "r1fo6voy",
|
|
223
|
-
context: "c185xiij",
|
|
224
|
-
prompt: "p1ky3ya3",
|
|
225
|
-
subheader: "snq1o7g",
|
|
226
|
-
commands: "cchvluj"
|
|
227
|
-
};
|
|
228
391
|
|
|
229
392
|
function Commands(props) {
|
|
393
|
+
const {
|
|
394
|
+
open: _open,
|
|
395
|
+
onClose: _onClose
|
|
396
|
+
} = props;
|
|
230
397
|
const [state, setState] = React.useState({
|
|
231
|
-
/**
|
|
232
|
-
* Whether the command palette should be open or not. The command palette is
|
|
233
|
-
* opened by cmd+k, and closed by escape or clicking outside of the dialog.
|
|
234
|
-
*/
|
|
235
|
-
open: false,
|
|
236
|
-
/**
|
|
237
|
-
* If the dialog is visible (even during the closing transition), this
|
|
238
|
-
* object contains both the container element (a div appended to the end of
|
|
239
|
-
* the body) and the React Portal (that is returned by this component).
|
|
240
|
-
*/
|
|
241
398
|
dialog: null
|
|
242
399
|
});
|
|
243
400
|
function open() {
|
|
244
401
|
setState({
|
|
245
|
-
open: true,
|
|
246
402
|
dialog: (() => {
|
|
247
403
|
if (!state.dialog) {
|
|
248
404
|
const containerElement = document.createElement("div");
|
|
249
405
|
document.body.appendChild(containerElement);
|
|
250
|
-
const reactPortal = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/
|
|
251
|
-
className:
|
|
406
|
+
const reactPortal = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
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",
|
|
252
408
|
onClick: ev => {
|
|
253
409
|
if (ev.target === ev.currentTarget) {
|
|
254
|
-
|
|
410
|
+
_onClose();
|
|
255
411
|
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
412
|
+
},
|
|
413
|
+
children: /*#__PURE__*/jsx(Dialog, {
|
|
414
|
+
open: true,
|
|
415
|
+
onClose: _onClose
|
|
416
|
+
})
|
|
417
|
+
}), containerElement);
|
|
261
418
|
return {
|
|
262
419
|
containerElement,
|
|
263
420
|
reactPortal
|
|
@@ -265,17 +422,18 @@ function Commands(props) {
|
|
|
265
422
|
} else {
|
|
266
423
|
return {
|
|
267
424
|
containerElement: state.dialog.containerElement,
|
|
268
|
-
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/
|
|
269
|
-
className:
|
|
425
|
+
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
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",
|
|
270
427
|
onClick: ev => {
|
|
271
428
|
if (ev.target === ev.currentTarget) {
|
|
272
|
-
|
|
429
|
+
_onClose();
|
|
273
430
|
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
431
|
+
},
|
|
432
|
+
children: /*#__PURE__*/jsx(Dialog, {
|
|
433
|
+
open: true,
|
|
434
|
+
onClose: _onClose
|
|
435
|
+
})
|
|
436
|
+
}), state.dialog.containerElement)
|
|
279
437
|
};
|
|
280
438
|
}
|
|
281
439
|
})()
|
|
@@ -283,28 +441,27 @@ function Commands(props) {
|
|
|
283
441
|
}
|
|
284
442
|
function close() {
|
|
285
443
|
setState({
|
|
286
|
-
open: false,
|
|
287
444
|
dialog: (() => {
|
|
288
445
|
if (state.dialog) {
|
|
289
446
|
return {
|
|
290
447
|
containerElement: state.dialog.containerElement,
|
|
291
|
-
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/
|
|
292
|
-
className:
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
})
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
})
|
|
448
|
+
reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
|
|
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",
|
|
450
|
+
children: /*#__PURE__*/jsx(Dialog, {
|
|
451
|
+
onDispose: () => {
|
|
452
|
+
setState({
|
|
453
|
+
dialog: (() => {
|
|
454
|
+
if (!_open && state.dialog) {
|
|
455
|
+
document.body.removeChild(state.dialog.containerElement);
|
|
456
|
+
return null;
|
|
457
|
+
} else {
|
|
458
|
+
return state.dialog;
|
|
459
|
+
}
|
|
460
|
+
})()
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
})
|
|
464
|
+
}), state.dialog.containerElement)
|
|
308
465
|
};
|
|
309
466
|
} else {
|
|
310
467
|
return state.dialog;
|
|
@@ -312,83 +469,61 @@ function Commands(props) {
|
|
|
312
469
|
})()
|
|
313
470
|
});
|
|
314
471
|
}
|
|
315
|
-
useHotkeys("meta+k", ev => {
|
|
316
|
-
ev.preventDefault();
|
|
317
|
-
if (!state.open) {
|
|
318
|
-
open();
|
|
319
|
-
} else {
|
|
320
|
-
close();
|
|
321
|
-
}
|
|
322
|
-
}, {
|
|
323
|
-
enableOnFormTags: ["INPUT"]
|
|
324
|
-
});
|
|
325
|
-
useHotkeys("escape", () => {
|
|
326
|
-
close();
|
|
327
|
-
}, {
|
|
328
|
-
enableOnFormTags: ["INPUT"]
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
/*
|
|
332
|
-
* Crude body scroll lock when the dialog is open.
|
|
333
|
-
*/
|
|
334
472
|
React.useEffect(() => {
|
|
335
|
-
if (
|
|
473
|
+
if (_open) {
|
|
336
474
|
document.body.style.overflow = "hidden";
|
|
475
|
+
open();
|
|
337
476
|
return () => {
|
|
338
477
|
document.body.style.overflow = "";
|
|
339
478
|
};
|
|
479
|
+
} else {
|
|
480
|
+
close();
|
|
340
481
|
}
|
|
341
|
-
}, [
|
|
482
|
+
}, [_open]);
|
|
342
483
|
return state.dialog?.reactPortal ?? null;
|
|
343
484
|
}
|
|
344
|
-
const classes$4 = {
|
|
345
|
-
root: "rfei6z8"
|
|
346
|
-
};
|
|
347
485
|
|
|
348
|
-
/**
|
|
349
|
-
* The underlying DOM element which is rendered by this component.
|
|
350
|
-
*/
|
|
351
486
|
const Root$1 = "div";
|
|
352
|
-
function NavigationFooter(props
|
|
353
|
-
const {
|
|
354
|
-
Link
|
|
355
|
-
} = useContext();
|
|
487
|
+
function NavigationFooter(props) {
|
|
356
488
|
const {
|
|
489
|
+
Link,
|
|
357
490
|
prev,
|
|
358
491
|
next,
|
|
359
|
-
className,
|
|
360
492
|
...rest
|
|
361
493
|
} = props;
|
|
362
|
-
return /*#__PURE__*/
|
|
363
|
-
ref: ref,
|
|
494
|
+
return /*#__PURE__*/jsx(Root$1, {
|
|
364
495
|
...rest,
|
|
365
|
-
className:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
496
|
+
className: "timvir-s-1dvi5bl timvir-s-rvj5dj timvir-s-3xbxsf timvir-s-12c0rpe timvir-s-9q0i6z timvir-s-1mxrek7",
|
|
497
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
498
|
+
className: "timvir-s-htle6 timvir-s-78zum5 timvir-s-3ieub6 timvir-s-8fetqu timvir-s-kpwil5 timvir-s-1evy7pa timvir-s-1k046mz",
|
|
499
|
+
children: [prev && /*#__PURE__*/jsxs(Link, {
|
|
500
|
+
href: prev.href,
|
|
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",
|
|
509
|
+
children: prev.label
|
|
510
|
+
})]
|
|
511
|
+
}), next && /*#__PURE__*/jsxs(Link, {
|
|
512
|
+
href: next.href,
|
|
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"
|
|
518
|
+
})]
|
|
519
|
+
}), /*#__PURE__*/jsx("div", {
|
|
520
|
+
className: "timvir-s-k50ysn timvir-s-b3r6kr timvir-s-lyipyv timvir-s-193iq5w",
|
|
521
|
+
children: next.label
|
|
522
|
+
})]
|
|
523
|
+
})]
|
|
524
|
+
})
|
|
387
525
|
});
|
|
388
526
|
}
|
|
389
|
-
const classes$3 = {
|
|
390
|
-
root: "rymvrdu"
|
|
391
|
-
};
|
|
392
527
|
|
|
393
528
|
function SidebarItem(props) {
|
|
394
529
|
const {
|
|
@@ -403,43 +538,61 @@ function SidebarItem(props) {
|
|
|
403
538
|
location,
|
|
404
539
|
Link
|
|
405
540
|
} = useContext();
|
|
406
|
-
const
|
|
407
|
-
className:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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
|
+
};
|
|
548
|
+
const icon = children.length === 0 ? null : /*#__PURE__*/jsx(Icons.ChevronRight, {
|
|
549
|
+
className: iconStylexProps.className,
|
|
550
|
+
style: iconStyle,
|
|
411
551
|
size: 16
|
|
412
552
|
});
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
href: path,
|
|
418
|
-
style: {
|
|
419
|
-
marginLeft: depth * 16
|
|
420
|
-
}
|
|
421
|
-
}, props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
|
|
422
|
-
className: classes$2.icn
|
|
423
|
-
}) : null, /*#__PURE__*/React.createElement("span", {
|
|
424
|
-
className: classes$2.label
|
|
425
|
-
}, label), icon) : /*#__PURE__*/React.createElement("a", {
|
|
426
|
-
style: {
|
|
427
|
-
marginLeft: depth * 16
|
|
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"
|
|
428
557
|
},
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
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
|
+
};
|
|
566
|
+
return /*#__PURE__*/jsx("div", {
|
|
567
|
+
className: "timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-3my8ay timvir-s-6u19be timvir-s-1ylh3l6 timvir-s-asi8qw",
|
|
568
|
+
children: path ? /*#__PURE__*/jsxs(Link, {
|
|
569
|
+
href: path,
|
|
570
|
+
className: linkStylexProps.className,
|
|
571
|
+
style: linkStyle,
|
|
572
|
+
children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
|
|
573
|
+
...{
|
|
574
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
575
|
+
}
|
|
576
|
+
}) : null, /*#__PURE__*/jsx("span", {
|
|
577
|
+
className: "timvir-s-uxw1ft timvir-s-b3r6kr timvir-s-lyipyv timvir-s-ack27t",
|
|
578
|
+
children: label
|
|
579
|
+
}), icon]
|
|
580
|
+
}) : /*#__PURE__*/jsxs("a", {
|
|
581
|
+
href: "#",
|
|
582
|
+
className: linkStylexProps.className,
|
|
583
|
+
style: linkStyle,
|
|
584
|
+
onClick: () => setActive(x => !x),
|
|
585
|
+
children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
|
|
586
|
+
...{
|
|
587
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
588
|
+
}
|
|
589
|
+
}) : null, /*#__PURE__*/jsx("span", {
|
|
590
|
+
className: "timvir-s-uxw1ft timvir-s-b3r6kr timvir-s-lyipyv timvir-s-ack27t",
|
|
591
|
+
children: label
|
|
592
|
+
}), icon]
|
|
593
|
+
})
|
|
594
|
+
});
|
|
436
595
|
}
|
|
437
|
-
const classes$2 = {
|
|
438
|
-
root: "r28qe6v",
|
|
439
|
-
icn: "i1ia823q",
|
|
440
|
-
label: "l13ixk6c",
|
|
441
|
-
icon: "i7wcd3g"
|
|
442
|
-
};
|
|
443
596
|
|
|
444
597
|
function Section(props) {
|
|
445
598
|
const {
|
|
@@ -466,30 +619,41 @@ function Section(props) {
|
|
|
466
619
|
setActive(true);
|
|
467
620
|
}
|
|
468
621
|
}, [path, location.asPath]);
|
|
469
|
-
return /*#__PURE__*/
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
622
|
+
return /*#__PURE__*/jsxs("section", {
|
|
623
|
+
children: [/*#__PURE__*/jsx(SidebarItem, {
|
|
624
|
+
...props,
|
|
625
|
+
active: active,
|
|
626
|
+
setActive: setActive
|
|
627
|
+
}), active && children.length > 0 && /*#__PURE__*/jsx("div", {
|
|
628
|
+
children: children.map((c, i) => /*#__PURE__*/jsx(Section, {
|
|
629
|
+
depth: depth + 1,
|
|
630
|
+
...c
|
|
631
|
+
}, i))
|
|
632
|
+
})]
|
|
633
|
+
});
|
|
480
634
|
}
|
|
481
|
-
const classes$1 = {
|
|
482
|
-
root: "ruyt2hq"
|
|
483
|
-
};
|
|
484
635
|
|
|
485
636
|
function Sidebar(props) {
|
|
486
637
|
const {
|
|
487
638
|
location
|
|
488
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]);
|
|
489
654
|
const {
|
|
490
655
|
toc,
|
|
491
656
|
search,
|
|
492
|
-
className,
|
|
493
657
|
...rest
|
|
494
658
|
} = props;
|
|
495
659
|
const node = function find(nodes) {
|
|
@@ -505,98 +669,110 @@ function Sidebar(props) {
|
|
|
505
669
|
}
|
|
506
670
|
}
|
|
507
671
|
}(toc);
|
|
508
|
-
|
|
509
|
-
className:
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
className:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
672
|
+
const rootStyleProps = {
|
|
673
|
+
className: "timvir-s-78zum5 timvir-s-dt5ytf timvir-s-1fsrbvp"
|
|
674
|
+
};
|
|
675
|
+
return /*#__PURE__*/jsxs("nav", {
|
|
676
|
+
...rest,
|
|
677
|
+
...rootStyleProps,
|
|
678
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
679
|
+
children: [/*#__PURE__*/jsxs("header", {
|
|
680
|
+
className: "timvir-s-7uxsod timvir-s-1pizb70 timvir-s-78zum5 timvir-s-6s0dn4 timvir-s-1d813ht timvir-s-1m2nq6k timvir-s-1vptubt",
|
|
681
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
682
|
+
className: "timvir-s-kpwil5 timvir-s-1xet1wb timvir-s-78zum5 timvir-s-ou54vl",
|
|
683
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
684
|
+
className: "timvir-s-kjxd12",
|
|
685
|
+
children: "Timvir"
|
|
686
|
+
}), /*#__PURE__*/jsx("div", {
|
|
687
|
+
className: "timvir-s-uqj7gu timvir-s-1i1rx1s timvir-s-mll18r"
|
|
688
|
+
}), /*#__PURE__*/jsx("div", {
|
|
689
|
+
children: "Docs"
|
|
690
|
+
})]
|
|
691
|
+
}), search && /*#__PURE__*/jsx("div", {
|
|
692
|
+
className: "timvir-s-2lah0s timvir-s-zhuw26 timvir-s-w7yly9 timvir-s-1s85apg timvir-s-1m2nq6k",
|
|
693
|
+
children: /*#__PURE__*/jsx(Search, {
|
|
694
|
+
...search
|
|
695
|
+
})
|
|
696
|
+
})]
|
|
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",
|
|
701
|
+
children: [node?.icon ? /*#__PURE__*/React.cloneElement(node.icon, {
|
|
702
|
+
...{
|
|
703
|
+
className: "timvir-s-1lliihq timvir-s-1fr90bg timvir-s-pz6ql4 timvir-s-1db2dqx timvir-s-15dgqpb"
|
|
704
|
+
}
|
|
705
|
+
}) : null, /*#__PURE__*/jsx("span", {
|
|
706
|
+
children: node?.label ?? "Menu"
|
|
707
|
+
}), /*#__PURE__*/jsx(Icons.Menu, {
|
|
708
|
+
size: 16,
|
|
709
|
+
className: "timvir-s-8x9d4c"
|
|
710
|
+
})]
|
|
711
|
+
}), /*#__PURE__*/jsx("div", {
|
|
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],
|
|
720
|
+
children: /*#__PURE__*/jsx("div", {
|
|
721
|
+
className: "timvir-s-1bd1j73 timvir-s-1odjw0f timvir-s-1iyjqo2 timvir-s-xqldzo timvir-s-rz96y6 timvir-s-1ijhxuk",
|
|
722
|
+
children: /*#__PURE__*/jsx("div", {
|
|
723
|
+
className: "timvir-s-158hnoc timvir-s-1ator1a",
|
|
724
|
+
onClick: () => {
|
|
725
|
+
setMenuOpen(false);
|
|
726
|
+
},
|
|
727
|
+
children: toc.map((c, i) => /*#__PURE__*/jsx(Section, {
|
|
728
|
+
depth: 0,
|
|
729
|
+
...c
|
|
730
|
+
}, i))
|
|
731
|
+
})
|
|
732
|
+
})
|
|
733
|
+
})]
|
|
734
|
+
});
|
|
552
735
|
}
|
|
553
|
-
const classes = {
|
|
554
|
-
scrollLock: "s56darb",
|
|
555
|
-
root: "rwbgl5x",
|
|
556
|
-
content: "c15aig6x",
|
|
557
|
-
sections: "svou0q5",
|
|
558
|
-
nav: "n1ibjf0n"
|
|
559
|
-
};
|
|
560
736
|
function Search(props) {
|
|
561
737
|
const {
|
|
562
738
|
open,
|
|
563
739
|
label
|
|
564
740
|
} = props;
|
|
565
|
-
return /*#__PURE__*/
|
|
566
|
-
className: "
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
741
|
+
return /*#__PURE__*/jsx("div", {
|
|
742
|
+
className: "timvir-s-gcpwm9",
|
|
743
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
744
|
+
role: "button",
|
|
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",
|
|
746
|
+
onClick: open,
|
|
747
|
+
children: [/*#__PURE__*/jsx("svg", {
|
|
748
|
+
x: "0px",
|
|
749
|
+
y: "0px",
|
|
750
|
+
width: "12px",
|
|
751
|
+
height: "12px",
|
|
752
|
+
viewBox: "0 0 12 12",
|
|
753
|
+
className: "timvir-s-1lliihq timvir-s-1db2dqx timvir-s-1jw3ynk timvir-s-vle69y",
|
|
754
|
+
children: /*#__PURE__*/jsx("path", {
|
|
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",
|
|
756
|
+
fill: "currentColor"
|
|
757
|
+
})
|
|
758
|
+
}), label || "Search docs"]
|
|
759
|
+
})
|
|
760
|
+
});
|
|
581
761
|
}
|
|
582
762
|
|
|
583
|
-
/**
|
|
584
|
-
* The underlying DOM element which is rendered by this component.
|
|
585
|
-
*/
|
|
586
763
|
const Root = "div";
|
|
587
|
-
function Page(props, ref) {
|
|
764
|
+
function Page(props$1, ref) {
|
|
588
765
|
const {
|
|
589
766
|
location,
|
|
590
767
|
toc,
|
|
591
768
|
Link,
|
|
592
|
-
className,
|
|
593
769
|
search,
|
|
594
770
|
mdxComponents,
|
|
595
771
|
Footer,
|
|
596
772
|
blocks,
|
|
597
773
|
children,
|
|
598
774
|
...rest
|
|
599
|
-
} = props;
|
|
775
|
+
} = props$1;
|
|
600
776
|
const [state, setState] = React.useState({
|
|
601
777
|
search: {
|
|
602
778
|
open: false
|
|
@@ -605,11 +781,15 @@ function Page(props, ref) {
|
|
|
605
781
|
const [bus] = React.useState(makeBus);
|
|
606
782
|
const context = React.useMemo(() => ({
|
|
607
783
|
bus,
|
|
784
|
+
articleComponents: {
|
|
785
|
+
...builtins,
|
|
786
|
+
...mdxComponents
|
|
787
|
+
},
|
|
608
788
|
location,
|
|
609
789
|
Link,
|
|
610
790
|
blocks,
|
|
611
791
|
toc
|
|
612
|
-
}), [bus, location, Link, blocks, toc]);
|
|
792
|
+
}), [bus, mdxComponents, location, Link, blocks, toc]);
|
|
613
793
|
useHotkeys("meta+p", ev => {
|
|
614
794
|
ev.preventDefault();
|
|
615
795
|
setState({
|
|
@@ -620,95 +800,124 @@ function Page(props, ref) {
|
|
|
620
800
|
}, {
|
|
621
801
|
enableOnFormTags: true
|
|
622
802
|
});
|
|
623
|
-
useHotkeys("
|
|
803
|
+
useHotkeys("meta+k", ev => {
|
|
804
|
+
ev.preventDefault();
|
|
624
805
|
setState({
|
|
625
806
|
search: {
|
|
626
|
-
open:
|
|
807
|
+
open: !state.search.open
|
|
627
808
|
}
|
|
628
809
|
});
|
|
629
810
|
}, {
|
|
630
|
-
enableOnFormTags:
|
|
811
|
+
enableOnFormTags: ["INPUT"]
|
|
631
812
|
});
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
ref: ref,
|
|
636
|
-
...rest,
|
|
637
|
-
className: cx_default(className, theme, "rfhjyp1")
|
|
638
|
-
}, /*#__PURE__*/React.createElement(Sidebar, {
|
|
639
|
-
className: "s1pp8z35",
|
|
640
|
-
toc: toc,
|
|
641
|
-
search: search && {
|
|
642
|
-
open: () => {
|
|
643
|
-
setState({
|
|
644
|
-
search: {
|
|
645
|
-
open: true
|
|
646
|
-
}
|
|
647
|
-
});
|
|
648
|
-
},
|
|
649
|
-
...search
|
|
650
|
-
}
|
|
651
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
652
|
-
className: "dxk1fgw"
|
|
653
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
654
|
-
className: grid
|
|
655
|
-
}, /*#__PURE__*/React.createElement(MDXProvider, {
|
|
656
|
-
components: {
|
|
657
|
-
...mdxComponentsBase,
|
|
658
|
-
...mdxComponents
|
|
659
|
-
}
|
|
660
|
-
}, children)), /*#__PURE__*/React.createElement("div", {
|
|
661
|
-
className: "d2srpki"
|
|
662
|
-
}, (() => {
|
|
663
|
-
function flatten(n, parents) {
|
|
664
|
-
let ret = [];
|
|
665
|
-
if (n.path) {
|
|
666
|
-
ret.push({
|
|
667
|
-
parents,
|
|
668
|
-
label: n.label,
|
|
669
|
-
path: n.path
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
if (n.children) {
|
|
673
|
-
ret = [...ret, ...n.children.flatMap(c => flatten(c, [...parents, n]))];
|
|
674
|
-
}
|
|
675
|
-
return ret;
|
|
676
|
-
}
|
|
677
|
-
const items = toc.flatMap(n => flatten(n, []));
|
|
678
|
-
const index = items.findIndex(v => v.path === location.asPath.replace(/#.*/, ""));
|
|
679
|
-
if (index === -1) {
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
|
-
function toLink(index) {
|
|
683
|
-
const item = items[index];
|
|
684
|
-
if (item === undefined) {
|
|
685
|
-
return undefined;
|
|
686
|
-
} else {
|
|
687
|
-
return {
|
|
688
|
-
href: item.path,
|
|
689
|
-
label: item.label,
|
|
690
|
-
context: item.parents.map(x => x.label).join(" / ")
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
695
|
-
className: "d1hkiw6l"
|
|
696
|
-
}, /*#__PURE__*/React.createElement(NavigationFooter$1, {
|
|
697
|
-
prev: toLink(index - 1),
|
|
698
|
-
next: toLink(index + 1)
|
|
699
|
-
}));
|
|
700
|
-
})(), Footer && /*#__PURE__*/React.createElement(Footer, null))), search && /*#__PURE__*/React.createElement(search.Component, {
|
|
701
|
-
...state.search,
|
|
702
|
-
onClose: () => {
|
|
813
|
+
useHotkeys("escape", ev => {
|
|
814
|
+
if (state.search.open) {
|
|
815
|
+
ev.preventDefault();
|
|
703
816
|
setState({
|
|
704
817
|
search: {
|
|
705
818
|
open: false
|
|
706
819
|
}
|
|
707
820
|
});
|
|
708
821
|
}
|
|
709
|
-
}
|
|
822
|
+
}, {
|
|
823
|
+
enableOnFormTags: true
|
|
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
|
+
};
|
|
828
|
+
return /*#__PURE__*/jsxs(Provider, {
|
|
829
|
+
value: context,
|
|
830
|
+
children: [/*#__PURE__*/jsxs(Root, {
|
|
831
|
+
ref: ref,
|
|
832
|
+
...rest,
|
|
833
|
+
...rootStyleProps,
|
|
834
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
835
|
+
style: {
|
|
836
|
+
...rest.style,
|
|
837
|
+
...rootStyleProps.style
|
|
838
|
+
},
|
|
839
|
+
children: [/*#__PURE__*/jsx(Sidebar, {
|
|
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",
|
|
841
|
+
toc: toc,
|
|
842
|
+
search: search && {
|
|
843
|
+
open: () => {
|
|
844
|
+
setState({
|
|
845
|
+
search: {
|
|
846
|
+
open: true
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
},
|
|
850
|
+
...search
|
|
851
|
+
}
|
|
852
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
853
|
+
className: "timvir-s-78zum5 timvir-s-dt5ytf timvir-s-1fdo2jl",
|
|
854
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
855
|
+
...props(styles.content, layoutStyles.grid),
|
|
856
|
+
children: children
|
|
857
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
858
|
+
className: "timvir-s-r1yuqi",
|
|
859
|
+
children: [(() => {
|
|
860
|
+
function flatten(n, parents) {
|
|
861
|
+
let ret = [];
|
|
862
|
+
if (n.path) {
|
|
863
|
+
ret.push({
|
|
864
|
+
parents,
|
|
865
|
+
label: n.label,
|
|
866
|
+
path: n.path
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
if (n.children) {
|
|
870
|
+
ret = [...ret, ...n.children.flatMap(c => flatten(c, [...parents, n]))];
|
|
871
|
+
}
|
|
872
|
+
return ret;
|
|
873
|
+
}
|
|
874
|
+
const items = toc.flatMap(n => flatten(n, []));
|
|
875
|
+
const index = items.findIndex(v => v.path === location.asPath.replace(/#.*/, ""));
|
|
876
|
+
if (index === -1) {
|
|
877
|
+
return null;
|
|
878
|
+
}
|
|
879
|
+
function toLink(index) {
|
|
880
|
+
const item = items[index];
|
|
881
|
+
if (item === undefined) {
|
|
882
|
+
return undefined;
|
|
883
|
+
} else {
|
|
884
|
+
return {
|
|
885
|
+
href: item.path,
|
|
886
|
+
label: item.label,
|
|
887
|
+
context: item.parents.map(x => x.label).join(" / ")
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
return /*#__PURE__*/jsx("div", {
|
|
892
|
+
className: "timvir-s-r1yuqi timvir-s-11408do",
|
|
893
|
+
children: /*#__PURE__*/jsx(NavigationFooter, {
|
|
894
|
+
Link: Link,
|
|
895
|
+
prev: toLink(index - 1),
|
|
896
|
+
next: toLink(index + 1)
|
|
897
|
+
})
|
|
898
|
+
});
|
|
899
|
+
})(), Footer && /*#__PURE__*/jsx(Footer, {})]
|
|
900
|
+
})]
|
|
901
|
+
})]
|
|
902
|
+
}), /*#__PURE__*/jsx(Commands, {
|
|
903
|
+
open: state.search.open,
|
|
904
|
+
onClose: () => {
|
|
905
|
+
setState({
|
|
906
|
+
search: {
|
|
907
|
+
open: false
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
})]
|
|
912
|
+
});
|
|
710
913
|
}
|
|
711
914
|
var Page$1 = /*#__PURE__*/React.forwardRef(Page);
|
|
915
|
+
const styles = {
|
|
916
|
+
content: {
|
|
917
|
+
kTgw9: "timvir-s-13faqbe",
|
|
918
|
+
$$css: true
|
|
919
|
+
}
|
|
920
|
+
};
|
|
712
921
|
|
|
713
922
|
/**
|
|
714
923
|
* A mailbox is a wonka source which receives messages for one specific block (identified by its id).
|
|
@@ -746,7 +955,7 @@ function useBlock(props) {
|
|
|
746
955
|
});
|
|
747
956
|
}
|
|
748
957
|
}
|
|
749
|
-
})).unsubscribe, [mailbox]);
|
|
958
|
+
})).unsubscribe, [mailbox, state.overrides]);
|
|
750
959
|
return {
|
|
751
960
|
bus,
|
|
752
961
|
mailbox,
|
|
@@ -763,4 +972,20 @@ function useBlock(props) {
|
|
|
763
972
|
};
|
|
764
973
|
}
|
|
765
974
|
|
|
766
|
-
|
|
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 };
|