@levo-so/studio 0.1.112 → 0.1.113
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/{BillingStep-CdfHr9TA.js → BillingStep-DjNmSVkY.js} +1 -1
- package/{Button-Dyp67okY.js → Button-Uwxgkriw.js} +22 -21
- package/{DateTimeWidget-BVHZh4EV.js → DateTimeWidget-CzBq92zC.js} +1 -1
- package/{EntryCard-BYONyIm5.js → EntryCard-C2KA5HMX.js} +1 -1
- package/KBChatWidget-C6K3zT6G.js +944 -0
- package/{LoginCard-CrtSHdaR.js → LoginCard-S_2jls6v.js} +1 -1
- package/{PendingApprovalCard-CsnyrSsa.js → PendingApprovalCard-C06B_Tg-.js} +1 -1
- package/{Popover-DnZY1k6o.js → Popover-C_IQMM8H.js} +1 -0
- package/{PopupRenderer-Dd9zoNIY-Cx663DmW.js → PopupRenderer-Bncp54gB-DysCmUdR.js} +268 -241
- package/{ProfileCard-Dg5TY1Mw.js → ProfileCard-DGanb4BY.js} +1 -1
- package/{RichTextWidget-yaDCZwIo.js → RichTextWidget-BfZ3sCcx.js} +1 -1
- package/{Toolbar-D3PnF7Ud.js → Toolbar-6IXR9qAh.js} +1 -1
- package/{bookingCard-X0dfbVqn.js → bookingCard-CUv7WgqT.js} +2 -2
- package/collection.js +3 -3
- package/{dist-bHoi1bCB.js → dist-D-y51gmU.js} +1 -1
- package/gradients-DfbdH7nO.js +13 -0
- package/index.d.ts +52 -8
- package/index.js +1369 -1148
- package/kbChat-D7WQsERz.js +175 -0
- package/package.json +8 -4
- package/studio.css +1 -1
- package/{utils-C_tr8kXV.js → utils-NDllPDUz.js} +1 -1
- /package/{PhoneWidget-BaDSMSW5.js → PhoneWidget-DdX8_-2v.js} +0 -0
|
@@ -3,7 +3,7 @@ import { r as e, t } from "./inlineRteTheme-abXxag3B.js";
|
|
|
3
3
|
import { t as ee } from "./RteThemeProvider-LFGzAYi1.js";
|
|
4
4
|
import { l as te, t as ne, u as re } from "./CollectionField-DrJuHNsg.js";
|
|
5
5
|
import { i as n } from "./Tooltip-DreKXbTO.js";
|
|
6
|
-
import { r, t as ie } from "./Toolbar-
|
|
6
|
+
import { r, t as ie } from "./Toolbar-6IXR9qAh.js";
|
|
7
7
|
import { c as ae } from "react/compiler-runtime";
|
|
8
8
|
import { useEffect as i, useState as oe } from "react";
|
|
9
9
|
import { jsx as a, jsxs as se } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./Button-lUfKisu8.js";
|
|
|
2
2
|
import { t } from "./nodeAlignment-BC_Uferw.js";
|
|
3
3
|
import { l as n } from "./CollectionField-DrJuHNsg.js";
|
|
4
4
|
import { n as r, r as i, t as a } from "./Tooltip-DreKXbTO.js";
|
|
5
|
-
import { a as o, i as s, n as c, o as l, r as u } from "./Popover-
|
|
5
|
+
import { a as o, i as s, n as c, o as l, r as u } from "./Popover-C_IQMM8H.js";
|
|
6
6
|
import { c as d } from "react/compiler-runtime";
|
|
7
7
|
import { forwardRef as f, useEffect as p, useState as m } from "react";
|
|
8
8
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-Uwxgkriw.js";
|
|
3
3
|
import { n as t } from "./AuthProvider-C6bvedwF.js";
|
|
4
4
|
import { n, t as r } from "./StripePaymentModal-BsYNQ4MB.js";
|
|
5
|
-
import { BillingStep as i } from "./BillingStep-
|
|
5
|
+
import { BillingStep as i } from "./BillingStep-DjNmSVkY.js";
|
|
6
6
|
import { cn as a, errorHandler as o, useLevo as s } from "@levo-so/react";
|
|
7
7
|
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
8
8
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
package/collection.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, n as g, o as _, p as v, r as y, s as b, u as x, v as S, w as C, x as w, y as T } from "./dist-
|
|
1
|
+
import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, n as g, o as _, p as v, r as y, s as b, u as x, v as S, w as C, x as w, y as T } from "./dist-D-y51gmU.js";
|
|
2
2
|
import { a as E, c as D, d as O, i as k, n as A, o as j, r as M, s as N, t as P, u as F } from "./CollectionField-DrJuHNsg.js";
|
|
3
3
|
import { t as I } from "./CollectionInput-CG-Pu_51.js";
|
|
4
|
-
import { t as L } from "./utils-
|
|
5
|
-
import { n as R, r as z, t as B } from "./Toolbar-
|
|
4
|
+
import { t as L } from "./utils-NDllPDUz.js";
|
|
5
|
+
import { n as R, r as z, t as B } from "./Toolbar-6IXR9qAh.js";
|
|
6
6
|
//#region ../../libraries/react-collection/dist/types/formVariant.js
|
|
7
7
|
var V = [
|
|
8
8
|
{
|
|
@@ -2168,7 +2168,7 @@ var Br = "_156u72w0", Vr = "_156u72w1", Hr = (e) => Array.isArray(e) && e.every(
|
|
|
2168
2168
|
leftIcon: n,
|
|
2169
2169
|
...e
|
|
2170
2170
|
}), t[1] = e, t[2] = r), r;
|
|
2171
|
-
}, Gr = L(() => import("./DateTimeWidget-
|
|
2171
|
+
}, Gr = L(() => import("./DateTimeWidget-CzBq92zC.js")), Kr = L(() => import("./PhoneWidget-DdX8_-2v.js")), qr = L(() => import("./RichTextWidget-BfZ3sCcx.js")), Jr = {
|
|
2172
2172
|
TextWidget: $((e) => /* @__PURE__ */ G(ur, { ...e })),
|
|
2173
2173
|
NumberWidget: $((e) => /* @__PURE__ */ G(ur, {
|
|
2174
2174
|
type: "number",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region ../../libraries/ai-chat/src/helpers.ts
|
|
2
|
+
var e = (e, t = {
|
|
3
|
+
hour: "numeric",
|
|
4
|
+
minute: "2-digit"
|
|
5
|
+
}) => {
|
|
6
|
+
if (!e) return "";
|
|
7
|
+
let n = e instanceof Date ? e : new Date(e);
|
|
8
|
+
return Number.isNaN(n.getTime()) ? "" : n.toLocaleTimeString([], t);
|
|
9
|
+
}, t = (e, t) => t ? `levo.site_chat.${e}.${t}` : null, n = (e, t) => {
|
|
10
|
+
e.style.height = "auto", e.style.height = t === void 0 ? `${e.scrollHeight}px` : `${Math.min(e.scrollHeight, t)}px`;
|
|
11
|
+
}, r = "linear-gradient(to right, color-mix(in oklch, var(--ai-chat-thinking-1, oklch(0.65 0.15 253.81)) 40%, transparent), color-mix(in oklch, var(--ai-chat-thinking-2, oklch(0.65 0.15 17.5826)) 40%, transparent))", i = "linear-gradient(to right, var(--ai-chat-thinking-1, oklch(0.65 0.15 253.81)), var(--ai-chat-thinking-2, oklch(0.65 0.15 17.5826)))";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as a, e as i, i as n, n as r, r as t };
|
package/index.d.ts
CHANGED
|
@@ -446,6 +446,12 @@ declare interface CarouselProps extends BaseElementProps {
|
|
|
446
446
|
*/
|
|
447
447
|
export declare const CategoryFilter: React.FC<ICategoryFilterProps>;
|
|
448
448
|
|
|
449
|
+
/**
|
|
450
|
+
* Invalidate every cached entry whose key contains `match` (typically a source
|
|
451
|
+
* identifier). Called after a content edit so the page refetches fresh data.
|
|
452
|
+
*/
|
|
453
|
+
export declare const clearContentCache: (match: string) => Promise<void>;
|
|
454
|
+
|
|
449
455
|
export declare const colorOptions: {
|
|
450
456
|
readonly brand: {
|
|
451
457
|
readonly label: "Brand";
|
|
@@ -702,7 +708,7 @@ export declare const fetchCollectionSchema: ({ levoClient, source, cookies, draf
|
|
|
702
708
|
};
|
|
703
709
|
}>;
|
|
704
710
|
|
|
705
|
-
export declare const fetchSource: ({ levoClient, source, workspace_id, slugs, params, cookies, draft, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
|
|
711
|
+
export declare const fetchSource: ({ levoClient, source, workspace_id, slugs, params, cookies, draft, language, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
|
|
706
712
|
|
|
707
713
|
/**
|
|
708
714
|
* Recursively searches content_schema for a field with matching key
|
|
@@ -921,12 +927,13 @@ export declare const getPageData: ({ levoClient, workspace, url, draft, visitorP
|
|
|
921
927
|
cookies?: string;
|
|
922
928
|
}) => Promise<IPageFromPath | null>;
|
|
923
929
|
|
|
924
|
-
export declare const getPageSource: ({ levoClient, pageData, slugs, cookies, draft, }: {
|
|
930
|
+
export declare const getPageSource: ({ levoClient, pageData, slugs, cookies, draft, language, }: {
|
|
925
931
|
levoClient: ILevoClient;
|
|
926
932
|
pageData: IPageExpanded;
|
|
927
933
|
slugs: Record<string, string>;
|
|
928
934
|
cookies?: string;
|
|
929
935
|
draft?: boolean;
|
|
936
|
+
language?: string;
|
|
930
937
|
}) => Promise<{
|
|
931
938
|
pageContext: IPageContext;
|
|
932
939
|
pageMeta: TPageMeta;
|
|
@@ -1091,7 +1098,7 @@ export declare interface IBlockInstance {
|
|
|
1091
1098
|
created_at: string;
|
|
1092
1099
|
updated_at: string;
|
|
1093
1100
|
deleted_at: any;
|
|
1094
|
-
site_version: "v1" | "v2";
|
|
1101
|
+
site_version: "v1" | "v2" | "v3";
|
|
1095
1102
|
}
|
|
1096
1103
|
|
|
1097
1104
|
export declare interface IBlockLayouts {
|
|
@@ -1300,8 +1307,8 @@ export declare interface IFieldConfig {
|
|
|
1300
1307
|
selected_fields?: string[];
|
|
1301
1308
|
};
|
|
1302
1309
|
action?: {
|
|
1303
|
-
type: "page" | "external_link" | "email" | "phone" | "login" | "popup" | "none";
|
|
1304
|
-
/** For type "popup", holds the popup id to open. */
|
|
1310
|
+
type: "page" | "page_section" | "external_link" | "email" | "phone" | "login" | "popup" | "none";
|
|
1311
|
+
/** For type "popup", holds the popup id to open. For "page_section", holds the target block id (rendered as a `#<blockId>` in-page anchor). */
|
|
1305
1312
|
value: string;
|
|
1306
1313
|
alt?: string;
|
|
1307
1314
|
options: {
|
|
@@ -1451,6 +1458,11 @@ declare interface IJsonEditorProps {
|
|
|
1451
1458
|
onChange: (value: Record<string, any>) => void;
|
|
1452
1459
|
}
|
|
1453
1460
|
|
|
1461
|
+
export declare interface IKBChatProps {
|
|
1462
|
+
workspace: IWorkspace;
|
|
1463
|
+
site: ISite;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1454
1466
|
/**
|
|
1455
1467
|
* A sibling language variant as returned by the studio runtime
|
|
1456
1468
|
* (`get-page-from-path` → `data.language_variants`). Drives the published-site
|
|
@@ -1636,7 +1648,7 @@ export declare interface IPage {
|
|
|
1636
1648
|
id: string;
|
|
1637
1649
|
workspace_id: string;
|
|
1638
1650
|
site_id: string;
|
|
1639
|
-
site_version?: "v1" | "v2";
|
|
1651
|
+
site_version?: "v1" | "v2" | "v3";
|
|
1640
1652
|
title: string;
|
|
1641
1653
|
description: string;
|
|
1642
1654
|
key: string;
|
|
@@ -1964,7 +1976,7 @@ export declare interface ISite {
|
|
|
1964
1976
|
object: string;
|
|
1965
1977
|
id: string;
|
|
1966
1978
|
workspace_id: string;
|
|
1967
|
-
site_version: "v1" | "v2";
|
|
1979
|
+
site_version: "v1" | "v2" | "v3";
|
|
1968
1980
|
name: string;
|
|
1969
1981
|
slug: string;
|
|
1970
1982
|
timezone: string;
|
|
@@ -2078,6 +2090,8 @@ export declare type IStudioSource = {
|
|
|
2078
2090
|
module: (typeof BlockSourceModuleList)[number];
|
|
2079
2091
|
identifier: string;
|
|
2080
2092
|
field_key: string;
|
|
2093
|
+
/** Owning workspace, sent with system-defined sources at create-single so the backend scopes the source record. */
|
|
2094
|
+
workspace_id?: string;
|
|
2081
2095
|
params?: Record<string, any>;
|
|
2082
2096
|
options?: {
|
|
2083
2097
|
sub_module?: "latest_posts" | "popular_posts" | "related_posts" | "author_posts" | "category_posts" | "tag_posts";
|
|
@@ -2395,6 +2409,14 @@ export declare const JoinRequestForm: default_2.FC<IJoinRequestFormProps>;
|
|
|
2395
2409
|
|
|
2396
2410
|
export declare const JsonEditor: React.FC<IJsonEditorProps>;
|
|
2397
2411
|
|
|
2412
|
+
/**
|
|
2413
|
+
* Studio's site AI chat widget, derived from `workspace`/`site` the same way
|
|
2414
|
+
* `LevoPage` mounts it automatically. Exported standalone for callers that
|
|
2415
|
+
* render outside `LevoPage` (custom layouts, non-block pages) and still want
|
|
2416
|
+
* the chat widget wired up without re-deriving its props by hand.
|
|
2417
|
+
*/
|
|
2418
|
+
export declare const KBChat: React.FC<IKBChatProps>;
|
|
2419
|
+
|
|
2398
2420
|
export declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): JSX.Element;
|
|
2399
2421
|
|
|
2400
2422
|
export declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
@@ -2582,7 +2604,7 @@ declare type ParseResult = {
|
|
|
2582
2604
|
prefix: string;
|
|
2583
2605
|
};
|
|
2584
2606
|
|
|
2585
|
-
export declare const parseVariablesFromResolvedSource: ({ levoClient, block, resolvedSources, pageContext, siteData, cookies, draft, workspace_id, }: {
|
|
2607
|
+
export declare const parseVariablesFromResolvedSource: ({ levoClient, block, resolvedSources, pageContext, siteData, cookies, draft, workspace_id, language, }: {
|
|
2586
2608
|
levoClient: ILevoClient;
|
|
2587
2609
|
block: IBlockInstance;
|
|
2588
2610
|
resolvedSources: IBlockInstance["source"];
|
|
@@ -2591,6 +2613,7 @@ export declare const parseVariablesFromResolvedSource: ({ levoClient, block, res
|
|
|
2591
2613
|
siteData?: Record<string, any>;
|
|
2592
2614
|
cookies?: string;
|
|
2593
2615
|
draft?: boolean;
|
|
2616
|
+
language?: string;
|
|
2594
2617
|
}) => Promise<[IBlockInstance, Record<string, IResponseMultiple<Record<string, unknown>>>]>;
|
|
2595
2618
|
|
|
2596
2619
|
/** Parse the inner expression of a `{...}` token into a path + transforms. */
|
|
@@ -2801,6 +2824,14 @@ export declare const RegisterModal: ({ eventID, title, external, buttonText, }:
|
|
|
2801
2824
|
buttonText?: string;
|
|
2802
2825
|
}) => JSX.Element;
|
|
2803
2826
|
|
|
2827
|
+
/**
|
|
2828
|
+
* Drop the cached DB connection so the next cache access re-opens and re-wipes
|
|
2829
|
+
* the store. Call when leaving studio: client-side navigation keeps this module
|
|
2830
|
+
* alive, so without this the reused connection would skip the open-time wipe and
|
|
2831
|
+
* serve the previous session's data when studio is reopened without a reload.
|
|
2832
|
+
*/
|
|
2833
|
+
export declare const resetContentCache: () => void;
|
|
2834
|
+
|
|
2804
2835
|
export declare const resolveStyles: ({ skeleton, blockFetchedContent, blockSources, currentPath, }: {
|
|
2805
2836
|
skeleton: any;
|
|
2806
2837
|
blockFetchedContent: Record<string, any>;
|
|
@@ -2861,6 +2892,12 @@ export declare const sanitizeBackgroundEffectConfig: (config: BackgroundEffectCo
|
|
|
2861
2892
|
*/
|
|
2862
2893
|
export declare const sanitizeElementKey: (elementKey: string) => string;
|
|
2863
2894
|
|
|
2895
|
+
/** Cache for collection schema responses, keyed by request url. */
|
|
2896
|
+
export declare const schemaCache: {
|
|
2897
|
+
get: (key: string) => Promise<unknown>;
|
|
2898
|
+
set: (key: string, value: unknown) => Promise<void>;
|
|
2899
|
+
};
|
|
2900
|
+
|
|
2864
2901
|
/**
|
|
2865
2902
|
* Converts an IBlock schema definition into a mock IBlockInstance
|
|
2866
2903
|
* that LevoBlock can render. Uses layout defaults for content/styles/config.
|
|
@@ -2931,6 +2968,12 @@ export declare function Skeleton({ className, ...props }: React.ComponentProps<"
|
|
|
2931
2968
|
*/
|
|
2932
2969
|
export declare const snapDateStyle: (style: TDateStyle, available: readonly TDateStyle[]) => TDateStyle;
|
|
2933
2970
|
|
|
2971
|
+
/** Cache for content-engine source query responses, keyed by request url. */
|
|
2972
|
+
export declare const sourceCache: {
|
|
2973
|
+
get: (key: string) => Promise<unknown>;
|
|
2974
|
+
set: (key: string, value: unknown) => Promise<void>;
|
|
2975
|
+
};
|
|
2976
|
+
|
|
2934
2977
|
export declare interface SourceFetchOptions {
|
|
2935
2978
|
levoClient: ILevoClient;
|
|
2936
2979
|
source: IStudioSource;
|
|
@@ -2939,6 +2982,7 @@ export declare interface SourceFetchOptions {
|
|
|
2939
2982
|
params?: Record<string, unknown>;
|
|
2940
2983
|
cookies?: string;
|
|
2941
2984
|
draft?: boolean;
|
|
2985
|
+
language?: string;
|
|
2942
2986
|
}
|
|
2943
2987
|
|
|
2944
2988
|
export declare interface SourceURL {
|