@levo-so/studio 0.1.92 → 0.1.95

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./Button-_hpg7Rxx.js";
2
+ import { t as e } from "./Button-C6BOkG_z.js";
3
3
  import { useState as t } from "react";
4
4
  import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  //#region src/components/bookingCard/BillingStep.tsx
@@ -1016,36 +1016,41 @@ var y = r({
1016
1016
  return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`, a(n);
1017
1017
  }, B = i(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
1018
1018
  if (!n) return null;
1019
- let { kind: l, data: u } = n, d = g(e, i), f = {
1019
+ let { kind: l, data: u } = n, d = t?.icon?.alt, f = g(e, i), p = {
1020
1020
  "data-levo_element_key": o ? void 0 : r,
1021
1021
  "data-levo_element_type": "Icon",
1022
- className: d,
1022
+ className: f,
1023
1023
  ...s
1024
- };
1024
+ }, h = d ? {
1025
+ "aria-label": d,
1026
+ role: "img"
1027
+ } : {};
1025
1028
  switch (l) {
1026
1029
  case "emoji": return /* @__PURE__ */ m("p", {
1027
1030
  style: {
1028
1031
  width: "auto",
1029
1032
  height: "auto",
1030
- ...f.style
1033
+ ...p.style
1031
1034
  },
1032
1035
  ref: c,
1033
- ...f,
1036
+ ...p,
1037
+ ...h,
1034
1038
  children: u?.unicode
1035
1039
  });
1036
1040
  case "icon": {
1037
1041
  let e = u;
1038
1042
  return e?.svgCode ? /* @__PURE__ */ m("div", {
1039
1043
  ref: c,
1040
- ...f,
1044
+ ...p,
1045
+ ...h,
1041
1046
  style: {
1042
1047
  display: a?.display ? void 0 : "inline-block",
1043
- ...f.style
1048
+ ...p.style
1044
1049
  },
1045
1050
  dangerouslySetInnerHTML: { __html: e.svgCode }
1046
1051
  }) : /* @__PURE__ */ m("span", {
1047
1052
  ref: c,
1048
- ...f
1053
+ ...p
1049
1054
  });
1050
1055
  }
1051
1056
  case "custom": return /* @__PURE__ */ m("img", {
@@ -1053,12 +1058,12 @@ var y = r({
1053
1058
  src: u?.location,
1054
1059
  srcSet: u?.srcset?.path,
1055
1060
  decoding: "async",
1056
- alt: "icon",
1057
- ...f
1061
+ alt: d ?? "icon",
1062
+ ...p
1058
1063
  });
1059
1064
  default: return /* @__PURE__ */ m("span", {
1060
1065
  ref: c,
1061
- ...f
1066
+ ...p
1062
1067
  });
1063
1068
  }
1064
1069
  });
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { n as e } from "./AuthProvider-56TywIOB.js";
3
- import { t } from "./Button-_hpg7Rxx.js";
3
+ import { t } from "./Button-C6BOkG_z.js";
4
4
  import { n, t as r } from "./StripePaymentModal-CajqohNM.js";
5
- import { BillingStep as ee } from "./BillingStep-o2yIMjLk.js";
5
+ import { BillingStep as ee } from "./BillingStep-BLwl9IDQ.js";
6
6
  import { useRef as i, useState as a } from "react";
7
7
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  import { cn as te, errorHandler as l, useLevo as u } from "@levo-so/react";
package/index.d.ts CHANGED
@@ -563,6 +563,8 @@ export declare const DEFAULT_VISIBLE_STATE: AnimationProperties;
563
563
 
564
564
  export declare const DEMO_SCHEMA: ILemaCollection;
565
565
 
566
+ export declare const DevTools: React.FC<IDevToolsProps>;
567
+
566
568
  export declare const EditForm: WithBlockPropsComponent<BaseElementProps & {
567
569
  className?: string;
568
570
  initialValues?: Record<string, any>;
@@ -1104,6 +1106,13 @@ declare interface ICreateForumPostProps {
1104
1106
  onPostCreated?: (post: IForumPost) => void;
1105
1107
  }
1106
1108
 
1109
+ export declare interface IDevToolsProps {
1110
+ schema: IBlock;
1111
+ component: React.ComponentType<any>;
1112
+ theme?: ITheme;
1113
+ defaultLayoutIndex?: number;
1114
+ }
1115
+
1107
1116
  export declare type IElementStyle = Record<string, any>;
1108
1117
 
1109
1118
  export declare interface IFieldConfig {
@@ -1173,6 +1182,9 @@ export declare interface IFieldConfig {
1173
1182
  height?: string;
1174
1183
  alt?: string;
1175
1184
  };
1185
+ icon?: {
1186
+ alt?: string;
1187
+ };
1176
1188
  media?: {
1177
1189
  autoPlay?: boolean;
1178
1190
  controls?: boolean;
@@ -2428,6 +2440,12 @@ export declare const sanitizeBackgroundEffectConfig: (config: BackgroundEffectCo
2428
2440
  */
2429
2441
  export declare const sanitizeElementKey: (elementKey: string) => string;
2430
2442
 
2443
+ /**
2444
+ * Converts an IBlock schema definition into a mock IBlockInstance
2445
+ * that LevoBlock can render. Uses layout defaults for content/styles/config.
2446
+ */
2447
+ export declare const schemaToBlockInstance: (schema: IBlock, layoutIndex?: number) => IBlockInstance;
2448
+
2431
2449
  declare interface Scores {
2432
2450
  performance: number;
2433
2451
  seo: number;