timvir 0.2.50 → 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 +6 -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/Code/Code.d.ts +3 -3
- package/blocks/Code/index.d.ts +1 -1
- package/blocks/Code/index.js +2 -4
- package/blocks/ColorBar/ColorBar.d.ts +3 -3
- package/blocks/ColorBar/index.d.ts +1 -1
- package/blocks/ColorBar/index.js +2 -4
- 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/Font/Font.d.ts +3 -3
- package/blocks/Font/index.d.ts +1 -1
- package/blocks/Font/index.js +2 -4
- 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 +3 -3
- package/blocks/Icon/index.d.ts +1 -1
- package/blocks/Icon/index.js +2 -5
- package/blocks/Icon/internal/Canvas.d.ts +2 -2
- 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/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 +5 -9
- 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 +2 -4
- package/context/index.d.ts +1 -1
- package/context/index.js +1 -1
- package/core/components/Footer/Footer.d.ts +4 -4
- package/core/components/Page/Page.d.ts +2 -2
- package/core/index.js +3 -7
- package/package.json +4 -4
- package/search/Search/Search.d.ts +4 -4
- package/search/index.js +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# timvir
|
|
2
2
|
|
|
3
|
+
## 0.2.51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Make React 19 required** ([#3732](https://github.com/timvir/timvir/pull/3732)) - Up until now we've supported React 17, 18, and 19. React 19 has introduced changes that make components simpler. The version has been out for over a year. This version makes React 19 a required peer dependency.
|
|
8
|
+
|
|
3
9
|
## 0.2.50
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -7,5 +7,5 @@ declare const Root = "div";
|
|
|
7
7
|
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
8
8
|
ExhibitProps?: React.ComponentPropsWithRef<typeof Exhibit>;
|
|
9
9
|
}
|
|
10
|
-
declare
|
|
11
|
-
export
|
|
10
|
+
export declare function Arbitrary(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Arbitrary } from "./Arbitrary";
|
|
2
2
|
export { useContext } from "./context";
|
|
@@ -236,7 +236,7 @@ const Context = /*#__PURE__*/React.createContext({
|
|
|
236
236
|
const useContext = () => React.useContext(Context);
|
|
237
237
|
|
|
238
238
|
const Root = "div";
|
|
239
|
-
function Arbitrary(props$1
|
|
239
|
+
function Arbitrary(props$1) {
|
|
240
240
|
const block = useBlock(props$1);
|
|
241
241
|
const {
|
|
242
242
|
ExhibitProps,
|
|
@@ -264,10 +264,9 @@ function Arbitrary(props$1, ref) {
|
|
|
264
264
|
}
|
|
265
265
|
}, [props$1.id, block.bus, value.seed]);
|
|
266
266
|
const rootStyleProps = props(layoutStyles.block, styles.root);
|
|
267
|
-
return /*#__PURE__*/jsx(Context
|
|
267
|
+
return /*#__PURE__*/jsx(Context, {
|
|
268
268
|
value: value,
|
|
269
269
|
children: /*#__PURE__*/jsxs(Root, {
|
|
270
|
-
ref: ref,
|
|
271
270
|
"data-timvir-b-arbitrary": true,
|
|
272
271
|
...rest,
|
|
273
272
|
...rootStyleProps,
|
|
@@ -320,7 +319,6 @@ function Arbitrary(props$1, ref) {
|
|
|
320
319
|
})
|
|
321
320
|
});
|
|
322
321
|
}
|
|
323
|
-
var Arbitrary_default = /*#__PURE__*/React.forwardRef(Arbitrary);
|
|
324
322
|
const styles = {
|
|
325
323
|
root: {
|
|
326
324
|
kogj98: "timvir-s-9t3ola",
|
|
@@ -328,4 +326,4 @@ const styles = {
|
|
|
328
326
|
}
|
|
329
327
|
};
|
|
330
328
|
|
|
331
|
-
export {
|
|
329
|
+
export { Arbitrary, useContext };
|
package/blocks/Code/Code.d.ts
CHANGED
|
@@ -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 code that should be highlighted.
|
|
9
9
|
*/
|
|
@@ -21,5 +21,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
|
|
|
21
21
|
highlightedLines?: Array<number>;
|
|
22
22
|
caption?: React.ReactNode;
|
|
23
23
|
}
|
|
24
|
-
declare
|
|
25
|
-
export
|
|
24
|
+
export declare function Code(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
package/blocks/Code/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Code } from "./Code";
|
package/blocks/Code/index.js
CHANGED
|
@@ -175,7 +175,7 @@ const layoutStyles = {
|
|
|
175
175
|
}};
|
|
176
176
|
|
|
177
177
|
const Root = "div";
|
|
178
|
-
function Code(props$1
|
|
178
|
+
function Code(props$1) {
|
|
179
179
|
const block = useBlock(props$1);
|
|
180
180
|
const {
|
|
181
181
|
children,
|
|
@@ -245,7 +245,6 @@ function Code(props$1, ref) {
|
|
|
245
245
|
}, [children, language, highlightedLines]);
|
|
246
246
|
const rootStyleProps = props(layoutStyles.block);
|
|
247
247
|
return /*#__PURE__*/jsxs(Root, {
|
|
248
|
-
ref: ref,
|
|
249
248
|
"data-timvir-b-code": true,
|
|
250
249
|
...rest,
|
|
251
250
|
...rootStyleProps,
|
|
@@ -267,6 +266,5 @@ function Code(props$1, ref) {
|
|
|
267
266
|
})]
|
|
268
267
|
});
|
|
269
268
|
}
|
|
270
|
-
var Code_default = /*#__PURE__*/React.forwardRef(Code);
|
|
271
269
|
|
|
272
|
-
export {
|
|
270
|
+
export { Code };
|
|
@@ -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
|
* Array of CSS Color values.
|
|
9
9
|
*/
|
|
@@ -14,5 +14,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
|
|
|
14
14
|
ancestry?: string;
|
|
15
15
|
}>;
|
|
16
16
|
}
|
|
17
|
-
declare
|
|
18
|
-
export
|
|
17
|
+
export declare function ColorBar(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ColorBar } from "./ColorBar";
|
package/blocks/ColorBar/index.js
CHANGED
|
@@ -175,7 +175,7 @@ const layoutStyles = {
|
|
|
175
175
|
}};
|
|
176
176
|
|
|
177
177
|
const Root = "div";
|
|
178
|
-
function ColorBar(props$1
|
|
178
|
+
function ColorBar(props$1) {
|
|
179
179
|
const block = useBlock(props$1);
|
|
180
180
|
const {
|
|
181
181
|
values,
|
|
@@ -184,7 +184,6 @@ function ColorBar(props$1, ref) {
|
|
|
184
184
|
const [selected, setSelected] = React.useState(undefined);
|
|
185
185
|
const rootStyleProps = props(layoutStyles.block, styles.root);
|
|
186
186
|
return /*#__PURE__*/jsxs(Root, {
|
|
187
|
-
ref: ref,
|
|
188
187
|
...rest,
|
|
189
188
|
...rootStyleProps,
|
|
190
189
|
className: cx(rest.className, rootStyleProps.className),
|
|
@@ -227,7 +226,6 @@ function ColorBar(props$1, ref) {
|
|
|
227
226
|
})]
|
|
228
227
|
});
|
|
229
228
|
}
|
|
230
|
-
var ColorBar_default = /*#__PURE__*/React.forwardRef(ColorBar);
|
|
231
229
|
const styles = {
|
|
232
230
|
root: {
|
|
233
231
|
kVAEAm: "timvir-s-1n2onr6",
|
|
@@ -250,4 +248,4 @@ const styles = {
|
|
|
250
248
|
}
|
|
251
249
|
};
|
|
252
250
|
|
|
253
|
-
export {
|
|
251
|
+
export { ColorBar };
|
|
@@ -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 = "div";
|
|
6
|
-
interface Props extends React.
|
|
6
|
+
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
7
7
|
chapters: Array<Chapter>;
|
|
8
8
|
selectedChapter?: number;
|
|
9
9
|
onSelectChapter?: (i: number) => void;
|
|
@@ -12,5 +12,5 @@ interface Chapter {
|
|
|
12
12
|
name?: string;
|
|
13
13
|
values: Array<string>;
|
|
14
14
|
}
|
|
15
|
-
declare
|
|
16
|
-
export
|
|
15
|
+
export declare function ColorBook(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ColorBook } from "./ColorBook";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
|
|
4
3
|
var styleq = {};
|
|
@@ -161,7 +160,7 @@ const layoutStyles = {
|
|
|
161
160
|
}};
|
|
162
161
|
|
|
163
162
|
const Root = "div";
|
|
164
|
-
function ColorBook(props$1
|
|
163
|
+
function ColorBook(props$1) {
|
|
165
164
|
const {
|
|
166
165
|
chapters,
|
|
167
166
|
selectedChapter,
|
|
@@ -169,7 +168,6 @@ function ColorBook(props$1, ref) {
|
|
|
169
168
|
...rest
|
|
170
169
|
} = props$1;
|
|
171
170
|
return /*#__PURE__*/jsx(Root, {
|
|
172
|
-
ref: ref,
|
|
173
171
|
...rest,
|
|
174
172
|
...props(layoutStyles.block, styles.root),
|
|
175
173
|
children: chapters.map(({
|
|
@@ -213,7 +211,6 @@ function ColorBook(props$1, ref) {
|
|
|
213
211
|
}, i))
|
|
214
212
|
});
|
|
215
213
|
}
|
|
216
|
-
var ColorBook_default = /*#__PURE__*/React.forwardRef(ColorBook);
|
|
217
214
|
const styles = {
|
|
218
215
|
root: {
|
|
219
216
|
k1xSpc: "timvir-s-rvj5dj",
|
|
@@ -243,4 +240,4 @@ const styles = {
|
|
|
243
240
|
}
|
|
244
241
|
};
|
|
245
242
|
|
|
246
|
-
export {
|
|
243
|
+
export { ColorBook };
|
package/blocks/Cover/Cover.d.ts
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 = "div";
|
|
6
|
-
interface Props extends React.
|
|
6
|
+
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
7
7
|
metadata: {
|
|
8
8
|
width: number;
|
|
9
9
|
height: number;
|
|
@@ -16,5 +16,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
|
|
|
16
16
|
type: string;
|
|
17
17
|
}>;
|
|
18
18
|
}
|
|
19
|
-
declare
|
|
20
|
-
export
|
|
19
|
+
export declare function Cover(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
package/blocks/Cover/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Cover } from "./Cover";
|
package/blocks/Cover/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
|
|
4
3
|
function cx(...args) {
|
|
@@ -177,7 +176,7 @@ const layoutStyles = {
|
|
|
177
176
|
};
|
|
178
177
|
|
|
179
178
|
const Root = "div";
|
|
180
|
-
function Cover(props$1
|
|
179
|
+
function Cover(props$1) {
|
|
181
180
|
const {
|
|
182
181
|
metadata,
|
|
183
182
|
img: img1,
|
|
@@ -186,7 +185,6 @@ function Cover(props$1, ref) {
|
|
|
186
185
|
} = props$1;
|
|
187
186
|
const rootStyleProps = props(layoutStyles.block, layoutStyles.fullWidth);
|
|
188
187
|
return /*#__PURE__*/jsx(Root, {
|
|
189
|
-
ref: ref,
|
|
190
188
|
...rest,
|
|
191
189
|
...rootStyleProps,
|
|
192
190
|
className: cx(rest.className, rootStyleProps.className),
|
|
@@ -201,6 +199,5 @@ function Cover(props$1, ref) {
|
|
|
201
199
|
})
|
|
202
200
|
});
|
|
203
201
|
}
|
|
204
|
-
var Cover_default = /*#__PURE__*/React.forwardRef(Cover);
|
|
205
202
|
|
|
206
|
-
export {
|
|
203
|
+
export { Cover };
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
*/
|
|
@@ -11,7 +11,7 @@ interface Props extends React.ComponentProps<typeof Root> {
|
|
|
11
11
|
* (can be inline or reference to a CSS variable).
|
|
12
12
|
*/
|
|
13
13
|
bleed?: string | number;
|
|
14
|
-
BackdropProps?: React.
|
|
14
|
+
BackdropProps?: React.ComponentPropsWithRef<"div">;
|
|
15
15
|
/**
|
|
16
16
|
* Override the theme used for the background pattern. If not provided, the
|
|
17
17
|
* Exhibit component will use the default from the context. If that is also
|
|
@@ -19,5 +19,5 @@ interface Props extends React.ComponentProps<typeof Root> {
|
|
|
19
19
|
*/
|
|
20
20
|
theme?: "system" | "light" | "dark";
|
|
21
21
|
}
|
|
22
|
-
declare
|
|
23
|
-
export
|
|
22
|
+
export declare function Exhibit(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Exhibit } from "./Exhibit";
|
package/blocks/Exhibit/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useContext, useBlock } from 'timvir/core';
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
5
|
function cx(...args) {
|
|
@@ -174,7 +173,7 @@ const layoutStyles = {
|
|
|
174
173
|
}};
|
|
175
174
|
|
|
176
175
|
const Root = "div";
|
|
177
|
-
function Exhibit(props$1
|
|
176
|
+
function Exhibit(props$1) {
|
|
178
177
|
const {
|
|
179
178
|
theme: defaultTheme
|
|
180
179
|
} = useContext().blocks?.Exhibit ?? {};
|
|
@@ -195,7 +194,6 @@ function Exhibit(props$1, ref) {
|
|
|
195
194
|
const rootStyleProps = props(layoutStyles.block, styles.root);
|
|
196
195
|
const containerStyleProps = props(styles.container, bleed === 0 && styles.bleedZero, styles[`${theme}Theme`]);
|
|
197
196
|
return /*#__PURE__*/jsxs(Root, {
|
|
198
|
-
ref: ref,
|
|
199
197
|
"data-timvir-b-exhibit": true,
|
|
200
198
|
...rest,
|
|
201
199
|
...rootStyleProps,
|
|
@@ -225,7 +223,6 @@ function Exhibit(props$1, ref) {
|
|
|
225
223
|
})]
|
|
226
224
|
});
|
|
227
225
|
}
|
|
228
|
-
var Exhibit_default = /*#__PURE__*/React.forwardRef(Exhibit);
|
|
229
226
|
const cssVariables = {
|
|
230
227
|
bleed: "--timvir-b-Exhibit-bleed",
|
|
231
228
|
borderColor: "--timvir-b-Exhibit-borderColor",
|
|
@@ -273,4 +270,4 @@ const styles = {
|
|
|
273
270
|
}
|
|
274
271
|
};
|
|
275
272
|
|
|
276
|
-
export {
|
|
273
|
+
export { Exhibit };
|
package/blocks/Font/Font.d.ts
CHANGED
|
@@ -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
|
name: string;
|
|
8
8
|
font: {
|
|
9
9
|
style?: React.CSSProperties;
|
|
@@ -11,5 +11,5 @@ interface Props extends React.ComponentPropsWithoutRef<typeof Root> {
|
|
|
11
11
|
};
|
|
12
12
|
info?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
declare
|
|
15
|
-
export
|
|
14
|
+
export declare function Font(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
package/blocks/Font/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Font } from "./Font";
|
package/blocks/Font/index.js
CHANGED
|
@@ -194,7 +194,7 @@ const SvgInfo = props => /*#__PURE__*/jsxs("svg", {
|
|
|
194
194
|
});
|
|
195
195
|
|
|
196
196
|
const Root = "div";
|
|
197
|
-
function Font(props$1
|
|
197
|
+
function Font(props$1) {
|
|
198
198
|
const components = useArticleComponents();
|
|
199
199
|
const {
|
|
200
200
|
name,
|
|
@@ -229,7 +229,6 @@ function Font(props$1, ref) {
|
|
|
229
229
|
className: "timvir-s-1a2a7pz timvir-s-1hx0egp timvir-s-126k92a timvir-s-1mzt3pk"
|
|
230
230
|
};
|
|
231
231
|
return /*#__PURE__*/jsxs(Root, {
|
|
232
|
-
ref: ref,
|
|
233
232
|
...rest,
|
|
234
233
|
...rootStyleProps,
|
|
235
234
|
className: cx(rest.className, rootStyleProps.className),
|
|
@@ -303,6 +302,5 @@ function Font(props$1, ref) {
|
|
|
303
302
|
})]
|
|
304
303
|
});
|
|
305
304
|
}
|
|
306
|
-
var Font_default = /*#__PURE__*/React.forwardRef(Font);
|
|
307
305
|
|
|
308
|
-
export {
|
|
306
|
+
export { Font };
|
package/blocks/Grid/Grid.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import * as React from "react";
|
|
|
5
5
|
declare const Root = "div";
|
|
6
6
|
interface Props extends React.ComponentProps<typeof Root> {
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
9
|
-
export
|
|
8
|
+
export declare function Grid(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/blocks/Grid/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Grid } from "./Grid";
|
package/blocks/Grid/index.js
CHANGED
|
@@ -172,7 +172,7 @@ const layoutStyles = {
|
|
|
172
172
|
}};
|
|
173
173
|
|
|
174
174
|
const Root = "div";
|
|
175
|
-
function Grid(props$1
|
|
175
|
+
function Grid(props$1) {
|
|
176
176
|
const {
|
|
177
177
|
children,
|
|
178
178
|
className,
|
|
@@ -180,7 +180,6 @@ function Grid(props$1, ref) {
|
|
|
180
180
|
} = props$1;
|
|
181
181
|
const rootStyleProps = props(layoutStyles.block, styles.root);
|
|
182
182
|
return /*#__PURE__*/jsx(Root, {
|
|
183
|
-
ref: ref,
|
|
184
183
|
...rest,
|
|
185
184
|
...rootStyleProps,
|
|
186
185
|
style: {
|
|
@@ -207,7 +206,6 @@ function Grid(props$1, ref) {
|
|
|
207
206
|
})
|
|
208
207
|
});
|
|
209
208
|
}
|
|
210
|
-
var Grid_default = /*#__PURE__*/React.forwardRef(Grid);
|
|
211
209
|
const styles = {
|
|
212
210
|
root: {
|
|
213
211
|
k1xSpc: "timvir-s-rvj5dj",
|
|
@@ -218,4 +216,4 @@ const styles = {
|
|
|
218
216
|
}
|
|
219
217
|
};
|
|
220
218
|
|
|
221
|
-
export {
|
|
219
|
+
export { Grid };
|
package/blocks/Icon/Icon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import type { Descriptor } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* The underlying DOM element which is rendered by this component.
|
|
@@ -7,5 +7,5 @@ declare const Root = "div";
|
|
|
7
7
|
interface Props extends React.ComponentProps<typeof Root> {
|
|
8
8
|
descriptor: Descriptor;
|
|
9
9
|
}
|
|
10
|
-
declare
|
|
11
|
-
export
|
|
10
|
+
export declare function Icon(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
package/blocks/Icon/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Icon } from "./Icon";
|
package/blocks/Icon/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useResizeObserverEntry } from 'timvir/hooks';
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
5
|
function cx(...args) {
|
|
@@ -101,7 +100,7 @@ function Grid({
|
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
const Root = "div";
|
|
104
|
-
function Icon(props
|
|
103
|
+
function Icon(props) {
|
|
105
104
|
const {
|
|
106
105
|
descriptor,
|
|
107
106
|
...rest
|
|
@@ -112,7 +111,6 @@ function Icon(props, ref) {
|
|
|
112
111
|
className: "timvir-s-1n2onr6 timvir-s-1vjfegm timvir-s-dtfvks timvir-s-d2wi23"
|
|
113
112
|
};
|
|
114
113
|
return /*#__PURE__*/jsx(Root, {
|
|
115
|
-
ref: ref,
|
|
116
114
|
...rest,
|
|
117
115
|
...rootStyleProps,
|
|
118
116
|
className: cx(rest.className, rootStyleProps.className),
|
|
@@ -136,6 +134,5 @@ function Icon(props, ref) {
|
|
|
136
134
|
})
|
|
137
135
|
});
|
|
138
136
|
}
|
|
139
|
-
var Icon_default = /*#__PURE__*/React.forwardRef(Icon);
|
|
140
137
|
|
|
141
|
-
export {
|
|
138
|
+
export { Icon };
|
|
@@ -5,5 +5,5 @@ interface Props {
|
|
|
5
5
|
size: number;
|
|
6
6
|
Component: React.ElementType;
|
|
7
7
|
}
|
|
8
|
-
declare function Canvas(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export
|
|
8
|
+
export declare function Canvas(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Canvas } from "./Canvas";
|
|
@@ -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
|
@@ -248,7 +248,6 @@ function Caption(props$1) {
|
|
|
248
248
|
})]
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
var Caption$1 = /*#__PURE__*/React.memo(Caption);
|
|
252
251
|
const styles$1 = {
|
|
253
252
|
figcaption: {
|
|
254
253
|
kGuDYH: "timvir-s-1dcheo9",
|
|
@@ -292,7 +291,6 @@ function Handle(props) {
|
|
|
292
291
|
})
|
|
293
292
|
});
|
|
294
293
|
}
|
|
295
|
-
var Handle$1 = /*#__PURE__*/React.memo(Handle);
|
|
296
294
|
|
|
297
295
|
const height = 16;
|
|
298
296
|
function Ruler(props) {
|
|
@@ -328,7 +326,7 @@ function Ruler(props) {
|
|
|
328
326
|
}
|
|
329
327
|
|
|
330
328
|
const Root = "div";
|
|
331
|
-
function Viewport(props$1
|
|
329
|
+
function Viewport(props$1) {
|
|
332
330
|
const block = useBlock(props$1);
|
|
333
331
|
const {
|
|
334
332
|
src,
|
|
@@ -393,7 +391,6 @@ function Viewport(props$1, ref) {
|
|
|
393
391
|
const rootStyleProps = props(layoutStyles.block, layoutStyles.fullWidth, styles.root);
|
|
394
392
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
395
393
|
children: [/*#__PURE__*/jsxs(Root, {
|
|
396
|
-
ref: ref,
|
|
397
394
|
"data-timvir-b-viewport": true,
|
|
398
395
|
...rest,
|
|
399
396
|
className: cx(!state.settled && "timvir-unsettled", className, rootStyleProps.className),
|
|
@@ -474,12 +471,12 @@ function Viewport(props$1, ref) {
|
|
|
474
471
|
pointerEvents: height === undefined ? "none" : undefined
|
|
475
472
|
}
|
|
476
473
|
})
|
|
477
|
-
}), /*#__PURE__*/jsx(Handle
|
|
474
|
+
}), /*#__PURE__*/jsx(Handle, {
|
|
478
475
|
gridColumn: "1",
|
|
479
476
|
lock: lock,
|
|
480
477
|
edge: "left",
|
|
481
478
|
iframeRef: iframeRef
|
|
482
|
-
}), /*#__PURE__*/jsx(Handle
|
|
479
|
+
}), /*#__PURE__*/jsx(Handle, {
|
|
483
480
|
gridColumn: "3",
|
|
484
481
|
lock: lock,
|
|
485
482
|
edge: "right",
|
|
@@ -491,7 +488,7 @@ function Viewport(props$1, ref) {
|
|
|
491
488
|
containerWidth: svgROE?.contentRect.width,
|
|
492
489
|
viewportWidth: width
|
|
493
490
|
})]
|
|
494
|
-
}), /*#__PURE__*/jsx(Caption
|
|
491
|
+
}), /*#__PURE__*/jsx(Caption, {
|
|
495
492
|
src: src,
|
|
496
493
|
code: code
|
|
497
494
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -503,7 +500,6 @@ function Viewport(props$1, ref) {
|
|
|
503
500
|
})]
|
|
504
501
|
});
|
|
505
502
|
}
|
|
506
|
-
var Viewport_default = /*#__PURE__*/React.forwardRef(Viewport);
|
|
507
503
|
const styles = {
|
|
508
504
|
root: {
|
|
509
505
|
ktR8K2: "timvir-s-1vjgj0v",
|
|
@@ -512,4 +508,4 @@ const styles = {
|
|
|
512
508
|
}
|
|
513
509
|
};
|
|
514
510
|
|
|
515
|
-
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",
|
|
@@ -265,4 +263,4 @@ async function defaultUnfurl(url) {
|
|
|
265
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/context/index.d.ts
CHANGED
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;
|
|
@@ -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;
|
package/core/index.js
CHANGED
|
@@ -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", {
|
|
@@ -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;
|
|
@@ -795,7 +793,7 @@ function Search(props) {
|
|
|
795
793
|
}
|
|
796
794
|
|
|
797
795
|
const Root = "div";
|
|
798
|
-
function Page(props$1
|
|
796
|
+
function Page(props$1) {
|
|
799
797
|
const {
|
|
800
798
|
location,
|
|
801
799
|
toc,
|
|
@@ -861,7 +859,6 @@ function Page(props$1, ref) {
|
|
|
861
859
|
return /*#__PURE__*/jsxs(Provider, {
|
|
862
860
|
value: context,
|
|
863
861
|
children: [/*#__PURE__*/jsxs(Root, {
|
|
864
|
-
ref: ref,
|
|
865
862
|
...rest,
|
|
866
863
|
className: "timvir-s-g6iff7 timvir-s-1hz7z82 timvir-s-rvj5dj timvir-s-c0s83b timvir-s-1i3za4p timvir-s-oxwh6b timvir-s-1w3eerp",
|
|
867
864
|
children: [/*#__PURE__*/jsx(Sidebar, {
|
|
@@ -939,7 +936,6 @@ function Page(props$1, ref) {
|
|
|
939
936
|
})]
|
|
940
937
|
});
|
|
941
938
|
}
|
|
942
|
-
var Page_default = /*#__PURE__*/React.forwardRef(Page);
|
|
943
939
|
const styles = {
|
|
944
940
|
sidebar: {
|
|
945
941
|
kJuA4N: "timvir-s-1nkj2r4",
|
|
@@ -1063,4 +1059,4 @@ function useArticleComponents() {
|
|
|
1063
1059
|
};
|
|
1064
1060
|
}
|
|
1065
1061
|
|
|
1066
|
-
export {
|
|
1062
|
+
export { Footer, Page, extendedWidth, fullWidth, grid, layoutStyles, noLayout, useArticleComponents, useBlock, useMailbox };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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": {
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"bytestring": "^1",
|
|
44
|
-
"shiki": "^1 || ^2 || ^3",
|
|
44
|
+
"shiki": "^1 || ^2 || ^3 || ^4",
|
|
45
45
|
"wonka": "^6"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"react": "^
|
|
49
|
-
"react-dom": "^
|
|
48
|
+
"react": "^19",
|
|
49
|
+
"react-dom": "^19"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import type { Node } from "timvir/core";
|
|
3
|
-
interface Props extends React.
|
|
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;
|
package/search/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function Search(_props, _ref) {
|
|
1
|
+
function Search(_props) {
|
|
4
2
|
return null;
|
|
5
3
|
}
|
|
6
|
-
var Search_default = /*#__PURE__*/React.forwardRef(Search);
|
|
7
4
|
function defaultSearch(toc) {
|
|
8
5
|
return {
|
|
9
6
|
q: async query => {
|
|
@@ -41,4 +38,4 @@ function flatten(n) {
|
|
|
41
38
|
return ret;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
export {
|
|
41
|
+
export { Search, defaultSearch };
|