@vsreact/core 0.0.22 → 0.0.23
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tw.js +15 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/primitives.tsx +2 -0
- package/src/tw.test.ts +9 -0
- package/src/tw.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./runtime";
|
|
2
2
|
import "./bridge";
|
|
3
3
|
/** The SDK version — stamp it on support dumps and analytics. */
|
|
4
|
-
export declare const VERSION = "0.0.
|
|
4
|
+
export declare const VERSION = "0.0.23";
|
|
5
5
|
export { View, Text, Image, TextInput, NativeView } from "./primitives";
|
|
6
6
|
export type { CommonProps, TextProps, ImageProps, TextInputProps, NativeViewProps, } from "./primitives";
|
|
7
7
|
export { render, unmount } from "./render";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import "./runtime";
|
|
4
4
|
import "./bridge";
|
|
5
5
|
/** The SDK version — stamp it on support dumps and analytics. */
|
|
6
|
-
export const VERSION = "0.0.
|
|
6
|
+
export const VERSION = "0.0.23";
|
|
7
7
|
export { View, Text, Image, TextInput, NativeView } from "./primitives";
|
|
8
8
|
export { render, unmount } from "./render";
|
|
9
9
|
export { native } from "./native";
|
package/dist/tw.js
CHANGED
|
@@ -71,6 +71,21 @@ const staticClasses = {
|
|
|
71
71
|
"cursor-pointer": { cursor: "pointer" },
|
|
72
72
|
"cursor-text": { cursor: "text" },
|
|
73
73
|
"cursor-default": { cursor: "default" },
|
|
74
|
+
"cursor-grab": { cursor: "grab" },
|
|
75
|
+
"cursor-grabbing": { cursor: "grabbing" },
|
|
76
|
+
"cursor-move": { cursor: "move" },
|
|
77
|
+
"cursor-ns-resize": { cursor: "ns-resize" },
|
|
78
|
+
"cursor-ew-resize": { cursor: "ew-resize" },
|
|
79
|
+
"cursor-crosshair": { cursor: "crosshair" },
|
|
80
|
+
"cursor-not-allowed": { cursor: "not-allowed" },
|
|
81
|
+
"pointer-events-none": { pointerEvents: "none" },
|
|
82
|
+
"pointer-events-auto": { pointerEvents: "auto" },
|
|
83
|
+
"border-solid": { borderStyle: "solid" },
|
|
84
|
+
"border-dashed": { borderStyle: "dashed" },
|
|
85
|
+
"border-dotted": { borderStyle: "dotted" },
|
|
86
|
+
"object-contain": { objectFit: "contain" },
|
|
87
|
+
"object-cover": { objectFit: "cover" },
|
|
88
|
+
"object-fill": { objectFit: "fill" },
|
|
74
89
|
shadow: { shadowColor: "#00000066", shadowRadius: 4, shadowOffsetY: 1 },
|
|
75
90
|
"shadow-sm": { shadowColor: "#00000066", shadowRadius: 4, shadowOffsetY: 1 },
|
|
76
91
|
"shadow-md": { shadowColor: "#00000066", shadowRadius: 8, shadowOffsetY: 2 },
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import "./runtime";
|
|
|
4
4
|
import "./bridge";
|
|
5
5
|
|
|
6
6
|
/** The SDK version — stamp it on support dumps and analytics. */
|
|
7
|
-
export const VERSION = "0.0.
|
|
7
|
+
export const VERSION = "0.0.23";
|
|
8
8
|
|
|
9
9
|
export { View, Text, Image, TextInput, NativeView } from "./primitives";
|
|
10
10
|
export type {
|
package/src/primitives.tsx
CHANGED
|
@@ -85,6 +85,8 @@ export function Text(props: TextProps) {
|
|
|
85
85
|
|
|
86
86
|
export interface ImageProps extends CommonProps {
|
|
87
87
|
src: string;
|
|
88
|
+
/** Style keys also work: objectFit ("contain" default | "cover" | "fill")
|
|
89
|
+
and tintColor (fills the image's alpha with a solid colour). */
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
export function Image(props: ImageProps) {
|
package/src/tw.test.ts
CHANGED
|
@@ -253,3 +253,12 @@ describe("typography (0.0.22)", () => {
|
|
|
253
253
|
expect(tw("leading-5").style).toEqual({ lineHeight: 20 });
|
|
254
254
|
});
|
|
255
255
|
});
|
|
256
|
+
|
|
257
|
+
describe("input & media classes (0.0.23)", () => {
|
|
258
|
+
test("pointer events, border styles, object fit", () => {
|
|
259
|
+
expect(tw("pointer-events-none").style).toEqual({ pointerEvents: "none" });
|
|
260
|
+
expect(tw("border-dashed").style).toEqual({ borderStyle: "dashed" });
|
|
261
|
+
expect(tw("object-cover").style).toEqual({ objectFit: "cover" });
|
|
262
|
+
expect(tw("cursor-grab").style).toEqual({ cursor: "grab" });
|
|
263
|
+
});
|
|
264
|
+
});
|
package/src/tw.ts
CHANGED
|
@@ -82,6 +82,21 @@ const staticClasses: Record<string, Style> = {
|
|
|
82
82
|
"cursor-pointer": { cursor: "pointer" },
|
|
83
83
|
"cursor-text": { cursor: "text" },
|
|
84
84
|
"cursor-default": { cursor: "default" },
|
|
85
|
+
"cursor-grab": { cursor: "grab" },
|
|
86
|
+
"cursor-grabbing": { cursor: "grabbing" },
|
|
87
|
+
"cursor-move": { cursor: "move" },
|
|
88
|
+
"cursor-ns-resize": { cursor: "ns-resize" },
|
|
89
|
+
"cursor-ew-resize": { cursor: "ew-resize" },
|
|
90
|
+
"cursor-crosshair": { cursor: "crosshair" },
|
|
91
|
+
"cursor-not-allowed": { cursor: "not-allowed" },
|
|
92
|
+
"pointer-events-none": { pointerEvents: "none" },
|
|
93
|
+
"pointer-events-auto": { pointerEvents: "auto" },
|
|
94
|
+
"border-solid": { borderStyle: "solid" },
|
|
95
|
+
"border-dashed": { borderStyle: "dashed" },
|
|
96
|
+
"border-dotted": { borderStyle: "dotted" },
|
|
97
|
+
"object-contain": { objectFit: "contain" },
|
|
98
|
+
"object-cover": { objectFit: "cover" },
|
|
99
|
+
"object-fill": { objectFit: "fill" },
|
|
85
100
|
shadow: { shadowColor: "#00000066", shadowRadius: 4, shadowOffsetY: 1 },
|
|
86
101
|
"shadow-sm": { shadowColor: "#00000066", shadowRadius: 4, shadowOffsetY: 1 },
|
|
87
102
|
"shadow-md": { shadowColor: "#00000066", shadowRadius: 8, shadowOffsetY: 2 },
|