@developer_tribe/react-builder 1.2.25 → 1.2.26

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 (117) hide show
  1. package/dist/attributes-editor/AttributesEditorFields.d.ts +1 -1
  2. package/dist/attributes-editor/SpecialCategorySection.d.ts +1 -1
  3. package/dist/build-components/CountDown/CountDownProps.generated.d.ts +3 -4
  4. package/dist/build-components/PaywallOptions/PaywallOptionButton.d.ts +1 -1
  5. package/dist/build-components/PaywallProvider/PaywallContext.d.ts +1 -2
  6. package/dist/build-components/index.d.ts +1 -3
  7. package/dist/build-components/patterns.generated.d.ts +759 -1637
  8. package/dist/index.cjs.js +3 -3
  9. package/dist/index.cjs.js.map +1 -1
  10. package/dist/index.esm.js +4 -4
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/index.web.cjs.js +3 -3
  13. package/dist/index.web.cjs.js.map +1 -1
  14. package/dist/index.web.esm.js +3 -3
  15. package/dist/index.web.esm.js.map +1 -1
  16. package/dist/paywall/hooks/index.d.ts +0 -1
  17. package/dist/styles.css +1 -1
  18. package/dist/utils/index.d.ts +1 -0
  19. package/dist/utils/projectColors.d.ts +7 -0
  20. package/package.json +3 -3
  21. package/src/DeviceMockFrame.tsx +0 -2
  22. package/src/RenderPage.tsx +0 -9
  23. package/src/assets/.DS_Store +0 -0
  24. package/src/assets/meta.json +1 -1
  25. package/src/assets/samples/paywall-1.json +0 -1
  26. package/src/assets/samples/paywall-2.json +2 -3
  27. package/src/assets/samples/paywall-app-delete-offer.json +2 -3
  28. package/src/assets/samples/paywall-app-open-offer.json +2 -3
  29. package/src/assets/samples/paywall-back-offer.json +2 -3
  30. package/src/assets/samples/paywall-notification-offer.json +2 -3
  31. package/src/assets/samples/vpn-onboard-1.json +15 -15
  32. package/src/assets/samples/vpn-onboard-2.json +15 -15
  33. package/src/assets/samples/vpn-onboard-3.json +15 -15
  34. package/src/assets/samples/vpn-onboard-4.json +15 -15
  35. package/src/assets/samples/vpn-onboard-5.json +21 -21
  36. package/src/assets/samples/vpn-onboard-6.json +15 -15
  37. package/src/attributes-editor/AttributesEditorFields.tsx +0 -1
  38. package/src/attributes-editor/AttributesEditorView.tsx +0 -2
  39. package/src/attributes-editor/Field.tsx +1 -1
  40. package/src/attributes-editor/SpecialCategorySection.tsx +0 -1
  41. package/src/attributes-editor/useAttributesEditorModel.ts +18 -8
  42. package/src/build-components/BIcon/BIcon.tsx +1 -1
  43. package/src/build-components/BIcon/pattern.json +1 -3
  44. package/src/build-components/BackgroundImage/pattern.json +2 -10
  45. package/src/build-components/Button/pattern.json +1 -3
  46. package/src/build-components/Carousel/Carousel.tsx +1 -1
  47. package/src/build-components/Carousel/pattern.json +2 -8
  48. package/src/build-components/CarouselButtons/pattern.json +2 -9
  49. package/src/build-components/CarouselDots/pattern.json +1 -3
  50. package/src/build-components/CarouselItem/pattern.json +1 -3
  51. package/src/build-components/CarouselProvider/CarouselProvider.tsx +1 -1
  52. package/src/build-components/CarouselProvider/pattern.json +1 -4
  53. package/src/build-components/CountDown/CountDown.tsx +25 -1
  54. package/src/build-components/CountDown/CountDownProps.generated.ts +3 -4
  55. package/src/build-components/CountDown/pattern.json +9 -4
  56. package/src/build-components/Main/pattern.json +1 -3
  57. package/src/build-components/NavigationBarColor/pattern.json +1 -3
  58. package/src/build-components/Onboard/pattern.json +2 -6
  59. package/src/build-components/OnboardButton/OnboardButton.tsx +1 -4
  60. package/src/build-components/OnboardButton/pattern.json +3 -14
  61. package/src/build-components/OnboardButtons/OnboardButtons.tsx +1 -9
  62. package/src/build-components/OnboardButtons/pattern.json +4 -15
  63. package/src/build-components/OnboardDot/OnboardDot.tsx +2 -1
  64. package/src/build-components/OnboardDot/pattern.json +1 -3
  65. package/src/build-components/OnboardFooter/pattern.json +1 -3
  66. package/src/build-components/OnboardImage/pattern.json +1 -5
  67. package/src/build-components/OnboardItem/OnboardItem.tsx +1 -1
  68. package/src/build-components/OnboardItem/pattern.json +3 -11
  69. package/src/build-components/OnboardProvider/OnboardProvider.tsx +0 -1
  70. package/src/build-components/OnboardProvider/pattern.json +2 -8
  71. package/src/build-components/OnboardSubtitle/pattern.json +1 -4
  72. package/src/build-components/OnboardTitle/pattern.json +1 -4
  73. package/src/build-components/PaywallBackground/pattern.json +1 -3
  74. package/src/build-components/PaywallCloseButton/pattern.json +1 -3
  75. package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +1 -2
  76. package/src/build-components/PaywallOptions/pattern.json +1 -3
  77. package/src/build-components/PaywallProvider/PaywallContext.ts +1 -1
  78. package/src/build-components/PaywallProvider/PaywallProvider.tsx +0 -10
  79. package/src/build-components/PaywallProvider/pattern.json +1 -3
  80. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +1 -1
  81. package/src/build-components/PaywallSubscribeButton/pattern.json +1 -3
  82. package/src/build-components/RadioButton/RadioButton.tsx +1 -1
  83. package/src/build-components/RadioButton/pattern.json +1 -3
  84. package/src/build-components/RenderNode.generated.tsx +0 -10
  85. package/src/build-components/Separator/pattern.json +1 -3
  86. package/src/build-components/StatusBarColor/pattern.json +1 -3
  87. package/src/build-components/Text/pattern.json +2 -9
  88. package/src/build-components/View/pattern.json +4 -16
  89. package/src/build-components/index.ts +0 -10
  90. package/src/build-components/patterns.generated.ts +789 -1700
  91. package/src/components/Builder.tsx +5 -0
  92. package/src/components/BuilderProvider.tsx +2 -37
  93. package/src/hooks/useSafeAreaViewStyle.ts +1 -3
  94. package/src/mockOS/managers/navigationManager.ts +1 -1
  95. package/src/pages/ProjectPage.tsx +2 -0
  96. package/src/pages/tabs/SideTool.tsx +1 -22
  97. package/src/paywall/hooks/index.ts +0 -1
  98. package/src/store.ts +1 -6
  99. package/src/styles/base/_global.scss +2 -0
  100. package/src/utils/analyseNodeByPatterns.ts +4 -0
  101. package/src/utils/index.ts +1 -0
  102. package/src/utils/logRenderStore.ts +0 -1
  103. package/src/utils/novaToJson.ts +1 -5
  104. package/src/utils/parseColor.ts +1 -0
  105. package/src/utils/projectColors.ts +71 -0
  106. package/dist/build-components/Counter/Counter.d.ts +0 -2
  107. package/dist/build-components/Counter/CounterProps.generated.d.ts +0 -61
  108. package/dist/build-components/PaywallCounter/PaywallCounter.d.ts +0 -2
  109. package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +0 -61
  110. package/dist/paywall/hooks/useHandleGoBack.d.ts +0 -1
  111. package/src/build-components/Counter/Counter.tsx +0 -44
  112. package/src/build-components/Counter/CounterProps.generated.ts +0 -78
  113. package/src/build-components/Counter/pattern.json +0 -29
  114. package/src/build-components/PaywallCounter/PaywallCounter.tsx +0 -46
  115. package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +0 -78
  116. package/src/build-components/PaywallCounter/pattern.json +0 -26
  117. package/src/paywall/hooks/useHandleGoBack.ts +0 -60
