@superblocksteam/library 2.0.0-next.9 → 2.0.0-next.90
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/dist/{allPaths-BXojk62W.js → allPaths-DOgAt63V.js} +2 -2
- package/dist/{allPaths-BXojk62W.js.map → allPaths-DOgAt63V.js.map} +1 -1
- package/dist/{allPaths-CAGAw9-M.js → allPaths-Dc08Uuni.js} +2 -2
- package/dist/{allPaths-CAGAw9-M.js.map → allPaths-Dc08Uuni.js.map} +1 -1
- package/dist/{allPathsLoader-B4ukhqHJ.js → allPathsLoader-BzmY34gE.js} +3 -3
- package/dist/{allPathsLoader-DyEaA2Fu.js.map → allPathsLoader-BzmY34gE.js.map} +1 -1
- package/dist/{allPathsLoader-DyEaA2Fu.js → allPathsLoader-jAK8KtBp.js} +3 -3
- package/dist/{allPathsLoader-B4ukhqHJ.js.map → allPathsLoader-jAK8KtBp.js.map} +1 -1
- package/dist/{index-CzpxmuHJ.js → index-CKR37N65.js} +15995 -15028
- package/dist/{index-CzpxmuHJ.js.map → index-CKR37N65.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-DDVqG3q2.js → splitPathsBySizeLoader-BVTvOB-F.js} +2 -2
- package/dist/{splitPathsBySizeLoader-DDVqG3q2.js.map → splitPathsBySizeLoader-BVTvOB-F.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-B4CtleKq.js → splitPathsBySizeLoader-Rnz3IBJT.js} +2 -2
- package/dist/{splitPathsBySizeLoader-B4CtleKq.js.map → splitPathsBySizeLoader-Rnz3IBJT.js.map} +1 -1
- package/dist-types/edit-mode/default-table-data.d.ts +71 -0
- package/dist-types/edit-mode/dnd/grid-store.d.ts +29 -4
- package/dist-types/edit-mode/dnd/utils.d.ts +7 -10
- package/dist-types/edit-mode/features/connection-manager.d.ts +1 -2
- package/dist-types/edit-mode/features/operation-store.d.ts +4 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +1 -1
- package/dist-types/edit-mode/features/resizing-store.d.ts +1 -0
- package/dist-types/edit-mode/source-update-api.d.ts +3 -19
- package/dist-types/lib/internal-details/identifier-normalizer.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +7 -5
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +2 -1
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +12 -1
- package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +0 -1
- package/dist-types/lib/internal-details/lib/types.d.ts +3 -0
- package/dist-types/lib/internal-details/scope/global.d.ts +1 -0
- package/dist-types/lib/user-facing/component-base/components/button.d.ts +3 -4
- package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +3 -11
- package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +11 -8
- package/dist-types/lib/user-facing/components/button/index.d.ts +1 -1
- package/dist-types/lib/user-facing/components/button/props.d.ts +4 -10
- package/dist-types/lib/user-facing/components/column/index.d.ts +8 -21
- package/dist-types/lib/user-facing/components/column/props.d.ts +8 -20
- package/dist-types/lib/user-facing/components/container/index.d.ts +12 -24
- package/dist-types/lib/user-facing/components/container/props.d.ts +7 -22
- package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +3 -3
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +1 -1
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +1 -1
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +1 -1
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +2 -2
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +2 -2
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +1 -1
- package/dist-types/lib/user-facing/components/grid/index.d.ts +8 -8
- package/dist-types/lib/user-facing/components/image/index.d.ts +1 -1
- package/dist-types/lib/user-facing/components/image/props.d.ts +1 -1
- package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +1 -1
- package/dist-types/lib/user-facing/components/input/index.d.ts +9 -15
- package/dist-types/lib/user-facing/components/input/props.d.ts +10 -15
- package/dist-types/lib/user-facing/components/modal/index.d.ts +10 -15
- package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +2 -2
- package/dist-types/lib/user-facing/components/modal/props.d.ts +10 -15
- package/dist-types/lib/user-facing/components/pixel-input/index.d.ts +7 -0
- package/dist-types/lib/user-facing/components/section/index.d.ts +2 -2
- package/dist-types/lib/user-facing/components/section/props.d.ts +2 -2
- package/dist-types/lib/user-facing/components/stack/index.d.ts +2 -2
- package/dist-types/lib/user-facing/components/switch/index.d.ts +1 -1
- package/dist-types/lib/user-facing/components/switch/props.d.ts +1 -1
- package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +74 -70
- package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +5 -5
- package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +2 -2
- package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +4 -4
- package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +3 -3
- package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/index.d.ts +91 -87
- package/dist-types/lib/user-facing/components/table/props.d.ts +92 -89
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +3 -3
- package/dist-types/lib/user-facing/components/table/table-styles.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +21 -13
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +2 -2
- package/dist-types/lib/user-facing/components/table/types.d.ts +21 -32
- package/dist-types/lib/user-facing/components/text/index.d.ts +5 -5
- package/dist-types/lib/user-facing/components/text/props.d.ts +6 -6
- package/dist-types/lib/user-facing/components/text/utils.d.ts +3 -3
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +4 -8
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +3 -3
- package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +15 -14
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +5 -4
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +2 -1
- package/dist-types/lib/user-facing/state/sb-computed.d.ts +1 -1
- package/dist-types/lib/user-facing/themes/constants.d.ts +2 -0
- package/package.json +4 -3
|
@@ -5,7 +5,7 @@ export declare const SbText: import("react").FC<import("../../properties-panel/p
|
|
|
5
5
|
}>;
|
|
6
6
|
appearance: import("../../properties-panel/props-builder.js").Section<Record<string, import("../../properties-panel/props-builder.js").Prop<any, any>> & ({
|
|
7
7
|
textStyle: import("../../properties-panel/props-builder.js").Prop<import("@superblocksteam/library-shared/types").TextStyleWithVariant, true>;
|
|
8
|
-
|
|
8
|
+
horizontalAlign: import("../../properties-panel/props-builder.js").Prop<import("@superblocksteam/library-shared/props").HorizontalAlign, true>;
|
|
9
9
|
verticalAlign: import("../../properties-panel/props-builder.js").Prop<import("./props.js").VerticalAlign, true>;
|
|
10
10
|
wrapText: import("../../properties-panel/props-builder.js").Prop<boolean, true>;
|
|
11
11
|
animateLoading: import("../../properties-panel/props-builder.js").Prop<boolean, false>;
|
|
@@ -14,16 +14,16 @@ export declare const SbText: import("react").FC<import("../../properties-panel/p
|
|
|
14
14
|
} & (Omit<{
|
|
15
15
|
textType: import("../../properties-panel/props-builder.js").Prop<"number" | "time" | "text" | "date" | "currency", false>;
|
|
16
16
|
}, "textType" | "dateInputFormat" | "dateOutputFormat"> & ({
|
|
17
|
-
minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number,
|
|
18
|
-
maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number,
|
|
17
|
+
minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, false>;
|
|
18
|
+
maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, false>;
|
|
19
19
|
textType: import("../../properties-panel/props-builder.js").Prop<"currency", true>;
|
|
20
20
|
currency: import("../../properties-panel/props-builder.js").Prop<string, true>;
|
|
21
21
|
notation: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
|
|
22
22
|
dateInputFormat?: undefined;
|
|
23
23
|
dateOutputFormat?: undefined;
|
|
24
24
|
} | {
|
|
25
|
-
minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number,
|
|
26
|
-
maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number,
|
|
25
|
+
minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, false>;
|
|
26
|
+
maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, false>;
|
|
27
27
|
textType: import("../../properties-panel/props-builder.js").Prop<"number", true>;
|
|
28
28
|
notation: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
|
|
29
29
|
dateInputFormat?: undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Prop, Section } from "../../properties-panel/props-builder.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HorizontalAlign } from "@superblocksteam/library-shared/props";
|
|
3
3
|
import type { Typographies } from "@superblocksteam/library-shared/types";
|
|
4
4
|
/**
|
|
5
5
|
* TODO:
|
|
@@ -14,7 +14,7 @@ export declare const propertiesDefinition: {
|
|
|
14
14
|
}>;
|
|
15
15
|
appearance: Section<Record<string, Prop<any, any>> & ({
|
|
16
16
|
textStyle: Prop<import("@superblocksteam/library-shared/types").TextStyleWithVariant, true>;
|
|
17
|
-
|
|
17
|
+
horizontalAlign: Prop<HorizontalAlign, true>;
|
|
18
18
|
verticalAlign: Prop<VerticalAlign, true>;
|
|
19
19
|
wrapText: Prop<boolean, true>;
|
|
20
20
|
animateLoading: Prop<boolean, false>;
|
|
@@ -23,16 +23,16 @@ export declare const propertiesDefinition: {
|
|
|
23
23
|
} & (Omit<{
|
|
24
24
|
textType: Prop<"number" | "time" | "text" | "date" | "currency", false>;
|
|
25
25
|
}, "textType" | "dateInputFormat" | "dateOutputFormat"> & ({
|
|
26
|
-
minimumFractionDigits: Prop<number,
|
|
27
|
-
maximumFractionDigits: Prop<number,
|
|
26
|
+
minimumFractionDigits: Prop<number, false>;
|
|
27
|
+
maximumFractionDigits: Prop<number, false>;
|
|
28
28
|
textType: Prop<"currency", true>;
|
|
29
29
|
currency: Prop<string, true>;
|
|
30
30
|
notation: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
|
|
31
31
|
dateInputFormat?: undefined;
|
|
32
32
|
dateOutputFormat?: undefined;
|
|
33
33
|
} | {
|
|
34
|
-
minimumFractionDigits: Prop<number,
|
|
35
|
-
maximumFractionDigits: Prop<number,
|
|
34
|
+
minimumFractionDigits: Prop<number, false>;
|
|
35
|
+
maximumFractionDigits: Prop<number, false>;
|
|
36
36
|
textType: Prop<"number", true>;
|
|
37
37
|
notation: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
|
|
38
38
|
dateInputFormat?: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { propertiesDefinition } from "./props.js";
|
|
2
2
|
import type { InternalProps } from "../../properties-panel/props-builder.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { HorizontalAlign } from "@superblocksteam/library-shared/props";
|
|
4
4
|
import type { TextStyleWithVariant, Typographies, UserAccessibleTheme } from "@superblocksteam/library-shared/types";
|
|
5
5
|
type TextWidgetProps = InternalProps<typeof propertiesDefinition>;
|
|
6
6
|
export declare const useText: ({ text, notation, minimumFractionDigits, maximumFractionDigits, textType, currency, dateInputFormat, dateOutputFormat, }: Pick<TextWidgetProps, "text" | "notation" | "minimumFractionDigits" | "maximumFractionDigits" | "textType" | "currency" | "dateInputFormat" | "dateOutputFormat">) => string | undefined;
|
|
@@ -18,8 +18,8 @@ export declare const useIcon: ({ textStyleWithVariant, }: {
|
|
|
18
18
|
iconSize: number;
|
|
19
19
|
};
|
|
20
20
|
export declare const useStyle: (props: TextWidgetProps) => any;
|
|
21
|
-
export declare const useIconContainerStyles: ({ iconGap,
|
|
21
|
+
export declare const useIconContainerStyles: ({ iconGap, horizontalAlign, }: {
|
|
22
22
|
iconGap: any;
|
|
23
|
-
|
|
23
|
+
horizontalAlign: HorizontalAlign;
|
|
24
24
|
}) => any;
|
|
25
25
|
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Dim } from "@superblocksteam/library-shared";
|
|
2
1
|
import { Prop } from "../props-builder.js";
|
|
2
|
+
import type { Dim } from "@superblocksteam/library-shared";
|
|
3
3
|
import type { PropertiesPanelDisplay } from "@superblocksteam/library-shared/props";
|
|
4
|
-
import type { PerCornerBorderRadius, PerSideBorder } from "@superblocksteam/library-shared/types";
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
width: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false>;
|
|
8
|
-
style: Prop<string, false>;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const border: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<"unknown", "BORDER_CONTROL">>>) => Prop<PerSideBorder, true>;
|
|
4
|
+
import type { BorderStyleBlock, PerCornerBorderRadius, PerSideBorder } from "@superblocksteam/library-shared/types";
|
|
5
|
+
export declare const createPerSideBorder: (border: BorderStyleBlock) => PerSideBorder;
|
|
6
|
+
export declare const border: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<PerSideBorder, "BORDER_CONTROL">>>) => Prop<PerSideBorder, false>;
|
|
11
7
|
export declare const createBorderRadiusObject: (borderRadius: Dim<"px" | "%">) => PerCornerBorderRadius;
|
|
12
8
|
export declare const borderRadius: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<PerCornerBorderRadius, "BORDER_RADIUS_CONTROL">>>) => Prop<PerCornerBorderRadius, true>;
|
|
@@ -8,7 +8,7 @@ export declare const customValidationProperties: {
|
|
|
8
8
|
customValidationRule: Prop<string, true>;
|
|
9
9
|
customErrorMessage: Prop<string, true>;
|
|
10
10
|
};
|
|
11
|
-
export declare const labelPosition: Prop<"left" | "top", true>;
|
|
11
|
+
export declare const labelPosition: () => Prop<"left" | "top", true>;
|
|
12
12
|
export declare const getTypographyOptions: () => {
|
|
13
13
|
label: string;
|
|
14
14
|
value: {
|
|
@@ -39,6 +39,6 @@ export declare const getCustomValidationProperties: ({ errorMessagePlacementSche
|
|
|
39
39
|
export declare const getFractionDigitsProperties: ({ schema, }?: {
|
|
40
40
|
schema?: Omit<Partial<PropertiesPanelDisplay<number, "INPUT_TEXT">>, "controlType">;
|
|
41
41
|
}) => {
|
|
42
|
-
minimumFractionDigits: Prop<number,
|
|
43
|
-
maximumFractionDigits: Prop<number,
|
|
42
|
+
minimumFractionDigits: Prop<number, false>;
|
|
43
|
+
maximumFractionDigits: Prop<number, false>;
|
|
44
44
|
};
|
|
@@ -40,6 +40,9 @@ export declare const size: ({ defaults, defaultsOnAdd, hasMinWidth, hasMaxWidth,
|
|
|
40
40
|
width: Prop<Dim<DimModes>, false>;
|
|
41
41
|
height: Prop<Dim<DimModes>, false>;
|
|
42
42
|
};
|
|
43
|
+
export declare const widthWithoutFit: () => {
|
|
44
|
+
width: Prop<Dim<"px" | "fill" | "%" | "rows" | "columns">, false>;
|
|
45
|
+
};
|
|
43
46
|
export declare const shouldScrollContents: (defaultValue?: boolean) => {
|
|
44
47
|
shouldScrollContents: Prop<boolean, true>;
|
|
45
48
|
};
|
|
@@ -52,7 +55,7 @@ export declare const spacing: (options?: {
|
|
|
52
55
|
spacing: Prop<Dim<"px">, true>;
|
|
53
56
|
};
|
|
54
57
|
export declare const padding: (options?: {
|
|
55
|
-
default?: Padding;
|
|
58
|
+
default?: Padding | ((this: any) => Padding);
|
|
56
59
|
} & Partial<PropertiesPanelDisplay<Padding, "PADDING_CONTROL">>) => {
|
|
57
60
|
padding: Prop<import("@superblocksteam/library-shared/types").Spacing, true>;
|
|
58
61
|
};
|
|
@@ -63,14 +66,9 @@ export declare const getAlignmentProps: <LayoutType extends "vertical" | "horizo
|
|
|
63
66
|
verticalAlign: Prop<VerticalAlignment<LayoutType>, true>;
|
|
64
67
|
horizontalAlign: Prop<HorizontalAlignment<LayoutType>, true>;
|
|
65
68
|
};
|
|
66
|
-
export declare const containerLayout: () => import("../props-builder.js").UnionProp<{
|
|
69
|
+
export declare const containerLayout: (sizeProps?: Record<string, Prop<any, any>>) => import("../props-builder.js").UnionProp<{
|
|
67
70
|
layout: Prop<ContainerLayout, true>;
|
|
68
71
|
}, [{
|
|
69
|
-
readonly layout: Prop<"freeform", true>;
|
|
70
|
-
readonly columns: Prop<number, true>;
|
|
71
|
-
readonly rows: Prop<number, false>;
|
|
72
|
-
readonly rowSize: Prop<number, false>;
|
|
73
|
-
}, {
|
|
74
72
|
readonly verticalAlign: Prop<"center" | "space-around" | "space-between" | "bottom" | "top", true>;
|
|
75
73
|
readonly horizontalAlign: Prop<"center" | "left" | "right", true>;
|
|
76
74
|
readonly layout: Prop<"vertical", true>;
|
|
@@ -78,14 +76,11 @@ export declare const containerLayout: () => import("../props-builder.js").UnionP
|
|
|
78
76
|
readonly verticalAlign: Prop<"center" | "bottom" | "top", true>;
|
|
79
77
|
readonly horizontalAlign: Prop<"center" | "space-around" | "space-between" | "left" | "right", true>;
|
|
80
78
|
readonly layout: Prop<"horizontal", true>;
|
|
81
|
-
}
|
|
82
|
-
layout: Prop<ContainerLayout, true>;
|
|
83
|
-
} & {
|
|
84
|
-
readonly layout: Prop<"freeform", true>;
|
|
79
|
+
}, {
|
|
85
80
|
readonly columns: Prop<number, true>;
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
}
|
|
81
|
+
readonly rowHeight: Prop<Dim<"px">, true>;
|
|
82
|
+
readonly layout: Prop<"freeform", true>;
|
|
83
|
+
}], ({
|
|
89
84
|
layout: Prop<ContainerLayout, true>;
|
|
90
85
|
} & {
|
|
91
86
|
readonly verticalAlign: Prop<"center" | "space-around" | "space-between" | "bottom" | "top", true>;
|
|
@@ -97,6 +92,12 @@ export declare const containerLayout: () => import("../props-builder.js").UnionP
|
|
|
97
92
|
readonly verticalAlign: Prop<"center" | "bottom" | "top", true>;
|
|
98
93
|
readonly horizontalAlign: Prop<"center" | "space-around" | "space-between" | "left" | "right", true>;
|
|
99
94
|
readonly layout: Prop<"horizontal", true>;
|
|
95
|
+
}) | ({
|
|
96
|
+
layout: Prop<ContainerLayout, true>;
|
|
97
|
+
} & {
|
|
98
|
+
readonly columns: Prop<number, true>;
|
|
99
|
+
readonly rowHeight: Prop<Dim<"px">, true>;
|
|
100
|
+
readonly layout: Prop<"freeform", true>;
|
|
100
101
|
})>;
|
|
101
102
|
export declare const basicLayout: () => Section<Record<string, Prop<any, any>> & {
|
|
102
103
|
maxHeight?: Prop<Dim<DimModes>, false> | undefined;
|
|
@@ -99,13 +99,13 @@ type EntityProps<Definition extends PropertiesDefinition, MergedSections = Merge
|
|
|
99
99
|
* - Properties are fully evaluated to their final types
|
|
100
100
|
*/
|
|
101
101
|
type InternalProps<Definition extends PropertiesDefinition, FlattenedProps = EntityProps<Definition>, BaseProps = Omit<SbComponentProps, keyof FlattenedProps>> = FlattenedProps & BaseProps;
|
|
102
|
-
type MakeOptional<T, K extends
|
|
102
|
+
type MakeOptional<T, K extends string> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
|
|
103
103
|
type CleanProps<T> = {
|
|
104
104
|
[K in keyof T as string extends K ? never : K]: T[K];
|
|
105
105
|
};
|
|
106
|
-
type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends
|
|
106
|
+
type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends string, InternalPropsWithDefinition = InternalProps<Definition>> = InternalPropsWithDefinition extends infer U ? U extends any ? MakeOptional<CleanProps<U>, OptionalProps> & {
|
|
107
107
|
[key: string]: any;
|
|
108
|
-
};
|
|
108
|
+
} : never : never;
|
|
109
109
|
/**
|
|
110
110
|
* External props exposed to component consumers
|
|
111
111
|
* - All properties are optional regardless of defaults
|
|
@@ -131,7 +131,7 @@ declare class Section<T extends Record<string, Prop<any, any>> = Record<string,
|
|
|
131
131
|
}[number] : never : INP>(props: INP): Section<T & OUT>;
|
|
132
132
|
add: <INP extends Record<string, Prop<any, any>> | CompositeProp<any> | UnionProp<any, any>, OUT extends INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]>; }[number] : never : INP>(props: INP) => Section<T & OUT>;
|
|
133
133
|
propertiesPanel(config: Omit<SectionDefinition<any>, "props">): this;
|
|
134
|
-
get name(): "Content" | "Routing" | "Interaction" | "Layout" | "Appearance" | "Permissions" | "
|
|
134
|
+
get name(): "Content" | "Routing" | "Interaction" | "Layout" | "Appearance" | "Permissions" | "Uncategorized" | "Event handlers";
|
|
135
135
|
}
|
|
136
136
|
declare class Prop<Type extends DataType, _HasDefault extends boolean = false> {
|
|
137
137
|
protected prop: ManagedProp<Type>;
|
|
@@ -141,6 +141,7 @@ declare class Prop<Type extends DataType, _HasDefault extends boolean = false> {
|
|
|
141
141
|
*/
|
|
142
142
|
protected relations: Relation[][];
|
|
143
143
|
protected constructor(typeString: DataTypeString, defaultValidator?: ValidateFn<Type | undefined>);
|
|
144
|
+
static unset(): Prop<undefined>;
|
|
144
145
|
static string<T extends string>(): Prop<T>;
|
|
145
146
|
static number<T extends number>(): Prop<T>;
|
|
146
147
|
static boolean<T extends boolean>(): Prop<T>;
|
|
@@ -2,13 +2,14 @@ import type { Entity } from "../../internal-details/lib/evaluator/base-entity-ma
|
|
|
2
2
|
type ValidationResult<T = any> = {
|
|
3
3
|
valid: false;
|
|
4
4
|
message: string;
|
|
5
|
+
invalidValue: any;
|
|
5
6
|
} | {
|
|
6
7
|
valid: true;
|
|
7
8
|
result: T;
|
|
8
9
|
};
|
|
9
10
|
type ValidateFn<T> = (value: any, entity: Entity) => ValidationResult<T>;
|
|
10
11
|
declare const Valid: <T>(result: T) => ValidationResult<T>;
|
|
11
|
-
declare const Invalid: <T>(message
|
|
12
|
+
declare const Invalid: <T>(message: string | undefined, invalidValue: any) => ValidationResult<T>;
|
|
12
13
|
type VALIDATION_TYPES = {
|
|
13
14
|
TEXT: ValidateFn<string | undefined>;
|
|
14
15
|
TEXT_EMPTY_NULL: ValidateFn<string | undefined | null>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ComputedProperty } from "@superblocksteam/library-shared";
|
|
2
|
-
export declare function sbComputed<T>(fn: (...args: any[]) => T): ComputedProperty<T>;
|
|
2
|
+
export declare function sbComputed<T = any>(fn: (...args: any[]) => T): ComputedProperty<T>;
|
|
@@ -5,6 +5,7 @@ export declare const LIGHT_APP_BG: "#F9FAFB";
|
|
|
5
5
|
export declare const DARK_APP_BG = "#131516";
|
|
6
6
|
export declare const noBorder: (theme: UserAccessibleTheme) => Border;
|
|
7
7
|
export declare const noBorderOject: (theme: UserAccessibleTheme) => PerSideBorder;
|
|
8
|
+
export declare const onePixelTransparentBorderObject: () => PerSideBorder;
|
|
8
9
|
export declare const EMPTY_RADIUS: PerCornerBorderRadius;
|
|
9
10
|
export declare const DEFAULT_SYSTEM_RADIUS: PerCornerBorderRadius;
|
|
10
11
|
export declare const defaultContainerBorderObject: (theme: UserAccessibleTheme) => PerSideBorder;
|
|
@@ -77,4 +78,5 @@ export declare const KEY_VALUE_PADDING: {
|
|
|
77
78
|
bottom: Dim<"px">;
|
|
78
79
|
};
|
|
79
80
|
export declare const KEY_VALUE_SPACING: Dim<"px">;
|
|
81
|
+
export declare const DEFAULT_GRID_ROW_SIZE = 12;
|
|
80
82
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/library",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.90",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
27
27
|
"@mobx-devtools/tools": "^0.0.4",
|
|
28
28
|
"@oddbird/css-anchor-positioning": "^0.4.0",
|
|
29
|
+
"@opentelemetry/api": "^1.9.0",
|
|
29
30
|
"@popperjs/core": "^2.11.7",
|
|
30
31
|
"@radix-ui/colors": "^3.0.0",
|
|
31
32
|
"@radix-ui/react-context-menu": "^2.2.2",
|
|
32
33
|
"@react-hook/resize-observer": "1.2.6",
|
|
33
34
|
"@superblocksteam/fast-deep-equal": "3.1.4",
|
|
34
35
|
"@superblocksteam/iso-currency": "2.0.0",
|
|
35
|
-
"@superblocksteam/library-shared": "2.0.0-next.
|
|
36
|
-
"@superblocksteam/shared": "0.
|
|
36
|
+
"@superblocksteam/library-shared": "2.0.0-next.90",
|
|
37
|
+
"@superblocksteam/shared": "0.9149.0",
|
|
37
38
|
"antd": "4.24.15",
|
|
38
39
|
"apca-w3": "^0.1.9",
|
|
39
40
|
"clsx": "^2.1.1",
|