@developer_tribe/react-builder 1.2.10 → 1.2.12
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/README.md +3 -3
- package/dist/components/Checkbox.d.ts +1 -1
- package/dist/index.cjs.js +4 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +39 -7
- package/dist/index.esm.js +4 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +31 -0
- package/dist/index.web.cjs.js.map +1 -0
- package/dist/index.web.d.ts +6 -0
- package/dist/index.web.esm.js +31 -0
- package/dist/index.web.esm.js.map +1 -0
- package/package.json +7 -13
- package/src/assets/meta.json +1 -1
- package/src/index.ts +91 -9
- package/src/index.web.ts +12 -0
- package/dist/index.native.cjs.js +0 -31
- package/dist/index.native.cjs.js.map +0 -1
- package/dist/index.native.d.ts +0 -40
- package/dist/index.native.esm.js +0 -31
- package/dist/index.native.esm.js.map +0 -1
- package/src/index.native.ts +0 -92
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@developer_tribe/react-builder",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"restricted": true,
|
|
@@ -8,25 +8,19 @@
|
|
|
8
8
|
"main": "dist/index.cjs.js",
|
|
9
9
|
"module": "dist/index.esm.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
-
"react-native": "dist/index.
|
|
11
|
+
"react-native": "dist/index.cjs.js",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"react-native": {
|
|
15
|
-
"types": "./dist/index.native.d.ts",
|
|
16
|
-
"import": "./dist/index.native.esm.js",
|
|
17
|
-
"require": "./dist/index.native.cjs.js",
|
|
18
|
-
"default": "./dist/index.native.cjs.js"
|
|
19
|
-
},
|
|
20
14
|
"types": "./dist/index.d.ts",
|
|
21
15
|
"import": "./dist/index.esm.js",
|
|
22
16
|
"require": "./dist/index.cjs.js",
|
|
23
17
|
"default": "./dist/index.esm.js"
|
|
24
18
|
},
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/index.
|
|
27
|
-
"import": "./dist/index.
|
|
28
|
-
"require": "./dist/index.
|
|
29
|
-
"default": "./dist/index.
|
|
19
|
+
"./web": {
|
|
20
|
+
"types": "./dist/index.web.d.ts",
|
|
21
|
+
"import": "./dist/index.web.esm.js",
|
|
22
|
+
"require": "./dist/index.web.cjs.js",
|
|
23
|
+
"default": "./dist/index.web.esm.js"
|
|
30
24
|
},
|
|
31
25
|
"./dist/styles.css": "./dist/styles.css",
|
|
32
26
|
"./dist/background.jpg": "./dist/background.jpg",
|
package/src/assets/meta.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,12 +1,94 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* React Native-safe entrypoint.
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT:
|
|
5
|
+
* - No SCSS imports
|
|
6
|
+
* - No `react-dom` imports
|
|
7
|
+
* - No web-only modules that touch `window`/`document`/`localStorage`
|
|
8
|
+
*
|
|
9
|
+
* This file is meant to be used via the package `react-native` entry (Metro)
|
|
10
|
+
* or by importing the package root (recommended).
|
|
11
|
+
*/
|
|
12
|
+
//TODO: index's shoudl be reviewed and updated.
|
|
13
|
+
// Types
|
|
14
|
+
export type { TargetedScreenSize } from './types/TargetedScreenSize';
|
|
15
|
+
export type { Node, NodeData, NodeDefaultAttribute } from './types/Node';
|
|
16
|
+
export type { Project, ProjectColors } from './types/Project';
|
|
17
|
+
export type { Device } from './types/Device';
|
|
18
|
+
export type { AppConfig, Localication } from './types/PreviewConfig';
|
|
19
|
+
export { defaultAppConfig } from './types/PreviewConfig';
|
|
20
|
+
export type { Fonts, FontDefinition } from './types/Fonts';
|
|
21
|
+
export type {
|
|
22
|
+
PaywallBenefitValue,
|
|
23
|
+
PaywallBenefits,
|
|
24
|
+
Product as PaywallProduct,
|
|
25
|
+
PaywallModel,
|
|
26
|
+
} from './paywall/types/paywall-types';
|
|
27
|
+
|
|
28
|
+
// Paywall hooks (RN-safe placeholders)
|
|
29
|
+
export {
|
|
30
|
+
usePaywallCounter,
|
|
31
|
+
useCloseStatusPaywall,
|
|
32
|
+
useCarouselOptionsSeperator,
|
|
33
|
+
useCalculateLocalizedPrice,
|
|
34
|
+
useDiscountRate,
|
|
35
|
+
} from './paywall/hooks';
|
|
36
|
+
|
|
37
|
+
// Context (RN-safe). In React Native, `products` should come from an IAP wrapper
|
|
38
|
+
// (e.g. `react-native-iap`) and be passed into `BuilderProvider` by the host app.
|
|
39
|
+
export {
|
|
40
|
+
BuilderProvider,
|
|
41
|
+
useBuilderParams,
|
|
42
|
+
} from './components/BuilderProvider';
|
|
43
|
+
export { ParamsProvider } from './components/ParamsProvider';
|
|
44
|
+
export { LocalizationParamsProvider } from './components/LocalizationParamsProvider';
|
|
45
|
+
export { useParams } from './hooks/useParams';
|
|
46
|
+
export { useLocalizationParams } from './hooks/useLocalizationParams';
|
|
47
|
+
export { useLocalize } from './hooks/useLocalize';
|
|
48
|
+
export { useExtractTextStyle } from './attribute-analyser/style/native/useExtractTextStyle';
|
|
49
|
+
export { useExtractViewStyle } from './attribute-analyser/style/native/useExtractViewStyle';
|
|
50
|
+
export { useExtractImageStyle } from './attribute-analyser/style/native/useExtractImageStyle';
|
|
2
51
|
|
|
3
|
-
//
|
|
4
|
-
export {
|
|
5
|
-
|
|
52
|
+
// Pure utilities (RN-safe)
|
|
53
|
+
export {
|
|
54
|
+
isNodeNullOrUndefined,
|
|
55
|
+
isNodeString,
|
|
56
|
+
isNodeArray,
|
|
57
|
+
isEmptyObject,
|
|
58
|
+
analyseNode,
|
|
59
|
+
analyseAndProccess,
|
|
60
|
+
} from './utils/analyseNode';
|
|
6
61
|
export { getMeta } from './utils/getMeta';
|
|
7
|
-
export {
|
|
62
|
+
export { novaToJson } from './utils/novaToJson';
|
|
63
|
+
export { getDevices, getDefaultDevice } from './utils/getDevices';
|
|
64
|
+
export { querySelector } from './utils/querySelector';
|
|
65
|
+
export {
|
|
66
|
+
getImage,
|
|
67
|
+
TRIBE_ASSETS_BASE_URL,
|
|
68
|
+
TribeAssetName,
|
|
69
|
+
parseTribeAssetName,
|
|
70
|
+
resolveImageSrc,
|
|
71
|
+
} from './utils/getImage';
|
|
72
|
+
export {
|
|
73
|
+
getPatternByType,
|
|
74
|
+
getAttributeSchema,
|
|
75
|
+
getAttributeMeta,
|
|
76
|
+
getDefaultsForType,
|
|
77
|
+
getTypeSchema,
|
|
78
|
+
isPrimitiveType,
|
|
79
|
+
getArrayItemType,
|
|
80
|
+
} from './utils/patterns';
|
|
8
81
|
|
|
9
|
-
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
82
|
+
// Build-component prop/types surface (type-only export; no runtime code pulled into RN bundle)
|
|
83
|
+
export type * from './build-components';
|
|
84
|
+
|
|
85
|
+
// Node helpers (RN-safe)
|
|
86
|
+
export { default as useNode } from './build-components/useNode';
|
|
87
|
+
|
|
88
|
+
// Static sample data helpers (RN-safe)
|
|
89
|
+
export {
|
|
90
|
+
getSamples,
|
|
91
|
+
getBasicSamples,
|
|
92
|
+
getOnboardSamples,
|
|
93
|
+
} from './assets/samples/getSamples';
|
|
94
|
+
export type { EventObjectGenerated } from './build-components/OnboardButton/OnboardButtonProps.generated';
|
package/src/index.web.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './styles/index.scss';
|
|
2
|
+
|
|
3
|
+
// Web entrypoint.
|
|
4
|
+
export { ProjectPage } from './pages/ProjectPage';
|
|
5
|
+
|
|
6
|
+
// Re-export the RN-safe/root entry so `react-builder/web` can also access shared APIs.
|
|
7
|
+
export * from './index';
|
|
8
|
+
|
|
9
|
+
// Web-only runtime renderer + components (DOM + web style extraction + optional deps like lottie/react-toastify).
|
|
10
|
+
export * from './build-components';
|
|
11
|
+
export { default as useNode } from './build-components/useNode';
|
|
12
|
+
export type { EventObjectGenerated } from './build-components/OnboardButton/OnboardButtonProps.generated';
|