@developer_tribe/react-builder 1.2.7 → 1.2.9

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.
Files changed (204) hide show
  1. package/dist/AttributesEditor.d.ts +2 -11
  2. package/dist/attribute-analyser/style/native/useExtractImageStyle.d.ts +10 -0
  3. package/dist/attribute-analyser/style/native/useExtractTextStyle.d.ts +9 -0
  4. package/dist/attribute-analyser/style/native/useExtractViewStyle.d.ts +8 -0
  5. package/dist/attribute-analyser/style/web/useExtractImageStyle.d.ts +4 -0
  6. package/dist/attribute-analyser/style/web/useExtractTextStyle.d.ts +4 -0
  7. package/dist/attribute-analyser/style/web/useExtractViewStyle.d.ts +4 -0
  8. package/dist/attributes-editor/AttributesEditorFields.d.ts +18 -0
  9. package/dist/attributes-editor/AttributesEditorView.d.ts +4 -0
  10. package/dist/attributes-editor/attributesEditorModelTypes.d.ts +67 -0
  11. package/dist/attributes-editor/attributesEditorUtils.d.ts +19 -0
  12. package/dist/attributes-editor/useAttributesEditorModel.d.ts +2 -0
  13. package/dist/build-components/BIcon/BIconProps.generated.d.ts +41 -38
  14. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +37 -34
  15. package/dist/build-components/Button/ButtonProps.generated.d.ts +39 -36
  16. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +37 -34
  17. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +37 -34
  18. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +37 -34
  19. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +36 -33
  20. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +36 -33
  21. package/dist/build-components/Image/ImageProps.generated.d.ts +38 -33
  22. package/dist/build-components/Main/MainProps.generated.d.ts +36 -33
  23. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +36 -33
  24. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +38 -34
  25. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +39 -36
  26. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +43 -34
  27. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +41 -38
  28. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +36 -31
  29. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +39 -33
  30. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +38 -34
  31. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +41 -38
  32. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +41 -38
  33. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +36 -33
  34. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +41 -38
  35. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +36 -33
  36. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +36 -33
  37. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +39 -36
  38. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +36 -33
  39. package/dist/build-components/Text/TextProps.generated.d.ts +41 -38
  40. package/dist/build-components/View/ViewProps.generated.d.ts +36 -33
  41. package/dist/build-components/patterns.generated.d.ts +2673 -5787
  42. package/dist/components/BuilderProvider.d.ts +6 -0
  43. package/dist/index.cjs.js +5 -5
  44. package/dist/index.cjs.js.map +1 -1
  45. package/dist/index.d.ts +5 -26
  46. package/dist/index.esm.js +5 -5
  47. package/dist/index.esm.js.map +1 -1
  48. package/dist/index.native.cjs.js +6 -4
  49. package/dist/index.native.cjs.js.map +1 -1
  50. package/dist/index.native.d.ts +6 -3
  51. package/dist/index.native.esm.js +6 -4
  52. package/dist/index.native.esm.js.map +1 -1
  53. package/dist/migrations/migratePipe.d.ts +1 -1
  54. package/dist/migrations/migrations/1.1.2_extract_component_attributes_from_style.d.ts +2 -0
  55. package/dist/mockOS/components/PermissionModal.d.ts +1 -2
  56. package/dist/styles.css +1 -1
  57. package/dist/types/PreviewConfig.d.ts +1 -5
  58. package/dist/utils/extractImageStyle.d.ts +3 -0
  59. package/dist/utils/extractTextStyle/extractTextStyleNative.d.ts +17 -0
  60. package/dist/utils/extractTextStyle.d.ts +2 -0
  61. package/dist/utils/extractViewStyle/extractViewStyleNative.d.ts +12 -0
  62. package/dist/utils/extractViewStyle.d.ts +2 -0
  63. package/dist/utils/getMeta.d.ts +5 -0
  64. package/dist/utils/patterns.d.ts +14 -1
  65. package/package.json +2 -1
  66. package/scripts/prebuild/prebuild.js +14 -0
  67. package/scripts/prebuild/utils/createGeneratedProps.js +51 -3
  68. package/scripts/prebuild/utils/index.js +1 -0
  69. package/scripts/prebuild/utils/updateMetaJson.js +66 -0
  70. package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +37 -3
  71. package/scripts/prebuild/utils/validatePatternJson.js +27 -2
  72. package/scripts/public/scripts/build/index.js +20 -3
  73. package/scripts/public/scripts/build/info.json +6 -0
  74. package/scripts/public/scripts/build/utils/createComponentsIndex.js +9 -3
  75. package/scripts/public/scripts/build/utils/createRenderNodeGenerated.js +66 -8
  76. package/src/AttributesEditor.tsx +8 -944
  77. package/src/assets/meta.json +4 -0
  78. package/src/assets/samples/carousel-sample.json +1 -1
  79. package/src/assets/samples/getSamples.ts +2 -0
  80. package/src/assets/samples/paywall-1.json +11 -7
  81. package/src/assets/samples/simple-1.json +3 -3
  82. package/src/assets/samples/simple-2.json +3 -3
  83. package/src/assets/samples/unmigrated-builder-1.1.1.json +87 -0
  84. package/src/assets/samples/unmigrated-builder1.json +1 -1
  85. package/src/assets/samples/unvalidated-builder1.json +3 -3
  86. package/src/assets/samples/unvalidated-crash1.json +1 -1
  87. package/src/assets/samples/unvalidated-crashcomponent1.json +1 -1
  88. package/src/assets/samples/vpn-onboard-1.json +1 -1
  89. package/src/assets/samples/vpn-onboard-2.json +1 -1
  90. package/src/assets/samples/vpn-onboard-3.json +1 -1
  91. package/src/assets/samples/vpn-onboard-4.json +1 -1
  92. package/src/assets/samples/vpn-onboard-5.json +1 -1
  93. package/src/assets/samples/vpn-onboard-6.json +1 -1
  94. package/src/attribute-analyser/style/native/useExtractImageStyle.ts +46 -0
  95. package/src/attribute-analyser/style/native/useExtractTextStyle.ts +50 -0
  96. package/src/attribute-analyser/style/native/useExtractViewStyle.ts +32 -0
  97. package/src/attribute-analyser/style/web/useExtractImageStyle.ts +20 -0
  98. package/src/{hooks → attribute-analyser/style/web}/useExtractTextStyle.ts +7 -6
  99. package/src/{hooks → attribute-analyser/style/web}/useExtractViewStyle.ts +7 -6
  100. package/src/attributes-editor/AttributesEditorFields.tsx +248 -0
  101. package/src/attributes-editor/AttributesEditorView.tsx +360 -0
  102. package/src/attributes-editor/LayoutPreviewPicker.tsx +4 -3
  103. package/src/attributes-editor/attributesEditorModelTypes.ts +86 -0
  104. package/src/attributes-editor/attributesEditorUtils.ts +102 -0
  105. package/src/attributes-editor/useAttributesEditorModel.ts +477 -0
  106. package/src/build-components/BIcon/BIcon.tsx +4 -3
  107. package/src/build-components/BIcon/BIconProps.generated.ts +42 -38
  108. package/src/build-components/BIcon/pattern.json +5 -6
  109. package/src/build-components/BackgroundImage/BackgroundImage.tsx +7 -4
  110. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +38 -34
  111. package/src/build-components/BackgroundImage/pattern.json +9 -17
  112. package/src/build-components/Button/Button.tsx +7 -6
  113. package/src/build-components/Button/ButtonProps.generated.ts +40 -36
  114. package/src/build-components/Button/pattern.json +17 -15
  115. package/src/build-components/Carousel/Carousel.tsx +1 -1
  116. package/src/build-components/Carousel/CarouselProps.generated.ts +38 -34
  117. package/src/build-components/CarouselButtons/CarouselButtons.tsx +4 -6
  118. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +41 -37
  119. package/src/build-components/CarouselButtons/pattern.json +2 -1
  120. package/src/build-components/CarouselDots/CarouselDots.tsx +2 -2
  121. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +44 -40
  122. package/src/build-components/CarouselItem/CarouselItem.tsx +1 -1
  123. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +37 -33
  124. package/src/build-components/CarouselProvider/CarouselProvider.tsx +1 -1
  125. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +37 -33
  126. package/src/build-components/Image/Image.tsx +4 -3
  127. package/src/build-components/Image/ImageProps.generated.ts +39 -33
  128. package/src/build-components/Image/pattern.json +5 -11
  129. package/src/build-components/Main/Main.tsx +1 -1
  130. package/src/build-components/Main/MainProps.generated.ts +37 -33
  131. package/src/build-components/Main/pattern.json +2 -1
  132. package/src/build-components/Onboard/OnboardProps.generated.ts +37 -33
  133. package/src/build-components/OnboardButton/OnboardButton.tsx +8 -6
  134. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +44 -39
  135. package/src/build-components/OnboardButton/pattern.json +9 -7
  136. package/src/build-components/OnboardButtons/OnboardButtons.tsx +31 -31
  137. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +43 -39
  138. package/src/build-components/OnboardButtons/pattern.json +9 -7
  139. package/src/build-components/OnboardDot/OnboardDot.tsx +7 -5
  140. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +55 -34
  141. package/src/build-components/OnboardFooter/OnboardFooter.tsx +19 -23
  142. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +42 -38
  143. package/src/build-components/OnboardFooter/pattern.json +16 -14
  144. package/src/build-components/OnboardImage/OnboardImage.tsx +8 -7
  145. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +37 -31
  146. package/src/build-components/OnboardImage/pattern.json +2 -1
  147. package/src/build-components/OnboardItem/OnboardItem.tsx +1 -1
  148. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +40 -33
  149. package/src/build-components/OnboardItem/pattern.json +2 -1
  150. package/src/build-components/OnboardProvider/OnboardProvider.tsx +1 -1
  151. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +39 -34
  152. package/src/build-components/OnboardProvider/pattern.json +2 -1
  153. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +42 -38
  154. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +42 -38
  155. package/src/build-components/PaywallBackground/PaywallBackground.tsx +1 -1
  156. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +37 -33
  157. package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +6 -5
  158. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +42 -38
  159. package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +1 -1
  160. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +37 -33
  161. package/src/build-components/PaywallProvider/PaywallProvider.tsx +1 -1
  162. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +37 -33
  163. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +1 -1
  164. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +40 -36
  165. package/src/build-components/RadioButton/RadioButton.tsx +5 -4
  166. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +37 -33
  167. package/src/build-components/RadioButton/pattern.json +9 -7
  168. package/src/build-components/Text/Text.tsx +6 -8
  169. package/src/build-components/Text/TextProps.generated.ts +42 -38
  170. package/src/build-components/Text/pattern.json +15 -11
  171. package/src/build-components/View/View.tsx +1 -1
  172. package/src/build-components/View/ViewProps.generated.ts +37 -33
  173. package/src/build-components/View/pattern.json +71 -66
  174. package/src/build-components/patterns.generated.ts +3022 -5971
  175. package/src/components/AttributesEditorPanel.tsx +2 -2
  176. package/src/components/BuilderProvider.tsx +15 -1
  177. package/src/index.native.ts +7 -4
  178. package/src/index.ts +6 -77
  179. package/src/migrations/migratePipe.ts +7 -3
  180. package/src/migrations/migrations/1.1.2_extract_component_attributes_from_style.ts +211 -0
  181. package/src/mockOS/components/MockOSRouter.tsx +3 -1
  182. package/src/mockOS/components/PermissionModal.tsx +20 -160
  183. package/src/mockOS/components/SubscriptionModal.tsx +41 -278
  184. package/src/pages/ProjectPage.tsx +12 -6
  185. package/src/styles/components/_attributes-editor.scss +122 -0
  186. package/src/styles/components/_mockos-router.scss +388 -0
  187. package/src/styles/components/_onboard.scss +23 -0
  188. package/src/styles/index.scss +1 -0
  189. package/src/types/PreviewConfig.ts +1 -5
  190. package/src/utils/analyseNodeByPatterns.ts +39 -4
  191. package/src/utils/extractImageStyle.ts +34 -5
  192. package/src/utils/extractTextStyle/extractTextStyle.ts +7 -6
  193. package/src/utils/extractTextStyle/extractTextStyleNative.ts +106 -0
  194. package/src/utils/extractTextStyle.ts +2 -0
  195. package/src/utils/extractViewStyle/extractViewStyle.ts +2 -4
  196. package/src/utils/extractViewStyle/extractViewStyleNative.ts +111 -0
  197. package/src/utils/extractViewStyle.ts +2 -0
  198. package/src/utils/getMeta.ts +15 -0
  199. package/src/utils/patterns.ts +100 -3
  200. package/dist/hooks/useExtractImageStyle.d.ts +0 -3
  201. package/dist/hooks/useExtractTextStyle.d.ts +0 -3
  202. package/dist/hooks/useExtractViewStyle.d.ts +0 -3
  203. package/src/hooks/useExtractImageStyle.ts +0 -19
  204. package/src/migrations/migrations/1.1.0_normalize_style_attributes.ts +0 -80
