timvir 0.2.38 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/blocks/Arbitrary/index.js +46 -37
  3. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  4. package/blocks/Code/index.js +56 -48
  5. package/blocks/Code/samples/basic.d.ts +1 -1
  6. package/blocks/Code/samples/toggle.d.ts +1 -2
  7. package/blocks/Code/styles.css +3 -3
  8. package/blocks/ColorBar/index.js +33 -29
  9. package/blocks/ColorBar/samples/basic.d.ts +1 -2
  10. package/blocks/ColorBook/index.js +29 -26
  11. package/blocks/ColorBook/samples/basic.d.ts +1 -2
  12. package/blocks/Cover/index.js +18 -18
  13. package/blocks/Cover/samples/basic.d.ts +1 -2
  14. package/blocks/Exhibit/index.js +16 -12
  15. package/blocks/Exhibit/samples/basic.d.ts +1 -2
  16. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  17. package/blocks/Exhibit/samples/usage.d.ts +1 -2
  18. package/blocks/Exhibit/styles.css +1 -1
  19. package/blocks/Font/index.js +67 -56
  20. package/blocks/Font/samples/basic.d.ts +1 -1
  21. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  22. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  23. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  24. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  25. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  26. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  27. package/blocks/Grid/index.js +5 -3
  28. package/blocks/Grid/samples/basic.d.ts +1 -2
  29. package/blocks/Icon/index.js +72 -61
  30. package/blocks/Icon/internal/Canvas.d.ts +1 -1
  31. package/blocks/Icon/samples/basic.d.ts +1 -2
  32. package/blocks/Icon/types.d.ts +3 -2
  33. package/blocks/Message/index.js +21 -17
  34. package/blocks/Message/samples/basic.d.ts +1 -1
  35. package/blocks/Swatch/index.js +22 -13
  36. package/blocks/Swatch/samples/basic.d.ts +1 -2
  37. package/blocks/Viewport/index.js +206 -190
  38. package/blocks/Viewport/internal/Caption.d.ts +1 -1
  39. package/blocks/Viewport/internal/Handle.d.ts +1 -1
  40. package/blocks/Viewport/internal/Ruler.d.ts +1 -2
  41. package/blocks/Viewport/samples/basic.d.ts +1 -2
  42. package/blocks/WebLink/index.js +34 -23
  43. package/blocks/WebLink/samples/basic.d.ts +1 -1
  44. package/blocks/WebLink/styles.css +1 -1
  45. package/blocks/styles.css +5 -5
  46. package/builtins/index.d.ts +1 -0
  47. package/builtins/index.js +37 -27
  48. package/builtins/styles.css +13 -0
  49. package/core/components/Commands/Commands.d.ts +1 -3
  50. package/core/components/Commands/internal/Action.d.ts +1 -1
  51. package/core/components/Commands/internal/Dialog.d.ts +1 -2
  52. package/core/components/Commands/internal/index.d.ts +0 -1
  53. package/core/components/Footer/samples/basic.d.ts +1 -1
  54. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  55. package/core/components/Page/internal/Section.d.ts +1 -2
  56. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  57. package/core/components/Page/internal/SidebarItem.d.ts +1 -2
  58. package/core/components/Page/internal/index.d.ts +0 -1
  59. package/core/components/Page/samples/basic.d.ts +1 -2
  60. package/core/components/Page/samples/layout.d.ts +1 -2
  61. package/core/index.js +363 -297
  62. package/core/layout.d.ts +0 -1
  63. package/core/theme/detector.js +1 -1
  64. package/knip.config.d.ts +5 -0
  65. package/package.json +1 -1
  66. package/search/Search/samples/basic.d.ts +1 -2
  67. package/search/SearchBoxInput/samples/basic.d.ts +1 -2
  68. package/search/SearchBoxListItem/samples/basic.d.ts +1 -2
  69. package/search/index.js +96 -81
  70. package/search/styles.css +3 -3
  71. package/styles.css +21 -8
