@teamvortexsoftware/vortex-react-native 0.0.2 → 0.0.3

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.
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+
3
+ interface ButtonProps {
4
+ text: string;
5
+ onClick?: (e: any) => void;
6
+ }
7
+ declare function Button({ text, onClick }: ButtonProps): React.JSX.Element;
8
+
9
+ interface WidgetConfiguration {
10
+ configuration?: {
11
+ props?: any;
12
+ styles?: any;
13
+ };
14
+ slug?: string;
15
+ [key: string]: any;
16
+ }
17
+ interface VortexInviteProps {
18
+ widgetConfigurationId?: string;
19
+ widgetConfiguration?: WidgetConfiguration;
20
+ isLoading?: boolean;
21
+ }
22
+ declare function VortexInvite({ widgetConfigurationId, widgetConfiguration, isLoading, }: VortexInviteProps): React.JSX.Element;
23
+
24
+ export { Button, type ButtonProps, VortexInvite, type VortexInviteProps };
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+
3
+ interface ButtonProps {
4
+ text: string;
5
+ onClick?: (e: any) => void;
6
+ }
7
+ declare function Button({ text, onClick }: ButtonProps): React.JSX.Element;
8
+
9
+ interface WidgetConfiguration {
10
+ configuration?: {
11
+ props?: any;
12
+ styles?: any;
13
+ };
14
+ slug?: string;
15
+ [key: string]: any;
16
+ }
17
+ interface VortexInviteProps {
18
+ widgetConfigurationId?: string;
19
+ widgetConfiguration?: WidgetConfiguration;
20
+ isLoading?: boolean;
21
+ }
22
+ declare function VortexInvite({ widgetConfigurationId, widgetConfiguration, isLoading, }: VortexInviteProps): React.JSX.Element;
23
+
24
+ export { Button, type ButtonProps, VortexInvite, type VortexInviteProps };
package/dist/index.js ADDED
@@ -0,0 +1,177 @@
1
+ 'use client'
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/index.tsx
32
+ var src_exports = {};
33
+ __export(src_exports, {
34
+ Button: () => Button,
35
+ VortexInvite: () => VortexInvite
36
+ });
37
+ module.exports = __toCommonJS(src_exports);
38
+
39
+ // src/button.tsx
40
+ var import_react = __toESM(require("react"));
41
+ var import_react_native = require("react-native");
42
+ function Button({ text, onClick }) {
43
+ const [count, setCount] = (0, import_react.useState)(0);
44
+ (0, import_react.useEffect)(() => {
45
+ console.log("Current count:", count);
46
+ }, [count]);
47
+ const handlePress = (e) => {
48
+ console.log("handlePress called");
49
+ setCount((prevCount) => prevCount + 1);
50
+ if (onClick) {
51
+ onClick(e);
52
+ }
53
+ };
54
+ return /* @__PURE__ */ import_react.default.createElement(import_react_native.Text, { style: styles.text }, text);
55
+ }
56
+ var styles = import_react_native.StyleSheet.create({
57
+ button: {
58
+ maxWidth: 200,
59
+ textAlign: "center",
60
+ borderRadius: 10,
61
+ paddingTop: 14,
62
+ paddingBottom: 14,
63
+ paddingLeft: 30,
64
+ paddingRight: 30,
65
+ fontSize: 15,
66
+ backgroundColor: "#2f80ed"
67
+ },
68
+ text: {
69
+ color: "white"
70
+ }
71
+ });
72
+
73
+ // src/vortexInvite.tsx
74
+ var import_react2 = __toESM(require("react"));
75
+ var import_react_native2 = require("react-native");
76
+ function VortexInvite({
77
+ widgetConfigurationId,
78
+ widgetConfiguration,
79
+ isLoading = false
80
+ }) {
81
+ return /* @__PURE__ */ import_react2.default.createElement(import_react_native2.View, null, /* @__PURE__ */ import_react2.default.createElement("pre", null, "Chupacabra"));
82
+ }
83
+ var styles2 = import_react_native2.StyleSheet.create({
84
+ container: {
85
+ padding: 15,
86
+ display: "flex",
87
+ flexDirection: "column"
88
+ },
89
+ inviteContainer: {
90
+ display: "flex",
91
+ flexDirection: "column",
92
+ justifyContent: "center",
93
+ alignItems: "center",
94
+ marginTop: 8
95
+ },
96
+ introText: {
97
+ marginBottom: 8,
98
+ fontSize: 24,
99
+ fontWeight: "bold",
100
+ textAlign: "center"
101
+ },
102
+ input: {
103
+ width: "100%",
104
+ borderWidth: 1,
105
+ borderColor: "#ccc",
106
+ padding: 10,
107
+ borderRadius: 5,
108
+ marginBottom: 8
109
+ },
110
+ buttonContainer: {
111
+ marginTop: 16,
112
+ marginBottom: 8,
113
+ width: "100%"
114
+ },
115
+ submitButton: {
116
+ // backgroundColor: "#007bff",
117
+ padding: 12,
118
+ borderRadius: 5,
119
+ alignItems: "center",
120
+ shadowColor: "rgba(0, 0, 0, 0.2)",
121
+ shadowOffset: { width: 0, height: 2 },
122
+ shadowOpacity: 0.5,
123
+ shadowRadius: 2
124
+ },
125
+ submitButtonText: {
126
+ color: "white",
127
+ fontWeight: "500",
128
+ textTransform: "none"
129
+ },
130
+ skeleton: {
131
+ width: "100%",
132
+ height: 50,
133
+ backgroundColor: "#e0e0e0",
134
+ borderRadius: 5
135
+ },
136
+ shareContainer: {
137
+ marginTop: 16,
138
+ alignItems: "center"
139
+ },
140
+ divider: {
141
+ marginVertical: 10,
142
+ fontSize: 16,
143
+ fontWeight: "bold",
144
+ textAlign: "center"
145
+ },
146
+ shareButtonsContainer: {
147
+ flexDirection: "row",
148
+ flexWrap: "wrap",
149
+ justifyContent: "center"
150
+ },
151
+ shareButtonWrapper: {
152
+ width: "48%",
153
+ margin: 5
154
+ },
155
+ centeredShareButton: {
156
+ width: "100%",
157
+ alignItems: "center"
158
+ },
159
+ shareButton: {
160
+ flexDirection: "row",
161
+ alignItems: "center",
162
+ padding: 10,
163
+ borderWidth: 1,
164
+ borderColor: "#007bff",
165
+ borderRadius: 5,
166
+ justifyContent: "center"
167
+ },
168
+ shareButtonText: {
169
+ paddingLeft: 10,
170
+ color: "#007bff"
171
+ }
172
+ });
173
+ // Annotate the CommonJS export names for ESM import in node:
174
+ 0 && (module.exports = {
175
+ Button,
176
+ VortexInvite
177
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,143 @@
1
+ 'use client'
2
+
3
+ // src/button.tsx
4
+ import React, { useEffect, useState } from "react";
5
+ import { StyleSheet, Text } from "react-native";
6
+ function Button({ text, onClick }) {
7
+ const [count, setCount] = useState(0);
8
+ useEffect(() => {
9
+ console.log("Current count:", count);
10
+ }, [count]);
11
+ const handlePress = (e) => {
12
+ console.log("handlePress called");
13
+ setCount((prevCount) => prevCount + 1);
14
+ if (onClick) {
15
+ onClick(e);
16
+ }
17
+ };
18
+ return /* @__PURE__ */ React.createElement(Text, { style: styles.text }, text);
19
+ }
20
+ var styles = StyleSheet.create({
21
+ button: {
22
+ maxWidth: 200,
23
+ textAlign: "center",
24
+ borderRadius: 10,
25
+ paddingTop: 14,
26
+ paddingBottom: 14,
27
+ paddingLeft: 30,
28
+ paddingRight: 30,
29
+ fontSize: 15,
30
+ backgroundColor: "#2f80ed"
31
+ },
32
+ text: {
33
+ color: "white"
34
+ }
35
+ });
36
+
37
+ // src/vortexInvite.tsx
38
+ import React2 from "react";
39
+ import {
40
+ View,
41
+ StyleSheet as StyleSheet2
42
+ } from "react-native";
43
+ function VortexInvite({
44
+ widgetConfigurationId,
45
+ widgetConfiguration,
46
+ isLoading = false
47
+ }) {
48
+ return /* @__PURE__ */ React2.createElement(View, null, /* @__PURE__ */ React2.createElement("pre", null, "Chupacabra"));
49
+ }
50
+ var styles2 = StyleSheet2.create({
51
+ container: {
52
+ padding: 15,
53
+ display: "flex",
54
+ flexDirection: "column"
55
+ },
56
+ inviteContainer: {
57
+ display: "flex",
58
+ flexDirection: "column",
59
+ justifyContent: "center",
60
+ alignItems: "center",
61
+ marginTop: 8
62
+ },
63
+ introText: {
64
+ marginBottom: 8,
65
+ fontSize: 24,
66
+ fontWeight: "bold",
67
+ textAlign: "center"
68
+ },
69
+ input: {
70
+ width: "100%",
71
+ borderWidth: 1,
72
+ borderColor: "#ccc",
73
+ padding: 10,
74
+ borderRadius: 5,
75
+ marginBottom: 8
76
+ },
77
+ buttonContainer: {
78
+ marginTop: 16,
79
+ marginBottom: 8,
80
+ width: "100%"
81
+ },
82
+ submitButton: {
83
+ // backgroundColor: "#007bff",
84
+ padding: 12,
85
+ borderRadius: 5,
86
+ alignItems: "center",
87
+ shadowColor: "rgba(0, 0, 0, 0.2)",
88
+ shadowOffset: { width: 0, height: 2 },
89
+ shadowOpacity: 0.5,
90
+ shadowRadius: 2
91
+ },
92
+ submitButtonText: {
93
+ color: "white",
94
+ fontWeight: "500",
95
+ textTransform: "none"
96
+ },
97
+ skeleton: {
98
+ width: "100%",
99
+ height: 50,
100
+ backgroundColor: "#e0e0e0",
101
+ borderRadius: 5
102
+ },
103
+ shareContainer: {
104
+ marginTop: 16,
105
+ alignItems: "center"
106
+ },
107
+ divider: {
108
+ marginVertical: 10,
109
+ fontSize: 16,
110
+ fontWeight: "bold",
111
+ textAlign: "center"
112
+ },
113
+ shareButtonsContainer: {
114
+ flexDirection: "row",
115
+ flexWrap: "wrap",
116
+ justifyContent: "center"
117
+ },
118
+ shareButtonWrapper: {
119
+ width: "48%",
120
+ margin: 5
121
+ },
122
+ centeredShareButton: {
123
+ width: "100%",
124
+ alignItems: "center"
125
+ },
126
+ shareButton: {
127
+ flexDirection: "row",
128
+ alignItems: "center",
129
+ padding: 10,
130
+ borderWidth: 1,
131
+ borderColor: "#007bff",
132
+ borderRadius: 5,
133
+ justifyContent: "center"
134
+ },
135
+ shareButtonText: {
136
+ paddingLeft: 10,
137
+ color: "#007bff"
138
+ }
139
+ });
140
+ export {
141
+ Button,
142
+ VortexInvite
143
+ };
package/package.json CHANGED
@@ -2,13 +2,20 @@
2
2
  "name": "@teamvortexsoftware/vortex-react-native",
3
3
  "description": "",
4
4
  "author": "@teamvortexsoftware",
5
- "version": "0.0.2",
5
+ "version": "0.0.3",
6
6
  "publishConfig": {
7
7
  "access": "restricted"
8
8
  },
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ }
18
+ },
12
19
  "main": "./dist/index.js",
13
20
  "types": "./dist/index.d.ts",
14
21
  "devDependencies": {
@@ -24,6 +31,7 @@
24
31
  "scripts": {
25
32
  "build": "tsup",
26
33
  "dev": "tsup --watch",
27
- "clean": "rm -rf dist"
34
+ "clean": "rm -rf dist",
35
+ "prepublish": "npm run build"
28
36
  }
29
37
  }