@builder.io/sdk-vue 0.2.2 → 0.3.1

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 (122) hide show
  1. package/package.json +2 -5
  2. package/packages/_vue2/dist/block-styles.ae2c8895.cjs +1 -0
  3. package/packages/_vue2/dist/block-styles.b09f50da.js +75 -0
  4. package/packages/_vue2/dist/css.e6670a83.cjs +6 -0
  5. package/packages/_vue2/dist/css.fb10bcf8.js +74 -0
  6. package/packages/_vue2/dist/{index.eb91dc82.js → index.36f3710d.js} +432 -402
  7. package/packages/_vue2/dist/index.ae3f58f8.cjs +29 -0
  8. package/packages/_vue2/dist/render-block.74bc834e.cjs +3 -0
  9. package/packages/_vue2/dist/{render-block.6f9a607a.js → render-block.c14ab4be.js} +96 -90
  10. package/packages/_vue2/dist/render-component.2b74ef23.cjs +1 -0
  11. package/packages/_vue2/dist/render-component.d7f78e3d.js +38 -0
  12. package/packages/_vue2/dist/render-inlined-styles.04d09a3c.js +34 -0
  13. package/packages/_vue2/dist/render-inlined-styles.c8d80bc4.cjs +1 -0
  14. package/packages/_vue2/dist/render-repeated-block.58333f68.cjs +1 -0
  15. package/packages/_vue2/dist/render-repeated-block.a8717618.js +45 -0
  16. package/packages/_vue2/dist/render-styles.4a1edc25.cjs +31 -0
  17. package/packages/_vue2/dist/{render-styles.0d1f8872.js → render-styles.a49c2339.js} +26 -25
  18. package/packages/_vue2/dist/sdk.cjs +1 -1
  19. package/packages/_vue2/dist/sdk.js +23 -22
  20. package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +19 -8
  21. package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +29 -174
  22. package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +9 -13
  23. package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +13 -20
  24. package/packages/_vue2/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
  25. package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +72 -0
  26. package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +8 -11
  27. package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +12 -7
  28. package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +15 -245
  29. package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +7 -4
  30. package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +42 -7
  31. package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
  32. package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
  33. package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +3 -86
  34. package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +3 -86
  35. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -84
  36. package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +23 -127
  37. package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
  38. package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +46 -212
  39. package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
  40. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
  41. package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
  42. package/packages/_vue2/dist/src/context/types.d.ts +17 -2
  43. package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
  44. package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
  45. package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
  46. package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
  47. package/packages/_vue2/dist/src/index.d.ts +1 -0
  48. package/packages/_vue2/dist/style.css +1 -1
  49. package/packages/_vue3/dist/block-styles.a1577ff9.cjs +1 -0
  50. package/packages/_vue3/dist/block-styles.ae0db517.js +71 -0
  51. package/packages/_vue3/dist/css.c52c28f5.js +74 -0
  52. package/packages/_vue3/dist/css.eaf664fa.cjs +6 -0
  53. package/packages/_vue3/dist/index.8ed3c046.cjs +29 -0
  54. package/packages/_vue3/dist/{index.45ab85e5.js → index.d8d44f06.js} +835 -806
  55. package/packages/_vue3/dist/render-block.8f200c30.cjs +3 -0
  56. package/packages/_vue3/dist/render-block.c70eab34.js +285 -0
  57. package/packages/_vue3/dist/render-component.023d5d67.cjs +1 -0
  58. package/packages/_vue3/dist/render-component.9b027ad2.js +42 -0
  59. package/packages/_vue3/dist/render-inlined-styles.0b6cafc4.js +32 -0
  60. package/packages/_vue3/dist/render-inlined-styles.e3ea32fb.cjs +1 -0
  61. package/packages/_vue3/dist/render-repeated-block.1743f160.cjs +1 -0
  62. package/packages/_vue3/dist/render-repeated-block.1b229997.js +39 -0
  63. package/packages/_vue3/dist/render-styles.70e1b259.cjs +31 -0
  64. package/packages/_vue3/dist/{render-styles.cf6faa29.js → render-styles.f8cb298d.js} +33 -33
  65. package/packages/_vue3/dist/sdk.cjs +1 -1
  66. package/packages/_vue3/dist/sdk.js +1 -1
  67. package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +19 -8
  68. package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +45 -91
  69. package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +16 -13
  70. package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +17 -20
  71. package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +1 -4
  72. package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +54 -14
  73. package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +27 -11
  74. package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +12 -7
  75. package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +25 -162
  76. package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +7 -4
  77. package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +42 -7
  78. package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +18 -27
  79. package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
  80. package/packages/_vue3/dist/src/components/render-block/render-block.vue.d.ts +2 -2
  81. package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +2 -2
  82. package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +19 -8
  83. package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +23 -44
  84. package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +15 -18
  85. package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +77 -129
  86. package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +12 -11
  87. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
  88. package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
  89. package/packages/_vue3/dist/src/context/types.d.ts +17 -2
  90. package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
  91. package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
  92. package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
  93. package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
  94. package/packages/_vue3/dist/src/index.d.ts +1 -0
  95. package/packages/_vue3/dist/style.css +1 -1
  96. package/packages/_vue2/dist/block-styles.4667431d.js +0 -72
  97. package/packages/_vue2/dist/block-styles.7c2a87df.cjs +0 -1
  98. package/packages/_vue2/dist/css.468435de.js +0 -58
  99. package/packages/_vue2/dist/css.dce6e4eb.cjs +0 -6
  100. package/packages/_vue2/dist/index.78ba6586.cjs +0 -29
  101. package/packages/_vue2/dist/render-block.67e4dd65.cjs +0 -3
  102. package/packages/_vue2/dist/render-component.10d6c8d2.js +0 -37
  103. package/packages/_vue2/dist/render-component.3578089b.cjs +0 -1
  104. package/packages/_vue2/dist/render-inlined-styles.56373d13.cjs +0 -1
  105. package/packages/_vue2/dist/render-inlined-styles.942eb38d.js +0 -33
  106. package/packages/_vue2/dist/render-repeated-block.18d7fc6e.cjs +0 -1
  107. package/packages/_vue2/dist/render-repeated-block.1bb5c2fb.js +0 -42
  108. package/packages/_vue2/dist/render-styles.de7287b6.cjs +0 -31
  109. package/packages/_vue3/dist/block-styles.09955b0c.cjs +0 -1
  110. package/packages/_vue3/dist/block-styles.6bd36a5a.js +0 -69
  111. package/packages/_vue3/dist/css.3241302b.cjs +0 -6
  112. package/packages/_vue3/dist/css.81a21c5a.js +0 -58
  113. package/packages/_vue3/dist/index.cca81180.cjs +0 -29
  114. package/packages/_vue3/dist/render-block.33cc5768.cjs +0 -3
  115. package/packages/_vue3/dist/render-block.ec4c1913.js +0 -301
  116. package/packages/_vue3/dist/render-component.3bd8dc76.js +0 -26
  117. package/packages/_vue3/dist/render-component.c0d5e797.cjs +0 -1
  118. package/packages/_vue3/dist/render-inlined-styles.952d2fff.js +0 -32
  119. package/packages/_vue3/dist/render-inlined-styles.b55b6667.cjs +0 -1
  120. package/packages/_vue3/dist/render-repeated-block.263f0cec.js +0 -37
  121. package/packages/_vue3/dist/render-repeated-block.c3c9e926.cjs +0 -1
  122. package/packages/_vue3/dist/render-styles.d1ac3a18.cjs +0 -31
