@developer_tribe/react-builder 1.2.44-test.1 → 1.2.44

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 (50) hide show
  1. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +0 -2
  2. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +0 -2
  3. package/dist/build-components/SystemButton/usePlacementButtonEvents.d.ts +0 -6
  4. package/dist/build-components/index.d.ts +1 -3
  5. package/dist/build-components/patterns.generated.d.ts +1391 -2180
  6. package/dist/index.cjs.js +1 -1
  7. package/dist/index.cjs.js.map +1 -1
  8. package/dist/index.esm.js +1 -1
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/index.web.cjs.js +4 -4
  11. package/dist/index.web.cjs.js.map +1 -1
  12. package/dist/index.web.esm.js +3 -3
  13. package/dist/index.web.esm.js.map +1 -1
  14. package/dist/styles.css +1 -1
  15. package/package.json +1 -1
  16. package/src/assets/meta.json +1 -1
  17. package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
  18. package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
  19. package/src/assets/samples/getSamples.ts +0 -2
  20. package/src/build-components/FormSubmitButton/FormSubmitButton.tsx +0 -3
  21. package/src/build-components/OnboardButton/OnboardButton.tsx +1 -5
  22. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +0 -12
  23. package/src/build-components/OnboardProvider/pattern.json +1 -9
  24. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +0 -12
  25. package/src/build-components/PaywallProvider/pattern.json +1 -9
  26. package/src/build-components/RenderNode.generated.tsx +0 -10
  27. package/src/build-components/SystemButton/SystemButton.tsx +0 -3
  28. package/src/build-components/SystemButton/usePlacementButtonEvents.ts +25 -36
  29. package/src/build-components/index.ts +0 -10
  30. package/src/build-components/patterns.generated.ts +1381 -2236
  31. package/src/styles/index.scss +0 -1
  32. package/src/utils/analyseNodeByPatterns.ts +2 -5
  33. package/dist/build-components/GlobalProvider/GlobalContext.d.ts +0 -28
  34. package/dist/build-components/GlobalProvider/GlobalProvider.d.ts +0 -5
  35. package/dist/build-components/GlobalProvider/GlobalProviderProps.generated.d.ts +0 -60
  36. package/dist/build-components/GlobalProvider/globalProviderUtils.d.ts +0 -37
  37. package/dist/build-components/GlobalProvider/useGlobalNavigation.d.ts +0 -19
  38. package/dist/build-components/TermsProvider/TermsProvider.d.ts +0 -5
  39. package/dist/build-components/TermsProvider/TermsProviderProps.generated.d.ts +0 -55
  40. package/src/assets/samples/global-onboard-flow.json +0 -729
  41. package/src/build-components/GlobalProvider/GlobalContext.ts +0 -48
  42. package/src/build-components/GlobalProvider/GlobalProvider.tsx +0 -191
  43. package/src/build-components/GlobalProvider/GlobalProviderProps.generated.ts +0 -78
  44. package/src/build-components/GlobalProvider/globalProviderUtils.ts +0 -163
  45. package/src/build-components/GlobalProvider/pattern.json +0 -55
  46. package/src/build-components/GlobalProvider/useGlobalNavigation.ts +0 -70
  47. package/src/build-components/TermsProvider/TermsProvider.tsx +0 -45
  48. package/src/build-components/TermsProvider/TermsProviderProps.generated.ts +0 -82
  49. package/src/build-components/TermsProvider/pattern.json +0 -35
  50. package/src/styles/components/_global-provider.scss +0 -131
@@ -16,7 +16,6 @@
16
16
  @use './components/mockos-router';
17
17
  @use './components/bottom-bar';
18
18
  @use './components/onboard';
19
- @use './components/global-provider';
20
19
 
21
20
  @use './components/webview';
22
21
  @use './components/checkbox';