package/core/index.js CHANGED
@@ -3,6 +3,7 @@ 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 { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
7
  import { MDXProvider } from '@mdx-js/react';
7
8
  import { useHotkeys } from 'react-hotkeys-hook';
8
9
  import { makeBus } from 'timvir/bus';
@@ -55,37 +56,46 @@ function Footer(props, ref) {
55
56
  links,
56
57
  ...rest
57
58
  } = props;
58
- return /*#__PURE__*/React.createElement(Root$3, {
59
+ return /*#__PURE__*/jsxs(Root$3, {
59
60
  ref: ref,
60
61
  className: cx_default(className, classes$7.root),
61
- ...rest
62
- }, links && /*#__PURE__*/React.createElement("div", {
63
- className: grid
64
- }, /*#__PURE__*/React.createElement("div", {
65
- className: classes$7.linkGroups
66
- }, links.map(({
67
- group,
68
- items
69
- }, i) => /*#__PURE__*/React.createElement("div", {
70
- key: i
71
- }, /*#__PURE__*/React.createElement("div", {
72
- className: classes$7.linkGroupTitle
73
- }, group), /*#__PURE__*/React.createElement("div", null, items.map(({
74
- label,
75
- href
76
- }, j) => /*#__PURE__*/React.createElement("a", {
77
- key: j,
78
- href: href,
79
- className: classes$7.link
80
- }, label))))))), /*#__PURE__*/React.createElement("div", {
81
- className: cx_default(grid, classes$7.meta)
82
- }, /*#__PURE__*/React.createElement("div", {
83
- style: {
84
- marginBottom: 0
85
- }
86
- }, "Built with ", /*#__PURE__*/React.createElement("a", {
87
- href: "https://timvir.vercel.app"
88
- }, "Timvir"))));
62
+ ...rest,
63
+ children: [links && /*#__PURE__*/jsx("div", {
64
+ className: grid,
65
+ children: /*#__PURE__*/jsx("div", {
66
+ className: classes$7.linkGroups,
67
+ children: links.map(({
68
+ group,
69
+ items
70
+ }, i) => /*#__PURE__*/jsxs("div", {
71
+ children: [/*#__PURE__*/jsx("div", {
72
+ className: classes$7.linkGroupTitle,
73
+ children: group
74
+ }), /*#__PURE__*/jsx("div", {
75
+ children: items.map(({
76
+ label,
77
+ href
78
+ }, j) => /*#__PURE__*/jsx("a", {
79
+ href: href,
80
+ className: classes$7.link,
81
+ children: label
82
+ }, j))
83
+ })]
84
+ }, i))
85
+ })
86
+ }), /*#__PURE__*/jsx("div", {
87
+ className: cx_default(grid, classes$7.meta),
88
+ children: /*#__PURE__*/jsxs("div", {
89
+ style: {
90
+ marginBottom: 0
91
+ },
92
+ children: ["Built with ", /*#__PURE__*/jsx("a", {
93
+ href: "https://timvir.vercel.app",
94
+ children: "Timvir"
95
+ })]
96
+ })
97
+ })]
98
+ });
89
99
  }
90
100
  var Footer$1 = /*#__PURE__*/React.forwardRef(Footer);