@@ -1,85 +1,20 @@
1
- declare const _sfc_main: {
2
- name: string;
3
- components: {
4
- RenderBlock: () => Promise<{
5
- name: string;
6
- components: {
7
- RenderComponent: () => Promise<{
8
- name: string;
9
- components: {
10
- RenderBlock: () => Promise<any>;
11
- BlockStyles: () => Promise<{
12
- name: string;
13
- components: {
14
- RenderInlinedStyles: () => Promise<{
15
- name: string;
16
- props: string[];
17
- data(): {
18
- TARGET: string;
19
- };
20
- computed: {
21
- tag(): string;
22
- injectedStyleScript(): any;
23
- };
24
- }>;
25
- };
26
- props: string[];
27
- data(): {
28
- TARGET: string;
29
- };
30
- computed: {
31
- useBlock(): any;
32
- canShowBlock(): any;
33
- css(): any;
34
- };
35
- }>;
36
- };
37
- props: string[];
38
- }>;
39
- RenderRepeatedBlock: () => Promise<any>;
40
- BlockStyles: () => Promise<{
41
- name: string;
42
- components: {
43
- RenderInlinedStyles: () => Promise<{
44
- name: string;
45
- props: string[];
46
- data(): {
47
- TARGET: string;
48
- };
49
- computed: {
50
- tag(): string;
51
- injectedStyleScript(): any;
52
- };
53
- }>;
54
- };
55
- props: string[];
56
- data(): {
57
- TARGET: string;
58
- };
59
- computed: {
60
- useBlock(): any;
61
- canShowBlock(): any;
62
- css(): any;
63
- };
64
- }>;
65
- };
66
- props: string[];
67
- data(): any;
68
- computed: {
69
- useBlock(): any;
70
- canShowBlock(): unknown;
71
- actions(): any;
72
- attributes(): any;
73
- childrenWithoutParentComponent(): any;
74
- childrenContext(): any;
75
- renderComponentProps(): any;
76
- };
77
- methods: {
78
- stripVOn: (actions?: {}) => {};
79
- };
80
- }>;
81
- };
82
- props: string[];
83
- provide(): any;
84
- };
1
+ /**
2
+ * We can't make this a generic `ProvideContext` function because Vue 2 won't support root slots, e.g.
3
+ *
4
+ * ```vue
5
+ * <template>
6
+ * <slot></slot>
7
+ * </template>
8
+ * ```
9
+ */
10
+ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
11
+ block?: any;
12
+ repeatContext?: any;
13
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
14
+ block?: any;
15
+ repeatContext?: any;
16
+ }>>>, {
17
+ readonly block?: any;
18
+ readonly repeatContext?: any;
19
+ }>;
85
20
  export default _sfc_main;