@@ -1,78 +0,0 @@
1
- /* AUTO-GENERATED FILE - DO NOT EDIT */
2
-
3
- import type { NodeData } from '../../types/Node';
4
-
5
- export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
6
- export type FlexDirectionOptionType = 'row' | 'column';
7
- export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
8
- export type AlignItemsOptionType =
9
- | 'flex-start'
10
- | 'center'
11
- | 'flex-end'
12
- | 'stretch'
13
- | 'baseline';
14
- export type JustifyContentOptionType =
15
- | 'flex-start'
16
- | 'center'
17
- | 'flex-end'
18
- | 'space-between'
19
- | 'space-around'
20
- | 'space-evenly';
21
- export type PositionOptionType = 'relative' | 'absolute';
22
-
23
- export interface PaywallCounterStyleGenerated {
24
- color?: string;
25
- fontSize?: string;
26
- fontFamily?: string;
27
- fontWeight?: string;
28
- textAlign?: TextAlignOptionType;
29
- flexDirection?: FlexDirectionOptionType;
30
- flexWrap?: FlexWrapOptionType;
31
- alignItems?: AlignItemsOptionType;
32
- justifyContent?: JustifyContentOptionType;
33
- gap?: string;
34
- padding?: string;
35
- paddingHorizontal?: string;
36
- paddingVertical?: string;
37
- paddingTop?: string;
38
- paddingBottom?: string;
39
- paddingLeft?: string;
40
- paddingRight?: string;
41
- margin?: string;
42
- marginHorizontal?: string;
43
- marginVertical?: string;
44
- marginTop?: string;
45
- marginBottom?: string;
46
- marginLeft?: string;
47
- marginRight?: string;
48
- backgroundColor?: string;
49
- borderRadius?: string;
50
- width?: string;
51
- minWidth?: string;
52
- maxWidth?: string;
53
- height?: string;
54
- minHeight?: string;
55
- maxHeight?: string;
56
- flex?: number;
57
- position?: PositionOptionType;
58
- top?: string;
59
- bottom?: string;
60
- left?: string;
61
- right?: string;
62
- zIndex?: number;
63
- }
64
-
65
- export interface PaywallCounterPropsGenerated {
66
- child: string;
67
- attributes: {
68
- style?: PaywallCounterStyleGenerated;
69
- count?: number;
70
- adjustsFontSizeToFit?: boolean;
71
- showEllipsis?: boolean;
72
- scrollable?: boolean;
73
- };
74
- }
75
-
76
- export interface PaywallCounterComponentProps {
77
- node: NodeData<PaywallCounterPropsGenerated['attributes']>;
78
- }
@@ -1,26 +0,0 @@
1
- {
2
- "schemaVersion": 2,
3
- "pattern": {
4
- "type": "PaywallCounter",
5
- "title": "title",
6
- "description": "description",
7
- "children": "never",
8
- "extends": "Counter"
9
- },
10
- "meta": {
11
- "desiredParent": [
12
- "all"
13
- ],
14
- "label": "Paywall Counter",
15
- "description": "Displays the paywall counter value.",
16
- "attributes": {
17
- "count": {
18
- "label": "Fallback Count",
19
- "description": "Used only when the paywall counter hook returns no value.",
20
- "category": "other",
21
- "specialCategory": null,
22
- "sort": 1
23
- }
24
- }
25
- }
26
- }
@@ -1,60 +0,0 @@
1
- import { useEffect } from 'react';
2
- import { useMockOSContext } from '../../mockOS/context/MockOSContextBase';
3
-
4
- export function useHandleGoBack(
5
- handleGoBack: () => boolean | null | undefined,
6
- ) {
7
- const mockOS = useMockOSContext();
8
-
9
- useEffect(() => {
10
- if (!mockOS?.isEnabled) {
11
- return;
12
- }
13
-
14
- const handleBackPress = (event?: KeyboardEvent | PopStateEvent) => {
15
- const result = handleGoBack();
16
-
17
- // Only allow navigation if result is explicitly true
18
- if (result !== true) {
19
- // Prevent navigation
20
- if (event instanceof KeyboardEvent) {
21
- event.preventDefault();
22
- event.stopPropagation();
23
- } else if (event instanceof PopStateEvent) {
24
- // Prevent browser navigation by pushing state back
25
- window.history.pushState(null, '', window.location.href);
26
- }
27
- return;
28
- }
29
-
30
- // Allow navigation - execute MockOS goBack
31
- const canGoBack = mockOS.goBack();
32
- if (!canGoBack) {
33
- mockOS.navigation('launchscreen');
34
- }
35
- };
36
-
37
- // Handle Escape key
38
- const handleKeyDown = (e: KeyboardEvent) => {
39
- if (e.key === 'Escape') {
40
- handleBackPress(e);
41
- }
42
- };
43
-
44
- // Handle browser back button
45
- const handlePopState = (e: PopStateEvent) => {
46
- handleBackPress(e);
47
- };
48
-
49
- // Push a state to track back navigation
50
- window.history.pushState(null, '', window.location.href);
51
-
52
- window.addEventListener('keydown', handleKeyDown);
53
- window.addEventListener('popstate', handlePopState);
54
-
55
- return () => {
56
- window.removeEventListener('keydown', handleKeyDown);
57
- window.removeEventListener('popstate', handlePopState);
58
- };
59
- }, [handleGoBack, mockOS]);
60
- }