@developer_tribe/react-builder 1.2.4 → 1.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@developer_tribe/react-builder",
3
- "version": "1.2.4",
3
+ "version": "1.2.7",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "restricted": true,
@@ -12,6 +12,8 @@
12
12
  ".": {
13
13
  "react-native": {
14
14
  "types": "./dist/index.native.d.ts",
15
+ "import": "./dist/index.native.esm.js",
16
+ "require": "./dist/index.native.cjs.js",
15
17
  "default": "./dist/index.native.cjs.js"
16
18
  },
17
19
  "types": "./dist/index.d.ts",
@@ -21,6 +23,8 @@
21
23
  },
22
24
  "./native": {
23
25
  "types": "./dist/index.native.d.ts",
26
+ "import": "./dist/index.native.esm.js",
27
+ "require": "./dist/index.native.cjs.js",
24
28
  "default": "./dist/index.native.cjs.js"
25
29
  },
26
30
  "./dist/styles.css": "./dist/styles.css",
@@ -17,6 +17,7 @@ export type { Project, ProjectColors } from './types/Project';
17
17
  export type { Device } from './types/Device';
18
18
  export type { AppConfig, Localication } from './types/PreviewConfig';
19
19
  export { defaultAppConfig } from './types/PreviewConfig';
20
+ export type { Fonts, FontDefinition } from './types/Fonts';
20
21
  export type {
21
22
  PaywallBenefitValue,
22
23
  PaywallBenefits,
@@ -44,6 +45,9 @@ export { LocalizationParamsProvider } from './components/LocalizationParamsProvi
44
45
  export { useParams } from './hooks/useParams';
45
46
  export { useLocalizationParams } from './hooks/useLocalizationParams';
46
47
  export { useLocalize } from './hooks/useLocalize';
48
+ export { useExtractTextStyle } from './hooks/useExtractTextStyle';
49
+ export { useExtractViewStyle } from './hooks/useExtractViewStyle';
50
+ export { useExtractImageStyle } from './hooks/useExtractImageStyle';
47
51
 
48
52
  // Pure utilities (RN-safe)
49
53
  export {
package/src/index.ts CHANGED
@@ -1,22 +1,45 @@
1
1
  import './styles/index.scss';
2
- import AttributesEditor from './AttributesEditor';
3
2
 
4
- // Example app (`example/`) uses these exports today:
5
- // - `ProjectPage` (from `src/pages/ProjectPage.tsx`)
6
- // - `getSamples` (from `src/assets/samples/getSamples.ts`)
7
- // - types from `src/types/*` and `src/types/PreviewConfig.ts` (Project/ProjectColors/AppConfig/defaultAppConfig)
8
- //
9
- // React Native: a RN-safe entrypoint exists at `react-builder/native` (`src/index.native.ts`).
10
- // More RN-focused exports/integration helpers are coming.
11
- // NOTE: In React Native, `products` should be sourced from an IAP wrapper (e.g. `react-native-iap`)
12
- // and passed into `BuilderProvider` from the host app.
3
+ // Web entrypoint trimmed to what the `example/` app uses.
4
+ export { ProjectPage } from './pages/ProjectPage';
5
+ export { getSamples } from './assets/samples/getSamples';
6
+ export { defaultAppConfig } from './types/PreviewConfig';
7
+
8
+ export type { AppConfig } from './types/PreviewConfig';
9
+ export type { Project, ProjectColors } from './types/Project';
10
+
11
+ /**
12
+ * React Native-safe index. (trade-off for now)
13
+ */
14
+
15
+ // Types
16
+ export type { TargetedScreenSize } from './types/TargetedScreenSize';
17
+ export type { Node, NodeData, NodeDefaultAttribute } from './types/Node';
18
+ export type { Device } from './types/Device';
19
+ export type {
20
+ PaywallBenefitValue,
21
+ PaywallBenefits,
22
+ Product as PaywallProduct,
23
+ PaywallModel,
24
+ } from './paywall/types/paywall-types';
25
+
26
+ // Paywall hooks (RN-safe placeholders)
27
+ export {
28
+ usePaywallCounter,
29
+ useCloseStatusPaywall,
30
+ useCarouselOptionsSeperator,
31
+ useCalculateLocalizedPrice,
32
+ useDiscountRate,
33
+ } from './paywall/hooks';
34
+
35
+ // Context (RN-safe). In React Native, `products` should come from an IAP wrapper
36
+ // (e.g. `react-native-iap`) and be passed into `BuilderProvider` by the host app.
13
37
  export {
14
38
  BuilderProvider,
15
39
  useBuilderParams,
16
40
  } from './components/BuilderProvider';
17
41
  export { ParamsProvider } from './components/ParamsProvider';
18
42
  export { LocalizationParamsProvider } from './components/LocalizationParamsProvider';
19
- export { RenderErrorBoundary } from './components/RenderErrorBoundary';
20
43
  export { useParams } from './hooks/useParams';
21
44
  export { useLocalizationParams } from './hooks/useLocalizationParams';
22
45
  export { useLocalize } from './hooks/useLocalize';
@@ -24,29 +47,18 @@ export { useExtractTextStyle } from './hooks/useExtractTextStyle';
24
47
  export { useExtractViewStyle } from './hooks/useExtractViewStyle';
25
48
  export { useExtractImageStyle } from './hooks/useExtractImageStyle';
26
49
 
27
- export type { TargetedScreenSize } from './types/TargetedScreenSize';
28
- export type { Node, NodeData, NodeDefaultAttribute } from './types/Node';
29
- export type { Project, ProjectColors } from './types/Project';
30
- export type { Fonts, FontDefinition } from './types/Fonts';
50
+ // Pure utilities (RN-safe)
31
51
  export {
32
52
  isNodeNullOrUndefined,
33
53
  isNodeString,
34
54
  isNodeArray,
35
55
  isEmptyObject,
36
56
  analyseNode,
57
+ analyseAndProccess,
37
58
  } from './utils/analyseNode';
38
- export { getSamples } from './assets/samples/getSamples';
39
- export type { AppConfig, Localication } from './types/PreviewConfig';
40
- export { defaultAppConfig } from './types/PreviewConfig';
59
+ export { novaToJson } from './utils/novaToJson';
41
60
  export { getDevices, getDefaultDevice } from './utils/getDevices';
42
- export type { Device } from './types/Device';
43
- export { AttributesEditor };
44
- export * from './build-components/index';
45
- export { default as useNode } from './build-components/useNode';
46
61
  export { querySelector } from './utils/querySelector';
47
- export { extractViewStyle } from './utils/extractViewStyle';
48
- export { extractImageStyle } from './utils/extractImageStyle';
49
- export { extractTextStyle } from './utils/extractTextStyle';
50
62
  export {
51
63
  getImage,
52
64
  TRIBE_ASSETS_BASE_URL,
@@ -54,21 +66,21 @@ export {
54
66
  parseTribeAssetName,
55
67
  resolveImageSrc,
56
68
  } from './utils/getImage';
57
- export { ProjectPage } from './pages/ProjectPage';
58
- export type { ProjectPageProps } from './pages/ProjectPage';
59
- export { logger } from './utils/logger';
60
- export type { LogLevel } from './types/Project';
61
- export type {
62
- PaywallBenefitValue,
63
- PaywallBenefits,
64
- Product as PaywallProduct,
65
- PaywallModel,
66
- } from './paywall/types/paywall-types';
67
- // Paywall hooks
68
69
  export {
69
- usePaywallCounter,
70
- useCloseStatusPaywall,
71
- useCarouselOptionsSeperator,
72
- useCalculateLocalizedPrice,
73
- useDiscountRate,
74
- } from './paywall/hooks';
70
+ getPatternByType,
71
+ getAttributeSchema,
72
+ getAttributeMeta,
73
+ getDefaultsForType,
74
+ getTypeSchema,
75
+ isPrimitiveType,
76
+ getArrayItemType,
77
+ } from './utils/patterns';
78
+
79
+ // Node helpers (RN-safe)
80
+ export { default as useNode } from './build-components/useNode';
81
+ export * from './build-components/index';
82
+ // Static sample data helpers (RN-safe)
83
+ export {
84
+ getBasicSamples,
85
+ getOnboardSamples,
86
+ } from './assets/samples/getSamples';