91
101
  const classes$7 = {
@@ -104,28 +114,32 @@ function Action(props) {
104
114
  label,
105
115
  ...rest
106
116
  } = props;
107
- return /*#__PURE__*/React.createElement(Root$2, {
117
+ return /*#__PURE__*/jsxs(Root$2, {
108
118
  className: classes$6.root,
109
- ...rest
110
- }, /*#__PURE__*/React.createElement("div", {
111
- className: classes$6.icon
112
- }, /*#__PURE__*/React.createElement("svg", {
113
- viewBox: "0 0 24 24",
114
- fill: "none",
115
- stroke: "currentColor",
116
- strokeWidth: "2",
117
- strokeLinecap: "round",
118
- strokeLinejoin: "round"
119
- }, /*#__PURE__*/React.createElement("line", {
120
- x1: "5",
121
- y1: "12",
122
- x2: "19",
123
- y2: "12"
124
- }), /*#__PURE__*/React.createElement("polyline", {
125
- points: "12 5 19 12 12 19"
126
- }))), /*#__PURE__*/React.createElement("div", {
127
- className: classes$6.label
128
- }, label));
119
+ ...rest,
120
+ children: [/*#__PURE__*/jsx("div", {
121
+ className: classes$6.icon,
122
+ children: /*#__PURE__*/jsxs("svg", {
123
+ viewBox: "0 0 24 24",
124
+ fill: "none",
125
+ stroke: "currentColor",
126
+ strokeWidth: "2",
127
+ strokeLinecap: "round",
128
+ strokeLinejoin: "round",
129
+ children: [/*#__PURE__*/jsx("line", {
130
+ x1: "5",
131
+ y1: "12",
132
+ x2: "19",
133
+ y2: "12"
134
+ }), /*#__PURE__*/jsx("polyline", {
135
+ points: "12 5 19 12 12 19"
136
+ })]
137
+ })
138
+ }), /*#__PURE__*/jsx("div", {
139
+ className: classes$6.label,
140
+ children: label
141
+ })]
142
+ });
129
143
  }
130
144
  const classes$6 = {
131
145
  root: "ru1mblv",
@@ -172,7 +186,7 @@ function Dialog(props) {
172
186
  onDispose?.();
173
187
  }, 200);
174
188
  }
175
- }, [open]);
189
+ }, [open, onDispose]);
176
190
  React.useEffect(() => {
177
191
  (async () => {
178
192
  const {
@@ -183,40 +197,46 @@ function Dialog(props) {
183
197
  commands: edges
184
198
  }));
185
199
  })();
186
- }, [state.query]);
187
- return /*#__PURE__*/React.createElement("div", {
200
+ }, [toc, state.query]);
201
+ return /*#__PURE__*/jsxs("div", {
188
202
  className: classes$5.root,
189
203
  style: state.style,
190
- ...rest
191
- }, /*#__PURE__*/React.createElement("div", {
192
- className: classes$5.context
193
- }, "Context"), /*#__PURE__*/React.createElement("div", {
194
- className: classes$5.prompt
195
- }, /*#__PURE__*/React.createElement("input", {
196
- autoFocus: true,
197
- placeholder: "Type a command or search\u2026",
198
- value: state.query,
199
- onChange: ev => {
200
- const query = ev.currentTarget.value;
201
- setState(state => ({
202
- ...state,
203
- query
204
- }));
205
- }
206
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
207
- className: classes$5.subheader
208
- }, "Pages"), /*#__PURE__*/React.createElement("div", {
209
- className: classes$5.commands
210
- }, state.commands.map(({
211
- node
212
- }, index) => /*#__PURE__*/React.createElement(Action, {
213
- key: index,
214
- label: node.label,
215
- onClick: () => {
216
- onClose?.();
217
- window.location.href = node.path;
218
- }
219
- })))));
204
+ ...rest,
205
+ children: [/*#__PURE__*/jsx("div", {
206
+ className: classes$5.context,
207
+ children: "Context"
208
+ }), /*#__PURE__*/jsx("div", {
209
+ className: classes$5.prompt,
210
+ children: /*#__PURE__*/jsx("input", {
211
+ autoFocus: true,
212
+ placeholder: "Type a command or search\u2026",
213
+ value: state.query,
214
+ onChange: ev => {
215
+ const query = ev.currentTarget.value;
216
+ setState(state => ({
217
+ ...state,
218
+ query
219
+ }));
220
+ }
221
+ })
222
+ }), /*#__PURE__*/jsxs("div", {
223
+ children: [/*#__PURE__*/jsx("div", {
224
+ className: classes$5.subheader,
225
+ children: "Pages"
226
+ }), /*#__PURE__*/jsx("div", {
227
+ className: classes$5.commands,
228
+ children: state.commands.map(({
229
+ node
230
+ }, index) => /*#__PURE__*/jsx(Action, {
231
+ label: node.label,
232
+ onClick: () => {
233
+ onClose?.();
234
+ window.location.href = node.path;
235
+ }
236
+ }, index))
237
+ })]
238
+ })]
239
+ });
220
240
  }
