timvir 0.2.49 → 0.2.50
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/samples/basic.d.ts +1 -1
- package/blocks/Code/index.js +21 -6
- package/blocks/Code/samples/basic.d.ts +1 -1
- package/blocks/ColorBar/index.js +1 -1
- package/blocks/ColorBar/styles.css +2 -2
- package/blocks/Exhibit/samples/bleed.d.ts +1 -1
- package/blocks/Font/index.js +3 -0
- 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/Icon/Icon.d.ts +1 -1
- package/blocks/Icon/internal/Canvas.d.ts +1 -1
- package/blocks/Message/samples/basic.d.ts +1 -1
- package/blocks/Viewport/index.js +8 -2
- package/blocks/WebLink/index.js +1 -1
- 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 +2 -2
- package/core/components/Commands/internal/Action.d.ts +1 -1
- 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 +2 -2
- 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 +5 -4
- package/package.json +33 -9
- package/search/Search/Search.d.ts +1 -1
- package/styles.css +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# timvir
|
|
2
2
|
|
|
3
|
+
## 0.2.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Add explicit types and import conditions to exports** ([#3708](https://github.com/timvir/timvir/pull/3708)) - This improves TypeScript IntelliSense and module resolution for modern build tools.
|
|
8
|
+
|
|
3
9
|
## 0.2.49
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/blocks/Code/index.js
CHANGED
|
@@ -196,18 +196,33 @@ function Code(props$1, ref) {
|
|
|
196
196
|
const stylexTransformer = {
|
|
197
197
|
name: "stylex",
|
|
198
198
|
pre(node) {
|
|
199
|
-
|
|
199
|
+
const {
|
|
200
|
+
className
|
|
201
|
+
} = {
|
|
200
202
|
className: "timvir-s-1lliihq timvir-s-1ghz6dp timvir-s-1g8o3q3 timvir-s-1d0dlzq"
|
|
201
|
-
}
|
|
203
|
+
};
|
|
204
|
+
{
|
|
205
|
+
this.addClassToHast(node, className);
|
|
206
|
+
}
|
|
202
207
|
},
|
|
203
208
|
line(node, index) {
|
|
204
|
-
|
|
209
|
+
const {
|
|
210
|
+
className
|
|
211
|
+
} = {
|
|
205
212
|
className: "timvir-s-1rg5ohu timvir-s-h8yej3 timvir-s-e193im"
|
|
206
|
-
}
|
|
213
|
+
};
|
|
214
|
+
{
|
|
215
|
+
this.addClassToHast(node, className);
|
|
216
|
+
}
|
|
207
217
|
if (highlightedLines?.includes(index)) {
|
|
208
|
-
|
|
218
|
+
const {
|
|
219
|
+
className
|
|
220
|
+
} = {
|
|
209
221
|
className: "timvir-s-15fpjw5"
|
|
210
|
-
}
|
|
222
|
+
};
|
|
223
|
+
{
|
|
224
|
+
this.addClassToHast(node, className);
|
|
225
|
+
}
|
|
211
226
|
}
|
|
212
227
|
}
|
|
213
228
|
};
|
package/blocks/ColorBar/index.js
CHANGED
|
@@ -198,7 +198,7 @@ function ColorBar(props$1, ref) {
|
|
|
198
198
|
opacity: selected ? 0 : 1
|
|
199
199
|
},
|
|
200
200
|
children: values.map((value, i, self) => /*#__PURE__*/jsx("div", {
|
|
201
|
-
className: "timvir-s-1vqgdyp timvir-s-1iyjqo2 timvir-s-rvj5dj timvir-s-13b6k1y timvir-s-1ypdohk timvir-s-zkaem6 timvir-s-
|
|
201
|
+
className: "timvir-s-1vqgdyp timvir-s-1iyjqo2 timvir-s-rvj5dj timvir-s-13b6k1y timvir-s-1ypdohk timvir-s-zkaem6 timvir-s-12l46wj timvir-s-inzabm timvir-s-1bxid8z",
|
|
202
202
|
children: /*#__PURE__*/jsx("div", {
|
|
203
203
|
...props(i === 0 ? styles.firstChild : null, i === self.length - 1 ? styles.lastChild : null, styles.valueInner),
|
|
204
204
|
style: {
|
package/blocks/Font/index.js
CHANGED
|
@@ -250,6 +250,9 @@ function Font(props$1, ref) {
|
|
|
250
250
|
onClick: () => {
|
|
251
251
|
if (infoRef && contentRef) {
|
|
252
252
|
const infoParent = infoRef.parentElement;
|
|
253
|
+
if (!infoParent) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
253
256
|
if (infoParent.style.height === "0px") {
|
|
254
257
|
infoParent.style.height = `${infoRef.getBoundingClientRect().height}px`;
|
|
255
258
|
infoParent.style.opacity = "1";
|
package/blocks/Icon/Icon.d.ts
CHANGED
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";
|
|
@@ -365,8 +368,11 @@ function Viewport(props$1, ref) {
|
|
|
365
368
|
};
|
|
366
369
|
const onMouseUp = () => {
|
|
367
370
|
lock.current = "";
|
|
368
|
-
iframeRef.current
|
|
369
|
-
|
|
371
|
+
const iframeElement = iframeRef.current;
|
|
372
|
+
if (iframeElement) {
|
|
373
|
+
iframeElement.style.userSelect = "";
|
|
374
|
+
iframeElement.style.pointerEvents = "";
|
|
375
|
+
}
|
|
370
376
|
setHeight(height => {
|
|
371
377
|
setMaxHeight(height);
|
|
372
378
|
return height;
|
package/blocks/WebLink/index.js
CHANGED
|
@@ -262,7 +262,7 @@ const styles = {
|
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
async function defaultUnfurl(url) {
|
|
265
|
-
return fetch(`https://timvir.
|
|
265
|
+
return fetch(`https://timvir.dev/api/unfurl?url=${encodeURIComponent(url)}`).then(res => res.json());
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
export { WebLink_default as 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: {
|
|
@@ -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
|
*/
|
|
@@ -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';
|
|
@@ -47,7 +47,7 @@ function Footer(props, ref) {
|
|
|
47
47
|
children: /*#__PURE__*/jsxs("div", {
|
|
48
48
|
className: "timvir-s-htle6 timvir-s-euugli",
|
|
49
49
|
children: ["Built with", " ", /*#__PURE__*/jsx("a", {
|
|
50
|
-
href: "https://timvir.
|
|
50
|
+
href: "https://timvir.dev",
|
|
51
51
|
className: "timvir-s-1heor9g timvir-s-1hl2dhg timvir-s-1dlxito timvir-s-1j43nte timvir-s-odwsf6 timvir-s-1w3jsh0 timvir-s-g7t5vw",
|
|
52
52
|
children: "Timvir"
|
|
53
53
|
})]
|
|
@@ -667,9 +667,10 @@ function Sidebar(props$1) {
|
|
|
667
667
|
} = useContext();
|
|
668
668
|
const [isMenuOpen, setMenuOpen] = React.useState(false);
|
|
669
669
|
React.useEffect(() => {
|
|
670
|
-
const
|
|
670
|
+
const className = {
|
|
671
671
|
className: "timvir-s-1rife3k timvir-s-ixxii4 timvir-s-13vifvy timvir-s-h8yej3"
|
|
672
|
-
}.className
|
|
672
|
+
}.className;
|
|
673
|
+
const scrollLockClassList = className.split(" ");
|
|
673
674
|
for (const className of scrollLockClassList) {
|
|
674
675
|
document.body.classList.toggle(className, isMenuOpen);
|
|
675
676
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "timvir",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.50",
|
|
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",
|
package/styles.css
CHANGED
|
@@ -1692,8 +1692,8 @@ body {
|
|
|
1692
1692
|
--timvir-b-ColorBar-value-borderRadiusDefault: 2px 0 0 2px;
|
|
1693
1693
|
}
|
|
1694
1694
|
|
|
1695
|
-
.timvir-s-
|
|
1696
|
-
--timvir-b-ColorBar-value-margin:
|
|
1695
|
+
.timvir-s-12l46wj {
|
|
1696
|
+
--timvir-b-ColorBar-value-margin: 0px;
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
1699
|
.timvir-s-1f9b50e {
|