@@ -1,134 +1,30 @@
1
+ import type { BuilderBlock } from "../types/builder-block.js";
1
2
  export type RenderBlockProps = {
2
3
  blocks?: BuilderBlock[];
3
4
  parent?: string;
4
5
  path?: string;
5
6
  styleProp?: Record<string, any>;
6
7
  };
7
- import { BuilderBlock } from "../types/builder-block.js";
8
- declare const _sfc_main: {
9
- name: string;
10
- components: {
11
- RenderBlock: () => Promise<{
12
- name: string;
13
- components: {
14
- RenderComponent: () => Promise<{
15
- name: string;
16
- components: {
17
- RenderBlock: () => Promise<any>;
18
- BlockStyles: () => Promise<{
19
- name: string;
20
- components: {
21
- RenderInlinedStyles: () => Promise<{
22
- name: string;
23
- props: string[];
24
- data(): {
25
- TARGET: string;
26
- };
27
- computed: {
28
- tag(): string;
29
- injectedStyleScript(): any;
30
- };
31
- }>;
32
- };
33
- props: string[];
34
- data(): {
35
- TARGET: string;
36
- };
37
- computed: {
38
- useBlock(): any;
39
- canShowBlock(): any;
40
- css(): any;
41
- };
42
- }>;
43
- };
44
- props: string[];
45
- }>;
46
- RenderRepeatedBlock: () => Promise<{
47
- name: string;
48
- components: {
49
- RenderBlock: () => Promise<any>;
50
- };
51
- props: string[];
52
- provide(): any;
53
- }>;
54
- BlockStyles: () => Promise<{
55
- name: string;
56
- components: {
57
- RenderInlinedStyles: () => Promise<{
58
- name: string;
59
- props: string[];
60
- data(): {
61
- TARGET: string;
62
- };
63
- computed: {
64
- tag(): string;
65
- injectedStyleScript(): any;
66
- };
67
- }>;
68
- };
69
- props: string[];
70
- data(): {
71
- TARGET: string;
72
- };
73
- computed: {
74
- useBlock(): any;
75
- canShowBlock(): any;
76
- css(): any;
77
- };
78
- }>;
79
- };
80
- props: string[];
81
- data(): any;
82
- computed: {
83
- useBlock(): any;
84
- canShowBlock(): unknown;
85
- actions(): any;
86
- attributes(): any;
87
- childrenWithoutParentComponent(): any;
88
- childrenContext(): any;
89
- renderComponentProps(): any;
90
- };
91
- methods: {
92
- stripVOn: (actions?: {}) => {};
93
- };
94
- }>;
95
- BlockStyles: () => Promise<{
96
- name: string;
97
- components: {
98
- RenderInlinedStyles: () => Promise<{
99
- name: string;
100
- props: string[];
101
- data(): {
102
- TARGET: string;
103
- };
104
- computed: {
105
- tag(): string;
106
- injectedStyleScript(): any;
107
- };
108
- }>;
109
- };
110
- props: string[];
111
- data(): {
112
- TARGET: string;
113
- };
114
- computed: {
115
- useBlock(): any;
116
- canShowBlock(): any;
117
- css(): any;
118
- };
119
- }>;
120
- };
121
- props: string[];
122
- inject: {
123
- builderContext: symbol;
124
- };
125
- computed: {
126
- className(): any;
127
- };
128
- methods: {
129
- onClick(): void;
130
- onMouseEnter(): void;
131
- _classStringToObject(str: any): {};
132
- };
133
- };
8
+ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
9
+ parent?: any;
10
+ blocks?: any;
11
+ path?: any;
12
+ styleProp?: any;
13
+ }>, {}, {}, {
14
+ className(): string;
15
+ }, {
16
+ onClick(): void;
17
+ onMouseEnter(): void;
18
+ _classStringToObject(str: any): {};
19
+ }, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
20
+ parent?: any;
21
+ blocks?: any;
22
+ path?: any;
23
+ styleProp?: any;
24
+ }>>>, {
25
+ readonly parent?: any;
26
+ readonly blocks?: any;
27
+ readonly path?: any;
28
+ readonly styleProp?: any;
29
+ }>;
134
30
  export default _sfc_main;
