@levo-so/studio 0.3.18 → 0.3.20

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/index.d.ts CHANGED
@@ -34,7 +34,6 @@ import * as React_2 from 'react';
34
34
  import { ReactElement } from 'react';
35
35
  import { ReactNode } from 'react';
36
36
  import { RefAttributes } from 'react';
37
- import { Stripe } from '@stripe/stripe-js';
38
37
  import { Tabs } from 'radix-ui';
39
38
  import { Tooltip as Tooltip_2 } from 'radix-ui';
40
39
  import { UseEmblaCarouselType } from 'embla-carousel-react';
@@ -1002,7 +1001,7 @@ declare type HTMLImageProps_2 = Omit<React.DetailedHTMLProps<React.ImgHTMLAttrib
1002
1001
 
1003
1002
  declare type HTMLVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "src" | keyof BaseElementProps>;
1004
1003
 
1005
- /** Keys accepted by the `additionalFields` prop. */
1004
+ /** Keys accepted by the block's legacy `additionalFields` prop. */
1006
1005
  declare type IAdditionalFieldKey = "designation" | "mobile" | "organization";
1007
1006
 
1008
1007
  declare interface IAuthActions {
@@ -1631,7 +1630,7 @@ export declare interface ILocalizedPage {
1631
1630
  id: string;
1632
1631
  language: string;
1633
1632
  title: string;
1634
- status?: "published" | "draft";
1633
+ status?: IPageStatus;
1635
1634
  countries?: string[];
1636
1635
  url?: string;
1637
1636
  }
@@ -1682,9 +1681,26 @@ export declare interface IPage {
1682
1681
  description: string;
1683
1682
  key: string;
1684
1683
  url: string;
1684
+ /**
1685
+ * The address the public is actually being served, which is NOT always {@link url} —
1686
+ * a page renamed in the draft keeps serving its old address until the next publish.
1687
+ *
1688
+ * Empty string, never null, when nothing is serving the page. Before the 2026-08-28
1689
+ * repair this field mirrored `url` even on pages that had never been live, so any code
1690
+ * reading it as "there is a live page here" has to test for emptiness first.
1691
+ */
1685
1692
  live_url: string;
1693
+ /**
1694
+ * Where this page stands between the draft and what's live, decided by the API.
1695
+ *
1696
+ * **Absent, not null, on v1 and v2 sites** — feature-detect with `"sync_state" in page`
1697
+ * rather than comparing against a value. Do not re-derive it by comparing `url` with
1698
+ * `live_url`: the two agree in cases that are not `live` (a never-published page had
1699
+ * both equal until the repair) and the API knows things the page row doesn't.
1700
+ */
1701
+ sync_state?: IPageSyncState;
1686
1702
  domain: string;
1687
- status: "published" | "draft";
1703
+ status: IPageStatus;
1688
1704
  meta: IPageMeta;
1689
1705
  tags: IStudioTags[];
1690
1706
  pagespeed_score: IPageSpeedData;
@@ -1898,6 +1914,32 @@ export declare interface IPageStatMetric {
1898
1914
  change: number | null;
1899
1915
  }
1900
1916
 
1917
+ /**
1918
+ * A page's publication state.
1919
+ *
1920
+ * `archived` only occurs on studio **v3** sites: deleting a page there archives the
1921
+ * preview row and stages the removal, and the live page keeps serving until that removal
1922
+ * is published. An archived row is therefore "pending removal, still live" — not gone.
1923
+ */
1924
+ export declare type IPageStatus = "published" | "draft" | "archived";
1925
+
1926
+ /**
1927
+ * A v3 page's standing relative to the deployed site.
1928
+ *
1929
+ * - `live` — serving, and the draft agrees with it.
1930
+ * - `moved` — still serving its OLD address; the draft renamed it. Linking `url` 404s.
1931
+ * - `removing` — still serving, but deleted in the draft. Goes at the next publish.
1932
+ * - `unpublished` — never been served.
1933
+ */
1934
+ export declare type IPageSyncState = "live" | "moved" | "removing" | "unpublished"
1935
+ /**
1936
+ * Created and deleted in the draft without ever being published. Only a whole-site
1937
+ * publish clears the row (a selective one has nothing to select), so it is shown as
1938
+ * settled rather than pending. Sent from the 2026-09 sync-state fix onward; before it,
1939
+ * these rows arrived mis-labelled `unpublished` and are recognised by `status` instead.
1940
+ */
1941
+ | "discarded";
1942
+
1901
1943
  export declare interface IParsedVariableToken {
1902
1944
  path: string;
1903
1945
  transforms: IVariableTransform[];
@@ -2089,31 +2131,6 @@ export declare const isPendingApprovalError: (code?: string) => boolean;
2089
2131
  */
2090
2132
  export declare const isPrimaryMethod: (method: AuthenticationMethod) => method is "otp" | "magiclink" | "whatsapp";
2091
2133
 
2092
- /**
2093
- * Config passed to StripePaymentModal
2094
- */
2095
- export declare interface IStripePaymentConfig {
2096
- clientSecret: string;
2097
- }
2098
-
2099
- /**
2100
- * Payment metadata from API - for Stripe Embedded Checkout
2101
- */
2102
- export declare interface IStripePaymentMeta {
2103
- /** Stripe publishable key (pk_xxx) */
2104
- key: string;
2105
- /** Checkout Session client_secret (for embedded mode) */
2106
- client_secret: string;
2107
- /** Amount in smallest denomination (cents/paise) */
2108
- amount: number;
2109
- /** ISO currency code */
2110
- currency: string;
2111
- /** Payment provider */
2112
- provider: "stripe";
2113
- /** Internal reference ID */
2114
- reference_id: string;
2115
- }
2116
-
2117
2134
  export declare type IStudioSource = {
2118
2135
  id?: string;
2119
2136
  module: (typeof BlockSourceModuleList)[number];
@@ -2364,26 +2381,6 @@ export declare interface IUserHighlight {
2364
2381
  element: HTMLElement | null;
2365
2382
  }
2366
2383
 
2367
- /**
2368
- * Return type for useStripePayment hook
2369
- */
2370
- export declare interface IUseStripePaymentReturn {
2371
- /** Stripe Promise for EmbeddedCheckoutProvider */
2372
- stripePromise: Promise<Stripe | null> | null;
2373
- /** Config for payment modal */
2374
- config: IStripePaymentConfig | null;
2375
- /** Whether modal is open */
2376
- isOpen: boolean;
2377
- /** Open the Stripe embedded checkout modal */
2378
- openStripeCheckout: (meta: IStripePaymentMeta) => Promise<void>;
2379
- /** Close the modal */
2380
- closeStripeCheckout: () => void;
2381
- /** Set completion callback */
2382
- setOnComplete: (callback: () => void) => void;
2383
- /** Completion callback */
2384
- onComplete: (() => void) | null;
2385
- }
2386
-
2387
2384
  export declare interface IVariableGroup {
2388
2385
  name: string;
2389
2386
  items: IVariableItem[];
@@ -3229,12 +3226,6 @@ export declare const usePageMeta: (module: IStudioSource["module"]) => unknown;
3229
3226
 
3230
3227
  export declare const UserMenu: WithBlockPropsComponent<BaseUserMenuProps>;
3231
3228
 
3232
- /**
3233
- * Hook for managing Stripe Embedded Checkout modal
3234
- * Lazy loads Stripe SDK and manages modal state
3235
- */
3236
- export declare const useStripePayment: () => IUseStripePaymentReturn;
3237
-
3238
3229
  /** Single-token regex — matches a string that is ONLY a `{...}` token. */
3239
3230
  export declare const VARIABLE_SINGLE_TOKEN_REGEX: RegExp;
3240
3231