timvir 0.2.33 → 0.2.34
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/blocks/Font/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useMDXComponents } from '@mdx-js/react';
|
|
2
|
+
import * as builtins from 'timvir/builtins';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import * as Icons from 'react-feather';
|
|
4
5
|
|
|
@@ -40,7 +41,7 @@ const classes = {
|
|
|
40
41
|
};
|
|
41
42
|
function Font(props, ref) {
|
|
42
43
|
const components = {
|
|
43
|
-
|
|
44
|
+
...builtins,
|
|
44
45
|
...useMDXComponents()
|
|
45
46
|
};
|
|
46
47
|
const {
|
package/blocks/Viewport/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useResizeObserverEntry, useResizeObserver } from 'timvir/hooks';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useImmer } from 'use-immer';
|
|
6
6
|
import { useMDXComponents } from '@mdx-js/react';
|
|
7
|
+
import * as builtins from 'timvir/builtins';
|
|
7
8
|
import { Code } from 'timvir/blocks';
|
|
8
9
|
import * as Icons from 'react-feather';
|
|
9
10
|
|
|
@@ -38,7 +39,7 @@ var cx_default = cx;
|
|
|
38
39
|
|
|
39
40
|
function Caption(props) {
|
|
40
41
|
const components = {
|
|
41
|
-
|
|
42
|
+
...builtins,
|
|
42
43
|
...useMDXComponents()
|
|
43
44
|
};
|
|
44
45
|
const {
|
|
@@ -119,25 +120,25 @@ function Ruler(props) {
|
|
|
119
120
|
viewportWidth = 0
|
|
120
121
|
} = props;
|
|
121
122
|
return /*#__PURE__*/React.createElement("svg", {
|
|
122
|
-
viewBox: `-${containerWidth / 2} ${-
|
|
123
|
+
viewBox: `-${containerWidth / 2} ${ -16 / 2} ${containerWidth} ${height}`,
|
|
123
124
|
className: "ssl4j8q"
|
|
124
125
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
125
126
|
x: -containerWidth / 2,
|
|
126
|
-
y: -
|
|
127
|
+
y: -16 / 2,
|
|
127
128
|
width: containerWidth,
|
|
128
129
|
height: height,
|
|
129
130
|
fill: "var(--timvir-secondary-background-color)"
|
|
130
131
|
}), /*#__PURE__*/React.createElement("line", {
|
|
131
132
|
x1: -viewportWidth / 2,
|
|
132
133
|
x2: -viewportWidth / 2,
|
|
133
|
-
y1: -
|
|
134
|
+
y1: -16 / 2,
|
|
134
135
|
y2: height / 2,
|
|
135
136
|
strokeWidth: 2,
|
|
136
137
|
stroke: "var(--timvir-text-color)"
|
|
137
138
|
}), /*#__PURE__*/React.createElement("line", {
|
|
138
139
|
x1: viewportWidth / 2,
|
|
139
140
|
x2: viewportWidth / 2,
|
|
140
|
-
y1: -
|
|
141
|
+
y1: -16 / 2,
|
|
141
142
|
y2: height / 2,
|
|
142
143
|
strokeWidth: 2,
|
|
143
144
|
stroke: "var(--timvir-text-color)"
|
|
@@ -3,7 +3,7 @@ interface Props {
|
|
|
3
3
|
gridColumn: string;
|
|
4
4
|
lock: React.MutableRefObject<string>;
|
|
5
5
|
edge: "left" | "right";
|
|
6
|
-
iframeRef: React.RefObject<HTMLIFrameElement>;
|
|
6
|
+
iframeRef: React.RefObject<null | HTMLIFrameElement>;
|
|
7
7
|
}
|
|
8
8
|
declare function Handle(props: Props): React.JSX.Element;
|
|
9
9
|
declare const _default: React.MemoExoticComponent<typeof Handle>;
|
package/builtins/components.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export declare const h1:
|
|
2
|
+
export declare const h1: any;
|
|
3
3
|
export declare const h2: (props: React.HTMLAttributes<HTMLHeadingElement>) => React.JSX.Element;
|
|
4
4
|
export declare const h3: (props: React.HTMLAttributes<HTMLHeadingElement>) => React.JSX.Element;
|
|
5
5
|
export declare const h4: (props: React.HTMLAttributes<HTMLHeadingElement>) => React.JSX.Element;
|
|
6
|
-
export declare const blockquote:
|
|
7
|
-
export declare const hr:
|
|
8
|
-
export declare const table:
|
|
9
|
-
export declare const thead:
|
|
10
|
-
export declare const tbody:
|
|
11
|
-
export declare const tr:
|
|
12
|
-
export declare const th:
|
|
13
|
-
export declare const td:
|
|
14
|
-
export declare const code:
|
|
15
|
-
export declare const a:
|
|
16
|
-
export declare const p:
|
|
17
|
-
export declare const ul:
|
|
18
|
-
export declare const ol:
|
|
6
|
+
export declare const blockquote: any;
|
|
7
|
+
export declare const hr: any;
|
|
8
|
+
export declare const table: any;
|
|
9
|
+
export declare const thead: any;
|
|
10
|
+
export declare const tbody: any;
|
|
11
|
+
export declare const tr: any;
|
|
12
|
+
export declare const th: any;
|
|
13
|
+
export declare const td: any;
|
|
14
|
+
export declare const code: any;
|
|
15
|
+
export declare const a: any;
|
|
16
|
+
export declare const p: any;
|
|
17
|
+
export declare const ul: any;
|
|
18
|
+
export declare const ol: any;
|
package/builtins/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function styled(tag) {
|
|
|
101
101
|
}
|
|
102
102
|
const render = (props, ref) => {
|
|
103
103
|
const { as: component = tag, class: className = mockedClass } = props;
|
|
104
|
-
const shouldKeepProps = options.propsAsIs ===
|
|
104
|
+
const shouldKeepProps = options.propsAsIs === undefined ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
|
|
105
105
|
const filteredProps = filterProps(shouldKeepProps, props, [
|
|
106
106
|
"as",
|
|
107
107
|
"class"
|
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.34",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"downshift": "^7 || ^8 || ^9",
|
|
21
21
|
"fuzzaldrin-plus": "^0.6.0",
|
|
22
22
|
"immer": "^9 || ^10",
|
|
23
|
-
"shiki": "^1",
|
|
23
|
+
"shiki": "^1 || ^2",
|
|
24
24
|
"react-feather": "^2",
|
|
25
25
|
"use-immer": "^0.8.0 || ^0.8.1 || ^0.9.0 || ^0.10.0 || ^0.11.0",
|
|
26
26
|
"wonka": "^6"
|