221
241
  const classes$5 = {
222
242
  root: "r1fo6voy",
@@ -226,7 +246,7 @@ const classes$5 = {
226
246
  commands: "cchvluj"
227
247
  };
228
248
 
229
- function Commands(props) {
249
+ function Commands() {
230
250
  const [state, setState] = React.useState({
231
251
  /**
232
252
  * Whether the command palette should be open or not. The command palette is
@@ -247,17 +267,18 @@ function Commands(props) {
247
267
  if (!state.dialog) {
248
268
  const containerElement = document.createElement("div");
249
269
  document.body.appendChild(containerElement);
250
- const reactPortal = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
270
+ const reactPortal = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
251
271
  className: classes$4.root,
252
272
  onClick: ev => {
253
273
  if (ev.target === ev.currentTarget) {
254
274
  close();
255
275
  }
256
- }
257
- }, /*#__PURE__*/React.createElement(Dialog, {
258
- open: true,
259
- onClose: close
260
- })), containerElement);
276
+ },
277
+ children: /*#__PURE__*/jsx(Dialog, {
278
+ open: true,
279
+ onClose: close
280
+ })
281
+ }), containerElement);
261
282
  return {
262
283
  containerElement,
263
284
  reactPortal
@@ -265,17 +286,18 @@ function Commands(props) {
265
286
  } else {
266
287
  return {
267
288
  containerElement: state.dialog.containerElement,
268
- reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
289
+ reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
269
290
  className: classes$4.root,
270
291
  onClick: ev => {
271
292
  if (ev.target === ev.currentTarget) {
272
293
  close();
273
294
  }
274
- }
275
- }, /*#__PURE__*/React.createElement(Dialog, {
276
- open: true,
277
- onClose: close
278
- })), state.dialog.containerElement)
295
+ },
296
+ children: /*#__PURE__*/jsx(Dialog, {
297
+ open: true,
298
+ onClose: close
299
+ })
300
+ }), state.dialog.containerElement)
279
301
  };
280
302
  }
281
303
  })()
@@ -288,23 +310,24 @@ function Commands(props) {
288
310
  if (state.dialog) {
289
311
  return {
290
312
  containerElement: state.dialog.containerElement,
291
- reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
292
- className: classes$4.root
293
- }, /*#__PURE__*/React.createElement(Dialog, {
294
- onDispose: () => {
295
- setState({
296
- open: state.open,
297
- dialog: (() => {
298
- if (!state.open && state.dialog) {
299
- document.body.removeChild(state.dialog.containerElement);
300
- return null;
301
- } else {
302
- return state.dialog;
303
- }
304
- })()
305
- });
306
- }
307
- })), state.dialog.containerElement)
313
+ reactPortal: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx("div", {
314
+ className: classes$4.root,
315
+ children: /*#__PURE__*/jsx(Dialog, {
316
+ onDispose: () => {
317
+ setState({
318
+ open: state.open,
319
+ dialog: (() => {
320
+ if (!state.open && state.dialog) {
321
+ document.body.removeChild(state.dialog.containerElement);
322
+ return null;
323
+ } else {
324
+ return state.dialog;
325
+ }
326
+ })()
327
+ });
328
+ }
329
+ })
330
+ }), state.dialog.containerElement)
308
331
  };
