timvir 0.2.49 → 0.2.51

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 (79) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/blocks/Arbitrary/Arbitrary.d.ts +2 -2
  3. package/blocks/Arbitrary/index.d.ts +1 -1
  4. package/blocks/Arbitrary/index.js +3 -5
  5. package/blocks/Arbitrary/samples/basic.d.ts +1 -1
  6. package/blocks/Code/Code.d.ts +3 -3
  7. package/blocks/Code/index.d.ts +1 -1
  8. package/blocks/Code/index.js +23 -10
  9. package/blocks/Code/samples/basic.d.ts +1 -1
  10. package/blocks/ColorBar/ColorBar.d.ts +3 -3
  11. package/blocks/ColorBar/index.d.ts +1 -1
  12. package/blocks/ColorBar/index.js +3 -5
  13. package/blocks/ColorBar/styles.css +2 -2
  14. package/blocks/ColorBook/ColorBook.d.ts +4 -4
  15. package/blocks/ColorBook/index.d.ts +1 -1
  16. package/blocks/ColorBook/index.js +2 -5
  17. package/blocks/Cover/Cover.d.ts +4 -4
  18. package/blocks/Cover/index.d.ts +1 -1
  19. package/blocks/Cover/index.js +2 -5
  20. package/blocks/Exhibit/Exhibit.d.ts +4 -4
  21. package/blocks/Exhibit/index.d.ts +1 -1
  22. package/blocks/Exhibit/index.js +2 -5
  23. package/blocks/Exhibit/samples/bleed.d.ts +1 -1
  24. package/blocks/Font/Font.d.ts +3 -3
  25. package/blocks/Font/index.d.ts +1 -1
  26. package/blocks/Font/index.js +5 -4
  27. package/blocks/Font/samples/basic.d.ts +1 -1
  28. package/blocks/Font/samples/timvir/body1.d.ts +1 -1
  29. package/blocks/Font/samples/timvir/caption.d.ts +1 -1
  30. package/blocks/Font/samples/timvir/h1.d.ts +1 -1
  31. package/blocks/Font/samples/timvir/h2.d.ts +1 -1
  32. package/blocks/Font/samples/timvir/h3.d.ts +1 -1
  33. package/blocks/Font/samples/timvir/h4.d.ts +1 -1
  34. package/blocks/Grid/Grid.d.ts +2 -2
  35. package/blocks/Grid/index.d.ts +1 -1
  36. package/blocks/Grid/index.js +2 -4
  37. package/blocks/Icon/Icon.d.ts +4 -4
  38. package/blocks/Icon/index.d.ts +1 -1
  39. package/blocks/Icon/index.js +2 -5
  40. package/blocks/Icon/internal/Canvas.d.ts +3 -3
  41. package/blocks/Icon/internal/index.d.ts +1 -1
  42. package/blocks/Message/Message.d.ts +3 -3
  43. package/blocks/Message/index.d.ts +1 -1
  44. package/blocks/Message/index.js +2 -4
  45. package/blocks/Message/samples/basic.d.ts +1 -1
  46. package/blocks/Swatch/Swatch.d.ts +3 -3
  47. package/blocks/Swatch/index.d.ts +1 -1
  48. package/blocks/Swatch/index.js +2 -4
  49. package/blocks/Viewport/Viewport.d.ts +3 -3
  50. package/blocks/Viewport/index.d.ts +1 -1
  51. package/blocks/Viewport/index.js +13 -11
  52. package/blocks/Viewport/internal/Caption.d.ts +2 -4
  53. package/blocks/Viewport/internal/Handle.d.ts +3 -4
  54. package/blocks/Viewport/internal/Ruler.d.ts +2 -2
  55. package/blocks/Viewport/internal/index.d.ts +3 -3
  56. package/blocks/WebLink/WebLink.d.ts +3 -3
  57. package/blocks/WebLink/index.d.ts +1 -1
  58. package/blocks/WebLink/index.js +3 -5
  59. package/blocks/WebLink/samples/basic.d.ts +1 -1
  60. package/blocks/styles.css +2 -2
  61. package/bus/index.d.ts +2 -2
  62. package/context/index.d.ts +3 -3
  63. package/context/index.js +1 -1
  64. package/core/components/Commands/internal/Action.d.ts +1 -1
  65. package/core/components/Footer/Footer.d.ts +4 -4
  66. package/core/components/Footer/samples/basic.d.ts +1 -1
  67. package/core/components/NavigationFooter/NavigationFooter.d.ts +2 -2
  68. package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
  69. package/core/components/Page/Page.d.ts +4 -4
  70. package/core/components/Page/internal/Section.d.ts +1 -1
  71. package/core/components/Page/internal/Sidebar.d.ts +1 -1
  72. package/core/components/Page/internal/SidebarItem.d.ts +1 -1
  73. package/core/components/Page/types.d.ts +1 -1
  74. package/core/index.d.ts +2 -2
  75. package/core/index.js +8 -11
  76. package/package.json +36 -12
  77. package/search/Search/Search.d.ts +5 -5
  78. package/search/index.js +2 -5
  79. package/styles.css +2 -2
