@sylphx/sdk 0.3.1 → 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 +25728 -0
- package/dist/index.d.ts +25728 -0
- 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 +6237 -0
- package/dist/nextjs/index.d.ts +6237 -0
- 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 +19579 -0
- package/dist/react/index.d.ts +19579 -0
- 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 +20930 -0
- package/dist/server/index.d.ts +20930 -0
- 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.d.cts +90 -0
- package/dist/web-analytics.d.ts +90 -0
- 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 -5
package/dist/react/index.js
CHANGED
|
@@ -32,13 +32,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
33
|
|
|
34
34
|
// src/constants.ts
|
|
35
|
-
var
|
|
35
|
+
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;
|
|
36
36
|
var init_constants = __esm({
|
|
37
37
|
"src/constants.ts"() {
|
|
38
38
|
"use strict";
|
|
39
|
-
|
|
40
|
-
SDK_API_PATH = `/api/v1`;
|
|
41
|
-
SDK_API_PATH_NEW = `/v1`;
|
|
39
|
+
SDK_API_PATH = `/v1`;
|
|
42
40
|
DEFAULT_SDK_API_HOST = "api.sylphx.com";
|
|
43
41
|
SDK_VERSION = "0.1.0";
|
|
44
42
|
SDK_PLATFORM = typeof window !== "undefined" ? "browser" : typeof process !== "undefined" && process.versions?.node ? "node" : "unknown";
|
|
@@ -27297,6 +27295,7 @@ function AnimatedCheck({ className }) {
|
|
|
27297
27295
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
27298
27296
|
"svg",
|
|
27299
27297
|
{
|
|
27298
|
+
"aria-hidden": "true",
|
|
27300
27299
|
className: cn("h-4 w-4", className),
|
|
27301
27300
|
viewBox: "0 0 24 24",
|
|
27302
27301
|
fill: "none",
|
|
@@ -27358,13 +27357,7 @@ var Checkbox = (0, import_react45.forwardRef)(
|
|
|
27358
27357
|
"active:scale-95 motion-reduce:active:scale-100",
|
|
27359
27358
|
className
|
|
27360
27359
|
),
|
|
27361
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
27362
|
-
index_parts_exports5.Indicator,
|
|
27363
|
-
{
|
|
27364
|
-
className: cn("flex items-center justify-center text-current"),
|
|
27365
|
-
children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MinusIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AnimatedCheck, {})
|
|
27366
|
-
}
|
|
27367
|
-
)
|
|
27360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(index_parts_exports5.Indicator, { className: cn("flex items-center justify-center text-current"), children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MinusIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AnimatedCheck, {}) })
|
|
27368
27361
|
}
|
|
27369
27362
|
);
|
|
27370
27363
|
}
|
|
@@ -27374,6 +27367,7 @@ function MinusIcon({ className }) {
|
|
|
27374
27367
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
27375
27368
|
"svg",
|
|
27376
27369
|
{
|
|
27370
|
+
"aria-hidden": "true",
|
|
27377
27371
|
className: cn("h-4 w-4", className),
|
|
27378
27372
|
viewBox: "0 0 24 24",
|
|
27379
27373
|
fill: "none",
|
|
@@ -42467,7 +42461,7 @@ TooltipContent.displayName = "TooltipContent";
|
|
|
42467
42461
|
// ../ui/src/components/oauth-icons.tsx
|
|
42468
42462
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
42469
42463
|
function GoogleIcon(props) {
|
|
42470
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: [
|
|
42464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: [
|
|
42471
42465
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
42472
42466
|
"path",
|
|
42473
42467
|
{
|
|
@@ -42499,19 +42493,19 @@ function GoogleIcon(props) {
|
|
|
42499
42493
|
] });
|
|
42500
42494
|
}
|
|
42501
42495
|
function GitHubIcon(props) {
|
|
42502
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42503
42497
|
}
|
|
42504
42498
|
function AppleIcon(props) {
|
|
42505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42506
42500
|
}
|
|
42507
42501
|
function DiscordIcon(props) {
|
|
42508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42509
42503
|
}
|
|
42510
42504
|
function TwitterIcon(props) {
|
|
42511
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42512
42506
|
}
|
|
42513
42507
|
function MicrosoftIcon(props) {
|
|
42514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
42508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
42515
42509
|
"path",
|
|
42516
42510
|
{
|
|
42517
42511
|
d: "M0 0h11.377v11.372H0zm12.623 0H24v11.372H12.623zM0 12.623h11.377V24H0zm12.623 0H24V24H12.623",
|
|
@@ -42520,16 +42514,16 @@ function MicrosoftIcon(props) {
|
|
|
42520
42514
|
) });
|
|
42521
42515
|
}
|
|
42522
42516
|
function FacebookIcon(props) {
|
|
42523
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42524
42518
|
}
|
|
42525
42519
|
function LinkedInIcon(props) {
|
|
42526
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42527
42521
|
}
|
|
42528
42522
|
function TwitchIcon(props) {
|
|
42529
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42530
42524
|
}
|
|
42531
42525
|
function SpotifyIcon(props) {
|
|
42532
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("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" }) });
|
|
42533
42527
|
}
|
|
42534
42528
|
var OAuthIcons = {
|
|
42535
42529
|
google: GoogleIcon,
|
|
@@ -43541,32 +43535,18 @@ function createConfig(input) {
|
|
|
43541
43535
|
}
|
|
43542
43536
|
secretKey = result.sanitizedKey;
|
|
43543
43537
|
}
|
|
43544
|
-
|
|
43545
|
-
|
|
43546
|
-
|
|
43547
|
-
|
|
43548
|
-
|
|
43549
|
-
|
|
43550
|
-
);
|
|
43551
|
-
}
|
|
43552
|
-
}
|
|
43553
|
-
let platformUrl;
|
|
43554
|
-
let apiBasePath;
|
|
43555
|
-
if (input.platformUrl) {
|
|
43556
|
-
platformUrl = input.platformUrl.trim();
|
|
43557
|
-
apiBasePath = SDK_API_PATH;
|
|
43558
|
-
} else if (input.ref) {
|
|
43559
|
-
platformUrl = `https://${input.ref.trim()}.${DEFAULT_SDK_API_HOST}`;
|
|
43560
|
-
apiBasePath = SDK_API_PATH_NEW;
|
|
43561
|
-
} else {
|
|
43562
|
-
platformUrl = DEFAULT_PLATFORM_URL;
|
|
43563
|
-
apiBasePath = SDK_API_PATH;
|
|
43538
|
+
const trimmedRef = input.ref.trim();
|
|
43539
|
+
if (!REF_PATTERN.test(trimmedRef)) {
|
|
43540
|
+
throw new SylphxError(
|
|
43541
|
+
`[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.`,
|
|
43542
|
+
{ code: "BAD_REQUEST" }
|
|
43543
|
+
);
|
|
43564
43544
|
}
|
|
43545
|
+
const baseUrl = `https://${trimmedRef}.${DEFAULT_SDK_API_HOST}${SDK_API_PATH}`;
|
|
43565
43546
|
return Object.freeze({
|
|
43566
43547
|
secretKey,
|
|
43567
|
-
|
|
43568
|
-
|
|
43569
|
-
apiBasePath,
|
|
43548
|
+
ref: trimmedRef,
|
|
43549
|
+
baseUrl,
|
|
43570
43550
|
accessToken: input.accessToken
|
|
43571
43551
|
});
|
|
43572
43552
|
}
|
|
@@ -43583,9 +43563,9 @@ function buildHeaders(config2) {
|
|
|
43583
43563
|
return headers;
|
|
43584
43564
|
}
|
|
43585
43565
|
function buildApiUrl(config2, path) {
|
|
43586
|
-
const base = config2.
|
|
43566
|
+
const base = config2.baseUrl.replace(/\/$/, "");
|
|
43587
43567
|
const cleanPath = path.startsWith("/") ? path : `/${path}`;
|
|
43588
|
-
return `${base}${
|
|
43568
|
+
return `${base}${cleanPath}`;
|
|
43589
43569
|
}
|
|
43590
43570
|
async function callApi(config2, path, options = {}) {
|
|
43591
43571
|
const {
|
|
@@ -44160,7 +44140,7 @@ var stylesInjected = false;
|
|
|
44160
44140
|
function injectGlobalStyles() {
|
|
44161
44141
|
if (stylesInjected || typeof document === "undefined") return;
|
|
44162
44142
|
const style = document.createElement("style");
|
|
44163
|
-
style.id = "sylphx-
|
|
44143
|
+
style.id = "sylphx-runtime-styles";
|
|
44164
44144
|
style.textContent = `
|
|
44165
44145
|
@keyframes sylphx-spin {
|
|
44166
44146
|
to { transform: rotate(360deg); }
|
|
@@ -44982,10 +44962,9 @@ function useOrganization() {
|
|
|
44982
44962
|
const [isLoading, setIsLoading] = (0, import_react76.useState)(true);
|
|
44983
44963
|
const [error2, setError] = (0, import_react76.useState)(null);
|
|
44984
44964
|
const channelRef = (0, import_react76.useRef)(null);
|
|
44985
|
-
const config2 = platform3 ? createConfig({
|
|
44965
|
+
const config2 = platform3?.ref ? createConfig({
|
|
44986
44966
|
secretKey: platform3.appId,
|
|
44987
|
-
|
|
44988
|
-
platformUrl: platform3.platformUrl
|
|
44967
|
+
ref: platform3.ref
|
|
44989
44968
|
}) : null;
|
|
44990
44969
|
const getStoredOrgSlug = (0, import_react76.useCallback)(() => {
|
|
44991
44970
|
if (typeof window === "undefined") return null;
|
|
@@ -45102,7 +45081,7 @@ function useOrganization() {
|
|
|
45102
45081
|
return () => {
|
|
45103
45082
|
mounted = false;
|
|
45104
45083
|
};
|
|
45105
|
-
}, [config2?.
|
|
45084
|
+
}, [config2?.baseUrl, getStoredOrgSlug, selectOrganization, organization, config2]);
|
|
45106
45085
|
const hasPermission = (0, import_react76.useCallback)(
|
|
45107
45086
|
(permission) => {
|
|
45108
45087
|
if (!role) return false;
|
|
@@ -45620,7 +45599,7 @@ function BillingCardInner({
|
|
|
45620
45599
|
);
|
|
45621
45600
|
}
|
|
45622
45601
|
if (!isPremium && showUpgradeCta) {
|
|
45623
|
-
const highlightPlan = plans.find((p2) => p2.slug === "pro") || plans.find((p2) => (p2.
|
|
45602
|
+
const highlightPlan = plans.find((p2) => p2.slug === "pro") || plans.find((p2) => (p2.monthlyPrice ?? 0) > 0);
|
|
45624
45603
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { style: styles2.card, className, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { style: styles2.cardContent, children: [
|
|
45625
45604
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { style: styles2.flexBetween, children: [
|
|
45626
45605
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
|
|
@@ -45888,6 +45867,8 @@ function CrownIcon({ color: color2, size: size4 = 24 }) {
|
|
|
45888
45867
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
45889
45868
|
"svg",
|
|
45890
45869
|
{
|
|
45870
|
+
"aria-hidden": "true",
|
|
45871
|
+
focusable: "false",
|
|
45891
45872
|
width: size4,
|
|
45892
45873
|
height: size4,
|
|
45893
45874
|
viewBox: "0 0 24 24",
|
|
@@ -45902,6 +45883,8 @@ function SparklesIcon({ size: size4 = 24 }) {
|
|
|
45902
45883
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
45903
45884
|
"svg",
|
|
45904
45885
|
{
|
|
45886
|
+
"aria-hidden": "true",
|
|
45887
|
+
focusable: "false",
|
|
45905
45888
|
width: size4,
|
|
45906
45889
|
height: size4,
|
|
45907
45890
|
viewBox: "0 0 24 24",
|
|
@@ -45925,6 +45908,8 @@ function CheckIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
45925
45908
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
45926
45909
|
"svg",
|
|
45927
45910
|
{
|
|
45911
|
+
"aria-hidden": "true",
|
|
45912
|
+
focusable: "false",
|
|
45928
45913
|
width: size4,
|
|
45929
45914
|
height: size4,
|
|
45930
45915
|
viewBox: "0 0 24 24",
|
|
@@ -45942,6 +45927,8 @@ function ClockIcon({ color: color2, size: size4 = 24 }) {
|
|
|
45942
45927
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
45943
45928
|
"svg",
|
|
45944
45929
|
{
|
|
45930
|
+
"aria-hidden": "true",
|
|
45931
|
+
focusable: "false",
|
|
45945
45932
|
width: size4,
|
|
45946
45933
|
height: size4,
|
|
45947
45934
|
viewBox: "0 0 24 24",
|
|
@@ -45962,6 +45949,8 @@ function AlertIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
45962
45949
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
45963
45950
|
"svg",
|
|
45964
45951
|
{
|
|
45952
|
+
"aria-hidden": "true",
|
|
45953
|
+
focusable: "false",
|
|
45965
45954
|
width: size4,
|
|
45966
45955
|
height: size4,
|
|
45967
45956
|
viewBox: "0 0 24 24",
|
|
@@ -45983,6 +45972,8 @@ function SettingsIcon({ size: size4 = 24 }) {
|
|
|
45983
45972
|
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
45984
45973
|
"svg",
|
|
45985
45974
|
{
|
|
45975
|
+
"aria-hidden": "true",
|
|
45976
|
+
focusable: "false",
|
|
45986
45977
|
width: size4,
|
|
45987
45978
|
height: size4,
|
|
45988
45979
|
viewBox: "0 0 24 24",
|
|
@@ -47183,13 +47174,16 @@ function MembersListInner({
|
|
|
47183
47174
|
},
|
|
47184
47175
|
children: [
|
|
47185
47176
|
visibleMembers.map((member) => /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { style: memberItemStyles, children: [
|
|
47186
|
-
member.image ?
|
|
47187
|
-
|
|
47188
|
-
|
|
47189
|
-
|
|
47190
|
-
|
|
47191
|
-
|
|
47192
|
-
|
|
47177
|
+
member.image ? (
|
|
47178
|
+
// biome-ignore lint/performance/noImgElement: SDK package — Next.js Image not available
|
|
47179
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47180
|
+
"img",
|
|
47181
|
+
{
|
|
47182
|
+
src: member.image,
|
|
47183
|
+
alt: member.name || member.email,
|
|
47184
|
+
style: { ...avatarStyles, objectFit: "cover" }
|
|
47185
|
+
}
|
|
47186
|
+
)
|
|
47193
47187
|
) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { style: avatarStyles, children: (member.name || member.email).charAt(0).toUpperCase() }),
|
|
47194
47188
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
47195
47189
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
@@ -47238,7 +47232,7 @@ function MembersListInner({
|
|
|
47238
47232
|
}
|
|
47239
47233
|
)
|
|
47240
47234
|
] }),
|
|
47241
|
-
editingMember === member.
|
|
47235
|
+
editingMember === member.userId ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47242
47236
|
RoleSelector,
|
|
47243
47237
|
{
|
|
47244
47238
|
currentRole: member.role,
|
|
@@ -47247,7 +47241,7 @@ function MembersListInner({
|
|
|
47247
47241
|
isLoading: actionLoading === member.userId,
|
|
47248
47242
|
theme
|
|
47249
47243
|
}
|
|
47250
|
-
) : confirmingRemove === member.
|
|
47244
|
+
) : confirmingRemove === member.userId ? /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
|
|
47251
47245
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47252
47246
|
"button",
|
|
47253
47247
|
{
|
|
@@ -47286,15 +47280,15 @@ function MembersListInner({
|
|
|
47286
47280
|
MemberActions,
|
|
47287
47281
|
{
|
|
47288
47282
|
member,
|
|
47289
|
-
onEditRole: () => setEditingMember(member.
|
|
47290
|
-
onRemove: () => setConfirmingRemove(member.
|
|
47283
|
+
onEditRole: () => setEditingMember(member.userId),
|
|
47284
|
+
onRemove: () => setConfirmingRemove(member.userId),
|
|
47291
47285
|
theme
|
|
47292
47286
|
}
|
|
47293
47287
|
)
|
|
47294
47288
|
]
|
|
47295
47289
|
}
|
|
47296
47290
|
)
|
|
47297
|
-
] }, member.
|
|
47291
|
+
] }, member.userId)),
|
|
47298
47292
|
hasMore && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47299
47293
|
"button",
|
|
47300
47294
|
{
|
|
@@ -47421,13 +47415,20 @@ function MemberActions({
|
|
|
47421
47415
|
),
|
|
47422
47416
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
|
|
47423
47417
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47424
|
-
"
|
|
47418
|
+
"button",
|
|
47425
47419
|
{
|
|
47420
|
+
type: "button",
|
|
47421
|
+
"aria-label": "Close dropdown",
|
|
47426
47422
|
style: {
|
|
47427
47423
|
position: "fixed",
|
|
47428
47424
|
inset: 0,
|
|
47429
|
-
zIndex: 40
|
|
47425
|
+
zIndex: 40,
|
|
47426
|
+
background: "transparent",
|
|
47427
|
+
border: "none",
|
|
47428
|
+
padding: 0,
|
|
47429
|
+
cursor: "default"
|
|
47430
47430
|
},
|
|
47431
|
+
tabIndex: -1,
|
|
47431
47432
|
onClick: () => setIsOpen(false)
|
|
47432
47433
|
}
|
|
47433
47434
|
),
|
|
@@ -47512,6 +47513,8 @@ function PlusIcon({ size: size4 = 24 }) {
|
|
|
47512
47513
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47513
47514
|
"svg",
|
|
47514
47515
|
{
|
|
47516
|
+
"aria-hidden": "true",
|
|
47517
|
+
focusable: "false",
|
|
47515
47518
|
width: size4,
|
|
47516
47519
|
height: size4,
|
|
47517
47520
|
viewBox: "0 0 24 24",
|
|
@@ -47528,6 +47531,8 @@ function MoreIcon() {
|
|
|
47528
47531
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
47529
47532
|
"svg",
|
|
47530
47533
|
{
|
|
47534
|
+
"aria-hidden": "true",
|
|
47535
|
+
focusable: "false",
|
|
47531
47536
|
width: "16",
|
|
47532
47537
|
height: "16",
|
|
47533
47538
|
viewBox: "0 0 24 24",
|
|
@@ -47548,6 +47553,8 @@ function EditIcon({ size: size4 = 24 }) {
|
|
|
47548
47553
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
47549
47554
|
"svg",
|
|
47550
47555
|
{
|
|
47556
|
+
"aria-hidden": "true",
|
|
47557
|
+
focusable: "false",
|
|
47551
47558
|
width: size4,
|
|
47552
47559
|
height: size4,
|
|
47553
47560
|
viewBox: "0 0 24 24",
|
|
@@ -47564,6 +47571,8 @@ function TrashIcon({ size: size4 = 24, color: color2 = "currentColor" }) {
|
|
|
47564
47571
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
47565
47572
|
"svg",
|
|
47566
47573
|
{
|
|
47574
|
+
"aria-hidden": "true",
|
|
47575
|
+
focusable: "false",
|
|
47567
47576
|
width: size4,
|
|
47568
47577
|
height: size4,
|
|
47569
47578
|
viewBox: "0 0 24 24",
|
|
@@ -48116,18 +48125,18 @@ function PricingTableInner({
|
|
|
48116
48125
|
const getPlanPrice = (plan, int2) => {
|
|
48117
48126
|
switch (int2) {
|
|
48118
48127
|
case "monthly":
|
|
48119
|
-
return plan.
|
|
48128
|
+
return plan.monthlyPrice || 0;
|
|
48120
48129
|
case "annual":
|
|
48121
|
-
return plan.
|
|
48130
|
+
return plan.annualPrice || 0;
|
|
48122
48131
|
case "lifetime":
|
|
48123
|
-
return plan.
|
|
48132
|
+
return plan.lifetimePrice || 0;
|
|
48124
48133
|
default:
|
|
48125
48134
|
return 0;
|
|
48126
48135
|
}
|
|
48127
48136
|
};
|
|
48128
48137
|
const getAnnualSavings = (plan) => {
|
|
48129
|
-
const monthly = plan.
|
|
48130
|
-
const annual = plan.
|
|
48138
|
+
const monthly = plan.monthlyPrice || 0;
|
|
48139
|
+
const annual = plan.annualPrice || 0;
|
|
48131
48140
|
if (monthly > 0 && annual > 0) {
|
|
48132
48141
|
const yearlyFromMonthly = monthly * 12;
|
|
48133
48142
|
const savings = Math.round((yearlyFromMonthly - annual) / yearlyFromMonthly * 100);
|
|
@@ -48390,6 +48399,8 @@ function CheckIcon6({ color: color2, size: size4 = 24 }) {
|
|
|
48390
48399
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
48391
48400
|
"svg",
|
|
48392
48401
|
{
|
|
48402
|
+
"aria-hidden": "true",
|
|
48403
|
+
focusable: "false",
|
|
48393
48404
|
width: size4,
|
|
48394
48405
|
height: size4,
|
|
48395
48406
|
viewBox: "0 0 24 24",
|
|
@@ -48407,6 +48418,8 @@ function XIcon2({ color: color2, size: size4 = 24 }) {
|
|
|
48407
48418
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
48408
48419
|
"svg",
|
|
48409
48420
|
{
|
|
48421
|
+
"aria-hidden": "true",
|
|
48422
|
+
focusable: "false",
|
|
48410
48423
|
width: size4,
|
|
48411
48424
|
height: size4,
|
|
48412
48425
|
viewBox: "0 0 24 24",
|
|
@@ -48427,6 +48440,8 @@ function RefreshIcon({ color: color2, size: size4 = 24 }) {
|
|
|
48427
48440
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
48428
48441
|
"svg",
|
|
48429
48442
|
{
|
|
48443
|
+
"aria-hidden": "true",
|
|
48444
|
+
focusable: "false",
|
|
48430
48445
|
width: size4,
|
|
48431
48446
|
height: size4,
|
|
48432
48447
|
viewBox: "0 0 24 24",
|
|
@@ -52949,7 +52964,7 @@ function useTaskRun(runId, options) {
|
|
|
52949
52964
|
} = options ?? {};
|
|
52950
52965
|
const platformCtx = (0, import_react105.useContext)(PlatformContext);
|
|
52951
52966
|
const appId = platformCtx?.appId ?? "";
|
|
52952
|
-
const platformUrl = customPlatformUrl ?? platformCtx?.platformUrl ??
|
|
52967
|
+
const platformUrl = customPlatformUrl ?? platformCtx?.platformUrl ?? `https://${DEFAULT_SDK_API_HOST}`;
|
|
52953
52968
|
const [run, setRun] = (0, import_react105.useState)(null);
|
|
52954
52969
|
const [loading, setLoading] = (0, import_react105.useState)(!!runId);
|
|
52955
52970
|
const [error2, setError] = (0, import_react105.useState)(null);
|
|
@@ -53929,6 +53944,7 @@ var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
|
53929
53944
|
function SylphxProvider({
|
|
53930
53945
|
children,
|
|
53931
53946
|
appId,
|
|
53947
|
+
projectRef: providedRef,
|
|
53932
53948
|
platformUrl: providedPlatformUrl,
|
|
53933
53949
|
afterSignOutUrl = "/",
|
|
53934
53950
|
vapidPublicKey,
|
|
@@ -53952,6 +53968,7 @@ function SylphxProvider({
|
|
|
53952
53968
|
SylphxProviderInner,
|
|
53953
53969
|
{
|
|
53954
53970
|
appId,
|
|
53971
|
+
projectRef: providedRef,
|
|
53955
53972
|
platformUrl: providedPlatformUrl,
|
|
53956
53973
|
afterSignOutUrl,
|
|
53957
53974
|
vapidPublicKey,
|
|
@@ -53966,6 +53983,7 @@ function SylphxProvider({
|
|
|
53966
53983
|
function SylphxProviderInner({
|
|
53967
53984
|
children,
|
|
53968
53985
|
appId: appIdProp,
|
|
53986
|
+
projectRef: providedRef,
|
|
53969
53987
|
platformUrl: providedPlatformUrl,
|
|
53970
53988
|
afterSignOutUrl = "/",
|
|
53971
53989
|
vapidPublicKey,
|
|
@@ -53975,7 +53993,7 @@ function SylphxProviderInner({
|
|
|
53975
53993
|
authPrefix = "/auth"
|
|
53976
53994
|
}) {
|
|
53977
53995
|
const appId = validateAndSanitizeAppId(appIdProp);
|
|
53978
|
-
const platformUrl = providedPlatformUrl?.trim() ||
|
|
53996
|
+
const platformUrl = providedRef ? `https://${providedRef}.${DEFAULT_SDK_API_HOST}` : providedPlatformUrl?.trim() || `https://${DEFAULT_SDK_API_HOST}`;
|
|
53979
53997
|
const storage2 = (0, import_react109.useMemo)(() => new SylphxStorage(appId), [appId]);
|
|
53980
53998
|
const [anonymousId, setAnonymousId] = (0, import_react109.useState)("");
|
|
53981
53999
|
(0, import_react109.useEffect)(() => {
|
|
@@ -54050,13 +54068,11 @@ function SylphxProviderInner({
|
|
|
54050
54068
|
}
|
|
54051
54069
|
const wasAnonymous = !prevIsSignedIn.current;
|
|
54052
54070
|
const isNowAuthenticated = authState.isSignedIn && authState.user?.id;
|
|
54053
|
-
if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId) {
|
|
54054
|
-
const config3 = {
|
|
54055
|
-
appId,
|
|
54056
|
-
|
|
54057
|
-
|
|
54058
|
-
// Will use cookie auth via middleware
|
|
54059
|
-
};
|
|
54071
|
+
if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId && providedRef) {
|
|
54072
|
+
const config3 = createConfig({
|
|
54073
|
+
secretKey: appId,
|
|
54074
|
+
ref: providedRef
|
|
54075
|
+
});
|
|
54060
54076
|
linkAnonymousConsents(config3, {
|
|
54061
54077
|
userId: authState.user.id,
|
|
54062
54078
|
anonymousId
|
|
@@ -54071,8 +54087,8 @@ function SylphxProviderInner({
|
|
|
54071
54087
|
authState.user?.id,
|
|
54072
54088
|
anonymousId,
|
|
54073
54089
|
appId,
|
|
54074
|
-
|
|
54075
|
-
|
|
54090
|
+
authState.user,
|
|
54091
|
+
providedRef
|
|
54076
54092
|
]);
|
|
54077
54093
|
const api = (0, import_react109.useMemo)(
|
|
54078
54094
|
() => createRestApi({
|
|
@@ -55331,7 +55347,7 @@ function SylphxProviderInner({
|
|
|
55331
55347
|
const controller = new AbortController();
|
|
55332
55348
|
return {
|
|
55333
55349
|
[Symbol.asyncIterator]: async function* () {
|
|
55334
|
-
const response = await fetch(`${platformUrl}/
|
|
55350
|
+
const response = await fetch(`${platformUrl}/v1/chat/completions`, {
|
|
55335
55351
|
method: "POST",
|
|
55336
55352
|
headers: {
|
|
55337
55353
|
"Content-Type": "application/json",
|
|
@@ -55668,7 +55684,7 @@ function SylphxProviderInner({
|
|
|
55668
55684
|
...authState.user?.id && { userId: authState.user.id },
|
|
55669
55685
|
anonymousId,
|
|
55670
55686
|
limit: options?.limit?.toString(),
|
|
55671
|
-
|
|
55687
|
+
cursor: options?.cursor
|
|
55672
55688
|
});
|
|
55673
55689
|
}
|
|
55674
55690
|
}),
|
|
@@ -56299,6 +56315,7 @@ function SylphxProviderInner({
|
|
|
56299
56315
|
() => ({
|
|
56300
56316
|
appId,
|
|
56301
56317
|
platformUrl,
|
|
56318
|
+
ref: providedRef,
|
|
56302
56319
|
anonymousId,
|
|
56303
56320
|
queryClient,
|
|
56304
56321
|
clickIds,
|
|
@@ -56430,7 +56447,8 @@ function SylphxProviderInner({
|
|
|
56430
56447
|
submitScore,
|
|
56431
56448
|
getAchievements,
|
|
56432
56449
|
unlockAchievement,
|
|
56433
|
-
incrementAchievementProgress
|
|
56450
|
+
incrementAchievementProgress,
|
|
56451
|
+
providedRef
|
|
56434
56452
|
]
|
|
56435
56453
|
);
|
|
56436
56454
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AuthContext.Provider, { value: authValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SdkAuthContext.Provider, { value: sdkAuthValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(UserContext.Provider, { value: userValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SecurityContext.Provider, { value: securityValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(PlatformContext.Provider, { value: platformValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(StorageContext.Provider, { value: storageValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AIContext.Provider, { value: aiValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TasksContext.Provider, { value: tasksValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(MonitoringContext.Provider, { value: monitoringValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ConsentContext.Provider, { value: consentValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DatabaseContext.Provider, { value: databaseValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(EmailContext.Provider, { value: emailValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(NewsletterContext.Provider, { value: newsletterValue, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(WebhooksContext.Provider, { value: webhooksValue, children }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
@@ -59434,11 +59452,11 @@ function BillingSectionInner({
|
|
|
59434
59452
|
plans,
|
|
59435
59453
|
isLoading,
|
|
59436
59454
|
error: billingError,
|
|
59437
|
-
isPremium,
|
|
59438
|
-
isTrialing,
|
|
59455
|
+
isPremium: _isPremium,
|
|
59456
|
+
isTrialing: _isTrialing,
|
|
59439
59457
|
createCheckout,
|
|
59440
59458
|
openPortal,
|
|
59441
|
-
refresh
|
|
59459
|
+
refresh: _refresh
|
|
59442
59460
|
} = useBilling();
|
|
59443
59461
|
const styles2 = baseStyles(theme);
|
|
59444
59462
|
const [selectedInterval, setSelectedInterval] = (0, import_react117.useState)("monthly");
|
|
@@ -59582,7 +59600,7 @@ function BillingSectionInner({
|
|
|
59582
59600
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: mergeStyles(styles2.textXs, styles2.textMuted), children: "Amount" }),
|
|
59583
59601
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { style: { fontWeight: 500, marginTop: "0.25rem" }, children: [
|
|
59584
59602
|
formatPrice(
|
|
59585
|
-
subscription.interval === "monthly" ? plans.find((p2) => p2.slug === subscription.planSlug)?.
|
|
59603
|
+
subscription.interval === "monthly" ? plans.find((p2) => p2.slug === subscription.planSlug)?.monthlyPrice : plans.find((p2) => p2.slug === subscription.planSlug)?.annualPrice
|
|
59586
59604
|
),
|
|
59587
59605
|
subscription.interval !== "lifetime" && `/${subscription.interval === "monthly" ? "mo" : "yr"}`
|
|
59588
59606
|
] })
|
|
@@ -59672,7 +59690,7 @@ function BillingSectionInner({
|
|
|
59672
59690
|
},
|
|
59673
59691
|
children: plans.map((plan) => {
|
|
59674
59692
|
const isCurrentPlan = subscription?.planSlug === plan.slug;
|
|
59675
|
-
const price = selectedInterval === "monthly" ? plan.
|
|
59693
|
+
const price = selectedInterval === "monthly" ? plan.monthlyPrice : plan.annualPrice;
|
|
59676
59694
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
59677
59695
|
"div",
|
|
59678
59696
|
{
|
|
@@ -59791,6 +59809,8 @@ function CreditCardIcon2({ size: size4 = 24 }) {
|
|
|
59791
59809
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
59792
59810
|
"svg",
|
|
59793
59811
|
{
|
|
59812
|
+
"aria-hidden": "true",
|
|
59813
|
+
focusable: "false",
|
|
59794
59814
|
width: size4,
|
|
59795
59815
|
height: size4,
|
|
59796
59816
|
viewBox: "0 0 24 24",
|
|
@@ -59810,6 +59830,8 @@ function CheckIcon11({ color: color2 }) {
|
|
|
59810
59830
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
59811
59831
|
"svg",
|
|
59812
59832
|
{
|
|
59833
|
+
"aria-hidden": "true",
|
|
59834
|
+
focusable: "false",
|
|
59813
59835
|
width: "16",
|
|
59814
59836
|
height: "16",
|
|
59815
59837
|
viewBox: "0 0 24 24",
|
|
@@ -69715,7 +69737,7 @@ var ErrorTracker = class {
|
|
|
69715
69737
|
values: getBreadcrumbs()
|
|
69716
69738
|
},
|
|
69717
69739
|
sdk: {
|
|
69718
|
-
name: "sylphx-
|
|
69740
|
+
name: "sylphx-runtime",
|
|
69719
69741
|
version: "1.0.0",
|
|
69720
69742
|
integrations: this.getIntegrations()
|
|
69721
69743
|
}
|
|
@@ -69773,7 +69795,7 @@ var ErrorTracker = class {
|
|
|
69773
69795
|
values: getBreadcrumbs()
|
|
69774
69796
|
},
|
|
69775
69797
|
sdk: {
|
|
69776
|
-
name: "sylphx-
|
|
69798
|
+
name: "sylphx-runtime",
|
|
69777
69799
|
version: "1.0.0"
|
|
69778
69800
|
}
|
|
69779
69801
|
};
|
|
@@ -77992,7 +78014,7 @@ var AnalyticsTracker = class {
|
|
|
77992
78014
|
properties: mergedProperties,
|
|
77993
78015
|
distinct_id: this.getDistinctId(),
|
|
77994
78016
|
timestamp,
|
|
77995
|
-
$lib: "sylphx-
|
|
78017
|
+
$lib: "sylphx-runtime",
|
|
77996
78018
|
$lib_version: "1.0.0"
|
|
77997
78019
|
};
|
|
77998
78020
|
}
|
|
@@ -79664,7 +79686,7 @@ function useRealtime(channel, options = {}) {
|
|
|
79664
79686
|
const reconnectTimeoutRef = (0, import_react145.useRef)(null);
|
|
79665
79687
|
const reconnectAttemptRef = (0, import_react145.useRef)(0);
|
|
79666
79688
|
const mountedRef = (0, import_react145.useRef)(true);
|
|
79667
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
79689
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79668
79690
|
const buildUrl = (0, import_react145.useCallback)(() => {
|
|
79669
79691
|
const url = new URL(`${platformUrl}${SDK_API_PATH}/realtime/subscribe`);
|
|
79670
79692
|
url.searchParams.set("channel", channel);
|
|
@@ -79858,7 +79880,7 @@ function useRealtimeChannels(channels, options = {}) {
|
|
|
79858
79880
|
const [statuses, setStatuses] = (0, import_react145.useState)({});
|
|
79859
79881
|
const platformContext = (0, import_react145.useContext)(PlatformContext);
|
|
79860
79882
|
const appId = platformContext?.appId || "";
|
|
79861
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
79883
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79862
79884
|
const lastAcksRef = (0, import_react145.useRef)({});
|
|
79863
79885
|
const eventSourcesRef = (0, import_react145.useRef)({});
|
|
79864
79886
|
const mountedRef = (0, import_react145.useRef)(true);
|
|
@@ -79995,7 +80017,7 @@ function useKv(options = {}) {
|
|
|
79995
80017
|
const { platformUrl: customPlatformUrl } = options;
|
|
79996
80018
|
const platformContext = (0, import_react146.useContext)(PlatformContext);
|
|
79997
80019
|
const appId = platformContext?.appId || "";
|
|
79998
|
-
const platformUrl = customPlatformUrl || platformContext?.platformUrl ||
|
|
80020
|
+
const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
|
|
79999
80021
|
const headers = (0, import_react146.useMemo)(
|
|
80000
80022
|
() => ({
|
|
80001
80023
|
"Content-Type": "application/json",
|