309
332
  } else {
310
333
  return state.dialog;
@@ -359,29 +382,43 @@ function NavigationFooter(props, ref) {
359
382
  className,
360
383
  ...rest
361
384
  } = props;
362
- return /*#__PURE__*/React.createElement(Root$1, {
385
+ return /*#__PURE__*/jsx(Root$1, {
363
386
  ref: ref,
364
387
  ...rest,
365
- className: cx_default(className, classes$3.root)
366
- }, /*#__PURE__*/React.createElement("div", {
367
- className: "de625n1"
368
- }, prev && /*#__PURE__*/React.createElement(Link, {
369
- href: prev.href,
370
- className: "l19gj27w"
371
- }, /*#__PURE__*/React.createElement(Context, null, /*#__PURE__*/React.createElement(Icons.ChevronLeft, null), " Previous"), /*#__PURE__*/React.createElement(Label, null, prev.label)), next && /*#__PURE__*/React.createElement(Link, {
372
- href: next.href,
373
- className: "l15ohs1l"
374
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Context, null, "Next ", /*#__PURE__*/React.createElement(Icons.ChevronRight, null)), /*#__PURE__*/React.createElement(Label, null, next.label)))));
388
+ className: cx_default(className, classes$3.root),
389
+ children: /*#__PURE__*/jsxs("div", {
390
+ className: "de625n1",
391
+ children: [prev && /*#__PURE__*/jsxs(Link, {
392
+ href: prev.href,
393
+ className: "l19gj27w",
394
+ children: [/*#__PURE__*/jsxs(Context, {
395
+ children: [/*#__PURE__*/jsx(Icons.ChevronLeft, {}), " Previous"]
396
+ }), /*#__PURE__*/jsx(Label, {
397
+ children: prev.label
398
+ })]
399
+ }), next && /*#__PURE__*/jsx(Link, {
400
+ href: next.href,
401
+ className: "l15ohs1l",
402
+ children: /*#__PURE__*/jsxs(Fragment, {
403
+ children: [/*#__PURE__*/jsxs(Context, {
404
+ children: ["Next ", /*#__PURE__*/jsx(Icons.ChevronRight, {})]
405
+ }), /*#__PURE__*/jsx(Label, {
406
+ children: next.label
407
+ })]
408
+ })
409
+ })]
410
+ })
411
+ });
375
412
  }
376
413
  var NavigationFooter$1 = /*#__PURE__*/React.forwardRef(NavigationFooter);
