@superwall/studio 1.1.1 → 1.3.0-beta.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 +61 -11
- package/dist/assets/index-DyLb5fiB.js +11 -0
- package/dist/assets/index-_HCp6gCi.css +1 -0
- package/dist/index.html +2 -2
- package/dist/lib/StudioApp.d.ts +6 -0
- package/dist/lib/components/OpenInApp.d.ts +5 -0
- package/dist/lib/components/PaywallToasts.d.ts +8 -0
- package/dist/lib/components/SurfaceCard.d.ts +11 -0
- package/dist/lib/components/chrome/StudioShell.d.ts +4 -0
- package/dist/lib/components/chrome/Toolbar.d.ts +6 -0
- package/dist/lib/components/chrome/TopBar.d.ts +8 -0
- package/dist/lib/components/controls.d.ts +24 -0
- package/dist/lib/components/icons.d.ts +18 -0
- package/dist/lib/components/menus/ActionMenu.d.ts +14 -0
- package/dist/lib/components/menus/CompareMenu.d.ts +13 -0
- package/dist/lib/components/panels/MissingProducts.d.ts +8 -0
- package/dist/lib/components/panels/SidePanel.d.ts +6 -0
- package/dist/lib/components/panels/VariablesPanel.d.ts +13 -0
- package/dist/lib/components/preview/DeviceChrome.d.ts +12 -0
- package/dist/lib/components/preview/DeviceFrame.d.ts +21 -0
- package/dist/lib/components/preview/HostedIframe.d.ts +7 -0
- package/dist/lib/icon.svg +5 -0
- package/dist/lib/index.d.ts +20 -0
- package/dist/lib/index.js +2268 -0
- package/dist/lib/lib/actions.d.ts +4 -0
- package/dist/lib/lib/contract.d.ts +33 -0
- package/dist/lib/lib/devices.d.ts +26 -0
- package/dist/lib/lib/host.d.ts +15 -0
- package/dist/lib/lib/notices.d.ts +9 -0
- package/dist/lib/lib/preview.d.ts +5 -0
- package/dist/lib/lib/products.d.ts +16 -0
- package/dist/lib/lib/project.d.ts +13 -0
- package/dist/lib/lib/steps.d.ts +5 -0
- package/dist/lib/lib/surfaces.d.ts +35 -0
- package/dist/lib/lib/time.d.ts +1 -0
- package/dist/lib/lib/variables.d.ts +12 -0
- package/dist/lib/products.js +65 -0
- package/dist/lib/screens/SurfaceEditor.d.ts +9 -0
- package/dist/lib/screens/SurfaceList.d.ts +7 -0
- package/dist/lib/studio.css +1 -0
- package/package.json +19 -4
- package/src/StudioApp.tsx +8 -11
- package/src/components/PaywallToasts.tsx +162 -85
- package/src/components/SurfaceCard.tsx +9 -2
- package/src/components/chrome/StudioShell.tsx +12 -0
- package/src/components/icons.tsx +0 -13
- package/src/components/{ActionMenu.tsx → menus/ActionMenu.tsx} +4 -4
- package/src/components/{CompareMenu.tsx → menus/CompareMenu.tsx} +3 -3
- package/src/components/{SidePanel.tsx → panels/SidePanel.tsx} +1 -1
- package/src/components/{VariablesPanel.tsx → panels/VariablesPanel.tsx} +4 -4
- package/src/components/{DeviceChrome.tsx → preview/DeviceChrome.tsx} +1 -1
- package/src/components/{DeviceFrame.tsx → preview/DeviceFrame.tsx} +14 -55
- package/src/components/preview/HostedIframe.tsx +46 -0
- package/src/index.ts +26 -6
- package/src/lib/actions.ts +1 -1
- package/src/lib/contract.ts +30 -0
- package/src/lib/devices.ts +5 -4
- package/src/lib/host.ts +80 -0
- package/src/lib/notices.ts +63 -0
- package/src/lib/preview.ts +11 -33
- package/src/lib/products.ts +116 -0
- package/src/lib/project.ts +2 -1
- package/src/lib/steps.ts +20 -0
- package/src/lib/surfaces.ts +41 -0
- package/src/lib/time.ts +1 -2
- package/src/lib/variables.ts +13 -0
- package/src/main.tsx +3 -3
- package/src/screens/SurfaceEditor.tsx +97 -67
- package/src/screens/SurfaceList.tsx +17 -7
- package/src/styles.css +8 -6
- package/src/vite-env.d.ts +1 -0
- package/dist/assets/index-CVKGrx00.js +0 -11
- package/dist/assets/index-D4RIpSbg.css +0 -1
- package/src/lib/events.ts +0 -77
- package/src/lib/types.ts +0 -85
- /package/src/components/{Toolbar.tsx → chrome/Toolbar.tsx} +0 -0
- /package/src/components/{TopBar.tsx → chrome/TopBar.tsx} +0 -0
- /package/src/components/{MissingProducts.tsx → panels/MissingProducts.tsx} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Samples, StudioActionName, StudioActionResult, StudioStatus, StudioSurface } from "./surfaces";
|
|
2
|
+
export declare const runAction: (surface: StudioSurface, action: StudioActionName, onStep?: (step: string, state: "start" | "done") => void) => Promise<StudioActionResult>;
|
|
3
|
+
export declare const fetchStatus: (surface: StudioSurface) => Promise<StudioStatus>;
|
|
4
|
+
export declare const fetchSamples: () => Promise<Samples>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type StudioActionName = "push" | "promote" | "publish";
|
|
2
|
+
export type StudioActionResult = {
|
|
3
|
+
ok: true;
|
|
4
|
+
version: number;
|
|
5
|
+
live: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
ok: false;
|
|
8
|
+
error: string;
|
|
9
|
+
};
|
|
10
|
+
export type StudioActionProgress = (step: string, state: "start" | "done") => void;
|
|
11
|
+
export type StudioStatus = {
|
|
12
|
+
paywallId?: string;
|
|
13
|
+
identifier?: string;
|
|
14
|
+
liveUrl?: string;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
updatedAt?: string;
|
|
17
|
+
unreachable?: string;
|
|
18
|
+
};
|
|
19
|
+
export type Samples = {
|
|
20
|
+
device?: Record<string, unknown>;
|
|
21
|
+
user?: Record<string, unknown>;
|
|
22
|
+
products?: Record<string, Record<string, unknown>>;
|
|
23
|
+
live?: {
|
|
24
|
+
device: boolean;
|
|
25
|
+
user: boolean;
|
|
26
|
+
};
|
|
27
|
+
unreachable?: string;
|
|
28
|
+
};
|
|
29
|
+
export type AppScheme = {
|
|
30
|
+
scheme?: string;
|
|
31
|
+
source?: "dashboard" | "app";
|
|
32
|
+
blocksLocalNetworking?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type DeviceChromeSpec = {
|
|
2
|
+
radius: number;
|
|
3
|
+
cutout?: "island" | "punch";
|
|
4
|
+
statusBarHeight: number;
|
|
5
|
+
homeIndicator: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type StudioDevice = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
device?: {
|
|
13
|
+
platform: "iOS" | "Android";
|
|
14
|
+
deviceModel: string;
|
|
15
|
+
osVersion: string;
|
|
16
|
+
};
|
|
17
|
+
chrome?: DeviceChromeSpec;
|
|
18
|
+
};
|
|
19
|
+
export declare const STUDIO_DEVICES: readonly [StudioDevice, ...StudioDevice[]];
|
|
20
|
+
export declare const DEFAULT_DEVICE_ID = "iphone-17";
|
|
21
|
+
export declare const RESPONSIVE_ID = "responsive";
|
|
22
|
+
export declare const RESPONSIVE_DEFAULT: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const deviceById: (id: string) => StudioDevice;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type HostState } from "@superwall/host";
|
|
2
|
+
import type { Samples, StudioSurface } from "./surfaces";
|
|
3
|
+
import type { SampleDefaults, VariableOverrides } from "./variables";
|
|
4
|
+
export type HostInputs = {
|
|
5
|
+
surface: StudioSurface;
|
|
6
|
+
defaults: SampleDefaults;
|
|
7
|
+
sourceSamples?: SampleDefaults;
|
|
8
|
+
samples: Samples;
|
|
9
|
+
frame?: Record<string, unknown>;
|
|
10
|
+
theme: "light" | "dark";
|
|
11
|
+
locale?: string;
|
|
12
|
+
edited: VariableOverrides;
|
|
13
|
+
};
|
|
14
|
+
export declare const studioDefaults: () => SampleDefaults;
|
|
15
|
+
export declare const hostStateFor: ({ surface, defaults, sourceSamples, samples, frame, theme, locale, edited, }: HostInputs) => HostState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TIncomingMessage, TOutgoingMessage } from "@superwall/host";
|
|
2
|
+
export type PaywallEventName = TOutgoingMessage["event_name"];
|
|
3
|
+
export type PaywallMessageName = PaywallEventName | TIncomingMessage["event_name"];
|
|
4
|
+
export type EventNotice = {
|
|
5
|
+
action: PaywallEventName;
|
|
6
|
+
subject?: string;
|
|
7
|
+
tone: "info" | "success" | "warning";
|
|
8
|
+
};
|
|
9
|
+
export declare const noticeFor: (event: TOutgoingMessage) => EventNotice | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PreviewUrlBuilder, StudioSurface } from "./surfaces";
|
|
2
|
+
export declare const surfacePath: (surface: StudioSurface) => string;
|
|
3
|
+
export declare const hostedUrl: (url: string) => string;
|
|
4
|
+
export declare const buildPreviewPath: PreviewUrlBuilder;
|
|
5
|
+
export declare const snapshotPreviewUrl: (urlOf: (surface: StudioSurface) => string) => PreviewUrlBuilder;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface DashboardPrice {
|
|
2
|
+
amount?: number;
|
|
3
|
+
currency?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DashboardProduct {
|
|
6
|
+
identifier?: string;
|
|
7
|
+
price?: DashboardPrice | null;
|
|
8
|
+
trial_price?: DashboardPrice | null;
|
|
9
|
+
monthly_billing_plan_price?: DashboardPrice | null;
|
|
10
|
+
subscription?: {
|
|
11
|
+
period?: string;
|
|
12
|
+
period_count?: number;
|
|
13
|
+
trial_period_days?: number | null;
|
|
14
|
+
} | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const productVariables: (product: DashboardProduct) => Record<string, unknown>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StudioSurface } from "./surfaces";
|
|
2
|
+
import type { SampleDefaults } from "./variables";
|
|
3
|
+
export type StudioProjectPayload = {
|
|
4
|
+
title: string;
|
|
5
|
+
scheme?: string;
|
|
6
|
+
surfaces: StudioSurface[];
|
|
7
|
+
samples: SampleDefaults;
|
|
8
|
+
diagnostics: string[];
|
|
9
|
+
capabilities: {
|
|
10
|
+
actions: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const parseProjectPayload: (data: unknown) => StudioProjectPayload;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StudioActionName } from "./contract";
|
|
2
|
+
export type StudioStepState = "pending" | "active" | "done" | "failed";
|
|
3
|
+
export type StudioActionStep = "link" | "build" | "assets" | "push" | "source" | "promote";
|
|
4
|
+
export declare const ACTION_STEPS: Record<StudioActionName, StudioActionStep[]>;
|
|
5
|
+
export declare const STEP_LABELS: Record<StudioActionStep, string>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SampleDefaults } from "./variables";
|
|
2
|
+
export type { AppScheme, Samples, StudioActionName, StudioActionProgress, StudioActionResult, StudioStatus, } from "./contract";
|
|
3
|
+
export type StudioSurfaceKind = "paywall" | "funnel";
|
|
4
|
+
export type StudioSurface = {
|
|
5
|
+
kind: StudioSurfaceKind;
|
|
6
|
+
id: string;
|
|
7
|
+
project?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
products?: Record<string, string>;
|
|
10
|
+
routes: string[];
|
|
11
|
+
locales: string[];
|
|
12
|
+
platforms?: string[];
|
|
13
|
+
paywallId?: string;
|
|
14
|
+
paywallIdentifier?: string;
|
|
15
|
+
};
|
|
16
|
+
export type PreviewUrlBuilder = (surface: StudioSurface) => string;
|
|
17
|
+
export type CompareTarget = {
|
|
18
|
+
type: "live";
|
|
19
|
+
} | {
|
|
20
|
+
type: "surface";
|
|
21
|
+
surface: StudioSurface;
|
|
22
|
+
};
|
|
23
|
+
export type StudioSource = {
|
|
24
|
+
scheme?: string;
|
|
25
|
+
title: string;
|
|
26
|
+
surfaces: StudioSurface[];
|
|
27
|
+
diagnostics?: string[];
|
|
28
|
+
samples?: SampleDefaults;
|
|
29
|
+
previewUrl: PreviewUrlBuilder;
|
|
30
|
+
standaloneUrl?: PreviewUrlBuilder;
|
|
31
|
+
capabilities?: {
|
|
32
|
+
actions: boolean;
|
|
33
|
+
};
|
|
34
|
+
compareHint?: string;
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const timeAgo: (iso: string, now?: number) => string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SampleDefaults = {
|
|
2
|
+
device: Record<string, unknown>;
|
|
3
|
+
user: Record<string, unknown>;
|
|
4
|
+
params: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export type VariableOverrides = {
|
|
7
|
+
device?: Record<string, unknown>;
|
|
8
|
+
user?: Record<string, unknown>;
|
|
9
|
+
params?: Record<string, unknown>;
|
|
10
|
+
products?: Record<string, Record<string, unknown>>;
|
|
11
|
+
introductoryOfferEligible?: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
USD: "$",
|
|
3
|
+
CAD: "$",
|
|
4
|
+
AUD: "$",
|
|
5
|
+
NZD: "$",
|
|
6
|
+
EUR: "€",
|
|
7
|
+
GBP: "£",
|
|
8
|
+
JPY: "¥",
|
|
9
|
+
CNY: "¥",
|
|
10
|
+
INR: "₹",
|
|
11
|
+
KRW: "₩",
|
|
12
|
+
BRL: "R$",
|
|
13
|
+
MXN: "$",
|
|
14
|
+
CHF: "CHF",
|
|
15
|
+
SEK: "kr",
|
|
16
|
+
NOK: "kr",
|
|
17
|
+
DKK: "kr",
|
|
18
|
+
PLN: "zł",
|
|
19
|
+
TRY: "₺",
|
|
20
|
+
RUB: "₽",
|
|
21
|
+
ZAR: "R"
|
|
22
|
+
}, p = 100, m = { day: 365, week: 52, month: 12, year: 1 }, d = (r) => l[r.toUpperCase()] ?? "", i = (r, e) => {
|
|
23
|
+
try {
|
|
24
|
+
return new Intl.NumberFormat("en-US", { style: "currency", currency: e }).format(r);
|
|
25
|
+
} catch {
|
|
26
|
+
return `${d(e)}${r.toFixed(2)}`;
|
|
27
|
+
}
|
|
28
|
+
}, u = {
|
|
29
|
+
day: "daily",
|
|
30
|
+
week: "weekly",
|
|
31
|
+
month: "monthly",
|
|
32
|
+
year: "yearly"
|
|
33
|
+
}, h = {
|
|
34
|
+
day: { days: 1, weeks: 1 / 7, months: 1 / 30, years: 1 / 365 },
|
|
35
|
+
week: { days: 7, weeks: 1, months: 1 / 4, years: 1 / 52 },
|
|
36
|
+
month: { days: 30, weeks: 4, months: 1, years: 1 / 12 },
|
|
37
|
+
year: { days: 365, weeks: 52, months: 12, years: 1 }
|
|
38
|
+
}, k = (r, e) => {
|
|
39
|
+
const o = h[r];
|
|
40
|
+
if (o)
|
|
41
|
+
return {
|
|
42
|
+
periodDays: o.days * e,
|
|
43
|
+
periodWeeks: Math.round(o.weeks * e),
|
|
44
|
+
periodMonths: Math.floor(o.months * e),
|
|
45
|
+
periodYears: Math.floor(o.years * e)
|
|
46
|
+
};
|
|
47
|
+
}, R = (r) => {
|
|
48
|
+
const e = {};
|
|
49
|
+
r.identifier && (e.identifier = r.identifier);
|
|
50
|
+
const o = r.price;
|
|
51
|
+
if (!o || typeof o.amount != "number" || !o.currency) return e;
|
|
52
|
+
const s = o.currency.toUpperCase(), t = o.amount / p;
|
|
53
|
+
e.price = i(t, s), e.rawPrice = t, e.currencyCode = s, e.currencySymbol = d(s);
|
|
54
|
+
const n = r.subscription?.period;
|
|
55
|
+
if (!n) return e;
|
|
56
|
+
const c = r.subscription?.period_count ?? 1;
|
|
57
|
+
e.period = n, e.periodly = u[n] ?? `${n}ly`, Object.assign(e, k(n, c) ?? {});
|
|
58
|
+
const a = (m[n] ?? 1) / c;
|
|
59
|
+
e.yearlyPrice = i(t * a, s), e.monthlyPrice = i(t * a / 12, s), e.weeklyPrice = i(t * a / 52, s), e.dailyPrice = i(t * a / 365, s);
|
|
60
|
+
const y = r.subscription?.trial_period_days;
|
|
61
|
+
return typeof y == "number" && y > 0 && (e.trialPeriodDays = y, e.trialPeriodText = `${y}-day`), e;
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
R as productVariables
|
|
65
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Samples, type StudioSource, type StudioSurface } from "../lib/surfaces";
|
|
3
|
+
export declare const SurfaceEditor: ({ source, surface, samples, onBack, actions, }: {
|
|
4
|
+
source: StudioSource;
|
|
5
|
+
surface: StudioSurface;
|
|
6
|
+
samples: Samples;
|
|
7
|
+
onBack: () => void;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { StudioSource, StudioSurface } from "../lib/surfaces";
|
|
3
|
+
export declare const SurfaceList: ({ source, onOpen, device, }: {
|
|
4
|
+
source: StudioSource;
|
|
5
|
+
onOpen: (surface: StudioSurface) => void;
|
|
6
|
+
device?: boolean;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-mono:"Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-ink:#1a1918;--color-bar:#211f1d;--color-panel:#242220;--color-cream:#fdfef6;--color-accent:#46d7d4;--color-red:#ff7474}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.sw-studio{color-scheme:dark}.sw-studio ::selection{background:#46d7d480}@supports (color:color-mix(in lab,red,red)){.sw-studio ::selection{background:color-mix(in srgb,var(--color-accent) 50%,transparent)}}.sw-studio :focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.sw-studio button{cursor:pointer}.sw-studio,.sw-studio *{scrollbar-width:none}.sw-studio::-webkit-scrollbar{width:0;height:0;display:none}.sw-studio ::-webkit-scrollbar{width:0;height:0;display:none}}@layer components{.sw-btn{border:1px solid #fdfef62e;justify-content:center;align-items:center;gap:7px;height:30px;padding:0 12px;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.sw-btn{border:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-btn{color:var(--color-cream);white-space:nowrap;background:0 0;font-size:.8125rem;font-weight:500;transition:background-color .15s}.sw-btn:hover{background:#fdfef60d}@supports (color:color-mix(in lab,red,red)){.sw-btn:hover{background:color-mix(in srgb,var(--color-cream) 5%,transparent)}}.sw-btn--primary{background:var(--color-cream);border-color:var(--color-cream);color:var(--color-ink)}.sw-btn--primary:hover{background:#fdfef6d9}@supports (color:color-mix(in lab,red,red)){.sw-btn--primary:hover{background:color-mix(in srgb,var(--color-cream) 85%,transparent)}}.sw-btn--icon{width:30px;padding:0}.sw-icon,.sw-btn svg,.sw-segmented svg{stroke:currentColor;fill:none;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round;width:14px;height:14px}.sw-chip{border:1px solid #fdfef62e;align-items:center;height:20px;padding:0 7px;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.sw-chip{border:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-chip{color:var(--color-cream);white-space:nowrap}.sw-tool-label{color:#fdfef68c;font-size:.75rem;font-weight:500}@supports (color:color-mix(in lab,red,red)){.sw-tool-label{color:color-mix(in srgb,var(--color-cream) 55%,transparent)}}.sw-tool-label{white-space:nowrap}.sw-tool-label--key{font-family:var(--font-mono);letter-spacing:.04em;font-size:11px}.sw-select{appearance:none;cursor:pointer;border:1px solid #fdfef62e;height:30px;padding:0 24px 0 9px}@supports (color:color-mix(in lab,red,red)){.sw-select{border:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-select{background:linear-gradient(45deg,#0000 50%,#fdfef68c 50%) calc(100% - 13px) 55%/4px 4px no-repeat,linear-gradient(135deg,#fdfef68c 50%,#0000 50%) calc(100% - 9px) 55%/4px 4px no-repeat}@supports (color:color-mix(in lab,red,red)){.sw-select{background:linear-gradient(45deg,transparent 50%,color-mix(in srgb,var(--color-cream) 55%,transparent) 50%) calc(100% - 13px) 55% / 4px 4px no-repeat,linear-gradient(135deg,color-mix(in srgb,var(--color-cream) 55%,transparent) 50%,transparent 50%) calc(100% - 9px) 55% / 4px 4px no-repeat}}.sw-select{color:var(--color-cream);font:inherit;background-color:#0000;font-size:.8125rem;font-weight:500}.sw-select option{background:var(--color-bar)}.sw-segmented{border:1px solid #fdfef62e;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.sw-segmented{border:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-segmented{height:30px}.sw-segmented button{color:#fdfef68c;align-items:center;gap:6px;padding:0 11px;font-size:.8125rem;font-weight:500;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.sw-segmented button{color:color-mix(in srgb,var(--color-cream) 55%,transparent)}}.sw-segmented button{transition:background-color .15s,color .15s}.sw-segmented button+button{border-left:1px solid #fdfef62e}@supports (color:color-mix(in lab,red,red)){.sw-segmented button+button{border-left:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-segmented button[aria-pressed=true]{background:var(--color-cream);color:var(--color-ink)}input[type=search]::-webkit-search-cancel-button{appearance:none;display:none}input[type=search]::-webkit-search-decoration{appearance:none;display:none}input[type=search]::-webkit-search-results-button{appearance:none;display:none}input[type=search]::-webkit-search-results-decoration{appearance:none;display:none}.sw-input{border:1px solid #fdfef62e;height:30px;padding:0 9px}@supports (color:color-mix(in lab,red,red)){.sw-input{border:1px solid color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-input{color:var(--color-cream);font:inherit;background:0 0;width:100%;font-size:.8125rem}.sw-switch{background:#fdfef62e;border-radius:9999px;width:34px;height:19px;position:relative}@supports (color:color-mix(in lab,red,red)){.sw-switch{background:color-mix(in srgb,var(--color-cream) 18%,transparent)}}.sw-switch{flex:none;transition:background-color .15s}.sw-switch[aria-checked=true]{background:var(--color-accent)}.sw-switch:after{content:"";background:var(--color-ink);border-radius:9999px;width:13px;height:13px;transition:transform .15s;position:absolute;top:3px;left:3px}.sw-switch[aria-checked=true]:after{transform:translate(15px)}}@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-x-0{inset-inline:0}.top-0{top:0}.top-full{top:100%}.right-0{right:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-start-2{grid-column-start:2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-auto{margin:auto}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-px{margin-left:-1px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.aspect-\[390\/844\]{aspect-ratio:390/844}.size-\[5px\]{width:5px;height:5px}.h-0\.5{height:calc(var(--spacing) * .5)}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-11{height:calc(var(--spacing) * 11)}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:0}.min-h-14{min-height:calc(var(--spacing) * 14)}.w-0{width:0}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-16{width:calc(var(--spacing) * 16)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-\[344px\]{width:344px}.w-full{width:100%}.w-px{width:1px}.max-w-\[1080px\]{max-width:1080px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:0 0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[14px_1fr\]{grid-template-columns:14px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-\[7px\]{gap:7px}.gap-x-2\.5{column-gap:calc(var(--spacing) * 2.5)}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-cream\/10{border-color:#fdfef61a}@supports (color:color-mix(in lab,red,red)){.border-cream\/10{border-color:color-mix(in oklab,var(--color-cream) 10%,transparent)}}.border-cream\/15{border-color:#fdfef626}@supports (color:color-mix(in lab,red,red)){.border-cream\/15{border-color:color-mix(in oklab,var(--color-cream) 15%,transparent)}}.border-cream\/20{border-color:#fdfef633}@supports (color:color-mix(in lab,red,red)){.border-cream\/20{border-color:color-mix(in oklab,var(--color-cream) 20%,transparent)}}.border-red{border-color:var(--color-red)}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--color-accent)}.bg-accent\/15{background-color:#46d7d426}@supports (color:color-mix(in lab,red,red)){.bg-accent\/15{background-color:color-mix(in oklab,var(--color-accent) 15%,transparent)}}.bg-bar{background-color:var(--color-bar)}.bg-black{background-color:var(--color-black)}.bg-cream\/10{background-color:#fdfef61a}@supports (color:color-mix(in lab,red,red)){.bg-cream\/10{background-color:color-mix(in oklab,var(--color-cream) 10%,transparent)}}.bg-cream\/20{background-color:#fdfef633}@supports (color:color-mix(in lab,red,red)){.bg-cream\/20{background-color:color-mix(in oklab,var(--color-cream) 20%,transparent)}}.bg-cream\/55{background-color:#fdfef68c}@supports (color:color-mix(in lab,red,red)){.bg-cream\/55{background-color:color-mix(in oklab,var(--color-cream) 55%,transparent)}}.bg-ink{background-color:var(--color-ink)}.bg-ink\/70{background-color:#1a1918b3}@supports (color:color-mix(in lab,red,red)){.bg-ink\/70{background-color:color-mix(in oklab,var(--color-ink) 70%,transparent)}}.bg-panel{background-color:var(--color-panel)}.bg-red{background-color:var(--color-red)}.bg-red\/10{background-color:#ff74741a}@supports (color:color-mix(in lab,red,red)){.bg-red\/10{background-color:color-mix(in oklab,var(--color-red) 10%,transparent)}}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.\!px-0{padding-inline:0!important}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.625rem\]{font-size:.625rem}.text-\[0\.6875rem\]{font-size:.6875rem}.text-\[0\.8125rem\]{font-size:.8125rem}.text-\[0\.9375rem\]{font-size:.9375rem}.text-\[1\.0625rem\]{font-size:1.0625rem}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[0\.01em\]{--tw-tracking:.01em;letter-spacing:.01em}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--color-accent)}.text-cream{color:var(--color-cream)}.text-cream\/25{color:#fdfef640}@supports (color:color-mix(in lab,red,red)){.text-cream\/25{color:color-mix(in oklab,var(--color-cream) 25%,transparent)}}.text-cream\/35{color:#fdfef659}@supports (color:color-mix(in lab,red,red)){.text-cream\/35{color:color-mix(in oklab,var(--color-cream) 35%,transparent)}}.text-cream\/40{color:#fdfef666}@supports (color:color-mix(in lab,red,red)){.text-cream\/40{color:color-mix(in oklab,var(--color-cream) 40%,transparent)}}.text-cream\/45{color:#fdfef673}@supports (color:color-mix(in lab,red,red)){.text-cream\/45{color:color-mix(in oklab,var(--color-cream) 45%,transparent)}}.text-cream\/55{color:#fdfef68c}@supports (color:color-mix(in lab,red,red)){.text-cream\/55{color:color-mix(in oklab,var(--color-cream) 55%,transparent)}}.text-cream\/60{color:#fdfef699}@supports (color:color-mix(in lab,red,red)){.text-cream\/60{color:color-mix(in oklab,var(--color-cream) 60%,transparent)}}.text-cream\/70{color:#fdfef6b3}@supports (color:color-mix(in lab,red,red)){.text-cream\/70{color:color-mix(in oklab,var(--color-cream) 70%,transparent)}}.text-cream\/75{color:#fdfef6bf}@supports (color:color-mix(in lab,red,red)){.text-cream\/75{color:color-mix(in oklab,var(--color-cream) 75%,transparent)}}.text-red{color:var(--color-red)}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_24px_-8px\]{--tw-shadow:0 8px 24px -8px var(--tw-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/60{--tw-shadow-color:#0009}@supports (color:color-mix(in lab,red,red)){.shadow-black\/60{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 60%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-cream\/25{--tw-shadow-color:#fdfef640}@supports (color:color-mix(in lab,red,red)){.shadow-cream\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-cream) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:border-cream\/35:is(:where(.group):hover *){border-color:#fdfef659}@supports (color:color-mix(in lab,red,red)){.group-hover\:border-cream\/35:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-cream) 35%,transparent)}}}.first\:mt-0:first-child{margin-top:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media(hover:hover){.hover\:bg-cream\/5:hover{background-color:#fdfef60d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cream\/5:hover{background-color:color-mix(in oklab,var(--color-cream) 5%,transparent)}}.hover\:text-cream:hover{color:var(--color-cream)}}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}@media(min-width:40rem){.sm\:block{display:block}.sm\:grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.sm\:gap-6{gap:calc(var(--spacing) * 6)}.sm\:px-0{padding-inline:0}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:pt-10{padding-top:calc(var(--spacing) * 10)}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superwall/studio",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-beta.3",
|
|
4
4
|
"description": "The Superwall studio: paywall browsing, device preview, and editing surfaces. Shared between `superwall dev` (local studio) and the hosted dashboard.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paywall",
|
|
@@ -23,8 +23,22 @@
|
|
|
23
23
|
"src"
|
|
24
24
|
],
|
|
25
25
|
"type": "module",
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"*.css"
|
|
28
|
+
],
|
|
26
29
|
"exports": {
|
|
27
|
-
".":
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/lib/index.d.ts",
|
|
32
|
+
"default": "./dist/lib/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./products": {
|
|
35
|
+
"types": "./dist/lib/lib/products.d.ts",
|
|
36
|
+
"default": "./dist/lib/products.js"
|
|
37
|
+
},
|
|
38
|
+
"./contract": {
|
|
39
|
+
"types": "./dist/lib/lib/contract.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./studio.css": "./dist/lib/studio.css",
|
|
28
42
|
"./styles.css": "./src/styles.css",
|
|
29
43
|
"./package.json": "./package.json"
|
|
30
44
|
},
|
|
@@ -33,15 +47,16 @@
|
|
|
33
47
|
},
|
|
34
48
|
"scripts": {
|
|
35
49
|
"dev": "vite",
|
|
36
|
-
"build": "vite build",
|
|
50
|
+
"build": "vite build && vite build -c vite.lib.config.ts && tsc -p tsconfig.lib.json",
|
|
37
51
|
"preview": "vite preview",
|
|
38
|
-
"typecheck": "tsc -p tsconfig.json",
|
|
52
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.lib.json --noEmit",
|
|
39
53
|
"test": "vitest",
|
|
40
54
|
"test:run": "vitest --run",
|
|
41
55
|
"test:coverage": "vitest --run --coverage",
|
|
42
56
|
"clean": "rm -rf dist coverage"
|
|
43
57
|
},
|
|
44
58
|
"dependencies": {
|
|
59
|
+
"@superwall/host": "1.3.0-beta.3",
|
|
45
60
|
"sonner": "^2.0.7"
|
|
46
61
|
},
|
|
47
62
|
"devDependencies": {
|
package/src/StudioApp.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { StudioShell } from "./components/chrome/StudioShell";
|
|
2
3
|
import { SurfaceEditor } from "./screens/SurfaceEditor";
|
|
3
4
|
import { SurfaceList } from "./screens/SurfaceList";
|
|
4
|
-
import {
|
|
5
|
+
import { surfacePath } from "./lib/preview";
|
|
5
6
|
import { fetchSamples } from "./lib/actions";
|
|
6
|
-
import type { Samples, StudioSource, StudioSurface } from "./lib/
|
|
7
|
+
import type { Samples, StudioSource, StudioSurface } from "./lib/surfaces";
|
|
7
8
|
|
|
8
9
|
const surfaceFromPath = (
|
|
9
10
|
surfaces: StudioSurface[],
|
|
@@ -22,11 +23,9 @@ const surfaceFromPath = (
|
|
|
22
23
|
export const StudioApp = ({
|
|
23
24
|
source,
|
|
24
25
|
device = false,
|
|
25
|
-
openPreview = (url) => window.location.assign(url),
|
|
26
26
|
}: {
|
|
27
27
|
source: StudioSource;
|
|
28
28
|
device?: boolean;
|
|
29
|
-
openPreview?: (url: string) => void;
|
|
30
29
|
}) => {
|
|
31
30
|
const [pathname, setPathname] = React.useState(() => window.location.pathname);
|
|
32
31
|
const [samples, setSamples] = React.useState<Samples>({});
|
|
@@ -53,26 +52,24 @@ export const StudioApp = ({
|
|
|
53
52
|
setPathname(path);
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
const active =
|
|
55
|
+
const active = surfaceFromPath(source.surfaces, pathname);
|
|
57
56
|
|
|
58
57
|
return (
|
|
59
|
-
<
|
|
58
|
+
<StudioShell>
|
|
60
59
|
{active ? (
|
|
61
60
|
<SurfaceEditor
|
|
62
61
|
source={source}
|
|
63
62
|
surface={active}
|
|
64
63
|
samples={samples}
|
|
65
|
-
onBack={() => navigate("/")}
|
|
64
|
+
onBack={() => navigate(device ? "/device" : "/")}
|
|
66
65
|
/>
|
|
67
66
|
) : (
|
|
68
67
|
<SurfaceList
|
|
69
68
|
source={source}
|
|
70
69
|
device={device}
|
|
71
|
-
onOpen={(surface) =>
|
|
72
|
-
device ? openPreview(devicePreviewPath(surface)) : navigate(surfacePath(surface))
|
|
73
|
-
}
|
|
70
|
+
onOpen={(surface) => navigate(surfacePath(surface))}
|
|
74
71
|
/>
|
|
75
72
|
)}
|
|
76
|
-
</
|
|
73
|
+
</StudioShell>
|
|
77
74
|
);
|
|
78
75
|
};
|