@superwall/studio 1.6.0 → 1.6.2
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 +27 -10
- package/dist/assets/index-BMe9fPdZ.css +1 -0
- package/dist/assets/index-Czsb6jZs.js +11 -0
- package/dist/index.html +3 -3
- package/dist/lib/components/Dialog.d.ts +7 -0
- package/dist/lib/components/EmptyState.d.ts +9 -0
- package/dist/lib/components/InlineCode.d.ts +2 -0
- package/dist/lib/components/PaywallToasts.d.ts +8 -0
- package/dist/lib/components/SuperwallLogo.d.ts +9 -0
- package/dist/lib/components/Tooltip.d.ts +3 -1
- package/dist/lib/components/chrome/TopBar.d.ts +2 -3
- package/dist/lib/components/controls.d.ts +10 -1
- package/dist/lib/components/icons.d.ts +30 -17
- package/dist/lib/components/menus/ActionMenu.d.ts +4 -1
- package/dist/lib/components/menus/Menu.d.ts +19 -0
- package/dist/lib/index.d.ts +3 -1
- package/dist/lib/index.js +2590 -2064
- package/dist/lib/lib/actions.d.ts +3 -2
- package/dist/lib/lib/contract.d.ts +4 -0
- package/dist/lib/lib/notify.d.ts +4 -1
- package/dist/lib/lib/promotion.d.ts +17 -0
- package/dist/lib/lib/steps.d.ts +2 -1
- package/dist/lib/lib/surfaces.d.ts +10 -4
- package/dist/lib/studio.css +1 -1
- package/package.json +2 -2
- package/src/StudioApp.tsx +3 -2
- package/src/components/Dialog.tsx +74 -0
- package/src/components/DownloadScreenshot.tsx +13 -20
- package/src/components/EmptyState.tsx +32 -0
- package/src/components/InlineCode.tsx +7 -0
- package/src/components/OpenInApp.tsx +15 -14
- package/src/components/PaywallToasts.tsx +44 -37
- package/src/components/PreviewOnDevice.tsx +61 -43
- package/src/components/SuperwallLogo.tsx +72 -0
- package/src/components/SurfaceCard.tsx +34 -18
- package/src/components/Tooltip.tsx +25 -2
- package/src/components/chrome/StudioShell.tsx +1 -1
- package/src/components/chrome/Toolbar.tsx +10 -8
- package/src/components/chrome/TopBar.tsx +21 -22
- package/src/components/controls.tsx +116 -31
- package/src/components/icons.tsx +140 -59
- package/src/components/menus/ActionMenu.tsx +221 -97
- package/src/components/menus/CompareMenu.tsx +48 -67
- package/src/components/menus/Menu.tsx +144 -0
- package/src/components/panels/MissingProducts.tsx +27 -34
- package/src/components/panels/SidePanel.tsx +9 -9
- package/src/components/panels/VariablesPanel.tsx +57 -49
- package/src/components/preview/Canvas.tsx +9 -13
- package/src/components/preview/DeviceFrame.tsx +4 -6
- package/src/index.ts +9 -0
- package/src/lib/actions.ts +13 -4
- package/src/lib/contract.ts +2 -0
- package/src/lib/notify.tsx +15 -18
- package/src/lib/project.ts +1 -0
- package/src/lib/promotion.ts +47 -0
- package/src/lib/steps.ts +9 -1
- package/src/lib/surfaces.ts +22 -2
- package/src/main.tsx +22 -10
- package/src/screens/SurfaceEditor.tsx +101 -63
- package/src/screens/SurfaceList.tsx +112 -69
- package/src/scroll-fade.css +425 -0
- package/src/styles.css +380 -182
- package/dist/assets/index-CljhSsYl.js +0 -11
- package/dist/assets/index-DrsTCwot.css +0 -1
package/dist/index.html
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
/>
|
|
14
14
|
<style>
|
|
15
|
-
body { margin: 0; background: #
|
|
15
|
+
body { margin: 0; background: #0c0d0f; }
|
|
16
16
|
</style>
|
|
17
|
-
<script type="module" crossorigin src="/__studio/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/__studio/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/__studio/assets/index-Czsb6jZs.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/__studio/assets/index-BMe9fPdZ.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div id="root"></div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const Dialog: ({ title, description, footer, onClose, children, }: React.PropsWithChildren<{
|
|
3
|
+
title: string;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}>) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const EmptyState: ({ icon, title, description, actions, tone, size, }: {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
actions?: React.ReactNode;
|
|
7
|
+
tone?: "muted" | "destructive";
|
|
8
|
+
size?: "default" | "lg";
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { HostDelegate } from "@superwall/host";
|
|
3
|
+
import { type IconComponent } from "./icons";
|
|
4
|
+
import { type EventNotice } from "../lib/notices";
|
|
5
|
+
export declare const ToastCard: ({ icon: Icon, tone, children, description, actions, }: React.PropsWithChildren<{
|
|
6
|
+
icon: IconComponent;
|
|
7
|
+
tone: EventNotice["tone"];
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
}>) => React.JSX.Element;
|
|
3
11
|
export declare const createStudioDelegate: () => HostDelegate;
|
|
4
12
|
export declare const useStudioDelegate: () => HostDelegate;
|
|
5
13
|
export declare const PaywallToasts: ({ surfaceKey, raised, }: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The Superwall wordmark, the same artwork as superwall.com and the
|
|
4
|
+
* dashboard: "$UPER" in the accent, "WALL" in the foreground.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SuperwallLogo: ({ className, height, }: {
|
|
7
|
+
className?: string;
|
|
8
|
+
height?: number;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export declare const Tooltip: ({ hint, children }: {
|
|
2
|
+
export declare const Tooltip: ({ hint, side, align, children, }: {
|
|
3
3
|
hint?: string;
|
|
4
|
+
side?: "top" | "bottom";
|
|
5
|
+
align?: "start" | "center" | "end";
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
}) => React.JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export declare const titleFits: (bar: HTMLElement, title: HTMLElement) => boolean;
|
|
3
|
-
export declare const TopBar: ({ title, actions,
|
|
4
|
-
title
|
|
3
|
+
export declare const TopBar: ({ title, actions, label, }: {
|
|
4
|
+
title?: string;
|
|
5
5
|
actions?: React.ReactNode;
|
|
6
|
-
inset?: boolean;
|
|
7
6
|
label?: string;
|
|
8
7
|
}) => React.JSX.Element;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export type ControlSize = "default" | "sm";
|
|
3
|
+
export declare const ControlSizeContext: React.Context<ControlSize>;
|
|
2
4
|
export declare const Segmented: <TValue extends string>({ value, options, onChange, label, }: {
|
|
3
5
|
value: TValue;
|
|
4
6
|
options: readonly {
|
|
5
7
|
value: TValue;
|
|
6
8
|
label: React.ReactNode;
|
|
9
|
+
name?: string;
|
|
7
10
|
}[];
|
|
8
11
|
onChange: (value: TValue) => void;
|
|
9
12
|
label: string;
|
|
10
13
|
}) => React.JSX.Element;
|
|
11
|
-
export declare const Select: ({ value, options, onChange, label, }: {
|
|
14
|
+
export declare const Select: ({ value, options, onChange, label, size, }: {
|
|
12
15
|
value: string;
|
|
13
16
|
options: readonly {
|
|
14
17
|
value: string;
|
|
@@ -16,9 +19,15 @@ export declare const Select: ({ value, options, onChange, label, }: {
|
|
|
16
19
|
}[];
|
|
17
20
|
onChange: (value: string) => void;
|
|
18
21
|
label: string;
|
|
22
|
+
size?: ControlSize;
|
|
19
23
|
}) => React.JSX.Element;
|
|
20
24
|
export declare const Switch: ({ checked, onChange, label, }: {
|
|
21
25
|
checked: boolean;
|
|
22
26
|
onChange: (checked: boolean) => void;
|
|
23
27
|
label: string;
|
|
24
28
|
}) => React.JSX.Element;
|
|
29
|
+
declare const BADGE: Record<"outline" | "success", string>;
|
|
30
|
+
export declare const Badge: ({ variant, children, }: React.PropsWithChildren<{
|
|
31
|
+
variant: keyof typeof BADGE;
|
|
32
|
+
}>) => React.JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export type IconProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export type IconComponent = (props: IconProps) => React.ReactElement;
|
|
6
|
+
export declare const RotateIcon: (props: IconProps) => React.JSX.Element;
|
|
7
|
+
export declare const ExternalIcon: (props: IconProps) => React.JSX.Element;
|
|
8
|
+
export declare const DownloadIcon: (props: IconProps) => React.JSX.Element;
|
|
4
9
|
export declare const SpinnerIcon: () => React.JSX.Element;
|
|
5
|
-
export declare const SunIcon: () => React.JSX.Element;
|
|
6
|
-
export declare const MoonIcon: () => React.JSX.Element;
|
|
7
|
-
export declare const SlidersIcon: () => React.JSX.Element;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const ChevronDownIcon: () => React.JSX.Element;
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
10
|
+
export declare const SunIcon: (props: IconProps) => React.JSX.Element;
|
|
11
|
+
export declare const MoonIcon: (props: IconProps) => React.JSX.Element;
|
|
12
|
+
export declare const SlidersIcon: (props: IconProps) => React.JSX.Element;
|
|
13
|
+
export declare const XIcon: (props: IconProps) => React.JSX.Element;
|
|
14
|
+
export declare const ChevronDownIcon: (props: IconProps) => React.JSX.Element;
|
|
15
|
+
export declare const ChevronsUpDownIcon: (props: IconProps) => React.JSX.Element;
|
|
16
|
+
export declare const CheckIcon: (props: IconProps) => React.JSX.Element;
|
|
17
|
+
export declare const ColumnsIcon: (props: IconProps) => React.JSX.Element;
|
|
18
|
+
export declare const CheckCircleIcon: (props: IconProps) => React.JSX.Element;
|
|
19
|
+
export declare const AlertTriangleIcon: (props: IconProps) => React.JSX.Element;
|
|
20
|
+
export declare const InfoCircleIcon: (props: IconProps) => React.JSX.Element;
|
|
21
|
+
export declare const BoltIcon: (props: IconProps) => React.JSX.Element;
|
|
22
|
+
export declare const CartIcon: (props: IconProps) => React.JSX.Element;
|
|
23
|
+
export declare const BellIcon: (props: IconProps) => React.JSX.Element;
|
|
24
|
+
export declare const StarIcon: (props: IconProps) => React.JSX.Element;
|
|
25
|
+
export declare const UserIcon: (props: IconProps) => React.JSX.Element;
|
|
26
|
+
export declare const RotateDeviceIcon: (props: IconProps) => React.JSX.Element;
|
|
27
|
+
export declare const PencilIcon: (props: IconProps) => React.JSX.Element;
|
|
28
|
+
export declare const MinusIcon: (props: IconProps) => React.JSX.Element;
|
|
29
|
+
export declare const PlusIcon: (props: IconProps) => React.JSX.Element;
|
|
30
|
+
export declare const SearchIcon: (props: IconProps) => React.JSX.Element;
|
|
31
|
+
export declare const QrCodeIcon: (props: IconProps) => React.JSX.Element;
|
|
32
|
+
export declare const AppWindowIcon: (props: IconProps) => React.JSX.Element;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type StudioActionStep, type StudioStepState } from "../../lib/steps";
|
|
3
|
+
import { type Promotion } from "../../lib/promotion";
|
|
3
4
|
import { type StudioActionName } from "../../lib/surfaces";
|
|
4
5
|
export type ActionProgress = {
|
|
5
6
|
action: StudioActionName;
|
|
6
7
|
steps: Partial<Record<StudioActionStep, StudioStepState>>;
|
|
7
8
|
error?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const ActionMenu: ({ progress, blocked, onRun, onBlocked, }: {
|
|
10
|
+
export declare const ActionMenu: ({ offered, promotion, progress, blocked, onRun, onBlocked, }: {
|
|
11
|
+
offered: readonly StudioActionName[];
|
|
12
|
+
promotion: Promotion;
|
|
10
13
|
progress: ActionProgress | undefined;
|
|
11
14
|
blocked?: string;
|
|
12
15
|
onRun: (action: StudioActionName) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type PopupAlign = "start" | "end";
|
|
3
|
+
export declare const useDismiss: (refs: readonly React.RefObject<HTMLElement | null>[], open: boolean, onDismiss: () => void) => void;
|
|
4
|
+
export declare const usePopupAlign: (ref: React.RefObject<HTMLElement | null>, open: boolean) => PopupAlign;
|
|
5
|
+
export declare const MenuPopup: ({ popupRef, anchor, side, align, className, children, }: React.PropsWithChildren<{
|
|
6
|
+
popupRef: React.RefObject<HTMLDivElement | null>;
|
|
7
|
+
anchor: React.RefObject<HTMLElement | null>;
|
|
8
|
+
side: "top" | "bottom";
|
|
9
|
+
align: PopupAlign;
|
|
10
|
+
className?: string;
|
|
11
|
+
}>) => React.ReactPortal;
|
|
12
|
+
export declare const MenuItem: ({ label, hint, selected, onSelect, }: {
|
|
13
|
+
label: string;
|
|
14
|
+
hint?: string;
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
onSelect: () => void;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export declare const MenuGroupLabel: ({ children }: React.PropsWithChildren) => React.JSX.Element;
|
|
19
|
+
export declare const MenuSeparator: () => React.JSX.Element;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -16,11 +16,13 @@ export { DEFAULT_DEVICE_ID, deviceById, STUDIO_DEVICES } from "./lib/devices";
|
|
|
16
16
|
export type { StudioDevice } from "./lib/devices";
|
|
17
17
|
export { hostStateFor, studioDefaults } from "./lib/host";
|
|
18
18
|
export { hasActions } from "./lib/surfaces";
|
|
19
|
+
export { devServerActions } from "./lib/actions";
|
|
20
|
+
export { latestVersion, liveVersion, promotionDirection, type PromotionDirection, } from "./lib/promotion";
|
|
19
21
|
export { devServerLink } from "./lib/scheme";
|
|
20
22
|
export { StudioHostProvider, useStudioHome, useStudioMode, type StudioHome, type StudioMode, } from "./lib/studio-host";
|
|
21
23
|
export { createHostState, diffHostState, hasIntroductoryOffer, silentDelegate, type HostDelegate, type HostProduct, type HostState, } from "@superwall/host";
|
|
22
24
|
export type { HostInputs } from "./lib/host";
|
|
23
25
|
export { buildPreviewPath, hostedUrl, snapshotPreviewUrl, surfacePath } from "./lib/preview";
|
|
24
26
|
export { parseProjectPayload, type StudioProjectPayload } from "./lib/project";
|
|
25
|
-
export type { AppScheme, PreviewUrlBuilder, Samples, StudioActionName, StudioActionProgress, StudioActionResult, StudioPresentation, StudioSource, StudioStatus, StudioSurface, StudioSurfaceKind, StudioVersion, } from "./lib/surfaces";
|
|
27
|
+
export type { AppScheme, PreviewUrlBuilder, Samples, StudioActionName, StudioActionProgress, StudioActionRequest, StudioActionResult, StudioActions, StudioPresentation, StudioSource, StudioStatus, StudioSurface, StudioSurfaceKind, StudioVersion, } from "./lib/surfaces";
|
|
26
28
|
export type { SampleDefaults, VariableOverrides } from "./lib/variables";
|