377
414
  function Label(props) {
378
- return /*#__PURE__*/React.createElement("div", {
415
+ return /*#__PURE__*/jsx("div", {
379
416
  className: "dczrd9z",
380
417
  ...props
381
418
  });
382
419
  }
383
420
  function Context(props) {
384
- return /*#__PURE__*/React.createElement("div", {
421
+ return /*#__PURE__*/jsx("div", {
385
422
  className: "difnzb8",
386
423
  ...props
387
424
  });
@@ -403,36 +440,41 @@ function SidebarItem(props) {
403
440
  location,
404
441
  Link
405
442
  } = useContext();
406
- const icon = children.length === 0 ? null : /*#__PURE__*/React.createElement(Icons.ChevronRight, {
443
+ const icon = children.length === 0 ? null : /*#__PURE__*/jsx(Icons.ChevronRight, {
407
444
  className: classes$2.icon,
408
445
  style: {
409
446
  transform: active ? "rotate(90deg)" : "rotate(0deg)"
410
447
  },
411
448
  size: 16
412
449
  });
413
- return /*#__PURE__*/React.createElement("div", {
450
+ return /*#__PURE__*/jsx("div", {
414
451
  className: classes$2.root,
415
- "data-active": location.asPath.replace(/#.*$/, "") === path
416
- }, path ? /*#__PURE__*/React.createElement(Link, {
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
428
- },
429
- href: "#",
430
- onClick: () => setActive(x => !x)
431
- }, props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
432
- className: classes$2.icn
433
- }) : null, /*#__PURE__*/React.createElement("span", {
434
- className: classes$2.label
435
- }, label), icon));
452
+ "data-active": location.asPath.replace(/#.*$/, "") === path,
453
+ children: path ? /*#__PURE__*/jsxs(Link, {
454
+ href: path,
455
+ style: {
456
+ marginLeft: depth * 16
457
+ },
458
+ children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
459
+ className: classes$2.icn
460
+ }) : null, /*#__PURE__*/jsx("span", {
461
+ className: classes$2.label,
462
+ children: label
463
+ }), icon]
464
+ }) : /*#__PURE__*/jsxs("a", {
465
+ style: {
466
+ marginLeft: depth * 16
467
+ },
468
+ href: "#",
469
+ onClick: () => setActive(x => !x),
470
+ children: [props.icon ? /*#__PURE__*/React.cloneElement(props.icon, {
471
+ className: classes$2.icn
472
+ }) : null, /*#__PURE__*/jsx("span", {
473
+ className: classes$2.label,
474
+ children: label
475
+ }), icon]
476
+ })
477
+ });
436
478
  }
437
479
  const classes$2 = {
438
480
  root: "r28qe6v",
@@ -466,17 +508,19 @@ function Section(props) {
466
508
  setActive(true);
467
509
  }
468
510
  }, [path, location.asPath]);
469
- return /*#__PURE__*/React.createElement("section", {
470
- className: classes$1.root
471
- }, /*#__PURE__*/React.createElement(SidebarItem, {
472
- ...props,
473
- active: active,
474
- setActive: setActive
475
- }), active && children.length > 0 && /*#__PURE__*/React.createElement("div", null, children.map((c, i) => /*#__PURE__*/React.createElement(Section, {
476
- key: i,
477
- depth: depth + 1,
478
- ...c
479
- }))));
511
+ return /*#__PURE__*/jsxs("section", {
512
+ className: classes$1.root,
513
+ children: [/*#__PURE__*/jsx(SidebarItem, {
514
+ ...props,
515
+ active: active,
516
+ setActive: setActive
517
+ }), active && children.length > 0 && /*#__PURE__*/jsx("div", {
518
+ children: children.map((c, i) => /*#__PURE__*/jsx(Section, {
519
+ depth: depth + 1,
520
+ ...c
521
+ }, i))
522
+ })]
523
+ });
480
524
  }
481
525
  const classes$1 = {
482
526
  root: "ruyt2hq"
@@ -505,50 +549,62 @@ function Sidebar(props) {
505
549
  }
506
550
  }
507
551
  }(toc);