@@ -432,15 +432,12 @@ function validateAttributesByPattern(
432
432
  if (
433
433
  attrName === 'title' ||
434
434
  attrName === 'description' ||
435
- attrName === 'testID' ||
436
- attrName === 'animation'
435
+ attrName === 'testID'
437
436
  ) {
438
437
  const res = validateAttributeValue(
439
438
  pattern.pattern.type,
440
439
  attrValue,
441
- attrName === 'testID' || attrName === 'animation'
442
- ? 'string'
443
- : attrName,
440
+ attrName === 'testID' ? 'string' : attrName,
444
441
  joinPath(path, attrName),
445
442
  );
446
443
  if (!res.valid) return res;
@@ -1,28 +0,0 @@
1
- import type { NodeData } from '../../types/Node';
2
- /** Supported transition animations when navigating to this page (platform-style names).
3
- * rn stack transition animations
4
- */
5
- export declare const GLOBAL_PAGE_ANIMATIONS: readonly ["default", "fade", "fade_from_bottom", "fade_from_right", "reveal_from_bottom", "scale_from_center", "slide_from_right", "slide_from_left", "slide_from_bottom", "none"];
6
- export type GlobalPageAnimationType = (typeof GLOBAL_PAGE_ANIMATIONS)[number];
7
- export interface GlobalPage {
8
- key: string;
9
- node: NodeData;
10
- /** Condition key: this page is skipped when conditions[skipIf] === true */
11
- skipIf?: string;
12
- /** Optional transition animation when this page is shown (push/enter). */
13
- animation?: string;
14
- index: number;
15
- }
16
- export interface GlobalContextValue {
17
- currentPageKey: string;
18
- pages: GlobalPage[];
19
- pageStack: string[];
20
- navigate: (key: string) => void;
21
- goNext: () => void;
22
- goBack: () => boolean;
23
- /** Runtime boolean conditions (e.g. termsAccepted) */
24
- conditions: Record<string, boolean>;
25
- setCondition: (key: string, value: boolean) => void;
26
- }
27
- export declare const GlobalContext: import("react").Context<GlobalContextValue | null>;
28
- export declare function useGlobalContext(): GlobalContextValue | null;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { GlobalProviderComponentProps } from './GlobalProviderProps.generated';
3
- declare function GlobalProvider({ node }: GlobalProviderComponentProps): import("react/jsx-runtime").JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof GlobalProvider>;
5
- export default _default;
@@ -1,60 +0,0 @@
1
- import type { NodeData } from '../../types/Node';
2
- export type FlexDirectionOptionType = 'row' | 'column';
3
- export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
- export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
- export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
- export type PositionOptionType = 'relative' | 'absolute';
7
- export interface SkipConditionEntryGenerated {
8
- pageKey?: string;
9
- conditionKey?: string;
10
- }
11
- export interface GlobalProviderStyleGenerated {
12
- flexDirection?: FlexDirectionOptionType;
13
- flexWrap?: FlexWrapOptionType;
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
- }
47
- export interface GlobalProviderPropsGenerated {
48
- child: string;
49
- attributes: {
50
- styles?: GlobalProviderStyleGenerated;
51
- scrollable?: boolean;
52
- testID?: string;
53
- initialPage?: string;
54
- persistProgress?: boolean;
55
- skipConditions?: SkipConditionEntryGenerated[];
56
- };
57
- }
58
- export interface GlobalProviderComponentProps {
59
- node: NodeData<GlobalProviderPropsGenerated['attributes']>;
60
- }
@@ -1,37 +0,0 @@
1
- import type { NodeData } from '../../types/Node';
2
- import type { GlobalPage } from './GlobalContext';
3
- /**
4
- * Derives a stable page key for a child node.
5
- * Priority: node.key (standard NodeData field) → TYPE_KEY_MAP → "${type}-{index}"
6
- *
7
- * Using node.key avoids adding unknown attributes to child components that
8
- * would fail builder validation.
9
- */
10
- export declare function derivePageKey(node: NodeData, index: number): string;
11
- /** Runtime shape of a SkipConditionEntry (mirrors the types block in pattern.json). */
12
- export interface SkipConditionEntry {
13
- pageKey: string;
14
- conditionKey: string;
15
- }
16
- /**
17
- * Converts SkipConditionEntry[] (from pattern schema) to a lookup map for fast access.
18
- * Array format is used in pattern.json because the schema system doesn't support
19
- * plain Record/object attribute types.
20
- */
21
- export declare function normalizeSkipConditions(raw: unknown): Record<string, string>;
22
- /**
23
- * Builds the page list for GlobalProvider.
24
- *
25
- * @param children - direct child nodes of GlobalProvider
26
- * @param skipConditions - lookup map of pageKey → conditionKey, already normalized
27
- * from SkipConditionEntry[] via normalizeSkipConditions().
28
- */
29
- export declare function buildPages(children: NodeData[], skipConditions?: Record<string, string>): GlobalPage[];
30
- /** Returns the first non-skipped page key, starting from the requested key. */
31
- export declare function resolveEffectivePage(targetKey: string, pages: GlobalPage[], conditions: Record<string, boolean>): string;
32
- export declare function persistProgress(storageKey: string, currentPageKey: string, conditions: Record<string, boolean>): void;
33
- export declare function loadProgress(storageKey: string): {
34
- currentPageKey: string;
35
- conditions: Record<string, boolean>;
36
- } | null;
37
- export declare function clearProgress(storageKey: string): void;
@@ -1,19 +0,0 @@
1
- /**
2
- * Maps route/placement aliases to their canonical GlobalProvider page keys.
3
- *
4
- * Add entries here when a new alias should resolve to an existing page key.
5
- * Keys are the incoming target strings (from JSON events / usePlacementButtonEvents).
6
- * Values are the canonical page key that GlobalContext.navigate() will receive.
7
- *
8
- * Exported so other modules (e.g. a navigation-flow visualiser) can inspect
9
- * which aliases exist without duplicating this logic.
10
- */
11
- export declare const GLOBAL_ROUTE_ALIASES: Record<string, string>;
12
- /**
13
- * Returns a navigate function that first attempts to route within GlobalContext
14
- * (when a GlobalProvider is active), then falls back to MockOSContext navigation.
15
- *
16
- * Used by SystemButton and OnboardButton so that events defined in JSON work
17
- * transparently whether rendered inside a GlobalProvider or standalone.
18
- */
19
- export declare function useGlobalNavigation(): (target: string) => boolean;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { TermsProviderComponentProps } from './TermsProviderProps.generated';
3
- declare function TermsProvider({ node }: TermsProviderComponentProps): import("react/jsx-runtime").JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof TermsProvider>;
5
- export default _default;
@@ -1,55 +0,0 @@
1
- import type { NodeData } from '../../types/Node';
2
- export type AnimationOptionType = 'default' | 'fade' | 'fade_from_bottom' | 'fade_from_right' | 'reveal_from_bottom' | 'scale_from_center' | 'slide_from_right' | 'slide_from_left' | 'slide_from_bottom' | 'none';
3
- export type FlexDirectionOptionType = 'row' | 'column';
4
- export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
5
- export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
6
- export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
7
- export type PositionOptionType = 'relative' | 'absolute';
8
- export interface TermsProviderStyleGenerated {
9
- flexDirection?: FlexDirectionOptionType;
10
- flexWrap?: FlexWrapOptionType;
11
- alignItems?: AlignItemsOptionType;
12
- justifyContent?: JustifyContentOptionType;
13
- gap?: string;
14
- padding?: string;
15
- paddingHorizontal?: string;
16
- paddingVertical?: string;
17
- paddingTop?: string;
18
- paddingBottom?: string;
19
- paddingLeft?: string;
20
- paddingRight?: string;
21
- margin?: string;
22
- marginHorizontal?: string;
23
- marginVertical?: string;
24
- marginTop?: string;
25
- marginBottom?: string;
26
- marginLeft?: string;
27
- marginRight?: string;
28
- backgroundColor?: string;
29
- borderRadius?: string;
30
- width?: string;
31
- minWidth?: string;
32
- maxWidth?: string;
33
- height?: string;
34
- minHeight?: string;
35
- maxHeight?: string;
36
- flex?: number;
37
- position?: PositionOptionType;
38
- top?: string;
39
- bottom?: string;
40
- left?: string;
41
- right?: string;
42
- zIndex?: number;
43
- }
44
- export interface TermsProviderPropsGenerated {
45
- child: string;
46
- attributes: {
47
- styles?: TermsProviderStyleGenerated;
48
- scrollable?: boolean;
49
- testID?: string;
50
- animation?: AnimationOptionType;
51
- };
52
- }
53
- export interface TermsProviderComponentProps {
54
- node: NodeData<TermsProviderPropsGenerated['attributes']>;
55
- }