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.
- package/CHANGELOG.md +12 -0
- package/blocks/Arbitrary/Arbitrary.d.ts +2 -2
- package/blocks/Arbitrary/index.d.ts +1 -1
- package/blocks/Arbitrary/index.js +3 -5
- package/blocks/Arbitrary/samples/basic.d.ts +1 -1
- package/blocks/Code/Code.d.ts +3 -3
- package/blocks/Code/index.d.ts +1 -1
- package/blocks/Code/index.js +23 -10
- package/blocks/Code/samples/basic.d.ts +1 -1
- package/blocks/ColorBar/ColorBar.d.ts +3 -3
- package/blocks/ColorBar/index.d.ts +1 -1
- package/blocks/ColorBar/index.js +3 -5
- package/blocks/ColorBar/styles.css +2 -2
- package/blocks/ColorBook/ColorBook.d.ts +4 -4
- package/blocks/ColorBook/index.d.ts +1 -1
- package/blocks/ColorBook/index.js +2 -5
- package/blocks/Cover/Cover.d.ts +4 -4
- package/blocks/Cover/index.d.ts +1 -1
- package/blocks/Cover/index.js +2 -5
- package/blocks/Exhibit/Exhibit.d.ts +4 -4
- package/blocks/Exhibit/index.d.ts +1 -1
- package/blocks/Exhibit/index.js +2 -5
- package/blocks/Exhibit/samples/bleed.d.ts +1 -1
- package/blocks/Font/Font.d.ts +3 -3
- package/blocks/Font/index.d.ts +1 -1
- package/blocks/Font/index.js +5 -4
- 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/Grid/Grid.d.ts +2 -2
- package/blocks/Grid/index.d.ts +1 -1
- package/blocks/Grid/index.js +2 -4
- package/blocks/Icon/Icon.d.ts +4 -4
- package/blocks/Icon/index.d.ts +1 -1
- package/blocks/Icon/index.js +2 -5
- package/blocks/Icon/internal/Canvas.d.ts +3 -3
- package/blocks/Icon/internal/index.d.ts +1 -1
- package/blocks/Message/Message.d.ts +3 -3
- package/blocks/Message/index.d.ts +1 -1
- package/blocks/Message/index.js +2 -4
- package/blocks/Message/samples/basic.d.ts +1 -1
- package/blocks/Swatch/Swatch.d.ts +3 -3
- package/blocks/Swatch/index.d.ts +1 -1
- package/blocks/Swatch/index.js +2 -4
- package/blocks/Viewport/Viewport.d.ts +3 -3
- package/blocks/Viewport/index.d.ts +1 -1
- package/blocks/Viewport/index.js +13 -11
- package/blocks/Viewport/internal/Caption.d.ts +2 -4
- package/blocks/Viewport/internal/Handle.d.ts +3 -4
- package/blocks/Viewport/internal/Ruler.d.ts +2 -2
- package/blocks/Viewport/internal/index.d.ts +3 -3
- package/blocks/WebLink/WebLink.d.ts +3 -3
- package/blocks/WebLink/index.d.ts +1 -1
- package/blocks/WebLink/index.js +3 -5
- package/blocks/WebLink/samples/basic.d.ts +1 -1
- package/blocks/styles.css +2 -2
- package/bus/index.d.ts +2 -2
- package/context/index.d.ts +3 -3
- package/context/index.js +1 -1
- package/core/components/Commands/internal/Action.d.ts +1 -1
- package/core/components/Footer/Footer.d.ts +4 -4
- package/core/components/Footer/samples/basic.d.ts +1 -1
- package/core/components/NavigationFooter/NavigationFooter.d.ts +2 -2
- package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
- package/core/components/Page/Page.d.ts +4 -4
- package/core/components/Page/internal/Section.d.ts +1 -1
- package/core/components/Page/internal/Sidebar.d.ts +1 -1
- package/core/components/Page/internal/SidebarItem.d.ts +1 -1
- package/core/components/Page/types.d.ts +1 -1
- package/core/index.d.ts +2 -2
- package/core/index.js +8 -11
- package/package.json +36 -12
- package/search/Search/Search.d.ts +5 -5
- package/search/index.js +2 -5
- 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.
|
|
6
|
+
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
7
7
|
variant?: "info" | "warning" | "alert";
|
|
8
8
|
}
|
|
9
|
-
declare
|
|
10
|
-
export
|
|
9
|
+
export declare function Message(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Message } from "./Message";
|
package/blocks/Message/index.js
CHANGED
|
@@ -213,14 +213,13 @@ const layoutStyles = {
|
|
|
213
213
|
}};
|
|
214
214
|
|
|
215
215
|
const Root = "div";
|
|
216
|
-
function Message(props$1
|
|
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 {
|
|
317
|
+
export { Message };
|
|
@@ -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.
|
|
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
|
|
33
|
-
export
|
|
32
|
+
export declare function Swatch(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
package/blocks/Swatch/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Swatch } from "./Swatch";
|
package/blocks/Swatch/index.js
CHANGED
|
@@ -174,7 +174,7 @@ const layoutStyles = {
|
|
|
174
174
|
}};
|
|
175
175
|
|
|
176
176
|
const Root = "div";
|
|
177
|
-
function Swatch(props$1
|
|
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 {
|
|
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.
|
|
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
|
|
17
|
-
export
|
|
16
|
+
export declare function Viewport(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Viewport } from "./Viewport";
|
package/blocks/Viewport/index.js
CHANGED
|
@@ -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
|
|
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
|
|
369
|
-
|
|
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
|
|
474
|
+
}), /*#__PURE__*/jsx(Handle, {
|
|
472
475
|
gridColumn: "1",
|
|
473
476
|
lock: lock,
|
|
474
477
|
edge: "left",
|
|
475
478
|
iframeRef: iframeRef
|
|
476
|
-
}), /*#__PURE__*/jsx(Handle
|
|
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
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
5
|
+
export declare function Ruler(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
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.
|
|
6
|
+
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
7
7
|
url: string;
|
|
8
8
|
}
|
|
9
|
-
declare
|
|
10
|
-
export
|
|
9
|
+
export declare function WebLink(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { WebLink } from "./WebLink";
|
package/blocks/WebLink/index.js
CHANGED
|
@@ -174,7 +174,7 @@ const layoutStyles = {
|
|
|
174
174
|
}};
|
|
175
175
|
|
|
176
176
|
const Root = "a";
|
|
177
|
-
function WebLink(props$1
|
|
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.
|
|
263
|
+
return fetch(`https://timvir.dev/api/unfurl?url=${encodeURIComponent(url)}`).then(res => res.json());
|
|
266
264
|
}
|
|
267
265
|
|
|
268
|
-
export {
|
|
266
|
+
export { WebLink };
|
package/blocks/styles.css
CHANGED
package/bus/index.d.ts
CHANGED
package/context/index.d.ts
CHANGED
|
@@ -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.
|
|
31
|
+
export declare const Provider: React.Context<Value | undefined>;
|
|
32
32
|
export declare function useContext(): Value;
|
package/context/index.js
CHANGED
|
@@ -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.
|
|
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
|
|
16
|
-
export 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 { 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
|
|
66
|
-
export default
|
|
65
|
+
declare function Page(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export default Page;
|
|
@@ -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[];
|
package/core/index.d.ts
CHANGED
package/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { pipe,
|
|
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
|
|
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.
|
|
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
|
|
668
|
+
const className = {
|
|
671
669
|
className: "timvir-s-1rife3k timvir-s-ixxii4 timvir-s-13vifvy timvir-s-h8yej3"
|
|
672
|
-
}.className
|
|
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
|
|
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 {
|
|
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.
|
|
4
|
+
"version": "0.2.51",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
8
8
|
"./styles.css": "./styles.css",
|
|
9
|
-
"./blocks":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"./
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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": "^
|
|
25
|
-
"react-dom": "^
|
|
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.
|
|
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
|
|
18
|
-
export 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;
|