508
- return /*#__PURE__*/React.createElement("nav", {
552
+ return /*#__PURE__*/jsxs("nav", {
509
553
  className: cx_default(className, classes.root),
510
- ...rest
511
- }, /*#__PURE__*/React.createElement("header", {
512
- className: "h17eoe18"
513
- }, /*#__PURE__*/React.createElement("div", {
514
- className: "d1mgn6rc"
515
- }, /*#__PURE__*/React.createElement("div", {
516
- className: "d7bx8iu"
517
- }, "Timvir"), /*#__PURE__*/React.createElement("div", {
518
- className: "d119ou0k"
519
- }), /*#__PURE__*/React.createElement("div", null, "Docs")), search && /*#__PURE__*/React.createElement("div", {
520
- className: cx_default("d1f74255")
521
- }, /*#__PURE__*/React.createElement(Search, {
522
- ...search
523
- }))), /*#__PURE__*/React.createElement("label", {
524
- htmlFor: "menu",
525
- className: "l5l3c45"
526
- }, node?.icon ? /*#__PURE__*/React.cloneElement(node.icon, {
527
- className: "c15ju3pv"
528
- }) : null, /*#__PURE__*/React.createElement("span", null, node?.label ?? "Menu"), /*#__PURE__*/React.createElement(Icons.Menu, {
529
- size: 16,
530
- className: "s2bwnbz"
531
- })), /*#__PURE__*/React.createElement("input", {
532
- type: "checkbox",
533
- id: "menu",
534
- className: "iu06l76",
535
- onChange: ev => {
536
- document.body.classList.toggle(classes.scrollLock, ev.currentTarget.checked);
537
- }
538
- }), /*#__PURE__*/React.createElement("div", {
539
- className: classes.content
540
- }, /*#__PURE__*/React.createElement("div", {
541
- className: classes.sections
542
- }, /*#__PURE__*/React.createElement("div", {
543
- className: classes.nav,
544
- onClick: () => {
545
- document.body.classList.remove(classes.scrollLock);
546
- }
547
- }, toc.map((c, i) => /*#__PURE__*/React.createElement(Section, {
548
- key: i,
549
- depth: 0,
550
- ...c
551
- }))))));
554
+ ...rest,
555
+ children: [/*#__PURE__*/jsxs("header", {
556
+ className: "h17eoe18",
557
+ children: [/*#__PURE__*/jsxs("div", {
558
+ className: "d1mgn6rc",
559
+ children: [/*#__PURE__*/jsx("div", {
560
+ className: "d7bx8iu",
561
+ children: "Timvir"
562
+ }), /*#__PURE__*/jsx("div", {
563
+ className: "d119ou0k"
564
+ }), /*#__PURE__*/jsx("div", {
565
+ children: "Docs"
566
+ })]
567
+ }), search && /*#__PURE__*/jsx("div", {
568
+ className: cx_default("d1f74255"),
569
+ children: /*#__PURE__*/jsx(Search, {
570
+ ...search
571
+ })
572
+ })]
573
+ }), /*#__PURE__*/jsxs("label", {
574
+ htmlFor: "menu",
575
+ className: "l5l3c45",
576
+ children: [node?.icon ? /*#__PURE__*/React.cloneElement(node.icon, {
577
+ className: "c15ju3pv"
578
+ }) : null, /*#__PURE__*/jsx("span", {
579
+ children: node?.label ?? "Menu"
580
+ }), /*#__PURE__*/jsx(Icons.Menu, {
581
+ size: 16,
582
+ className: "s2bwnbz"
583
+ })]
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
+ }), /*#__PURE__*/jsx("div", {
592
+ className: classes.content,
593
+ children: /*#__PURE__*/jsx("div", {
594
+ className: classes.sections,
595
+ children: /*#__PURE__*/jsx("div", {
596
+ className: classes.nav,
597
+ onClick: () => {
598
+ document.body.classList.remove(classes.scrollLock);
599
+ },
600
+ children: toc.map((c, i) => /*#__PURE__*/jsx(Section, {
601
+ depth: 0,
602
+ ...c
603
+ }, i))
604
+ })
605
+ })
606
+ })]
607
+ });
552
608
  }
553
609
  const classes = {
554
610
  scrollLock: "s56darb",
@@ -562,22 +618,25 @@ function Search(props) {
562
618
  open,
563
619
  label
564
620
  } = props;
565
- return /*#__PURE__*/React.createElement("div", {
566
- className: "da95449"
567
- }, /*#__PURE__*/React.createElement("div", {
568
- role: "button",
569
- className: "d1au8wkb",
570
- onClick: open
571
- }, /*#__PURE__*/React.createElement("svg", {
572
- x: "0px",
573
- y: "0px",
574
- width: "12px",
575
- height: "12px",
576
- viewBox: "0 0 12 12"
577
- }, /*#__PURE__*/React.createElement("path", {
578
- 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",
579
- fill: "currentColor"
580
- })), label || "Search docs"));
621
+ return /*#__PURE__*/jsx("div", {
622
+ className: "da95449",
623
+ children: /*#__PURE__*/jsxs("div", {
624
+ role: "button",
625
+ className: "d1au8wkb",
626
+ onClick: open,
627
+ children: [/*#__PURE__*/jsx("svg", {
628
+ x: "0px",
629
+ y: "0px",
630
+ width: "12px",
631
+ height: "12px",
632
+ viewBox: "0 0 12 12",
633
+ children: /*#__PURE__*/jsx("path", {
634
+ 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
+ fill: "currentColor"
636
+ })
637
+ }), label || "Search docs"]
638
+ })
639
+ });
581
640
  }