@@ -3,8 +3,8 @@ import * as React from "react";
3
3
  * The underlying DOM element which is rendered by this component.
4
4
  */
5
5
  declare const Root = "div";
6
- interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
6
+ interface Props extends React.ComponentPropsWithRef<typeof Root> {
7
7
  variant?: "info" | "warning" | "alert";
8
8
  }
9
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
10
- export default _default;
9
+ export declare function Message(props: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1 +1 @@
1
- export { default as Message } from "./Message";
1
+ export { Message } from "./Message";
@@ -213,14 +213,13 @@ const layoutStyles = {
213
213
  }};
214
214
 
215
215
  const Root = "div";
216
- function Message(props$1, ref) {
216
+ function Message(props$1) {
217
217
  const {
218
218
  variant,
219
219
  children,
220
220
  ...rest
221
221
  } = props$1;
222
222
  return /*#__PURE__*/jsxs(Root, {
223
- ref: ref,
224
223
  ...props(layoutStyles.block, styles.root, variant && styles[variant]),
225
224
  ...rest,
226
225
  children: [variant && {
@@ -257,7 +256,6 @@ function Message(props$1, ref) {
257
256
  })]
258
257
  });
259
258
  }
260
- var Message_default = /*#__PURE__*/React.forwardRef(Message);
261
259
  const styles = {
262
260
  root: {
263
261
  kVAEAm: "timvir-s-1n2onr6",
@@ -316,4 +314,4 @@ const styles = {
316
314
  }
317
315
  };
318
316
 
319
- export { Message_default as Message };
317
+ export { Message };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  import { Message } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Message>>;
4
4
  export default function Sample(props: Props): import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  * The underlying DOM element which is rendered by this component.
4
4
  */
5
5
  declare const Root = "div";
6
- interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
6
+ interface Props extends React.ComponentPropsWithRef<typeof Root> {
7
7
  /**
8
8
  * The CSS Color value of the swatch. Any CSS color definition is accepted.
9
9
  *
@@ -29,5 +29,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
29
29
  */
30
30
  ancestry?: string;
31
31
  }
32
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
33
- export default _default;
32
+ export declare function Swatch(props: Props): import("react/jsx-runtime").JSX.Element;
33
+ export {};
@@ -1 +1 @@
1
- export { default as Swatch } from "./Swatch";
1
+ export { Swatch } from "./Swatch";
@@ -174,7 +174,7 @@ const layoutStyles = {
174
174
  }};
175
175
 
176
176
  const Root = "div";
177
- function Swatch(props$1, ref) {
177
+ function Swatch(props$1) {
178
178
  const block = useBlock(props$1);
179
179
  const {
180
180
  value,
@@ -197,7 +197,6 @@ function Swatch(props$1, ref) {
197
197
  };
198
198
  return /*#__PURE__*/jsx(Root, {
199
199
  role: "button",
200
- ref: ref,
201
200
  ...rest,
202
201
  ...rootStyleProps,
203
202
  className: cx(rootStyleProps.className, className),
@@ -236,7 +235,6 @@ function Swatch(props$1, ref) {
236
235
  })
237
236
  });
238
237
  }
239
- var Swatch_default = /*#__PURE__*/React.forwardRef(Swatch);
240
238
  const styles = {
241
239
  root: {
242
240
  kVAEAm: "timvir-s-1n2onr6",
@@ -244,4 +242,4 @@ const styles = {
244
242
  }
245
243
  };
246
244
 
247
- export { Swatch_default as Swatch };
245
+ export { Swatch };
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  * The underlying DOM element which is rendered by this component.
4
4
  */
5
5
  declare const Root = "div";
6
- interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
6
+ interface Props extends React.ComponentPropsWithRef<typeof Root> {
7
7
  /**
8
8
  * URL that should be loaded in the viewport. Can be absolute or relative.
9
9
  */
@@ -13,5 +13,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
13
13
  */
14
14
  code?: string;
15
15
  }
16
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
17
- export default _default;
16
+ export declare function Viewport(props: Props): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -1 +1 @@
1
- export { default as Viewport } from "./Viewport";
1
+ export { Viewport } from "./Viewport";
@@ -217,6 +217,9 @@ function Caption(props$1) {
217
217
  onClick: () => {
218
218
  if (codeRef) {
219
219
  const infoParent = codeRef.parentElement;
220
+ if (!infoParent) {
221
+ return;
222
+ }
220
223
  if (infoParent.style.height === "0px") {
221
224
  infoParent.style.height = `${codeRef.getBoundingClientRect().height}px`;
222
225
  infoParent.style.opacity = "1";
@@ -245,7 +248,6 @@ function Caption(props$1) {
245
248
  })]
246
249
  });
247
250
  }
248
- var Caption$1 = /*#__PURE__*/React.memo(Caption);
249
251
  const styles$1 = {
250
252
  figcaption: {
251
253
  kGuDYH: "timvir-s-1dcheo9",
@@ -289,7 +291,6 @@ function Handle(props) {
289
291
  })
290
292
  });
291
293
  }