@@ -1,11 +1,2 @@
1
- import React from 'react';
2
- import { Node } from './types/Node';
3
- import type { ProjectColors } from './types/Project';
4
- type AttributesEditorProps = {
5
- node: Node;
6
- onChange: (next: Node) => void;
7
- projectColors?: ProjectColors;
8
- };
9
- export declare function AttributesEditor({ node, onChange, projectColors, }: AttributesEditorProps): import("react/jsx-runtime").JSX.Element | null;
10
- declare const _default: React.MemoExoticComponent<typeof AttributesEditor>;
11
- export default _default;
1
+ import type { AttributesEditorProps } from './attributes-editor/attributesEditorModelTypes';
2
+ export declare function AttributesEditor(props: AttributesEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { NodeData } from '../../../types/Node';
2
+ import type { ImagePropsGenerated } from '../../../build-components/Image/ImageProps.generated';
3
+ export declare function useExtractImageStyle<T extends ImagePropsGenerated['attributes']>(node: NodeData<T>): {
4
+ style: {
5
+ [x: string]: unknown;
6
+ };
7
+ other: {
8
+ resizeMode: "cover" | "contain" | "stretch" | "center" | undefined;
9
+ };
10
+ };
@@ -0,0 +1,9 @@
1
+ import type { NodeData } from '../../../types/Node';
2
+ import type { TextPropsGenerated } from '../../../build-components/Text/TextProps.generated';
3
+ export declare function useExtractTextStyle<T extends TextPropsGenerated['attributes']>(node: NodeData<T>): {
4
+ style: Record<string, unknown>;
5
+ other: {
6
+ adjustsFontSizeToFit: boolean | undefined;
7
+ showEllipsis: boolean | undefined;
8
+ };
9
+ };
@@ -0,0 +1,8 @@
1
+ import type { NodeData } from '../../../types/Node';
2
+ import type { ViewPropsGenerated } from '../../../build-components/View/ViewProps.generated';
3
+ export declare function useExtractViewStyle<T extends ViewPropsGenerated['attributes']>(node: NodeData<T>): {
4
+ style: Record<string, unknown>;
5
+ other: {
6
+ scrollable: boolean | undefined;
7
+ };
8
+ };
@@ -0,0 +1,4 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { NodeData } from '../../../types/Node';
3
+ import type { ImagePropsGenerated } from '../../../build-components/Image/ImageProps.generated';
4
+ export declare function useExtractImageStyle<T extends ImagePropsGenerated['attributes']>(node: NodeData<T>): CSSProperties;
@@ -0,0 +1,4 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { NodeData } from '../../../types/Node';
3
+ import type { TextPropsGenerated } from '../../../build-components/Text/TextProps.generated';
4
+ export declare function useExtractTextStyle<T extends TextPropsGenerated['attributes']>(node: NodeData<T>): CSSProperties;
@@ -0,0 +1,4 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { NodeData } from '../../../types/Node';
3
+ import type { ViewPropsGenerated } from '../../../build-components/View/ViewProps.generated';
4
+ export declare function useExtractViewStyle<T extends ViewPropsGenerated['attributes']>(node: NodeData<T>): CSSProperties;
@@ -0,0 +1,18 @@
1
+ import type { Fonts } from '../types/Fonts';
2
+ type IconTypePickerFieldProps = {
3
+ name: string;
4
+ value: unknown;
5
+ onChange: (next: unknown) => void;
6
+ };
7
+ export declare function IconTypePickerField({ name, value, onChange, }: IconTypePickerFieldProps): import("react/jsx-runtime").JSX.Element;
8
+ type FontFamilyPickerFieldProps = {
9
+ name: string;
10
+ value: unknown;
11
+ onChange: (next: unknown) => void;
12
+ fonts: Fonts;
13
+ loadedFonts: string[] | undefined;
14
+ markFontLoaded: (fontFamily: string) => void;
15
+ addError: (message: string) => void;
16
+ };
17
+ export declare function FontFamilyPickerField({ name, value, onChange, fonts, loadedFonts, markFontLoaded, addError, }: FontFamilyPickerFieldProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { AttributesEditorModel } from './attributesEditorModelTypes';
2
+ type AttributesEditorViewProps = AttributesEditorModel;
3
+ export declare function AttributesEditorView(props: AttributesEditorViewProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export {};
@@ -0,0 +1,67 @@
1
+ import type { Node, NodeData, NodeDefaultAttribute } from '../types/Node';
2
+ import type { ProjectColors } from '../types/Project';
3
+ import type { ViewPropsGenerated } from '../build-components/View/ViewProps.generated';
4
+ import type { Fonts } from '../types/Fonts';
5
+ import type { LayoutContext, SchemaEntry } from './types';
6
+ export type TabId = 'style' | 'container' | 'other';
7
+ export type AttributesEditorProps = {
8
+ node: Node;
9
+ onChange: (next: Node) => void;
10
+ projectColors?: ProjectColors;
11
+ };
12
+ export type AttributesEditorTabConfig = {
13
+ id: TabId;
14
+ label: string;
15
+ entries: SchemaEntry[];
16
+ };
17
+ export type AttributesEditorSpecialSection = {
18
+ key: string;
19
+ entries: SchemaEntry[];
20
+ meta?: {
21
+ label?: string;
22
+ description?: string;
23
+ sort?: number;
24
+ category?: string;
25
+ };
26
+ };
27
+ export type TabContentInfo = Record<TabId, {
28
+ baseCount: number;
29
+ specialCount: number;
30
+ }>;
31
+ export type AttributesEditorModel = {
32
+ isInvalidNode: boolean;
33
+ baseData: NodeData<NodeDefaultAttribute>;
34
+ data: NodeData<NodeDefaultAttribute>;
35
+ appConfig: unknown;
36
+ projectFonts: Fonts;
37
+ loadedFonts: string[] | undefined;
38
+ markFontLoaded: (fontFamily: string) => void;
39
+ addError: (message: string) => void;
40
+ schema: Record<string, unknown>;
41
+ attributeMeta?: Record<string, any>;
42
+ componentTitle: string;
43
+ componentDescription?: string;
44
+ patternForType?: any;
45
+ componentMeta?: any;
46
+ attributes: NodeDefaultAttribute;
47
+ styleBag?: Record<string, unknown>;
48
+ projectColorsForPicker?: ProjectColors;
49
+ viewAttributes?: Partial<ViewPropsGenerated['attributes']>;
50
+ layoutContext: LayoutContext;
51
+ getAttributeValue: (name: string) => unknown;
52
+ handleAttributeChange: (name: string, val: unknown) => void;
53
+ handleChildrenChange: (val: string) => void;
54
+ tabs: AttributesEditorTabConfig[];
55
+ tabContentInfo: TabContentInfo;
56
+ firstAvailableTab: TabId;
57
+ activeTab: TabId;
58
+ setActiveTab: (next: TabId) => void;
59
+ activeEntries: SchemaEntry[];
60
+ specialSectionsByTab: Record<TabId, AttributesEditorSpecialSection[]>;
61
+ activeSpecialSections: AttributesEditorSpecialSection[];
62
+ mockableFeatureKeys: string[];
63
+ activeMockableFeature: string | null;
64
+ setActiveMockableFeature: (next: string | null) => void;
65
+ hasStringChildren: boolean;
66
+ childrenValue: string;
67
+ };
@@ -0,0 +1,19 @@
1
+ import type { NodeDefaultAttribute } from '../types/Node';
2
+ import type { SchemaEntry } from './types';
3
+ export type StyleBagSource = 'styles' | 'style' | 'none';
4
+ export declare function getStyleBagSourceAndValue(attributes: NodeDefaultAttribute): {
5
+ source: StyleBagSource;
6
+ styleBag?: Record<string, unknown>;
7
+ };
8
+ /**
9
+ * Flattens schemaVersion=2 nested style schemas (under schema.style or schema.styles)
10
+ * into plain entries so the editor can list them as individual fields.
11
+ *
12
+ * Note: we intentionally exclude the raw `style` / `styles` keys themselves, because
13
+ * Field.tsx does not render object specs (---not-implemented----).
14
+ */
15
+ export declare function buildAttributesEditorEntries(schema: Record<string, unknown>, attributeMeta?: Record<string, {
16
+ category?: string;
17
+ }>): SchemaEntry[];
18
+ export declare function isValidStyleBagValue(attributes: NodeDefaultAttribute): boolean;
19
+ export declare function findLegacyFlatStyleKeys(attributes: NodeDefaultAttribute, isStyleKeyForWrite: (name: string) => boolean): string[];
@@ -0,0 +1,2 @@
1
+ import type { AttributesEditorModel, AttributesEditorProps } from './attributesEditorModelTypes';
2
+ export declare function useAttributesEditorModel({ node, onChange, projectColors, }: AttributesEditorProps): AttributesEditorModel;
@@ -4,50 +4,53 @@ export type FlexDirectionOptionType = 'row' | 'column';
4
4
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
5
  export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
6
  export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface BIconStyleGenerated {
8
+ color?: string;
9
+ fontSize?: string;
10
+ fontFamily?: string;
11
+ fontWeight?: string;
12
+ textAlign?: TextAlignOptionType;
13
+ flexDirection?: FlexDirectionOptionType;
14
+ alignItems?: AlignItemsOptionType;
15
+ justifyContent?: JustifyContentOptionType;
16
+ gap?: string;
17
+ padding?: string;
18
+ paddingHorizontal?: string;
19
+ paddingVertical?: string;
20
+ paddingTop?: string;
21
+ paddingBottom?: string;
22
+ paddingLeft?: string;
23
+ paddingRight?: string;
24
+ margin?: string;
25
+ marginHorizontal?: string;
26
+ marginVertical?: string;
27
+ marginTop?: string;
28
+ marginBottom?: string;
29
+ marginLeft?: string;
30
+ marginRight?: string;
31
+ backgroundColor?: string;
32
+ borderRadius?: string;
33
+ width?: string;
34
+ minWidth?: string;
35
+ maxWidth?: string;
36
+ height?: string;
37
+ minHeight?: string;
38
+ maxHeight?: string;
39
+ flex?: number;
40
+ position?: PositionOptionType;
41
+ top?: string;
42
+ bottom?: string;
43
+ left?: string;
44
+ right?: string;
45
+ zIndex?: number;
46
+ }
7
47
  export interface BIconPropsGenerated {
8
48
  child: string;
9
49
  attributes: {
10
- style?: Record<string, unknown>;
11
- color?: string;
12
- fontSize?: string;
13
- fontFamily?: string;
14
- fontWeight?: string;
15
- textAlign?: TextAlignOptionType;
50
+ style?: BIconStyleGenerated;
16
51
  adjustsFontSizeToFit?: boolean;
17
52
  showEllipsis?: boolean;
18
53
  scrollable?: boolean;
19
- flexDirection?: FlexDirectionOptionType;
20
- alignItems?: AlignItemsOptionType;
21
- justifyContent?: JustifyContentOptionType;
22
- gap?: string;
23
- padding?: string;
24
- paddingHorizontal?: string;
25
- paddingVertical?: string;
26
- paddingTop?: string;
27
- paddingBottom?: string;
28
- paddingLeft?: string;
29
- paddingRight?: string;
30
- margin?: string;
31
- marginVertical?: string;
32
- marginTop?: string;
33
- marginBottom?: string;
34
- marginLeft?: string;
35
- marginRight?: string;
36
- backgroundColor?: string;
37
- borderRadius?: string;
38
- width?: string;
39
- minWidth?: string;
40
- maxWidth?: string;
41
- height?: string;
42
- minHeight?: string;
43
- maxHeight?: string;
44
- flex?: number;
45
- position?: PositionOptionType;
46
- top?: string;
47
- bottom?: string;
48
- left?: string;
49
- right?: string;
50
- zIndex?: number;
51
54
  iconType?: string;
52
55
  size?: number;
53
56
  strokeWidth?: number;
@@ -1,46 +1,49 @@
1
1
  import type { NodeData } from '../../types/Node';
2
+ export type ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
2
3
  export type FlexDirectionOptionType = 'row' | 'column';
3
4
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
4
5
  export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
5
6
  export type PositionOptionType = 'relative' | 'absolute';
6
- export type ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
7
+ export interface BackgroundImageStyleGenerated {
8
+ flexDirection?: FlexDirectionOptionType;
9
+ alignItems?: AlignItemsOptionType;
10
+ justifyContent?: JustifyContentOptionType;
11
+ gap?: string;
12
+ padding?: string;
13
+ paddingHorizontal?: string;
14
+ paddingVertical?: string;
15
+ paddingTop?: string;
16
+ paddingBottom?: string;
17
+ paddingLeft?: string;
18
+ paddingRight?: string;
19
+ margin?: string;
20
+ marginHorizontal?: string;
21
+ marginVertical?: string;
22
+ marginTop?: string;
23
+ marginBottom?: string;
24
+ marginLeft?: string;
25
+ marginRight?: string;
26
+ backgroundColor?: string;
27
+ borderRadius?: string;
28
+ width?: string;
29
+ minWidth?: string;
30
+ maxWidth?: string;
31
+ height?: string;
32
+ minHeight?: string;
33
+ maxHeight?: string;
34
+ flex?: number;
35
+ position?: PositionOptionType;
36
+ top?: string;
37
+ bottom?: string;
38
+ left?: string;
39
+ right?: string;
40
+ zIndex?: number;
41
+ }
7
42
  export interface BackgroundImagePropsGenerated {
8
43
  child: string;
9
44
  attributes: {
10
- style?: Record<string, unknown>;
45
+ style?: BackgroundImageStyleGenerated;
11
46
  scrollable?: boolean;
12
- flexDirection?: FlexDirectionOptionType;
13
- alignItems?: AlignItemsOptionType;
14
- justifyContent?: JustifyContentOptionType;
15
- gap?: string;
16
- padding?: string;
17
- paddingHorizontal?: string;
18
- paddingVertical?: string;
19
- paddingTop?: string;
20
- paddingBottom?: string;
21
- paddingLeft?: string;
22
- paddingRight?: string;
23
- margin?: string;
24
- marginVertical?: string;
25
- marginTop?: string;
26
- marginBottom?: string;
27
- marginLeft?: string;
28
- marginRight?: string;
29
- backgroundColor?: string;
30
- borderRadius?: string;
31
- width?: string;
32
- minWidth?: string;
33
- maxWidth?: string;
34
- height?: string;
35
- minHeight?: string;
36
- maxHeight?: string;
37
- flex?: number;
38
- position?: PositionOptionType;
39
- top?: string;
40
- bottom?: string;
41
- left?: string;
42
- right?: string;
43
- zIndex?: number;
44
47
  src?: string;
45
48
  resizeMode?: ResizeModeOptionType;
46
49
  };
@@ -4,46 +4,49 @@ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stret
4
4
  export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
5
5
  export type PositionOptionType = 'relative' | 'absolute';
6
6
  export type FontWeightOptionType = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
7
+ export interface ButtonStyleGenerated {
8
+ flexDirection?: FlexDirectionOptionType;
9
+ alignItems?: AlignItemsOptionType;
10
+ justifyContent?: JustifyContentOptionType;
11
+ gap?: string;
12
+ padding?: string;
13
+ paddingHorizontal?: string;
14
+ paddingVertical?: string;
15
+ paddingTop?: string;
16
+ paddingBottom?: string;
17
+ paddingLeft?: string;
18
+ paddingRight?: string;
19
+ margin?: string;
20
+ marginHorizontal?: string;
21
+ marginVertical?: string;
22
+ marginTop?: string;
23
+ marginBottom?: string;
24
+ marginLeft?: string;
25
+ marginRight?: string;
26
+ backgroundColor?: string;
27
+ borderRadius?: string;
28
+ width?: string;
29
+ minWidth?: string;
30
+ maxWidth?: string;
31
+ height?: string;
32
+ minHeight?: string;
33
+ maxHeight?: string;
34
+ flex?: number;
35
+ position?: PositionOptionType;
36
+ top?: string;
37
+ bottom?: string;
38
+ left?: string;
39
+ right?: string;
40
+ zIndex?: number;
41
+ color?: string;
42
+ fontSize?: string;
43
+ fontWeight?: FontWeightOptionType;
44
+ }
7
45
  export interface ButtonPropsGenerated {
8
46
  child: string;
9
47
  attributes: {
10
- style?: Record<string, unknown>;
48
+ style?: ButtonStyleGenerated;
11
49
  scrollable?: boolean;
12
- flexDirection?: FlexDirectionOptionType;
13
- alignItems?: AlignItemsOptionType;
14
- justifyContent?: JustifyContentOptionType;
15
- gap?: string;
16
- padding?: string;
17
- paddingHorizontal?: string;
18
- paddingVertical?: string;
19
- paddingTop?: string;
20
- paddingBottom?: string;
21
- paddingLeft?: string;
22
- paddingRight?: string;
23
- margin?: string;
24
- marginVertical?: string;
25
- marginTop?: string;
26
- marginBottom?: string;
27
- marginLeft?: string;
28
- marginRight?: string;
29
- backgroundColor?: string;
30
- borderRadius?: string;
31
- width?: string;
32
- minWidth?: string;
33
- maxWidth?: string;
34
- height?: string;
35
- minHeight?: string;
36
- maxHeight?: string;
37
- flex?: number;
38
- position?: PositionOptionType;
39
- top?: string;
40
- bottom?: string;
41
- left?: string;
42
- right?: string;
43
- zIndex?: number;
44
- color?: string;
45
- fontSize?: string;
46
- fontWeight?: FontWeightOptionType;
47
50
  };
48
51
  }
49
52
  export interface ButtonComponentProps {
@@ -1,46 +1,49 @@
1
1
  import type { NodeData } from '../../types/Node';
2
+ export type AlignOptionType = 'start' | 'center' | 'end';
2
3
  export type FlexDirectionOptionType = 'row' | 'column';
3
4
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
4
5
  export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
5
6
  export type PositionOptionType = 'relative' | 'absolute';
6
- export type AlignOptionType = 'start' | 'center' | 'end';
7
+ export interface CarouselStyleGenerated {
8
+ flexDirection?: FlexDirectionOptionType;
9
+ alignItems?: AlignItemsOptionType;
10
+ justifyContent?: JustifyContentOptionType;
11
+ gap?: string;
12
+ padding?: string;
13
+ paddingHorizontal?: string;
14
+ paddingVertical?: string;
15
+ paddingTop?: string;
16
+ paddingBottom?: string;
17
+ paddingLeft?: string;
18
+ paddingRight?: string;
19
+ margin?: string;
20
+ marginHorizontal?: string;
21
+ marginVertical?: string;
22
+ marginTop?: string;
23
+ marginBottom?: string;
24
+ marginLeft?: string;
25
+ marginRight?: string;
26
+ backgroundColor?: string;
27
+ borderRadius?: string;
28
+ width?: string;
29
+ minWidth?: string;
30
+ maxWidth?: string;
31
+ height?: string;
32
+ minHeight?: string;
33
+ maxHeight?: string;
34
+ flex?: number;
35
+ position?: PositionOptionType;
36
+ top?: string;
37
+ bottom?: string;
38
+ left?: string;
39
+ right?: string;
40
+ zIndex?: number;
41
+ }
7
42
  export interface CarouselPropsGenerated {
8
43
  child: string;
9
44
  attributes: {
10
- style?: Record<string, unknown>;
45
+ style?: CarouselStyleGenerated;
11
46
  scrollable?: boolean;
12
- flexDirection?: FlexDirectionOptionType;
13
- alignItems?: AlignItemsOptionType;
14
- justifyContent?: JustifyContentOptionType;
15
- gap?: string;
16
- padding?: string;
17
- paddingHorizontal?: string;
18
- paddingVertical?: string;
19
- paddingTop?: string;
20
- paddingBottom?: string;
21
- paddingLeft?: string;
22
- paddingRight?: string;
23
- margin?: string;
24
- marginVertical?: string;
25
- marginTop?: string;
26
- marginBottom?: string;
27
- marginLeft?: string;
28
- marginRight?: string;
29
- backgroundColor?: string;
30
- borderRadius?: string;
31
- width?: string;
32
- minWidth?: string;
33
- maxWidth?: string;
34
- height?: string;
35
- minHeight?: string;
36
- maxHeight?: string;
37
- flex?: number;
38
- position?: PositionOptionType;
39
- top?: string;
40
- bottom?: string;
41
- left?: string;
42
- right?: string;
43
- zIndex?: number;
44
47
  loop?: boolean;
45
48
  dragFree?: boolean;
46
49
  align?: AlignOptionType;
@@ -1,46 +1,49 @@
1
1
  import type { NodeData } from '../../types/Node';
2
+ export type ButtonTypeOptionType = 'previous_button' | 'next_button' | 'skip_button';
2
3
  export type FlexDirectionOptionType = 'row' | 'column';
3
4
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
4
5
  export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
5
6
  export type PositionOptionType = 'relative' | 'absolute';
6
- export type ButtonTypeOptionType = 'previous_button' | 'next_button' | 'skip_button';
7
+ export interface CarouselButtonsStyleGenerated {
8
+ flexDirection?: FlexDirectionOptionType;
9
+ alignItems?: AlignItemsOptionType;
10
+ justifyContent?: JustifyContentOptionType;
11
+ gap?: string;
12
+ padding?: string;
13
+ paddingHorizontal?: string;
14
+ paddingVertical?: string;
15
+ paddingTop?: string;
16
+ paddingBottom?: string;
17
+ paddingLeft?: string;
18
+ paddingRight?: string;
19
+ margin?: string;
20
+ marginHorizontal?: string;
21
+ marginVertical?: string;
22
+ marginTop?: string;
23
+ marginBottom?: string;
24
+ marginLeft?: string;
25
+ marginRight?: string;
26
+ backgroundColor?: string;
27
+ borderRadius?: string;
28
+ width?: string;
29
+ minWidth?: string;
30
+ maxWidth?: string;
31
+ height?: string;
32
+ minHeight?: string;
33
+ maxHeight?: string;
34
+ flex?: number;
35
+ position?: PositionOptionType;
36
+ top?: string;
37
+ bottom?: string;
38
+ left?: string;
39
+ right?: string;
40
+ zIndex?: number;
41
+ }
7
42
  export interface CarouselButtonsPropsGenerated {
8
43
  child: string;
9
44
  attributes: {
10
- style?: Record<string, unknown>;
45
+ style?: CarouselButtonsStyleGenerated;
11
46
  scrollable?: boolean;
12
- flexDirection?: FlexDirectionOptionType;
13
- alignItems?: AlignItemsOptionType;
14
- justifyContent?: JustifyContentOptionType;
15
- gap?: string;
16
- padding?: string;
17
- paddingHorizontal?: string;
18
- paddingVertical?: string;
19
- paddingTop?: string;
20
- paddingBottom?: string;
21
- paddingLeft?: string;
22
- paddingRight?: string;
23
- margin?: string;
24
- marginVertical?: string;
25
- marginTop?: string;
26
- marginBottom?: string;
27
- marginLeft?: string;
28
- marginRight?: string;
29
- backgroundColor?: string;
30
- borderRadius?: string;
31
- width?: string;
32
- minWidth?: string;
33
- maxWidth?: string;
34
- height?: string;
35
- minHeight?: string;
36
- maxHeight?: string;
37
- flex?: number;
38
- position?: PositionOptionType;
39
- top?: string;
40
- bottom?: string;
41
- left?: string;
42
- right?: string;
43
- zIndex?: number;
44
47
  buttonType?: ButtonTypeOptionType;
45
48
  skipNumber?: number;
46
49
  };