582
641
 
583
642
  /**
@@ -629,84 +688,91 @@ function Page(props, ref) {
629
688
  }, {
630
689
  enableOnFormTags: true
631
690
  });
632
- return /*#__PURE__*/React.createElement(Provider, {
633
- value: context
634
- }, /*#__PURE__*/React.createElement(Root, {
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: () => {
703
- setState({
704
- search: {
705
- open: false
691
+ return /*#__PURE__*/jsxs(Provider, {
692
+ value: context,
693
+ children: [/*#__PURE__*/jsxs(Root, {
694
+ ref: ref,
695
+ ...rest,
696
+ className: cx_default(className, theme, "rfhjyp1"),
697
+ children: [/*#__PURE__*/jsx(Sidebar, {
698
+ className: "s1pp8z35",
699
+ toc: toc,
700
+ search: search && {
701
+ open: () => {
702
+ setState({
703
+ search: {
704
+ open: true
705
+ }
706
+ });
707
+ },
708
+ ...search
706
709
  }
707
- });
708
- }
709
- })), /*#__PURE__*/React.createElement(Commands, null));
710
+ }), /*#__PURE__*/jsxs("div", {
711
+ className: "dxk1fgw",
712
+ children: [/*#__PURE__*/jsx("div", {
713
+ className: grid,
714
+ children: /*#__PURE__*/jsx(MDXProvider, {
715
+ components: {
716
+ ...mdxComponentsBase,
717
+ ...mdxComponents
718
+ },
719
+ children: children
720
+ })
721
+ }), /*#__PURE__*/jsxs("div", {
722
+ className: "d2srpki",
723
+ children: [(() => {
724
+ function flatten(n, parents) {
725
+ let ret = [];
726
+ if (n.path) {
727
+ ret.push({
728
+ parents,
729
+ label: n.label,
730
+ path: n.path
731
+ });
732
+ }
733
+ if (n.children) {
734
+ ret = [...ret, ...n.children.flatMap(c => flatten(c, [...parents, n]))];
735
+ }
736
+ return ret;
737
+ }
738
+ const items = toc.flatMap(n => flatten(n, []));
739
+ const index = items.findIndex(v => v.path === location.asPath.replace(/#.*/, ""));
740
+ if (index === -1) {
741
+ return null;
742
+ }
743
+ function toLink(index) {
744
+ const item = items[index];
745
+ if (item === undefined) {
746
+ return undefined;
747
+ } else {
748
+ return {
749
+ href: item.path,
750
+ label: item.label,
751
+ context: item.parents.map(x => x.label).join(" / ")
752
+ };
753
+ }
754
+ }
755
+ return /*#__PURE__*/jsx("div", {
756
+ className: "d1hkiw6l",
757
+ children: /*#__PURE__*/jsx(NavigationFooter$1, {
758
+ prev: toLink(index - 1),
759
+ next: toLink(index + 1)
760
+ })
761
+ });
762
+ })(), Footer && /*#__PURE__*/jsx(Footer, {})]
763
+ })]
764
+ }), search && /*#__PURE__*/jsx(search.Component, {
765
+ ...state.search,
766
+ onClose: () => {
767
+ setState({
768
+ search: {
769
+ open: false
770
+ }
771
+ });
772
+ }
773
+ })]
774
+ }), /*#__PURE__*/jsx(Commands, {})]
775
+ });
710
776
  }
711
777
  var Page$1 = /*#__PURE__*/React.forwardRef(Page);
712
778
 
@@ -746,7 +812,7 @@ function useBlock(props) {
746
812
  });
747
813
  }
748
814
  }
749
- })).unsubscribe, [mailbox]);
815
+ })).unsubscribe, [mailbox, state.overrides]);
750
816
  return {
751
817
  bus,
752
818
  mailbox,