292
- var Handle$1 = /*#__PURE__*/React.memo(Handle);
293
294
 
294
295
  const height = 16;
295
296
  function Ruler(props) {
@@ -325,7 +326,7 @@ function Ruler(props) {
325
326
  }
326
327
 
327
328
  const Root = "div";
328
- function Viewport(props$1, ref) {
329
+ function Viewport(props$1) {
329
330
  const block = useBlock(props$1);
330
331
  const {
331
332
  src,
@@ -365,8 +366,11 @@ function Viewport(props$1, ref) {
365
366
  };
366
367
  const onMouseUp = () => {
367
368
  lock.current = "";
368
- iframeRef.current.style.userSelect = "";
369
- iframeRef.current.style.pointerEvents = "";
369
+ const iframeElement = iframeRef.current;
370
+ if (iframeElement) {
371
+ iframeElement.style.userSelect = "";
372
+ iframeElement.style.pointerEvents = "";
373
+ }
370
374
  setHeight(height => {
371
375
  setMaxHeight(height);
372
376
  return height;
@@ -387,7 +391,6 @@ function Viewport(props$1, ref) {
387
391
  const rootStyleProps = props(layoutStyles.block, layoutStyles.fullWidth, styles.root);
388
392
  return /*#__PURE__*/jsxs(Fragment, {
389
393
  children: [/*#__PURE__*/jsxs(Root, {
390
- ref: ref,
391
394
  "data-timvir-b-viewport": true,
392
395
  ...rest,
393
396
  className: cx(!state.settled && "timvir-unsettled", className, rootStyleProps.className),
@@ -468,12 +471,12 @@ function Viewport(props$1, ref) {
468
471
  pointerEvents: height === undefined ? "none" : undefined
469
472
  }
470
473
  })
471
- }), /*#__PURE__*/jsx(Handle$1, {
474
+ }), /*#__PURE__*/jsx(Handle, {
472
475
  gridColumn: "1",
473
476
  lock: lock,
474
477
  edge: "left",
475
478
  iframeRef: iframeRef
476
- }), /*#__PURE__*/jsx(Handle$1, {
479
+ }), /*#__PURE__*/jsx(Handle, {
477
480
  gridColumn: "3",
478
481
  lock: lock,
479
482
  edge: "right",
@@ -485,7 +488,7 @@ function Viewport(props$1, ref) {
485
488
  containerWidth: svgROE?.contentRect.width,
486
489
  viewportWidth: width
487
490
  })]
488
- }), /*#__PURE__*/jsx(Caption$1, {
491
+ }), /*#__PURE__*/jsx(Caption, {
489
492
  src: src,
490
493
  code: code
491
494
  }), /*#__PURE__*/jsx("div", {
@@ -497,7 +500,6 @@ function Viewport(props$1, ref) {
497
500
  })]
498
501
  });
499
502
  }
500
- var Viewport_default = /*#__PURE__*/React.forwardRef(Viewport);
501
503
  const styles = {
502
504
  root: {
503
505
  ktR8K2: "timvir-s-1vjgj0v",
@@ -506,4 +508,4 @@ const styles = {
506
508
  }
507
509
  };
508
510
 
509
- export { Viewport_default as Viewport };
511
+ export { Viewport };
@@ -1,8 +1,6 @@
1
- import * as React from "react";
2
1
  interface Props {
3
2
  src: string;
4
3
  code?: string;
5
4
  }
6
- declare function Caption(props: Props): import("react/jsx-runtime").JSX.Element;
7
- declare const _default: React.MemoExoticComponent<typeof Caption>;
8
- export default _default;
5
+ export declare function Caption(props: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,10 +1,9 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  interface Props {
3
3
  gridColumn: string;
4
4
  lock: React.MutableRefObject<string>;
5
5
  edge: "left" | "right";
6
6
  iframeRef: React.RefObject<null | HTMLIFrameElement>;
7
7
  }
8
- declare function Handle(props: Props): import("react/jsx-runtime").JSX.Element;
9
- declare const _default: React.MemoExoticComponent<typeof Handle>;
10
- export default _default;
8
+ export declare function Handle(props: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -2,5 +2,5 @@ interface Props {
2
2
  containerWidth?: number;
3
3
  viewportWidth?: number;
4
4
  }
5
- declare function Ruler(props: Props): import("react/jsx-runtime").JSX.Element;
6
- export default Ruler;
5
+ export declare function Ruler(props: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,3 +1,3 @@
1
- export { default as Caption } from "./Caption";
2
- export { default as Handle } from "./Handle";
3
- export { default as Ruler } from "./Ruler";
1
+ export { Caption } from "./Caption";
2
+ export { Handle } from "./Handle";
3
+ export { Ruler } from "./Ruler";
@@ -3,8 +3,8 @@ import * as React from "react";
3
3
  * The underlying DOM element which is rendered by this component.
4
4
  */
5
5
  declare const Root = "a";
6
- interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
6
+ interface Props extends React.ComponentPropsWithRef<typeof Root> {
7
7
  url: string;
8
8
  }
9
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLAnchorElement>>;
10
- export default _default;
9
+ export declare function WebLink(props: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1 +1 @@
1
- export { default as WebLink } from "./WebLink";
1
+ export { WebLink } from "./WebLink";
@@ -174,7 +174,7 @@ const layoutStyles = {
174
174
  }};
175
175
 
176
176
  const Root = "a";
177
- function WebLink(props$1, ref) {
177
+ function WebLink(props$1) {
178
178
  const {
179
179
  url,
180
180
  className,
@@ -199,7 +199,6 @@ function WebLink(props$1, ref) {
199
199
  const image = metadata?.open_graph?.images?.[0]?.url;
200
200
  const rootStyleProps = props(layoutStyles.block, styles.root);
201
201
  return /*#__PURE__*/jsxs(Root, {
202
- ref: ref,
203
202
  "data-timvir-b-weblink": true,
204
203
  href: url,
205
204
  target: "_blank",
@@ -242,7 +241,6 @@ function WebLink(props$1, ref) {
242
241
  })]
243
242
  });
244
243
  }
245
- var WebLink_default = /*#__PURE__*/React.forwardRef(WebLink);
246
244
  const styles = {
247
245
  root: {
248
246
  kmkexE: "timvir-s-zhuw26",
@@ -262,7 +260,7 @@ const styles = {
262
260
  }
263
261
  };
264
262
  async function defaultUnfurl(url) {
265
- return fetch(`https://timvir.vercel.app/api/unfurl?url=${encodeURIComponent(url)}`).then(res => res.json());
263
+ return fetch(`https://timvir.dev/api/unfurl?url=${encodeURIComponent(url)}`).then(res => res.json());
266
264
  }
267
265
 
268
- export { WebLink_default as WebLink };
266
+ export { WebLink };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  import { WebLink } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof WebLink>>;
4
4
  export default function Sample(props: Props): import("react/jsx-runtime").JSX.Element;
package/blocks/styles.css CHANGED
@@ -391,8 +391,8 @@
391
391
  --timvir-b-ColorBar-value-borderRadiusDefault: 2px 0 0 2px;
392
392
  }
393
393
 
394
- .timvir-s-15311qs {
395
- --timvir-b-ColorBar-value-margin: 0;
394
+ .timvir-s-12l46wj {
395
+ --timvir-b-ColorBar-value-margin: 0px;
396
396
  }
397
397
 
398
398
  .timvir-s-1f9b50e {
package/bus/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Subject } from "wonka";
2
- import { Message } from "./messages";
1
+ import { type Subject } from "wonka";
2
+ import type { Message } from "./messages";
3
3
  export * from "./messages";
4
4
  /**
5
5
  * The bus is a wonka Subject that represents a stream of Messages.
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { Bus } from "timvir/bus";
3
- import { Node } from "../core/components/Page/types";
2
+ import type { Bus } from "timvir/bus";
3
+ import type { Node } from "../core/components/Page/types";
4
4
  export interface Value {
5
5
  bus: Bus;
6
6
  articleComponents: {
@@ -28,5 +28,5 @@ export interface Value {
28
28
  };
29
29
  toc: readonly Node[];
30
30
  }
31
- export declare const Provider: React.Provider<Value | undefined>;
31
+ export declare const Provider: React.Context<Value | undefined>;
32
32
  export declare function useContext(): Value;
package/context/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  const Context = /*#__PURE__*/React.createContext(undefined);
4
- const Provider = Context.Provider;
4
+ const Provider = Context;
5
5
  function useContext() {
6
6
  const value = React.useContext(Context);
7
7
  if (!value) {
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  declare const Root = "div";
3
3
  interface Props extends Omit<React.ComponentPropsWithoutRef<typeof Root>, "className" | "style"> {
4
4
  label?: React.ReactNode;
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  /**
3
3
  * The underlying DOM element which is rendered by this component.
4
4
  */
5
5
  declare const Root = "footer";
6
- interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
6
+ interface Props extends React.ComponentPropsWithRef<typeof Root> {
7
7
  links?: Array<{
8
8
  group: React.ReactNode;
9
9
  items: Array<{
@@ -12,5 +12,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
12
12
  }>;
13
13
  }>;
14
14
  }
15
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
16
- export default _default;
15
+ declare function Footer(props: Props): import("react/jsx-runtime").JSX.Element;
16
+ export default Footer;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  import { Footer } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof Footer>>;
4
4
  export default function Sample(props: Props): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import { Value } from "timvir/context";
1
+ import type * as React from "react";
2
+ import type { Value } from "timvir/context";
3
3
  /**
4
4
  * The underlying DOM element which is rendered by this component.
5
5
  */
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  import { NavigationFooter } from "..";
3
3
  type Props = Partial<React.ComponentPropsWithoutRef<typeof NavigationFooter>>;
4
4
  export default function Sample(props: Props): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { Value } from "timvir/context";
3
- import { Node } from "./types";
2
+ import { type Value } from "timvir/context";
3
+ import type { Node } from "./types";
4
4
  /**
5
5
  * The underlying DOM element which is rendered by this component.
6
6
  */
@@ -62,5 +62,5 @@ interface Props extends Omit<React.ComponentProps<typeof Root>, "className" | "s
62
62
  */
63
63
  blocks?: Value["blocks"];
64
64
  }
65
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
66
- export default _default;
65
+ declare function Page(props: Props): import("react/jsx-runtime").JSX.Element;
66
+ export default Page;
@@ -1,4 +1,4 @@
1
- import { Node } from "../types";
1
+ import type { Node } from "../types";
2
2
  interface Props extends Node {
3
3
  depth: number;
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import * as stylex from "@stylexjs/stylex";
2
2
  import * as React from "react";
3
- import { Node } from "../types";
3
+ import type { Node } from "../types";
4
4
  interface Props extends Omit<React.ComponentPropsWithoutRef<"nav">, "className" | "style"> {
5
5
  sx: stylex.StyleXStyles;
6
6
  toc: readonly Node[];
@@ -1,4 +1,4 @@
1
- import { Node } from "../types";
1
+ import type { Node } from "../types";
2
2
  interface Props extends Node {
3
3
  depth: number;
4
4
  active: boolean;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  export interface Node {
3
3
  readonly icon?: React.ReactElement<{
4
4
  className?: string;
package/core/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Source } from "wonka";
2
- import { Message } from "timvir/bus";
1
+ import { type Source } from "wonka";
2
+ import type { Message } from "timvir/bus";
3
3
  import * as React from "react";
4
4
  export * from "./components/Footer";
5
5
  export * from "./components/Page";
package/core/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { pipe, filter, subscribe } from 'wonka';
2
+ import { pipe, subscribe, filter } from 'wonka';
3
3
  import { useContext, Provider } from 'timvir/context';
4
4
  export { useContext } from 'timvir/context';
5
5
  import * as React from 'react';
@@ -10,13 +10,12 @@ import * as ReactDOM from 'react-dom';
10
10
  import { defaultSearch } from 'timvir/search';
11
11
 
12
12
  const Root$3 = "footer";
13
- function Footer(props, ref) {
13
+ function Footer(props) {
14
14
  const {
15
15
  links,
16
16
  ...rest
17
17
  } = props;
18
18
  return /*#__PURE__*/jsxs(Root$3, {
19
- ref: ref,
20
19
  ...rest,
21
20
  className: "timvir-s-v0thzw timvir-s-rvj5dj timvir-s-kcw01v timvir-s-qr9vqb",
22
21
  children: [links && /*#__PURE__*/jsx("div", {
@@ -47,7 +46,7 @@ function Footer(props, ref) {
47
46
  children: /*#__PURE__*/jsxs("div", {
48
47
  className: "timvir-s-htle6 timvir-s-euugli",
49
48
  children: ["Built with", " ", /*#__PURE__*/jsx("a", {
50
- href: "https://timvir.vercel.app",
49
+ href: "https://timvir.dev",
51
50
  className: "timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-1dlxito timvir-s-1j43nte timvir-s-odwsf6 timvir-s-1w3jsh0 timvir-s-g7t5vw",
52
51
  children: "Timvir"
53
52
  })]
@@ -55,7 +54,6 @@ function Footer(props, ref) {
55
54
  })]
56
55
  });
57
56
  }
58
- var Footer_default = /*#__PURE__*/React.forwardRef(Footer);
59
57
 
60
58
  var styleq = {};
61
59
  var hasRequiredStyleq;
@@ -667,9 +665,10 @@ function Sidebar(props$1) {
667
665
  } = useContext();
668
666
  const [isMenuOpen, setMenuOpen] = React.useState(false);
669
667
  React.useEffect(() => {
670
- const scrollLockClassList = {
668
+ const className = {
671
669
  className: "timvir-s-1rife3k timvir-s-ixxii4 timvir-s-13vifvy timvir-s-h8yej3"
672
- }.className.split(" ");
670
+ }.className;
671
+ const scrollLockClassList = className.split(" ");
673
672
  for (const className of scrollLockClassList) {
674
673
  document.body.classList.toggle(className, isMenuOpen);
675
674
  }
@@ -794,7 +793,7 @@ function Search(props) {
794
793
  }
795
794
 
796
795
  const Root = "div";
797
- function Page(props$1, ref) {
796
+ function Page(props$1) {
798
797
  const {
799
798
  location,
800
799
  toc,
@@ -860,7 +859,6 @@ function Page(props$1, ref) {
860
859
  return /*#__PURE__*/jsxs(Provider, {
861
860
  value: context,
862
861
  children: [/*#__PURE__*/jsxs(Root, {
863
- ref: ref,
864
862
  ...rest,
865
863
  className: "timvir-s-g6iff7 timvir-s-1hz7z82 timvir-s-rvj5dj timvir-s-c0s83b timvir-s-1i3za4p timvir-s-oxwh6b timvir-s-1w3eerp",
866
864
  children: [/*#__PURE__*/jsx(Sidebar, {
@@ -938,7 +936,6 @@ function Page(props$1, ref) {
938
936
  })]
939
937
  });
940
938
  }
941
- var Page_default = /*#__PURE__*/React.forwardRef(Page);
942
939
  const styles = {
943
940
  sidebar: {
944
941
  kJuA4N: "timvir-s-1nkj2r4",
@@ -1062,4 +1059,4 @@ function useArticleComponents() {
1062
1059
  };
1063
1060
  }
1064
1061
 
1065
- export { Footer_default as Footer, Page_default as Page, extendedWidth, fullWidth, grid, layoutStyles, noLayout, useArticleComponents, useBlock, useMailbox };
1062
+ export { Footer, Page, extendedWidth, fullWidth, grid, layoutStyles, noLayout, useArticleComponents, useBlock, useMailbox };
package/package.json CHANGED
@@ -1,28 +1,52 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "timvir",
4
- "version": "0.2.49",
4
+ "version": "0.2.51",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "exports": {
8
8
  "./styles.css": "./styles.css",
9
- "./blocks": "./blocks/index.js",
10
- "./blocks/*": "./blocks/*/index.js",
11
- "./builtins": "./builtins/index.js",
12
- "./bus": "./bus/index.js",
13
- "./context": "./context/index.js",
14
- "./core": "./core/index.js",
15
- "./hooks": "./hooks/index.js",
16
- "./search": "./search/index.js"
9
+ "./blocks": {
10
+ "types": "./blocks/index.d.ts",
11
+ "import": "./blocks/index.js"
12
+ },
13
+ "./blocks/*": {
14
+ "types": "./blocks/*/index.d.ts",
15
+ "import": "./blocks/*/index.js"
16
+ },
17
+ "./builtins": {
18
+ "types": "./builtins/index.d.ts",
19
+ "import": "./builtins/index.js"
20
+ },
21
+ "./bus": {
22
+ "types": "./bus/index.d.ts",
23
+ "import": "./bus/index.js"
24
+ },
25
+ "./context": {
26
+ "types": "./context/index.d.ts",
27
+ "import": "./context/index.js"
28
+ },
29
+ "./core": {
30
+ "types": "./core/index.d.ts",
31
+ "import": "./core/index.js"
32
+ },
33
+ "./hooks": {
34
+ "types": "./hooks/index.d.ts",
35
+ "import": "./hooks/index.js"
36
+ },
37
+ "./search": {
38
+ "types": "./search/index.d.ts",
39
+ "import": "./search/index.js"
40
+ }
17
41
  },
18
42
  "dependencies": {
19
43
  "bytestring": "^1",
20
- "shiki": "^1 || ^2 || ^3",
44
+ "shiki": "^1 || ^2 || ^3 || ^4",
21
45
  "wonka": "^6"
22
46
  },
23
47
  "peerDependencies": {
24
- "react": "^17 || ^18 || ^19",
25
- "react-dom": "^17 || ^18 || ^19"
48
+ "react": "^19",
49
+ "react-dom": "^19"
26
50
  },
27
51
  "repository": {
28
52
  "type": "git",
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { Node } from "timvir/core";
3
- interface Props extends React.ComponentPropsWithoutRef<"div"> {
1
+ import type * as React from "react";
2
+ import type { Node } from "timvir/core";
3
+ interface Props extends React.ComponentPropsWithRef<"div"> {
4
4
  open?: boolean;
5
5
  onClose?: (ev: React.SyntheticEvent<HTMLElement>) => void;
6
6
  q: (query: string) => Promise<{
@@ -14,8 +14,8 @@ interface Props extends React.ComponentPropsWithoutRef<"div"> {
14
14
  }>;
15
15
  }>;
16
16
  }
17
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
18
- export default _default;
17
+ declare function Search(_props: Props): null;
18
+ export default Search;
19
19
  export declare function defaultSearch(toc: readonly Node[]): {
20
20
  q: (query: string) => Promise<{
21
21
  totalCount: number;