@every-app/sdk 0.0.8 → 0.0.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatewayRequiredError.d.ts","sourceRoot":"","sources":["../../src/client/GatewayRequiredError.tsx"],"names":[],"mappings":"AAEA,UAAU,yBAAyB;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"GatewayRequiredError.d.ts","sourceRoot":"","sources":["../../src/client/GatewayRequiredError.tsx"],"names":[],"mappings":"AAEA,UAAU,yBAAyB;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAmFD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,KAAK,GACN,EAAE,yBAAyB,2CA6C3B"}
|
|
@@ -36,7 +36,7 @@ const styles = {
|
|
|
36
36
|
colorScheme: "light dark",
|
|
37
37
|
},
|
|
38
38
|
content: {
|
|
39
|
-
maxWidth: "
|
|
39
|
+
maxWidth: "520px",
|
|
40
40
|
width: "100%",
|
|
41
41
|
textAlign: "left",
|
|
42
42
|
},
|
|
@@ -64,19 +64,17 @@ const styles = {
|
|
|
64
64
|
color: "var(--gateway-text-muted, oklch(40% 0 0))",
|
|
65
65
|
marginBottom: "20px",
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
display: "inline-flex",
|
|
69
|
-
alignItems: "center",
|
|
70
|
-
gap: "8px",
|
|
67
|
+
urlText: {
|
|
71
68
|
fontSize: "14px",
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
lineHeight: 1.5,
|
|
70
|
+
color: "var(--gateway-text-muted, oklch(40% 0 0))",
|
|
71
|
+
wordBreak: "break-all",
|
|
72
|
+
},
|
|
73
|
+
urlLink: {
|
|
74
74
|
color: "rgb(168, 162, 158)",
|
|
75
75
|
textDecoration: "underline",
|
|
76
76
|
textDecorationColor: "rgb(87, 83, 78)",
|
|
77
|
-
textUnderlineOffset: "
|
|
78
|
-
cursor: "pointer",
|
|
79
|
-
transition: "color, background-color, border-color, text-decoration-color, fill, stroke 0.15s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
77
|
+
textUnderlineOffset: "2px",
|
|
80
78
|
},
|
|
81
79
|
};
|
|
82
80
|
/**
|
|
@@ -87,6 +85,7 @@ const styles = {
|
|
|
87
85
|
* the app through the Gateway and provides a link to do so.
|
|
88
86
|
*/
|
|
89
87
|
export function GatewayRequiredError({ gatewayOrigin, appId, }) {
|
|
90
|
-
const
|
|
91
|
-
|
|
88
|
+
const isLocalhost = window.location.hostname === "localhost";
|
|
89
|
+
const gatewayUrl = `${gatewayOrigin}/apps/${appId}${window.location.pathname}${isLocalhost ? "dev" : ""}`;
|
|
90
|
+
return (_jsxs("div", { style: styles.container, children: [_jsx("style", { children: CSS_VARIABLES }), _jsxs("div", { style: styles.content, children: [_jsx("div", { style: styles.iconContainer, children: _jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "var(--gateway-icon-stroke, oklch(55% 0.22 25))", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }) }), _jsx("h1", { style: styles.title, children: "Open in Gateway" }), _jsx("p", { style: styles.description, children: "The Gateway handles sign in and user auth. Access your app from there so this works properly." }), _jsxs("p", { style: styles.urlText, children: ["Go to", " ", _jsx("a", { href: gatewayUrl, style: styles.urlLink, children: gatewayUrl })] })] })] }));
|
|
92
91
|
}
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ const styles = {
|
|
|
50
50
|
colorScheme: "light dark",
|
|
51
51
|
} satisfies CSSProperties,
|
|
52
52
|
content: {
|
|
53
|
-
maxWidth: "
|
|
53
|
+
maxWidth: "520px",
|
|
54
54
|
width: "100%",
|
|
55
55
|
textAlign: "left",
|
|
56
56
|
} satisfies CSSProperties,
|
|
@@ -78,20 +78,17 @@ const styles = {
|
|
|
78
78
|
color: "var(--gateway-text-muted, oklch(40% 0 0))",
|
|
79
79
|
marginBottom: "20px",
|
|
80
80
|
} satisfies CSSProperties,
|
|
81
|
-
|
|
82
|
-
display: "inline-flex",
|
|
83
|
-
alignItems: "center",
|
|
84
|
-
gap: "8px",
|
|
81
|
+
urlText: {
|
|
85
82
|
fontSize: "14px",
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
lineHeight: 1.5,
|
|
84
|
+
color: "var(--gateway-text-muted, oklch(40% 0 0))",
|
|
85
|
+
wordBreak: "break-all",
|
|
86
|
+
} satisfies CSSProperties,
|
|
87
|
+
urlLink: {
|
|
88
88
|
color: "rgb(168, 162, 158)",
|
|
89
89
|
textDecoration: "underline",
|
|
90
90
|
textDecorationColor: "rgb(87, 83, 78)",
|
|
91
|
-
textUnderlineOffset: "
|
|
92
|
-
cursor: "pointer",
|
|
93
|
-
transition:
|
|
94
|
-
"color, background-color, border-color, text-decoration-color, fill, stroke 0.15s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
91
|
+
textUnderlineOffset: "2px",
|
|
95
92
|
} satisfies CSSProperties,
|
|
96
93
|
};
|
|
97
94
|
|
|
@@ -106,7 +103,8 @@ export function GatewayRequiredError({
|
|
|
106
103
|
gatewayOrigin,
|
|
107
104
|
appId,
|
|
108
105
|
}: GatewayRequiredErrorProps) {
|
|
109
|
-
const
|
|
106
|
+
const isLocalhost = window.location.hostname === "localhost";
|
|
107
|
+
const gatewayUrl = `${gatewayOrigin}/apps/${appId}${window.location.pathname}${isLocalhost ? "dev" : ""}`;
|
|
110
108
|
|
|
111
109
|
return (
|
|
112
110
|
<div style={styles.container}>
|
|
@@ -139,23 +137,13 @@ export function GatewayRequiredError({
|
|
|
139
137
|
so this works properly.
|
|
140
138
|
</p>
|
|
141
139
|
|
|
142
|
-
{/*
|
|
143
|
-
<
|
|
144
|
-
Go to
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
fill="none"
|
|
150
|
-
stroke="currentColor"
|
|
151
|
-
strokeWidth="2"
|
|
152
|
-
strokeLinecap="round"
|
|
153
|
-
strokeLinejoin="round"
|
|
154
|
-
>
|
|
155
|
-
<line x1="5" y1="12" x2="19" y2="12" />
|
|
156
|
-
<polyline points="12 5 19 12 12 19" />
|
|
157
|
-
</svg>
|
|
158
|
-
</a>
|
|
140
|
+
{/* URL Link */}
|
|
141
|
+
<p style={styles.urlText}>
|
|
142
|
+
Go to{" "}
|
|
143
|
+
<a href={gatewayUrl} style={styles.urlLink}>
|
|
144
|
+
{gatewayUrl}
|
|
145
|
+
</a>
|
|
146
|
+
</p>
|
|
159
147
|
</div>
|
|
160
148
|
</div>
|
|
161
149
|
);
|