@@ -1,19 +1,16 @@
1
- declare const _sfc_main: {
2
- name: string;
3
- components: {
4
- RenderInlinedStyles: () => Promise<{
5
- name: string;
6
- props: string[];
7
- data(): {
8
- TARGET: string;
9
- };
10
- computed: {
11
- tag(): string;
12
- injectedStyleScript(): any;
13
- };
14
- }>;
15
- };
16
- props: string[];
17
- data(): any;
18
- };
1
+ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
2
+ cssCode?: any;
3
+ contentId?: any;
4
+ customFonts?: any;
5
+ }>, {}, {
6
+ injectedStyles: string;
7
+ }, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
8
+ cssCode?: any;
9
+ contentId?: any;
10
+ customFonts?: any;
11
+ }>>>, {
12
+ readonly cssCode?: any;
13
+ readonly contentId?: any;
14
+ readonly customFonts?: any;
15
+ }>;
19
16
  export default _sfc_main;
@@ -1,220 +1,54 @@
1
- import { BuilderRenderState } from "../../context/types.js";
2
- import { Breakpoints, BuilderContent } from "../../types/builder-content.js";
3
- import { Nullable } from "../../types/typescript.js";
4
- declare const _sfc_main: {
5
- name: string;
6
- components: {
7
- RenderContentStyles: () => Promise<{
8
- name: string;
9
- components: {
10
- RenderInlinedStyles: () => Promise<{
11
- name: string;
12
- props: string[];
13
- data(): {
14
- TARGET: string;
15
- };
16
- computed: {
17
- tag(): string;
18
- injectedStyleScript(): any;
19
- };
20
- }>;
21
- };
22
- props: string[];
23
- data(): any;
24
- }>;
25
- RenderBlocks: () => Promise<{
26
- name: string;
27
- components: {
28
- RenderBlock: () => Promise<{
29
- name: string;
30
- components: {
31
- RenderComponent: () => Promise<{
32
- name: string;
33
- components: {
34
- RenderBlock: () => Promise<any>;
35
- BlockStyles: () => Promise<{
36
- name: string;
37
- components: {
38
- RenderInlinedStyles: () => Promise<{
39
- name: string;
40
- props: string[];
41
- data(): {
42
- TARGET: string;
43
- };
44
- computed: {
45
- tag(): string;
46
- injectedStyleScript(): any;
47
- };
48
- }>;
49
- };
50
- props: string[];
51
- data(): {
52
- TARGET: string;
53
- };
54
- computed: {
55
- useBlock(): any;
56
- canShowBlock(): any;
57
- css(): any;
58
- };
59
- }>;
60
- };
61
- props: string[];
62
- }>;
63
- RenderRepeatedBlock: () => Promise<{
64
- name: string;
65
- components: {
66
- RenderBlock: () => Promise<any>;
67
- };
68
- props: string[];
69
- provide(): any;
70
- }>;
71
- BlockStyles: () => Promise<{
72
- name: string;
73
- components: {
74
- RenderInlinedStyles: () => Promise<{
75
- name: string;
76
- props: string[];
77
- data(): {
78
- TARGET: string;
79
- };
80
- computed: {
81
- tag(): string;
82
- injectedStyleScript(): any;
83
- };
84
- }>;
85
- };
86
- props: string[];
87
- data(): {
88
- TARGET: string;
89
- };
90
- computed: {
91
- useBlock(): any;
92
- canShowBlock(): any;
93
- css(): any;
94
- };
95
- }>;
96
- };
97
- props: string[];
98
- data(): any;
99
- computed: {
100
- useBlock(): any;
101
- canShowBlock(): unknown;
102
- actions(): any;
103
- attributes(): any;
104
- childrenWithoutParentComponent(): any;
105
- childrenContext(): any;
106
- renderComponentProps(): any;
107
- };
108
- methods: {
109
- stripVOn: (actions?: {}) => {};
110
- };
111
- }>;
112
- BlockStyles: () => Promise<{
113
- name: string;
114
- components: {
115
- RenderInlinedStyles: () => Promise<{
116
- name: string;
117
- props: string[];
118
- data(): {
119
- TARGET: string;
120
- };
121
- computed: {
122
- tag(): string;
123
- injectedStyleScript(): any;
124
- };
125
- }>;
126
- };
127
- props: string[];
128
- data(): {
129
- TARGET: string;
130
- };
131
- computed: {
132
- useBlock(): any;
133
- canShowBlock(): any;
134
- css(): any;
135
- };
136
- }>;
137
- };
138
- props: string[];
139
- inject: {
140
- builderContext: symbol;
141
- };
142
- computed: {
143
- className(): any;
144
- };
145
- methods: {
146
- onClick(): void;
147
- onMouseEnter(): void;
148
- _classStringToObject(str: any): {};
149
- };
150
- }>;
1
+ import type { BuilderRenderState } from "../../context/types.js";
2
+ import type { Breakpoints, BuilderContent } from "../../types/builder-content.js";
3
+ import type { Nullable } from "../../types/typescript.js";
4
+ declare const _sfc_main: import("vue").DefineComponent<string[], {}, {
5
+ forceReRenderCount: number;
6
+ overrideContent: null;
7
+ useContent: Nullable<BuilderContent>;
8
+ update: number;
9
+ canTrackToUse: any;
10
+ contentState: {
11
+ [x: string]: unknown;
151
12
  };
152
- props: string[];
153
- data(): {
154
- forceReRenderCount: number;
155
- overrideContent: null;
156
- useContent: Nullable<BuilderContent>;
157
- update: number;
158
- canTrackToUse: any;
159
- contentState: {
13
+ allRegisteredComponents: any;
14
+ httpReqsData: {};
15
+ clicked: boolean;
16
+ TARGET: string;
17
+ }, {
18
+ onUpdateHook0(): {
19
+ 0: any;
20
+ };
21
+ onUpdateHook1(): {
22
+ 0: string | undefined;
23
+ 1: {
160
24
  [x: string]: unknown;
161
25
  };
162
- allRegisteredComponents: any;
163
- httpReqsData: {};
164
- clicked: boolean;
165
- TARGET: string;
166
26
  };
167
- provide(): {
168
- [x: symbol]: {
169
- content: any;
170
- state: any;
171
- setState: any;
172
- context: any;
173
- apiKey: any;
174
- apiVersion: any;
175
- registeredComponents: any;
176
- };
27
+ onUpdateHook2(): {
28
+ 0: {
29
+ [key: string]: string;
30
+ } | undefined;
177
31
  };
178
- mounted(): void;
179
- watch: {
180
- onUpdateHook0: {
181
- handler(): void;
182
- immediate: boolean;
183
- };
184
- onUpdateHook1: {
185
- handler(): void;
186
- immediate: boolean;
187
- };
188
- onUpdateHook2: {
189
- handler(): void;
190
- immediate: boolean;
191
- };
192
- onUpdateHook3: {
193
- handler(): void;
194
- immediate: boolean;
32
+ onUpdateHook3(): {
33
+ 0: {
34
+ [x: string]: unknown;
195
35
  };
196
36
  };
197
- unmounted(): void;
198
- computed: {
199
- onUpdateHook0(): any;
200
- onUpdateHook1(): any;
201
- onUpdateHook2(): any;
202
- onUpdateHook3(): any;
203
- };
204
- methods: {
205
- mergeNewContent(newContent: BuilderContent): void;
206
- setBreakpoints(breakpoints: Breakpoints): void;
207
- setContextState(newState: BuilderRenderState): void;
208
- processMessage(event: MessageEvent): void;
209
- evaluateJsCode(): void;
210
- onClick(event: any): void;
211
- evalExpression(expression: string): string;
212
- handleRequest({ url, key }: {
213
- key: string;
214
- url: string;
215
- }): void;
216
- runHttpRequests(): void;
217
- emitStateUpdate(): void;
218
- };
219
- };
37
+ }, {
38
+ mergeNewContent(newContent: BuilderContent): void;
39
+ setBreakpoints(breakpoints: Breakpoints): void;
40
+ contentSetState(newRootState: BuilderRenderState): void;
41
+ processMessage(event: MessageEvent): void;
42
+ evaluateJsCode(): void;
43
+ onClick(event: any): void;
44
+ evalExpression(expression: string): string;
45
+ handleRequest({ url, key }: {
46
+ key: string;
47
+ url: string;
48
+ }): void;
49
+ runHttpRequests(): void;
50
+ emitStateUpdate(): void;
51
+ }, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<string[]>>, {
52
+ [x: number]: string;
53
+ }>;
220
54
  export default _sfc_main;
@@ -1,12 +1,13 @@
1
- declare const _sfc_main: {
2
- name: string;
3
- props: string[];
4
- data(): {
5
- TARGET: string;
6
- };
7
- computed: {
8
- tag(): string;
9
- injectedStyleScript(): any;
10
- };
11
- };
1
+ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
2
+ styles?: any;
3
+ }>, {}, {
4
+ TARGET: string;
5
+ }, {
6
+ tag(): any;
7
+ injectedStyleScript(): string;
8
+ }, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{
9
+ styles?: any;
10
+ }>>>, {
11
+ readonly styles?: any;
12
+ }>;
12
13
  export default _sfc_main;
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "0.3.1";
@@ -2,8 +2,9 @@ declare const _default: {
2
2
  Builder: {
3
3
  content: null;
4
4
  context: {};
5
- state: {};
6
- setState(): void;
5
+ localState: undefined;
6
+ rootSetState(): void;
7
+ rootState: {};
7
8
  apiKey: null;
8
9
  apiVersion: undefined;
9
10
  registeredComponents: {};
@@ -11,8 +11,23 @@ export type BuilderRenderContext = Record<string, unknown>;
11
11
  export interface BuilderContextInterface {
12
12
  content: Nullable<BuilderContent>;
13
13
  context: BuilderRenderContext;
14
- state: BuilderRenderState;
15
- setState?: (state: BuilderRenderState) => void;
14
+ /**
15
+ * The state of the application.
16
+ *
17
+ * NOTE: see `localState` below to understand how it is different from `rootState`.
18
+ */
19
+ rootState: BuilderRenderState;
20
+ /**
21
+ * Some frameworks have a `setState` function which needs to be invoked to notify
22
+ * the framework of state change. (other frameworks don't in which case it is `undefined')
23
+ */
24
+ rootSetState: ((rootState: BuilderRenderState) => void) | undefined;
25
+ /**
26
+ * The local state of the current component. This is different from `rootState` in that
27
+ * it can be a child state created by a repeater containing local state.
28
+ * The `rootState` is where all of the state mutations are actually stored.
29
+ */
30
+ localState: BuilderRenderState | undefined;
16
31
  apiKey: string | null;
17
32
  apiVersion: ApiVersion | undefined;
18
33
  registeredComponents: RegisteredComponents;
@@ -1,6 +1,7 @@
1
- import type { BuilderContextInterface } from '../context/types.js';
2
- export declare function evaluate({ code, context, state, event, isExpression, }: {
1
+ import type { BuilderContextInterface, BuilderRenderState } from '../context/types.js';
2
+ export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, }: {
3
3
  code: string;
4
4
  event?: Event;
5
5
  isExpression?: boolean;
6
- } & Pick<BuilderContextInterface, 'state' | 'context'>): any;
6
+ } & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): any;
7
+ export declare function flattenState(rootState: Record<string | symbol, any>, localState: Record<string | symbol, any> | undefined, rootSetState: ((rootState: BuilderRenderState) => void) | undefined): BuilderRenderState;
@@ -2,7 +2,7 @@ import type { BuilderContextInterface } from '../context/types.js';
2
2
  import type { BuilderBlock } from '../types/builder-block.js';
3
3
  type Options = {
4
4
  block: BuilderBlock;
5
- } & Pick<BuilderContextInterface, 'state' | 'context'>;
5
+ } & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
6
6
  type EventHandler = (event: Event) => any;
7
7
  export declare const createEventHandler: (value: string, options: Options) => EventHandler;
8
8
  export {};
@@ -5,5 +5,5 @@ type Actions = {
5
5
  };
6
6
  export declare function getBlockActions(options: {
7
7
  block: BuilderBlock;
8
- } & Pick<BuilderContextInterface, 'state' | 'context'>): Actions;
8
+ } & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
9
9
  export {};