@sylphx/sdk 0.3.2 → 0.3.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.
- package/README.md +15 -5
- package/dist/index.d.cts +16908 -5920
- package/dist/index.d.ts +16908 -5920
- package/dist/index.js +179 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +179 -142
- package/dist/index.mjs.map +1 -1
- package/dist/nextjs/index.d.cts +5378 -1202
- package/dist/nextjs/index.d.ts +5378 -1202
- package/dist/nextjs/index.js +78 -37
- package/dist/nextjs/index.js.map +1 -1
- package/dist/nextjs/index.mjs +76 -37
- package/dist/nextjs/index.mjs.map +1 -1
- package/dist/react/index.d.cts +5353 -1212
- package/dist/react/index.d.ts +5353 -1212
- package/dist/react/index.js +118 -96
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +118 -96
- package/dist/react/index.mjs.map +1 -1
- package/dist/server/index.d.cts +14368 -3312
- package/dist/server/index.d.ts +14368 -3312
- package/dist/server/index.js +82 -47
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +80 -47
- package/dist/server/index.mjs.map +1 -1
- package/dist/web-analytics.js +1 -1
- package/dist/web-analytics.js.map +1 -1
- package/dist/web-analytics.mjs +1 -1
- package/dist/web-analytics.mjs.map +1 -1
- package/package.json +3 -3
package/dist/react/index.mjs
CHANGED
|
@@ -16,13 +16,11 @@ var __export = (target, all) => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// src/constants.ts
|
|
19
|
-
var
|
|
19
|
+
var SDK_API_PATH, DEFAULT_SDK_API_HOST, SDK_VERSION, SDK_PLATFORM, DEFAULT_TIMEOUT_MS, TOKEN_EXPIRY_BUFFER_MS, SESSION_TOKEN_LIFETIME_SECONDS, SESSION_TOKEN_LIFETIME_MS, REFRESH_TOKEN_LIFETIME_SECONDS, FLAGS_CACHE_TTL_MS, FLAGS_STALE_WHILE_REVALIDATE_MS, MAX_RETRY_DELAY_MS, BASE_RETRY_DELAY_MS, MAX_RETRIES, ANALYTICS_SESSION_TIMEOUT_MS, WEBHOOK_MAX_AGE_MS, WEBHOOK_CLOCK_SKEW_MS, PKCE_CODE_TTL_MS, JOBS_DLQ_MAX_AGE_MS, SESSION_REPLAY_MAX_DURATION_MS, SESSION_REPLAY_UPLOAD_INTERVAL_MS, SESSION_REPLAY_RAGE_CLICK_WINDOW_MS, SESSION_REPLAY_DEAD_CLICK_TIMEOUT_MS, SESSION_REPLAY_SCROLL_HEAT_WINDOW_MS, SESSION_REPLAY_STATUS_CHECK_MS, ANALYTICS_FLUSH_INTERVAL_MS, ANALYTICS_FLUSH_TIMEOUT_MS, ANALYTICS_INTERVAL_CHECK_MS, ANALYTICS_RETRY_BASE_DELAY_MS, ANALYTICS_RETRY_MAX_DELAY_MS, ANALYTICS_RETRY_JITTER, ANALYTICS_MAX_RETRIES, FLAGS_EXPOSURE_DEDUPE_WINDOW_MS, FLAGS_STREAM_INITIAL_RECONNECT_MS, FLAGS_STREAM_MAX_RECONNECT_MS, FLAGS_STREAM_HEARTBEAT_TIMEOUT_MS, FLAGS_HTTP_POLLING_INTERVAL_MS, DEFAULT_RETRY_DELAYS_MS, JOB_DEFAULT_TIMEOUT_MS, STORAGE_KEY_PREFIX, FLAGS_CACHE_KEY, FLAGS_CACHE_TIMESTAMP_KEY, PKCE_STORAGE_PREFIX, STORAGE_TEST_KEY, ANALYTICS_SESSION_KEY, FLAGS_STORAGE_KEY, CLICK_ID_EXPIRY_MS, STALE_TIME_FREQUENT_MS, STALE_TIME_MODERATE_MS, STALE_TIME_STABLE_MS, STALE_TIME_STATS_MS, UI_COPY_FEEDBACK_MS, UI_FORM_SUCCESS_MS, UI_NOTIFICATION_MS, UI_PROMPT_DELAY_MS, UI_REDIRECT_DELAY_MS, EMAIL_RESEND_COOLDOWN_TICK_MS, NEW_USER_THRESHOLD_MS, WEB_VITALS_FCP_GOOD_MS, WEB_VITALS_FCP_POOR_MS, STORAGE_MULTIPART_THRESHOLD_BYTES, STORAGE_DEFAULT_MAX_SIZE_BYTES, STORAGE_AVATAR_MAX_SIZE_BYTES, STORAGE_LARGE_MAX_SIZE_BYTES, JWK_CACHE_TTL_MS, ANALYTICS_MAX_TRACKED_EVENT_IDS, ANALYTICS_TRACKED_IDS_KEEP, ANALYTICS_QUEUE_LIMIT, SESSION_REPLAY_CHECK_INTERVAL_MS, UI_SUCCESS_REDIRECT_MS, LOG_MESSAGE_MAX_LENGTH, DOM_SNAPSHOT_MAX_LENGTH, STACK_TRACE_MAX_LENGTH, CONSENT_WAIT_FOR_UPDATE_MS, MS_PER_MINUTE, MS_PER_HOUR, MS_PER_DAY, SECONDS_PER_MINUTE, SECONDS_PER_HOUR, Z_INDEX_OVERLAY, Z_INDEX_CRITICAL_OVERLAY, API_KEY_EXPIRY_1_DAY, API_KEY_EXPIRY_7_DAYS, API_KEY_EXPIRY_30_DAYS, API_KEY_EXPIRY_90_DAYS, API_KEY_EXPIRY_1_YEAR, WEB_VITALS_LCP_GOOD_MS, WEB_VITALS_LCP_POOR_MS, WEB_VITALS_INP_GOOD_MS, WEB_VITALS_INP_POOR_MS, WEB_VITALS_TTFB_GOOD_MS, WEB_VITALS_TTFB_POOR_MS, MIN_PASSWORD_LENGTH, DEFAULT_CONTEXT_WINDOW, ETAG_CACHE_TTL_MS;
|
|
20
20
|
var init_constants = __esm({
|
|
21
21
|
"src/constants.ts"() {
|
|
22
22
|
"use strict";
|
|
23
|
-
|
|
24
|
-
SDK_API_PATH = `/api/v1`;
|
|
25
|
-
SDK_API_PATH_NEW = `/v1`;
|
|
23
|
+
SDK_API_PATH = `/v1`;
|
|
26
24
|
DEFAULT_SDK_API_HOST = "api.sylphx.com";
|
|
27
25
|
SDK_VERSION = "0.1.0";
|
|
28
26
|
SDK_PLATFORM = typeof window !== "undefined" ? "browser" : typeof process !== "undefined" && process.versions?.node ? "node" : "unknown";
|
|
@@ -26965,6 +26963,7 @@ function AnimatedCheck({ className }) {
|
|
|
26965
26963
|
return /* @__PURE__ */ jsx20(
|
|
26966
26964
|
"svg",
|
|
26967
26965
|
{
|
|
26966
|
+
"aria-hidden": "true",
|
|
26968
26967
|
className: cn("h-4 w-4", className),
|
|
26969
26968
|
viewBox: "0 0 24 24",
|
|
26970
26969
|
fill: "none",
|
|
@@ -27026,13 +27025,7 @@ var Checkbox = forwardRef39(
|
|
|
27026
27025
|
"active:scale-95 motion-reduce:active:scale-100",
|
|
27027
27026
|
className
|
|
27028
27027
|
),
|
|
27029
|
-
children: /* @__PURE__ */ jsx20(
|
|
27030
|
-
index_parts_exports5.Indicator,
|
|
27031
|
-
{
|
|
27032
|
-
className: cn("flex items-center justify-center text-current"),
|
|
27033
|
-
children: isIndeterminate ? /* @__PURE__ */ jsx20(MinusIcon, {}) : /* @__PURE__ */ jsx20(AnimatedCheck, {})
|
|
27034
|
-
}
|
|
27035
|
-
)
|
|
27028
|
+
children: /* @__PURE__ */ jsx20(index_parts_exports5.Indicator, { className: cn("flex items-center justify-center text-current"), children: isIndeterminate ? /* @__PURE__ */ jsx20(MinusIcon, {}) : /* @__PURE__ */ jsx20(AnimatedCheck, {}) })
|
|
27036
27029
|
}
|
|
27037
27030
|
);
|
|
27038
27031
|
}
|
|
@@ -27042,6 +27035,7 @@ function MinusIcon({ className }) {
|
|
|
27042
27035
|
return /* @__PURE__ */ jsx20(
|
|
27043
27036
|
"svg",
|
|
27044
27037
|
{
|
|
27038
|
+
"aria-hidden": "true",
|
|
27045
27039
|
className: cn("h-4 w-4", className),
|
|
27046
27040
|
viewBox: "0 0 24 24",
|
|
27047
27041
|
fill: "none",
|
|
@@ -42141,7 +42135,7 @@ TooltipContent.displayName = "TooltipContent";
|
|
|
42141
42135
|
// ../ui/src/components/oauth-icons.tsx
|
|
42142
42136
|
import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
42143
42137
|
function GoogleIcon(props) {
|
|
42144
|
-
return /* @__PURE__ */ jsxs23("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: [
|
|
42138
|
+
return /* @__PURE__ */ jsxs23("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: [
|
|
42145
42139
|
/* @__PURE__ */ jsx41(
|
|
42146
42140
|
"path",
|
|
42147
42141
|
{
|
|
@@ -42173,19 +42167,19 @@ function GoogleIcon(props) {
|
|
|
42173
42167
|
] });
|
|
42174
42168
|
}
|
|
42175
42169
|
function GitHubIcon(props) {
|
|
42176
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" }) });
|
|
42170
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" }) });
|
|
42177
42171
|
}
|
|
42178
42172
|
function AppleIcon(props) {
|
|
42179
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) });
|
|
42173
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" }) });
|
|
42180
42174
|
}
|
|
42181
42175
|
function DiscordIcon(props) {
|
|
42182
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" }) });
|
|
42176
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" }) });
|
|
42183
42177
|
}
|
|
42184
42178
|
function TwitterIcon(props) {
|
|
42185
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) });
|
|
42179
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) });
|
|
42186
42180
|
}
|
|
42187
42181
|
function MicrosoftIcon(props) {
|
|
42188
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41(
|
|
42182
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41(
|
|
42189
42183
|
"path",
|
|
42190
42184
|
{
|
|
42191
42185
|
d: "M0 0h11.377v11.372H0zm12.623 0H24v11.372H12.623zM0 12.623h11.377V24H0zm12.623 0H24V24H12.623",
|
|
@@ -42194,16 +42188,16 @@ function MicrosoftIcon(props) {
|
|
|
42194
42188
|
) });
|
|
42195
42189
|
}
|
|
42196
42190
|
function FacebookIcon(props) {
|
|
42197
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }) });
|
|
42191
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" }) });
|
|
42198
42192
|
}
|
|
42199
42193
|
function LinkedInIcon(props) {
|
|
42200
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
|
|
42194
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
|
|
42201
42195
|
}
|
|
42202
42196
|
function TwitchIcon(props) {
|
|
42203
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z" }) });
|
|
42197
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z" }) });
|
|
42204
42198
|
}
|
|
42205
42199
|
function SpotifyIcon(props) {
|
|
42206
|
-
return /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z" }) });
|
|
42200
|
+
return /* @__PURE__ */ jsx41("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx41("path", { d: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z" }) });
|
|
42207
42201
|
}
|
|
42208
42202
|
var OAuthIcons = {
|
|
42209
42203
|
google: GoogleIcon,
|
|
@@ -43215,32 +43209,18 @@ function createConfig(input) {
|
|
|
43215
43209
|
}
|
|
43216
43210
|
secretKey = result.sanitizedKey;
|
|
43217
43211
|
}
|
|
43218
|
-
|
|
43219
|
-
|
|
43220
|
-
|
|
43221
|
-
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
);
|
|
43225
|
-
}
|
|
43226
|
-
}
|
|
43227
|
-
let platformUrl;
|
|
43228
|
-
let apiBasePath;
|
|
43229
|
-
if (input.platformUrl) {
|
|
43230
|
-
platformUrl = input.platformUrl.trim();
|
|
43231
|
-
apiBasePath = SDK_API_PATH;
|
|
43232
|
-
} else if (input.ref) {
|
|
43233
|
-
platformUrl = `https://${input.ref.trim()}.${DEFAULT_SDK_API_HOST}`;
|
|
43234
|
-
apiBasePath = SDK_API_PATH_NEW;
|
|
43235
|
-
} else {
|
|
43236
|
-
platformUrl = DEFAULT_PLATFORM_URL;
|
|
43237
|
-
apiBasePath = SDK_API_PATH;
|
|
43212
|
+
const trimmedRef = input.ref.trim();
|
|
43213
|
+
if (!REF_PATTERN.test(trimmedRef)) {
|
|
43214
|
+
throw new SylphxError(
|
|
43215
|
+
`[Sylphx] Invalid project ref format: "${input.ref}". Expected a 16-character lowercase alphanumeric string (e.g. "abc123def456ghij"). Get your ref from Platform Console \u2192 Projects \u2192 Your Project \u2192 Overview.`,
|
|
43216
|
+
{ code: "BAD_REQUEST" }
|
|
43217
|
+
);
|
|
43238
43218
|
}
|
|
43219
|
+
const baseUrl = `https://${trimmedRef}.${DEFAULT_SDK_API_HOST}${SDK_API_PATH}`;
|
|
43239
43220
|
return Object.freeze({
|
|
43240
43221
|
secretKey,
|
|
43241
|
-
|
|
43242
|
-
|
|
43243
|
-
apiBasePath,
|
|
43222
|
+
ref: trimmedRef,
|
|
43223
|
+
baseUrl,
|
|
43244
43224
|
accessToken: input.accessToken
|
|
43245
43225
|
});
|
|
43246
43226
|
}
|
|
@@ -43257,9 +43237,9 @@ function buildHeaders(config2) {
|
|
|
43257
43237
|
return headers;
|
|
43258
43238
|
}
|
|
43259
43239
|
function buildApiUrl(config2, path) {
|
|
43260
|
-
const base = config2.
|
|
43240
|
+
const base = config2.baseUrl.replace(/\/$/, "");
|
|
43261
43241
|
const cleanPath = path.startsWith("/") ? path : `/${path}`;
|
|
43262
|
-
return `${base}${
|
|
43242
|
+
return `${base}${cleanPath}`;
|
|
43263
43243
|
}
|
|
43264
43244
|
async function callApi(config2, path, options = {}) {
|
|
43265
43245
|
const {
|
|
@@ -43834,7 +43814,7 @@ var stylesInjected = false;
|
|
|
43834
43814
|
function injectGlobalStyles() {
|
|
43835
43815
|
if (stylesInjected || typeof document === "undefined") return;
|
|
43836
43816
|
const style = document.createElement("style");
|
|
43837
|
-
style.id = "sylphx-
|
|
43817
|
+
style.id = "sylphx-runtime-styles";
|
|
43838
43818
|
style.textContent = `
|
|
43839
43819
|
@keyframes sylphx-spin {
|
|
43840
43820
|
to { transform: rotate(360deg); }
|
|
@@ -44656,10 +44636,9 @@ function useOrganization() {
|
|
|
44656
44636
|
const [isLoading, setIsLoading] = useState50(true);
|
|
44657
44637
|
const [error2, setError] = useState50(null);
|
|
44658
44638
|
const channelRef = useRef79(null);
|
|
44659
|
-
const config2 = platform3 ? createConfig({
|
|
44639
|
+
const config2 = platform3?.ref ? createConfig({
|
|
44660
44640
|
secretKey: platform3.appId,
|
|
44661
|
-
|
|
44662
|
-
platformUrl: platform3.platformUrl
|
|
44641
|
+
ref: platform3.ref
|
|
44663
44642
|
}) : null;
|
|
44664
44643
|
const getStoredOrgSlug = useCallback41(() => {
|
|
44665
44644
|
if (typeof window === "undefined") return null;
|
|
@@ -44776,7 +44755,7 @@ function useOrganization() {
|
|
|
44776
44755
|
return () => {
|
|
44777
44756
|
mounted = false;
|
|
44778
44757
|
};
|
|
44779
|
-
}, [config2?.
|
|
44758
|
+
}, [config2?.baseUrl, getStoredOrgSlug, selectOrganization, organization, config2]);
|
|
44780
44759
|
const hasPermission = useCallback41(
|
|
44781
44760
|
(permission) => {
|
|
44782
44761
|
if (!role) return false;
|
|
@@ -45294,7 +45273,7 @@ function BillingCardInner({
|
|
|
45294
45273
|
);
|
|
45295
45274
|
}
|
|
45296
45275
|
if (!isPremium && showUpgradeCta) {
|
|
45297
|
-
const highlightPlan = plans.find((p2) => p2.slug === "pro") || plans.find((p2) => (p2.
|
|
45276
|
+
const highlightPlan = plans.find((p2) => p2.slug === "pro") || plans.find((p2) => (p2.monthlyPrice ?? 0) > 0);
|
|
45298
45277
|
return /* @__PURE__ */ jsx44("div", { style: styles2.card, className, children: /* @__PURE__ */ jsxs25("div", { style: styles2.cardContent, children: [
|
|
45299
45278
|
/* @__PURE__ */ jsxs25("div", { style: styles2.flexBetween, children: [
|
|
45300
45279
|
/* @__PURE__ */ jsxs25("div", { children: [
|
|
@@ -45562,6 +45541,8 @@ function CrownIcon({ color: color2, size: size4 = 24 }) {
|
|
|
45562
45541
|
return /* @__PURE__ */ jsx44(
|
|
45563
45542
|
"svg",
|
|
45564
45543
|
{
|
|
45544
|
+
"aria-hidden": "true",
|
|
45545
|
+
focusable: "false",
|
|
45565
45546
|
width: size4,
|
|
45566
45547
|
height: size4,
|
|
45567
45548
|
viewBox: "0 0 24 24",
|
|
@@ -45576,6 +45557,8 @@ function SparklesIcon({ size: size4 = 24 }) {
|
|
|
45576
45557
|
return /* @__PURE__ */ jsxs25(
|
|
45577
45558
|
"svg",
|
|
45578
45559
|
{
|
|
45560
|
+
"aria-hidden": "true",
|
|
45561
|
+
focusable: "false",
|
|
45579
45562
|
width: size4,
|
|
45580
45563
|
height: size4,
|
|
45581
45564
|
viewBox: "0 0 24 24",
|
|
@@ -45599,6 +45582,8 @@ function CheckIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
45599
45582
|
return /* @__PURE__ */ jsx44(
|
|
45600
45583
|
"svg",
|
|
45601
45584
|
{
|
|
45585
|
+
"aria-hidden": "true",
|
|
45586
|
+
focusable: "false",
|
|
45602
45587
|
width: size4,
|
|
45603
45588
|
height: size4,
|
|
45604
45589
|
viewBox: "0 0 24 24",
|
|
@@ -45616,6 +45601,8 @@ function ClockIcon({ color: color2, size: size4 = 24 }) {
|
|
|
45616
45601
|
return /* @__PURE__ */ jsxs25(
|
|
45617
45602
|
"svg",
|
|
45618
45603
|
{
|
|
45604
|
+
"aria-hidden": "true",
|
|
45605
|
+
focusable: "false",
|
|
45619
45606
|
width: size4,
|
|
45620
45607
|
height: size4,
|
|
45621
45608
|
viewBox: "0 0 24 24",
|
|
@@ -45636,6 +45623,8 @@ function AlertIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
45636
45623
|
return /* @__PURE__ */ jsxs25(
|
|
45637
45624
|
"svg",
|
|
45638
45625
|
{
|
|
45626
|
+
"aria-hidden": "true",
|
|
45627
|
+
focusable: "false",
|
|
45639
45628
|
width: size4,
|
|
45640
45629
|
height: size4,
|
|
45641
45630
|
viewBox: "0 0 24 24",
|
|
@@ -45657,6 +45646,8 @@ function SettingsIcon({ size: size4 = 24 }) {
|
|
|
45657
45646
|
return /* @__PURE__ */ jsxs25(
|
|
45658
45647
|
"svg",
|
|
45659
45648
|
{
|
|
45649
|
+
"aria-hidden": "true",
|
|
45650
|
+
focusable: "false",
|
|
45660
45651
|
width: size4,
|
|
45661
45652
|
height: size4,
|
|
45662
45653
|
viewBox: "0 0 24 24",
|
|
@@ -46857,13 +46848,16 @@ function MembersListInner({
|
|
|
46857
46848
|
},
|
|
46858
46849
|
children: [
|
|
46859
46850
|
visibleMembers.map((member) => /* @__PURE__ */ jsxs30("div", { style: memberItemStyles, children: [
|
|
46860
|
-
member.image ?
|
|
46861
|
-
|
|
46862
|
-
|
|
46863
|
-
|
|
46864
|
-
|
|
46865
|
-
|
|
46866
|
-
|
|
46851
|
+
member.image ? (
|
|
46852
|
+
// biome-ignore lint/performance/noImgElement: SDK package — Next.js Image not available
|
|
46853
|
+
/* @__PURE__ */ jsx49(
|
|
46854
|
+
"img",
|
|
46855
|
+
{
|
|
46856
|
+
src: member.image,
|
|
46857
|
+
alt: member.name || member.email,
|
|
46858
|
+
style: { ...avatarStyles, objectFit: "cover" }
|
|
46859
|
+
}
|
|
46860
|
+
)
|
|
46867
46861
|
) : /* @__PURE__ */ jsx49("div", { style: avatarStyles, children: (member.name || member.email).charAt(0).toUpperCase() }),
|
|
46868
46862
|
/* @__PURE__ */ jsxs30("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
46869
46863
|
/* @__PURE__ */ jsxs30(
|
|
@@ -46912,7 +46906,7 @@ function MembersListInner({
|
|
|
46912
46906
|
}
|
|
46913
46907
|
)
|
|
46914
46908
|
] }),
|
|
46915
|
-
editingMember === member.
|
|
46909
|
+
editingMember === member.userId ? /* @__PURE__ */ jsx49(
|
|
46916
46910
|
RoleSelector,
|
|
46917
46911
|
{
|
|
46918
46912
|
currentRole: member.role,
|
|
@@ -46921,7 +46915,7 @@ function MembersListInner({
|
|
|
46921
46915
|
isLoading: actionLoading === member.userId,
|
|
46922
46916
|
theme
|
|
46923
46917
|
}
|
|
46924
|
-
) : confirmingRemove === member.
|
|
46918
|
+
) : confirmingRemove === member.userId ? /* @__PURE__ */ jsxs30("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
|
|
46925
46919
|
/* @__PURE__ */ jsx49(
|
|
46926
46920
|
"button",
|
|
46927
46921
|
{
|
|
@@ -46960,15 +46954,15 @@ function MembersListInner({
|
|
|
46960
46954
|
MemberActions,
|
|
46961
46955
|
{
|
|
46962
46956
|
member,
|
|
46963
|
-
onEditRole: () => setEditingMember(member.
|
|
46964
|
-
onRemove: () => setConfirmingRemove(member.
|
|
46957
|
+
onEditRole: () => setEditingMember(member.userId),
|
|
46958
|
+
onRemove: () => setConfirmingRemove(member.userId),
|
|
46965
46959
|
theme
|
|
46966
46960
|
}
|
|
46967
46961
|
)
|
|
46968
46962
|
]
|
|
46969
46963
|
}
|
|
46970
46964
|
)
|
|
46971
|
-
] }, member.
|
|
46965
|
+
] }, member.userId)),
|
|
46972
46966
|
hasMore && /* @__PURE__ */ jsx49(
|
|
46973
46967
|
"button",
|
|
46974
46968
|
{
|
|
@@ -47095,13 +47089,20 @@ function MemberActions({
|
|
|
47095
47089
|
),
|
|
47096
47090
|
isOpen && /* @__PURE__ */ jsxs30(Fragment23, { children: [
|
|
47097
47091
|
/* @__PURE__ */ jsx49(
|
|
47098
|
-
"
|
|
47092
|
+
"button",
|
|
47099
47093
|
{
|
|
47094
|
+
type: "button",
|
|
47095
|
+
"aria-label": "Close dropdown",
|
|
47100
47096
|
style: {
|
|
47101
47097
|
position: "fixed",
|
|
47102
47098
|
inset: 0,
|
|
47103
|
-
zIndex: 40
|
|
47099
|
+
zIndex: 40,
|
|
47100
|
+
background: "transparent",
|
|
47101
|
+
border: "none",
|
|
47102
|
+
padding: 0,
|
|
47103
|
+
cursor: "default"
|
|
47104
47104
|
},
|
|
47105
|
+
tabIndex: -1,
|
|
47105
47106
|
onClick: () => setIsOpen(false)
|
|
47106
47107
|
}
|
|
47107
47108
|
),
|
|
@@ -47186,6 +47187,8 @@ function PlusIcon({ size: size4 = 24 }) {
|
|
|
47186
47187
|
return /* @__PURE__ */ jsx49(
|
|
47187
47188
|
"svg",
|
|
47188
47189
|
{
|
|
47190
|
+
"aria-hidden": "true",
|
|
47191
|
+
focusable: "false",
|
|
47189
47192
|
width: size4,
|
|
47190
47193
|
height: size4,
|
|
47191
47194
|
viewBox: "0 0 24 24",
|
|
@@ -47202,6 +47205,8 @@ function MoreIcon() {
|
|
|
47202
47205
|
return /* @__PURE__ */ jsxs30(
|
|
47203
47206
|
"svg",
|
|
47204
47207
|
{
|
|
47208
|
+
"aria-hidden": "true",
|
|
47209
|
+
focusable: "false",
|
|
47205
47210
|
width: "16",
|
|
47206
47211
|
height: "16",
|
|
47207
47212
|
viewBox: "0 0 24 24",
|
|
@@ -47222,6 +47227,8 @@ function EditIcon({ size: size4 = 24 }) {
|
|
|
47222
47227
|
return /* @__PURE__ */ jsx49(
|
|
47223
47228
|
"svg",
|
|
47224
47229
|
{
|
|
47230
|
+
"aria-hidden": "true",
|
|
47231
|
+
focusable: "false",
|
|
47225
47232
|
width: size4,
|
|
47226
47233
|
height: size4,
|
|
47227
47234
|
viewBox: "0 0 24 24",
|
|
@@ -47238,6 +47245,8 @@ function TrashIcon({ size: size4 = 24, color: color2 = "currentColor" }) {
|
|
|
47238
47245
|
return /* @__PURE__ */ jsxs30(
|
|
47239
47246
|
"svg",
|
|
47240
47247
|
{
|
|
47248
|
+
"aria-hidden": "true",
|
|
47249
|
+
focusable: "false",
|
|
47241
47250
|
width: size4,
|
|
47242
47251
|
height: size4,
|
|
47243
47252
|
viewBox: "0 0 24 24",
|
|
@@ -47790,18 +47799,18 @@ function PricingTableInner({
|
|
|
47790
47799
|
const getPlanPrice = (plan, int2) => {
|
|
47791
47800
|
switch (int2) {
|
|
47792
47801
|
case "monthly":
|
|
47793
|
-
return plan.
|
|
47802
|
+
return plan.monthlyPrice || 0;
|
|
47794
47803
|
case "annual":
|
|
47795
|
-
return plan.
|
|
47804
|
+
return plan.annualPrice || 0;
|
|
47796
47805
|
case "lifetime":
|
|
47797
|
-
return plan.
|
|
47806
|
+
return plan.lifetimePrice || 0;
|
|
47798
47807
|
default:
|
|
47799
47808
|
return 0;
|
|
47800
47809
|
}
|
|
47801
47810
|
};
|
|
47802
47811
|
const getAnnualSavings = (plan) => {
|
|
47803
|
-
const monthly = plan.
|
|
47804
|
-
const annual = plan.
|
|
47812
|
+
const monthly = plan.monthlyPrice || 0;
|
|
47813
|
+
const annual = plan.annualPrice || 0;
|
|
47805
47814
|
if (monthly > 0 && annual > 0) {
|
|
47806
47815
|
const yearlyFromMonthly = monthly * 12;
|
|
47807
47816
|
const savings = Math.round((yearlyFromMonthly - annual) / yearlyFromMonthly * 100);
|
|
@@ -48064,6 +48073,8 @@ function CheckIcon6({ color: color2, size: size4 = 24 }) {
|
|
|
48064
48073
|
return /* @__PURE__ */ jsx51(
|
|
48065
48074
|
"svg",
|
|
48066
48075
|
{
|
|
48076
|
+
"aria-hidden": "true",
|
|
48077
|
+
focusable: "false",
|
|
48067
48078
|
width: size4,
|
|
48068
48079
|
height: size4,
|
|
48069
48080
|
viewBox: "0 0 24 24",
|
|
@@ -48081,6 +48092,8 @@ function XIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
48081
48092
|
return /* @__PURE__ */ jsxs32(
|
|
48082
48093
|
"svg",
|
|
48083
48094
|
{
|
|
48095
|
+
"aria-hidden": "true",
|
|
48096
|
+
focusable: "false",
|
|
48084
48097
|
width: size4,
|
|
48085
48098
|
height: size4,
|
|
48086
48099
|
viewBox: "0 0 24 24",
|
|
@@ -48101,6 +48114,8 @@ function RefreshIcon({ color: color2, size: size4 = 24 }) {
|
|
|
48101
48114
|
return /* @__PURE__ */ jsxs32(
|
|
48102
48115
|
"svg",
|
|
48103
48116
|
{
|
|
48117
|
+
"aria-hidden": "true",
|
|
48118
|
+
focusable: "false",
|
|
48104
48119
|
width: size4,
|
|
48105
48120
|
height: size4,
|
|
48106
48121
|
viewBox: "0 0 24 24",
|
|
@@ -52637,7 +52652,7 @@ function useTaskRun(runId, options) {
|
|
|
52637
52652
|
} = options ?? {};
|
|
52638
52653
|
const platformCtx = useContext77(PlatformContext);
|
|
52639
52654
|
const appId = platformCtx?.appId ?? "";
|
|
52640
|
-
const platformUrl = customPlatformUrl ?? platformCtx?.platformUrl ??
|
|
52655
|
+
const platformUrl = customPlatformUrl ?? platformCtx?.platformUrl ?? `https://${DEFAULT_SDK_API_HOST}`;
|
|
52641
52656
|
const [run, setRun] = useState74(null);
|
|
52642
52657
|
const [loading, setLoading] = useState74(!!runId);
|
|
52643
52658
|
const [error2, setError] = useState74(null);
|
|
@@ -53617,6 +53632,7 @@ import { jsx as jsx64 } from "react/jsx-runtime";
|
|
|
53617
53632
|
function SylphxProvider({
|
|
53618
53633
|
children,
|
|
53619
53634
|
appId,
|
|
53635
|
+
projectRef: providedRef,
|
|
53620
53636
|
platformUrl: providedPlatformUrl,
|
|
53621
53637
|
afterSignOutUrl = "/",
|
|
53622
53638
|
vapidPublicKey,
|
|
@@ -53640,6 +53656,7 @@ function SylphxProvider({
|
|
|
53640
53656
|
SylphxProviderInner,
|
|
53641
53657
|
{
|
|
53642
53658
|
appId,
|
|
53659
|
+
projectRef: providedRef,
|
|
53643
53660
|
platformUrl: providedPlatformUrl,
|
|
53644
53661
|
afterSignOutUrl,
|
|
53645
53662
|
vapidPublicKey,
|
|
@@ -53654,6 +53671,7 @@ function SylphxProvider({
|
|
|
53654
53671
|
function SylphxProviderInner({
|
|
53655
53672
|
children,
|
|
53656
53673
|
appId: appIdProp,
|
|
53674
|
+
projectRef: providedRef,
|
|
53657
53675
|
platformUrl: providedPlatformUrl,
|
|
53658
53676
|
afterSignOutUrl = "/",
|
|
53659
53677
|
vapidPublicKey,
|
|
@@ -53663,7 +53681,7 @@ function SylphxProviderInner({
|
|
|
53663
53681
|
authPrefix = "/auth"
|
|
53664
53682
|
}) {
|
|
53665
53683
|
const appId = validateAndSanitizeAppId(appIdProp);
|
|
53666
|
-
const platformUrl = providedPlatformUrl?.trim() ||
|
|
53684
|
+
const platformUrl = providedRef ? `https://${providedRef}.${DEFAULT_SDK_API_HOST}` : providedPlatformUrl?.trim() || `https://${DEFAULT_SDK_API_HOST}`;
|
|
53667
53685
|
const storage2 = useMemo127(() => new SylphxStorage(appId), [appId]);
|
|
53668
53686
|
const [anonymousId, setAnonymousId] = useState77("");
|
|
53669
53687
|
useEffect63(() => {
|
|
@@ -53738,13 +53756,11 @@ function SylphxProviderInner({
|
|
|
53738
53756
|
}
|
|
53739
53757
|
const wasAnonymous = !prevIsSignedIn.current;
|
|
53740
53758
|
const isNowAuthenticated = authState.isSignedIn && authState.user?.id;
|
|
53741
|
-
if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId) {
|
|
53742
|
-
const config3 = {
|
|
53743
|
-
appId,
|
|
53744
|
-
|
|
53745
|
-
|
|
53746
|
-
// Will use cookie auth via middleware
|
|
53747
|
-
};
|
|
53759
|
+
if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId && providedRef) {
|
|
53760
|
+
const config3 = createConfig({
|
|
53761
|
+
secretKey: appId,
|
|
53762
|
+
ref: providedRef
|
|
53763
|
+
});
|
|
53748
53764
|
linkAnonymousConsents(config3, {
|
|
53749
53765
|
userId: authState.user.id,
|
|
53750
53766
|
anonymousId
|
|
@@ -53759,8 +53775,8 @@ function SylphxProviderInner({
|
|
|
53759
53775
|
authState.user?.id,
|
|
53760
53776
|
anonymousId,
|
|
53761
53777
|
appId,
|
|
53762
|
-
|
|
53763
|
-
|
|
53778
|
+
authState.user,
|
|
53779
|
+
providedRef
|
|
53764
53780
|
]);
|
|
53765
53781
|
const api = useMemo127(
|
|
53766
53782
|
() => createRestApi({
|
|
@@ -55019,7 +55035,7 @@ function SylphxProviderInner({
|
|
|
55019
55035
|
const controller = new AbortController();
|
|
55020
55036
|
return {
|
|
55021
55037
|
[Symbol.asyncIterator]: async function* () {
|
|
55022
|
-
const response = await fetch(`${platformUrl}/
|
|
55038
|
+
const response = await fetch(`${platformUrl}/v1/chat/completions`, {
|
|
55023
55039
|
method: "POST",
|
|
55024
55040
|
headers: {
|
|
55025
55041
|
"Content-Type": "application/json",
|
|
@@ -55356,7 +55372,7 @@ function SylphxProviderInner({
|
|
|
55356
55372
|
...authState.user?.id && { userId: authState.user.id },
|
|
55357
55373
|
anonymousId,
|
|
55358
55374
|
limit: options?.limit?.toString(),
|
|
55359
|
-
|
|
55375
|
+
cursor: options?.cursor
|
|
55360
55376
|
});
|
|
55361
55377
|
}
|
|
55362
55378
|
}),
|
|
@@ -55987,6 +56003,7 @@ function SylphxProviderInner({
|
|
|
55987
56003
|
() => ({
|
|
55988
56004
|
appId,
|
|
55989
56005
|
platformUrl,
|
|
56006
|
+
ref: providedRef,
|
|
55990
56007
|
anonymousId,
|
|
55991
56008
|
queryClient,
|
|
55992
56009
|
clickIds,
|
|
@@ -56118,7 +56135,8 @@ function SylphxProviderInner({
|
|
|
56118
56135
|
submitScore,
|
|
56119
56136
|
getAchievements,
|
|
56120
56137
|
unlockAchievement,
|
|
56121
|
-
incrementAchievementProgress
|
|
56138
|
+
incrementAchievementProgress,
|
|
56139
|
+
providedRef
|
|
56122
56140
|
]
|
|
56123
56141
|
);
|
|
56124
56142
|
return /* @__PURE__ */ jsx64(AuthContext.Provider, { value: authValue, children: /* @__PURE__ */ jsx64(SdkAuthContext.Provider, { value: sdkAuthValue, children: /* @__PURE__ */ jsx64(UserContext.Provider, { value: userValue, children: /* @__PURE__ */ jsx64(SecurityContext.Provider, { value: securityValue, children: /* @__PURE__ */ jsx64(PlatformContext.Provider, { value: platformValue, children: /* @__PURE__ */ jsx64(StorageContext.Provider, { value: storageValue, children: /* @__PURE__ */ jsx64(AIContext.Provider, { value: aiValue, children: /* @__PURE__ */ jsx64(TasksContext.Provider, { value: tasksValue, children: /* @__PURE__ */ jsx64(MonitoringContext.Provider, { value: monitoringValue, children: /* @__PURE__ */ jsx64(ConsentContext.Provider, { value: consentValue, children: /* @__PURE__ */ jsx64(DatabaseContext.Provider, { value: databaseValue, children: /* @__PURE__ */ jsx64(EmailContext.Provider, { value: emailValue, children: /* @__PURE__ */ jsx64(NewsletterContext.Provider, { value: newsletterValue, children: /* @__PURE__ */ jsx64(WebhooksContext.Provider, { value: webhooksValue, children }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
@@ -59122,11 +59140,11 @@ function BillingSectionInner({
|
|
|
59122
59140
|
plans,
|
|
59123
59141
|
isLoading,
|
|
59124
59142
|
error: billingError,
|
|
59125
|
-
isPremium,
|
|
59126
|
-
isTrialing,
|
|
59143
|
+
isPremium: _isPremium,
|
|
59144
|
+
isTrialing: _isTrialing,
|
|
59127
59145
|
createCheckout,
|
|
59128
59146
|
openPortal,
|
|
59129
|
-
refresh
|
|
59147
|
+
refresh: _refresh
|
|
59130
59148
|
} = useBilling();
|
|
59131
59149
|
const styles2 = baseStyles(theme);
|
|
59132
59150
|
const [selectedInterval, setSelectedInterval] = useState84("monthly");
|
|
@@ -59270,7 +59288,7 @@ function BillingSectionInner({
|
|
|
59270
59288
|
/* @__PURE__ */ jsx69("div", { style: mergeStyles(styles2.textXs, styles2.textMuted), children: "Amount" }),
|
|
59271
59289
|
/* @__PURE__ */ jsxs46("div", { style: { fontWeight: 500, marginTop: "0.25rem" }, children: [
|
|
59272
59290
|
formatPrice(
|
|
59273
|
-
subscription.interval === "monthly" ? plans.find((p2) => p2.slug === subscription.planSlug)?.
|
|
59291
|
+
subscription.interval === "monthly" ? plans.find((p2) => p2.slug === subscription.planSlug)?.monthlyPrice : plans.find((p2) => p2.slug === subscription.planSlug)?.annualPrice
|
|
59274
59292
|
),
|
|
59275
59293
|
subscription.interval !== "lifetime" && `/${subscription.interval === "monthly" ? "mo" : "yr"}`
|
|
59276
59294
|
] })
|
|
@@ -59360,7 +59378,7 @@ function BillingSectionInner({
|
|
|
59360
59378
|
},
|
|
59361
59379
|
children: plans.map((plan) => {
|
|
59362
59380
|
const isCurrentPlan = subscription?.planSlug === plan.slug;
|
|
59363
|
-
const price = selectedInterval === "monthly" ? plan.
|
|
59381
|
+
const price = selectedInterval === "monthly" ? plan.monthlyPrice : plan.annualPrice;
|
|
59364
59382
|
return /* @__PURE__ */ jsxs46(
|
|
59365
59383
|
"div",
|
|
59366
59384
|
{
|
|
@@ -59479,6 +59497,8 @@ function CreditCardIcon2({ size: size4 = 24 }) {
|
|
|
59479
59497
|
return /* @__PURE__ */ jsxs46(
|
|
59480
59498
|
"svg",
|
|
59481
59499
|
{
|
|
59500
|
+
"aria-hidden": "true",
|
|
59501
|
+
focusable: "false",
|
|
59482
59502
|
width: size4,
|
|
59483
59503
|
height: size4,
|
|
59484
59504
|
viewBox: "0 0 24 24",
|
|
@@ -59498,6 +59518,8 @@ function CheckIcon11({ color: color2 }) {
|
|
|
59498
59518
|
return /* @__PURE__ */ jsx69(
|
|
59499
59519
|
"svg",
|
|
59500
59520
|
{
|
|
59521
|
+
"aria-hidden": "true",
|
|
59522
|
+
focusable: "false",
|
|
59501
59523
|
width: "16",
|
|
59502
59524
|
height: "16",
|
|
59503
59525
|
viewBox: "0 0 24 24",
|
|
@@ -69411,7 +69433,7 @@ var ErrorTracker = class {
|
|
|
69411
69433
|
values: getBreadcrumbs()
|
|
69412
69434
|
},
|
|
69413
69435
|
sdk: {
|
|
69414
|
-
name: "sylphx-
|
|
69436
|
+
name: "sylphx-runtime",
|
|
69415
69437
|
version: "1.0.0",
|
|
69416
69438
|
integrations: this.getIntegrations()
|
|
69417
69439
|
}
|
|
@@ -69469,7 +69491,7 @@ var ErrorTracker = class {
|
|
|
69469
69491
|
values: getBreadcrumbs()
|
|
69470
69492
|
},
|
|
69471
69493
|
sdk: {
|
|
69472
|
-
name: "sylphx-
|
|
69494
|
+
name: "sylphx-runtime",
|
|
69473
69495
|
version: "1.0.0"
|
|
69474
69496
|
}
|
|
69475
69497
|
};
|
|
@@ -77688,7 +77710,7 @@ var AnalyticsTracker = class {
|
|
|
77688
77710
|
properties: mergedProperties,
|
|
77689
77711
|
distinct_id: this.getDistinctId(),
|
|
77690
77712
|
timestamp,
|
|
77691
|
-
$lib: "sylphx-
|
|
77713
|
+
$lib: "sylphx-runtime",
|
|
77692
77714
|
$lib_version: "1.0.0"
|
|
77693
77715
|
};
|
|
77694
77716
|
}
|
|
@@ -79360,7 +79382,7 @@ function useRealtime(channel, options = {}) {
|
|
|
79360
79382
|
const reconnectTimeoutRef = useRef103(null);
|
|
79361
79383
|
const reconnectAttemptRef = useRef103(0);
|
|
79362
79384
|
const mountedRef = useRef103(true);
|
|
79363
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
79385
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79364
79386
|
const buildUrl = useCallback83(() => {
|
|
79365
79387
|
const url = new URL(`${platformUrl}${SDK_API_PATH}/realtime/subscribe`);
|
|
79366
79388
|
url.searchParams.set("channel", channel);
|
|
@@ -79554,7 +79576,7 @@ function useRealtimeChannels(channels, options = {}) {
|
|
|
79554
79576
|
const [statuses, setStatuses] = useState108({});
|
|
79555
79577
|
const platformContext = useContext83(PlatformContext);
|
|
79556
79578
|
const appId = platformContext?.appId || "";
|
|
79557
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
79579
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79558
79580
|
const lastAcksRef = useRef103({});
|
|
79559
79581
|
const eventSourcesRef = useRef103({});
|
|
79560
79582
|
const mountedRef = useRef103(true);
|
|
@@ -79691,7 +79713,7 @@ function useKv(options = {}) {
|
|
|
79691
79713
|
const { platformUrl: customPlatformUrl } = options;
|
|
79692
79714
|
const platformContext = useContext84(PlatformContext);
|
|
79693
79715
|
const appId = platformContext?.appId || "";
|
|
79694
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
79716
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79695
79717
|
const headers = useMemo133(
|
|
79696
79718
|
() => ({
|
|
79697
79719
|
"Content-Type": "application/json",
|