@levo-so/studio 0.1.101 → 0.1.102
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/Beams-DkcjMVZl.js +102 -0
- package/{BillingStep-Brc1Mzo3.js → BillingStep-BTRobf00.js} +1 -1
- package/{Button-XTKnNIl9.js → Button-DTrN8kki.js} +32 -18
- package/{Input-Btdc1Dee.js → CollectionField-7uXvhxYK.js} +57 -76
- package/CollectionInput-lHOvWWav.js +147 -0
- package/{DateTimeWidget-B5lBr0_R.js → DateTimeWidget-BHCP5osb.js} +9 -9
- package/Dots-BrEPvoj3.js +100 -0
- package/{EntryCard-DTcx6wfA.js → EntryCard-CqZlbw1Z.js} +6 -6
- package/Grid-B4XWU9eL.js +99 -0
- package/{LoginCard-CnHmCKUF.js → LoginCard-DWLnYJJU.js} +3 -3
- package/{LoginForm-Ck-xFaDg.js → LoginForm-CEUbBeE3.js} +23 -22
- package/{LoginModal-BdYM8INu.js → LoginModal-AWNLO49X.js} +3 -3
- package/{MessageCard-ChDBqLVG.js → MessageCard-C5ULcfuw.js} +2 -2
- package/{MessageFooter-AzAtJWMo.js → MessageFooter-CATwNJJU.js} +1 -1
- package/{ModalManager-SggxCIno.js → ModalManager-DQXhkmyC.js} +1 -1
- package/{PendingApprovalCard-C6ORDqrY.js → PendingApprovalCard-BowwZMBu.js} +3 -3
- package/{PhoneWidget-BRIAve47.js → PhoneWidget-C6uZmrk8.js} +3 -3
- package/{Popover-BdKCElnb.js → Popover-Du4iigVw.js} +1 -1
- package/RichTextWidget-iYdVRBGB.js +112 -0
- package/Toolbar-BHi_B-nE.js +737 -0
- package/{Tooltip-BOq5vSOW.js → Tooltip-K_gFzjOa.js} +1 -1
- package/{VerifyButton-Bl2QqMpB.js → VerifyButton-D21AOIX3.js} +2 -2
- package/authentication-fXmNYss1.js +36 -0
- package/{bookingCard-D3ZSjq-P.js → bookingCard--NlgtcJs.js} +3 -3
- package/collection.d.ts +83 -0
- package/collection.js +9 -8
- package/{dist-DuTd566a.js → dist-x5VFEnQl.js} +1132 -1059
- package/index.d.ts +43 -7
- package/index.js +1517 -1441
- package/inlineRteTheme-Cn_Vqgsm.js +23 -0
- package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DoVbjk29.js} +39 -60
- package/package.json +2 -2
- package/studio.css +1 -1
- package/useLogin-D2VCOHYI.js +127 -0
- package/{utils-kDaDLLGt.js → utils-Bh9uGjo1.js} +1 -1
- package/{widgets-CWDiqXm9.js → widgets-CG5Z_dk7.js} +48 -48
- package/Beams-B0O3uyYF.js +0 -118
- package/CollectionInput-cmJ0RXzG.js +0 -132
- package/Dots-DjezbpLp.js +0 -137
- package/Grid-C9aUfXM-.js +0 -145
- package/RichTextWidget-CjEoGecM.js +0 -1136
- /package/{Gradient-B1K9Yi04.js → Gradient-B4Er9hym.js} +0 -0
- /package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DC-ySB_o.js} +0 -0
- /package/{Waves-BkaAfGqA.js → Waves-kW-EBDdJ.js} +0 -0
- /package/{card-BQr9258p.js → card-BwNr7kQS.js} +0 -0
- /package/{dialog-Dw6n_36P.js → dialog-CCWrvmHd.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e } from "./getFieldValidations-DZnDgNI0.js";
|
|
2
|
-
import {
|
|
2
|
+
import { d as t } from "./CollectionField-7uXvhxYK.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { c as i } from "react/compiler-runtime";
|
|
5
5
|
import a from "clsx";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as e } from "./getFieldValidations-DZnDgNI0.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as n } from "./CollectionInput-
|
|
3
|
+
import { u as t } from "./CollectionField-7uXvhxYK.js";
|
|
4
|
+
import { t as n } from "./CollectionInput-lHOvWWav.js";
|
|
5
5
|
import { useEffect as r, useState as i } from "react";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { errorToast as c, successToast as l, useLevo as u } from "@levo-so/react";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/constants/authentication.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
value: "otp",
|
|
5
|
+
label: "Email OTP",
|
|
6
|
+
category: "primary"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
value: "magiclink",
|
|
10
|
+
label: "Magic Link",
|
|
11
|
+
category: "primary"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
value: "whatsapp",
|
|
15
|
+
label: "WhatsApp",
|
|
16
|
+
category: "primary"
|
|
17
|
+
}
|
|
18
|
+
], t = [
|
|
19
|
+
{
|
|
20
|
+
value: "google",
|
|
21
|
+
label: "Google",
|
|
22
|
+
category: "alternate"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: "microsoft",
|
|
26
|
+
label: "Microsoft",
|
|
27
|
+
category: "alternate"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
value: "linkedin",
|
|
31
|
+
label: "LinkedIn",
|
|
32
|
+
category: "alternate"
|
|
33
|
+
}
|
|
34
|
+
], n = [...e, ...t], r = e.map((e) => e.value), i = t.map((e) => e.value), a = (e) => r.includes(e), o = (e) => i.includes(e), s = "membership.account.ACCOUNT_PENDING_APPROVAL", c = (e) => e ? e === "membership.account.ACCOUNT_PENDING_APPROVAL" || e.includes("ACCOUNT_PENDING_APPROVAL") : !1;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { e as a, c, s as i, a as l, t as n, r as o, n as r, o as s, i as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as e } from "./AuthProvider-56TywIOB.js";
|
|
3
|
-
import { t } from "./Button-
|
|
4
|
-
import { n, t as r } from "./StripePaymentModal-
|
|
5
|
-
import { BillingStep as ee } from "./BillingStep-
|
|
3
|
+
import { t } from "./Button-DTrN8kki.js";
|
|
4
|
+
import { n, t as r } from "./StripePaymentModal-DC-ySB_o.js";
|
|
5
|
+
import { BillingStep as ee } from "./BillingStep-BTRobf00.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/collection.d.ts
CHANGED
|
@@ -2,20 +2,31 @@ import { AsyncPaginateProps } from 'react-select-async-paginate';
|
|
|
2
2
|
import { CommonFieldInterfacesList } from '@levo-so/core';
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
4
|
import { default as default_2 } from 'react';
|
|
5
|
+
import { Extension } from '@tiptap/core';
|
|
5
6
|
import { FieldInterfacesList } from '@levo-so/core';
|
|
6
7
|
import { FieldKindList } from '@levo-so/core';
|
|
7
8
|
import { FieldValues } from 'react-hook-form';
|
|
9
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
10
|
+
import { Icon } from '@tabler/icons-react';
|
|
8
11
|
import { IFieldError } from '@levo-so/core';
|
|
9
12
|
import { ILemaCollection } from '@levo-so/core';
|
|
10
13
|
import { ILemaField } from '@levo-so/core';
|
|
11
14
|
import { ILemaFieldOptions } from '@levo-so/core';
|
|
12
15
|
import { ILevoMembership } from '@levo-so/core';
|
|
13
16
|
import { JSX } from 'react/jsx-runtime';
|
|
17
|
+
import { Mark } from '@tiptap/core';
|
|
14
18
|
import { MediaKindList } from '@levo-so/core';
|
|
19
|
+
import { PlaceholderOptions } from '@tiptap/extensions';
|
|
15
20
|
import { ReactElement } from 'react';
|
|
16
21
|
import { RecipeVariants } from '@vanilla-extract/recipes';
|
|
22
|
+
import { RefAttributes } from 'react';
|
|
17
23
|
import { RegisterOptions } from 'react-hook-form';
|
|
18
24
|
import { RuntimeFn } from '@vanilla-extract/recipes';
|
|
25
|
+
import { SelectionOptions } from '@tiptap/extensions';
|
|
26
|
+
import { StarterKitOptions } from '@tiptap/starter-kit';
|
|
27
|
+
import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
|
|
28
|
+
import { TypographyOptions } from '@tiptap/extension-typography';
|
|
29
|
+
import { UniqueIDOptions } from '@tiptap/extension-unique-id';
|
|
19
30
|
import { UseFormReturn } from 'react-hook-form';
|
|
20
31
|
import { UseFormSetError } from 'react-hook-form';
|
|
21
32
|
|
|
@@ -23,6 +34,15 @@ export declare const areAllFieldsHidden: (fields: ILemaField[]) => boolean;
|
|
|
23
34
|
|
|
24
35
|
export declare const AsyncSelectPaginate: default_2.FC<AsyncPaginateProps<any, any, any, any>>;
|
|
25
36
|
|
|
37
|
+
/**
|
|
38
|
+
* `children` are rendered as an extra trailing group, separated from the
|
|
39
|
+
* built-in clusters by a vertical divider. Lets host apps (e.g. dashboard)
|
|
40
|
+
* append AI / variables / custom buttons without re-implementing the rest.
|
|
41
|
+
*/
|
|
42
|
+
export declare const CollectionEditorToolbar: React.FC<{
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}>;
|
|
45
|
+
|
|
26
46
|
/**
|
|
27
47
|
* Collection-scoped field wrapper.
|
|
28
48
|
* Composes levocn Field primitives with collection theme overrides.
|
|
@@ -67,6 +87,9 @@ export declare function CollectionLabel({ label, isRequired, htmlFor, }: {
|
|
|
67
87
|
|
|
68
88
|
export declare const createWidget: (component: WidgetComponent) => WidgetComponent;
|
|
69
89
|
|
|
90
|
+
/** Curated list of currency symbols available to schema authors. */
|
|
91
|
+
export declare const CURRENCY_SYMBOLS: ICurrencySymbolOption[];
|
|
92
|
+
|
|
70
93
|
export declare const DEFAULT_WIDGET_REGISTRY: IWidgetRegistry;
|
|
71
94
|
|
|
72
95
|
export declare const errorsToParam: (data: Record<string, string[]>) => ParamError[];
|
|
@@ -141,6 +164,18 @@ export declare const FormVariantOptions: readonly [{
|
|
|
141
164
|
|
|
142
165
|
export declare type FormVariantType = (typeof FormVariantOptions)[number]["value"];
|
|
143
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Extensions for the collection form rich text editor.
|
|
169
|
+
*
|
|
170
|
+
* Mirrors the legacy editor-package kit: StarterKit minus blockquote,
|
|
171
|
+
* codeBlock and horizontalRule (collection forms never used these), with
|
|
172
|
+
* super/subscript marks, unique IDs for diffable nodes, typography
|
|
173
|
+
* shortcuts, selection decoration, and node-level alignment.
|
|
174
|
+
*/
|
|
175
|
+
export declare const getCollectionEditorExtensions: (options?: {
|
|
176
|
+
placeholder?: string;
|
|
177
|
+
}) => (Extension<StarterKitOptions, any> | Extension<PlaceholderOptions, any> | Extension<TypographyOptions, any> | Extension<SelectionOptions, any> | Mark<SuperscriptExtensionOptions, any> | Extension<NodeAlignmentOptions, any> | Extension<UniqueIDOptions, any>)[];
|
|
178
|
+
|
|
144
179
|
export declare const getDefaultFieldValues: (fields: ILemaField[]) => Record<string, unknown>;
|
|
145
180
|
|
|
146
181
|
export declare const getDefaultValuesByKind: (schema: ILemaCollection | null) => Record<string, unknown>;
|
|
@@ -207,6 +242,12 @@ declare interface ICommonRendererProps {
|
|
|
207
242
|
};
|
|
208
243
|
}
|
|
209
244
|
|
|
245
|
+
export declare interface ICurrencySymbolOption {
|
|
246
|
+
label: string;
|
|
247
|
+
value: string;
|
|
248
|
+
code: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
210
251
|
export declare interface IFieldControlProps {
|
|
211
252
|
error?: any;
|
|
212
253
|
touched?: any;
|
|
@@ -310,6 +351,9 @@ export declare interface ILevoFormThemeContext {
|
|
|
310
351
|
cssReset?: boolean;
|
|
311
352
|
}
|
|
312
353
|
|
|
354
|
+
/** Symbol used to switch thousands grouping to the Indian (lakh/crore) system. */
|
|
355
|
+
export declare const INR_CURRENCY_SYMBOL = "\u20B9";
|
|
356
|
+
|
|
313
357
|
export declare const isPhoneValid: (phone: string) => boolean;
|
|
314
358
|
|
|
315
359
|
declare interface IThemeProviderProps extends Omit<default_2.ComponentPropsWithoutRef<"div">, "className"> {
|
|
@@ -331,12 +375,44 @@ declare interface IThemeWrapperProps extends IThemeProviderProps {
|
|
|
331
375
|
variant?: FormVariantType;
|
|
332
376
|
}
|
|
333
377
|
|
|
378
|
+
declare interface IToolbarButtonProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
379
|
+
label: string;
|
|
380
|
+
Icon: Icon;
|
|
381
|
+
isActive?: boolean;
|
|
382
|
+
iconSize?: number;
|
|
383
|
+
/** Render extra content (e.g. caret) after the icon. */
|
|
384
|
+
trailing?: React.ReactNode;
|
|
385
|
+
}
|
|
386
|
+
|
|
334
387
|
export declare type IWidgetRegistry = Record<(typeof CommonFieldInterfacesList)[number], WidgetComponent>;
|
|
335
388
|
|
|
336
389
|
declare const Label: React.FC<React.ComponentProps<"label">>;
|
|
337
390
|
|
|
338
391
|
export declare const LevoFormProvider: default_2.FC<IFormRendererProps>;
|
|
339
392
|
|
|
393
|
+
declare interface NodeAlignmentOptions {
|
|
394
|
+
/**
|
|
395
|
+
* Node types that should support alignment
|
|
396
|
+
* @default ["paragraph", "heading", "blockquote", "tableCell", "tableHeader"]
|
|
397
|
+
*/
|
|
398
|
+
types: string[];
|
|
399
|
+
/**
|
|
400
|
+
* Use inline style instead of data attribute
|
|
401
|
+
* @default true
|
|
402
|
+
*/
|
|
403
|
+
useStyle?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Valid text alignment values
|
|
406
|
+
* @default ["left", "center", "right", "justify"]
|
|
407
|
+
*/
|
|
408
|
+
textAlignValues: string[];
|
|
409
|
+
/**
|
|
410
|
+
* Valid vertical alignment values
|
|
411
|
+
* @default ["top", "middle", "bottom"]
|
|
412
|
+
*/
|
|
413
|
+
verticalAlignValues: string[];
|
|
414
|
+
}
|
|
415
|
+
|
|
340
416
|
declare type ParamError = {
|
|
341
417
|
message: string;
|
|
342
418
|
name: string;
|
|
@@ -348,6 +424,13 @@ export declare const submitDataParser: (data: Record<string, unknown>, schema: I
|
|
|
348
424
|
|
|
349
425
|
export declare const ThemeWrapper: default_2.FC<IThemeWrapperProps>;
|
|
350
426
|
|
|
427
|
+
/**
|
|
428
|
+
* Stateless toolbar button — caller wires `isActive` / `disabled` from
|
|
429
|
+
* tiptap's `useEditorState`. Wraps levocn's `Button` (variant=ghost, size=sm)
|
|
430
|
+
* for pixel parity with other levocn-styled controls in the app.
|
|
431
|
+
*/
|
|
432
|
+
export declare const ToolbarButton: ForwardRefExoticComponent<IToolbarButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
433
|
+
|
|
351
434
|
export declare const updateFieldWInterface: (tempField: ILemaField, field_interface: (typeof FieldInterfacesList)[number]) => {
|
|
352
435
|
field: {
|
|
353
436
|
id: string;
|
package/collection.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { n as e, r as t, t as n } from "./Toolbar-BHi_B-nE.js";
|
|
2
|
+
import { t as r } from "./getFieldValidations-DZnDgNI0.js";
|
|
3
|
+
import { a as i, c as a, d as o, f as s, i as c, l, n as u, o as d, r as f, s as p, t as m, u as h } from "./widgets-CG5Z_dk7.js";
|
|
4
|
+
import { a as g, c as _, d as v, f as y, h as b, i as x, l as S, m as C, n as w, o as T, p as E, r as D, s as O, u as k } from "./dist-x5VFEnQl.js";
|
|
5
|
+
import { t as A } from "./utils-Bh9uGjo1.js";
|
|
6
|
+
import { a as j, c as M, f as N, i as P, n as F, o as I, r as L, s as R, t as z } from "./CollectionField-7uXvhxYK.js";
|
|
7
|
+
import { t as B } from "./CollectionInput-lHOvWWav.js";
|
|
7
8
|
//#region ../../libraries/react-collection/dist/types/formVariant.js
|
|
8
|
-
var
|
|
9
|
+
var V = [
|
|
9
10
|
{
|
|
10
11
|
value: "default",
|
|
11
12
|
label: "Classic",
|
|
@@ -28,4 +29,4 @@ var I = [
|
|
|
28
29
|
}
|
|
29
30
|
];
|
|
30
31
|
//#endregion
|
|
31
|
-
export {
|
|
32
|
+
export { b as AsyncSelectPaginate, C as CURRENCY_SYMBOLS, n as CollectionEditorToolbar, z as CollectionFieldWrapper, z as FieldWrapper, _ as CollectionForm, D as CollectionFormBuilder, w as CollectionFormRenderer, B as CollectionInput, B as Input, N as CollectionLabel, y as DEFAULT_WIDGET_REGISTRY, j as Field, R as FieldContent, I as FieldDescription, F as FieldError, M as FieldGroup, L as FieldLabel, v as FieldRenderer, P as FieldSet, x as FormBuilder, V as FormVariantOptions, E as INR_CURRENCY_SYMBOL, T as LevoFormProvider, k as ThemeWrapper, e as ToolbarButton, s as areAllFieldsHidden, m as createWidget, c as errorsToParam, t as getCollectionEditorExtensions, d as getDefaultFieldValues, o as getDefaultValuesByKind, r as getFieldValidations, a as getInitialValues, A as getKindFromMimetype, h as getValueIfNotUndefined, l as isPhoneValid, u as setFormErrors, f as submitDataParser, p as updateFieldWInterface, g as useLevoForm, O as useLevoFormContext, S as useLevoFormTheme, i as validateForm };
|