@developer_tribe/react-builder 1.2.20 → 1.2.22

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 (151) hide show
  1. package/dist/attribute-analyser/style/web/useExtractTextStyle.d.ts +1 -1
  2. package/dist/build-components/BIcon/BIconProps.generated.d.ts +2 -0
  3. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +2 -0
  4. package/dist/build-components/Button/ButtonProps.generated.d.ts +2 -0
  5. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +2 -0
  6. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +2 -0
  7. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +2 -0
  8. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +2 -0
  9. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +2 -0
  10. package/dist/build-components/CountDown/CountDownProps.generated.d.ts +2 -0
  11. package/dist/build-components/Counter/CounterProps.generated.d.ts +2 -0
  12. package/dist/build-components/Image/ImageProps.generated.d.ts +2 -0
  13. package/dist/build-components/Main/MainProps.generated.d.ts +2 -0
  14. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +2 -0
  15. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -0
  16. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +2 -0
  17. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +2 -0
  18. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +2 -0
  19. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +2 -0
  20. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +2 -0
  21. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +2 -0
  22. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +2 -0
  23. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +2 -0
  24. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +2 -0
  25. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +2 -0
  26. package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +2 -0
  27. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +2 -0
  28. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +2 -0
  29. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +2 -0
  30. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +2 -0
  31. package/dist/build-components/Text/TextProps.generated.d.ts +2 -0
  32. package/dist/build-components/View/View.d.ts +1 -1
  33. package/dist/build-components/View/ViewProps.generated.d.ts +2 -0
  34. package/dist/build-components/patterns.generated.d.ts +287 -2
  35. package/dist/components/BuilderButton.d.ts +3 -1
  36. package/dist/index.cjs.js +3 -3
  37. package/dist/index.cjs.js.map +1 -1
  38. package/dist/index.esm.js +4 -4
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.web.cjs.js +4 -4
  41. package/dist/index.web.cjs.js.map +1 -1
  42. package/dist/index.web.esm.js +4 -4
  43. package/dist/index.web.esm.js.map +1 -1
  44. package/dist/store.d.ts +2 -0
  45. package/dist/styles.css +1 -1
  46. package/dist/utils/extractTextStyle/extractTextStyle.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/scripts/migrate-patterns-to-v2.mjs +13 -8
  49. package/scripts/prebuild/icon-generator.js +34 -37
  50. package/src/assets/loading_animation.json +2587 -1
  51. package/src/assets/meta.json +1 -1
  52. package/src/assets/samples/carousel-sample.json +279 -197
  53. package/src/assets/samples/getSamples.ts +16 -1
  54. package/src/assets/samples/paywall-1.json +16 -0
  55. package/src/assets/samples/paywall-2.json +2 -2
  56. package/src/assets/samples/paywall-app-delete-offer.json +353 -0
  57. package/src/assets/samples/paywall-app-open-offer.json +353 -0
  58. package/src/assets/samples/paywall-back-offer.json +353 -0
  59. package/src/assets/samples/paywall-notification-offer.json +353 -0
  60. package/src/assets/samples/vpn-onboard-1.json +23 -12
  61. package/src/assets/samples/vpn-onboard-2.json +23 -12
  62. package/src/assets/samples/vpn-onboard-3.json +23 -12
  63. package/src/assets/samples/vpn-onboard-4.json +23 -12
  64. package/src/assets/samples/vpn-onboard-5.json +23 -12
  65. package/src/assets/samples/vpn-onboard-6.json +23 -12
  66. package/src/attribute-analyser/style/web/useExtractTextStyle.ts +9 -2
  67. package/src/build-components/BIcon/BIconProps.generated.ts +2 -0
  68. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +2 -0
  69. package/src/build-components/Button/ButtonProps.generated.ts +2 -0
  70. package/src/build-components/Carousel/CarouselProps.generated.ts +2 -0
  71. package/src/build-components/Carousel/pattern.json +2 -8
  72. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +2 -0
  73. package/src/build-components/CarouselButtons/pattern.json +2 -9
  74. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +2 -0
  75. package/src/build-components/CarouselDots/pattern.json +1 -3
  76. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +2 -0
  77. package/src/build-components/CarouselItem/pattern.json +1 -3
  78. package/src/build-components/CarouselProvider/CarouselProvider.tsx +5 -44
  79. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +2 -0
  80. package/src/build-components/CarouselProvider/pattern.json +6 -0
  81. package/src/build-components/CountDown/CountDownProps.generated.ts +2 -0
  82. package/src/build-components/CountDown/pattern.json +0 -1
  83. package/src/build-components/Counter/CounterProps.generated.ts +2 -0
  84. package/src/build-components/Counter/pattern.json +0 -1
  85. package/src/build-components/Image/Image.tsx +1 -1
  86. package/src/build-components/Image/ImageProps.generated.ts +2 -0
  87. package/src/build-components/Main/MainProps.generated.ts +2 -0
  88. package/src/build-components/Main/pattern.json +1 -3
  89. package/src/build-components/Onboard/OnboardProps.generated.ts +2 -0
  90. package/src/build-components/Onboard/pattern.json +2 -6
  91. package/src/build-components/OnboardButton/OnboardButton.tsx +0 -4
  92. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -0
  93. package/src/build-components/OnboardButton/pattern.json +9 -14
  94. package/src/build-components/OnboardButtons/OnboardButtons.tsx +17 -20
  95. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +2 -0
  96. package/src/build-components/OnboardButtons/pattern.json +15 -15
  97. package/src/build-components/OnboardDot/OnboardDot.tsx +0 -3
  98. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +2 -0
  99. package/src/build-components/OnboardFooter/OnboardFooter.tsx +63 -51
  100. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +2 -0
  101. package/src/build-components/OnboardFooter/pattern.json +6 -3
  102. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +2 -0
  103. package/src/build-components/OnboardImage/pattern.json +1 -5
  104. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +2 -0
  105. package/src/build-components/OnboardItem/pattern.json +3 -11
  106. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +2 -0
  107. package/src/build-components/OnboardProvider/pattern.json +2 -8
  108. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +2 -0
  109. package/src/build-components/OnboardSubtitle/pattern.json +1 -4
  110. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +2 -0
  111. package/src/build-components/OnboardTitle/pattern.json +1 -4
  112. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +2 -0
  113. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +2 -0
  114. package/src/build-components/PaywallCloseButton/pattern.json +1 -3
  115. package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +2 -0
  116. package/src/build-components/PaywallCounter/pattern.json +0 -1
  117. package/src/build-components/PaywallOptions/PaywallOptions.tsx +1 -1
  118. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +2 -0
  119. package/src/build-components/PaywallOptions/pattern.json +1 -3
  120. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +2 -0
  121. package/src/build-components/PaywallProvider/pattern.json +1 -3
  122. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +2 -0
  123. package/src/build-components/PaywallSubscribeButton/pattern.json +1 -3
  124. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +2 -0
  125. package/src/build-components/RadioButton/pattern.json +1 -3
  126. package/src/build-components/RenderNode.generated.tsx +1 -1
  127. package/src/build-components/Text/TextProps.generated.ts +2 -0
  128. package/src/build-components/View/View.tsx +11 -7
  129. package/src/build-components/View/ViewProps.generated.ts +2 -0
  130. package/src/build-components/View/pattern.json +8 -0
  131. package/src/build-components/patterns.generated.ts +277 -2
  132. package/src/build-components/useNode.ts +2 -2
  133. package/src/components/Builder.tsx +98 -8
  134. package/src/components/BuilderButton.tsx +39 -7
  135. package/src/components/DeviceButton.tsx +5 -1
  136. package/src/pages/DebugJsonPage.tsx +30 -1
  137. package/src/pages/ProjectDebug.tsx +0 -1
  138. package/src/pages/ProjectPage.tsx +2 -2
  139. package/src/store.ts +8 -0
  140. package/src/styles/base/_global.scss +0 -5
  141. package/src/styles/components/_editor-shell.scss +18 -3
  142. package/src/styles/components/_onboard.scss +0 -17
  143. package/src/styles/foundation/_colors.scss +1 -4
  144. package/src/styles/foundation/_typography.scss +0 -1
  145. package/src/styles/layout/_builder.scss +20 -0
  146. package/src/styles/modals/_product-presets-modal.scss +0 -2
  147. package/src/utils/extractTextStyle/extractTextStyle.ts +47 -13
  148. package/src/utils/extractViewStyle/extractViewStyle.ts +118 -39
  149. package/src/utils/logRenderStore.ts +7 -9
  150. package/src/utils/logger.ts +1 -5
  151. package/src/utils/repairNodeKeys.ts +1 -4
@@ -1,4 +1,7 @@
1
- import { ViewPropsGenerated } from '../../build-components/View/ViewProps.generated';
1
+ import {
2
+ ViewPropsGenerated,
3
+ type ViewStyleGenerated,
4
+ } from '../../build-components/View/ViewProps.generated';
2
5
  import type { NodeData } from '../../types/Node';
3
6
  import type { ProjectColors } from '../../types/Project';
4
7
  import { parseSize } from '../../size-matters';
@@ -14,16 +17,16 @@ export function extractViewStyle<T extends ViewPropsGenerated['attributes']>(
14
17
  options: ExtractViewStyleOptions = {},
15
18
  ) {
16
19
  const attributes = node.attributes;
17
- const styleBag = (attributes as any)?.style as
18
- | Record<string, unknown>
20
+ const styleBag = (attributes as Record<string, unknown>)?.style as
21
+ | ViewStyleGenerated
19
22
  | undefined;
20
23
  const get = (key: string): unknown => {
21
- const direct = (attributes as any)?.[key];
24
+ const direct = (attributes as Record<string, unknown>)?.[key];
22
25
  if (direct !== undefined && direct !== null) return direct;
23
- return styleBag?.[key];
26
+ return styleBag?.[key as keyof ViewStyleGenerated];
24
27
  };
25
28
 
26
- const scrollable = (get('scrollable') as any) ?? false;
29
+ const scrollable = (get('scrollable') as boolean | undefined) ?? false;
27
30
  const style: React.CSSProperties = {
28
31
  display: 'flex',
29
32
  flexDirection: 'column',
@@ -50,7 +53,13 @@ export function extractViewStyle<T extends ViewPropsGenerated['attributes']>(
50
53
  }
51
54
  }
52
55
  const flexDirection = get('flexDirection');
53
- if (flexDirection) style.flexDirection = flexDirection as any;
56
+ if (flexDirection) {
57
+ style.flexDirection = flexDirection as React.CSSProperties['flexDirection'];
58
+ }
59
+ const flexWrap = get('flexWrap');
60
+ if (flexWrap) {
61
+ style.flexWrap = flexWrap as React.CSSProperties['flexWrap'];
62
+ }
54
63
  const alignItems = get('alignItems');
55
64
  if (alignItems)
56
65
  style.alignItems = alignItems as React.CSSProperties['alignItems'];
@@ -67,17 +76,20 @@ export function extractViewStyle<T extends ViewPropsGenerated['attributes']>(
67
76
  style[property] = parsed as React.CSSProperties[K];
68
77
  };
69
78
 
70
- setParsedSize('gap', get('gap') as any);
71
- setParsedSize('padding', get('padding') as any);
72
- setParsedSize('margin', get('margin') as any);
79
+ setParsedSize('gap', get('gap') as string | number | undefined);
80
+ setParsedSize('padding', get('padding') as string | number | undefined);
81
+ setParsedSize('margin', get('margin') as string | number | undefined);
73
82
 
74
- const paddingHorizontal = get('paddingHorizontal') as any;
83
+ const paddingHorizontal = get('paddingHorizontal') as
84
+ | string
85
+ | number
86
+ | undefined;
75
87
  if (!isEmptySizeValue(paddingHorizontal)) {
76
88
  const parsed = parseSize(paddingHorizontal);
77
89
  style.paddingLeft = parsed as React.CSSProperties['paddingLeft'];
78
90
  style.paddingRight = parsed as React.CSSProperties['paddingRight'];
79
91
  }
80
- const paddingVertical = get('paddingVertical') as any;
92
+ const paddingVertical = get('paddingVertical') as string | number | undefined;
81
93
  if (!isEmptySizeValue(paddingVertical)) {
82
94
  const parsed = parseSize(paddingVertical);
83
95
  style.paddingTop = parsed as React.CSSProperties['paddingTop'];
@@ -85,34 +97,50 @@ export function extractViewStyle<T extends ViewPropsGenerated['attributes']>(
85
97
  }
86
98
 
87
99
  // Explicit per-side paddings should override paddingHorizontal/paddingVertical.
88
- setParsedSize('paddingTop', get('paddingTop') as any);
89
- setParsedSize('paddingBottom', get('paddingBottom') as any);
90
- setParsedSize('paddingLeft', get('paddingLeft') as any);
91
- setParsedSize('paddingRight', get('paddingRight') as any);
100
+ setParsedSize('paddingTop', get('paddingTop') as string | number | undefined);
101
+ setParsedSize(
102
+ 'paddingBottom',
103
+ get('paddingBottom') as string | number | undefined,
104
+ );
105
+ setParsedSize(
106
+ 'paddingLeft',
107
+ get('paddingLeft') as string | number | undefined,
108
+ );
109
+ setParsedSize(
110
+ 'paddingRight',
111
+ get('paddingRight') as string | number | undefined,
112
+ );
92
113
 
93
114
  const marginHorizontalRaw =
94
115
  ((attributes as Record<string, unknown>).marginHorizontal as
95
116
  | string
96
117
  | number
97
- | undefined) ?? (styleBag?.marginHorizontal as any);
118
+ | undefined) ??
119
+ (styleBag?.marginHorizontal as string | number | undefined);
98
120
  if (!isEmptySizeValue(marginHorizontalRaw)) {
99
121
  const parsed = parseSize(marginHorizontalRaw);
100
122
  style.marginLeft = parsed as React.CSSProperties['marginLeft'];
101
123
  style.marginRight = parsed as React.CSSProperties['marginRight'];
102
124
  }
103
125
 
104
- const marginVertical = get('marginVertical') as any;
126
+ const marginVertical = get('marginVertical') as string | number | undefined;
105
127
  if (!isEmptySizeValue(marginVertical)) {
106
128
  const parsed = parseSize(marginVertical);
107
129
  style.marginTop = parsed as React.CSSProperties['marginTop'];
108
130
  style.marginBottom = parsed as React.CSSProperties['marginBottom'];
109
131
  }
110
132
 
111
- setParsedSize('marginTop', get('marginTop') as any);
112
- setParsedSize('marginBottom', get('marginBottom') as any);
113
- setParsedSize('marginLeft', get('marginLeft') as any);
114
- setParsedSize('marginRight', get('marginRight') as any);
115
- const backgroundColor = get('backgroundColor') as any;
133
+ setParsedSize('marginTop', get('marginTop') as string | number | undefined);
134
+ setParsedSize(
135
+ 'marginBottom',
136
+ get('marginBottom') as string | number | undefined,
137
+ );
138
+ setParsedSize('marginLeft', get('marginLeft') as string | number | undefined);
139
+ setParsedSize(
140
+ 'marginRight',
141
+ get('marginRight') as string | number | undefined,
142
+ );
143
+ const backgroundColor = get('backgroundColor') as string | undefined;
116
144
  if (backgroundColor) {
117
145
  style.backgroundColor =
118
146
  parseColor(backgroundColor, {
@@ -120,23 +148,74 @@ export function extractViewStyle<T extends ViewPropsGenerated['attributes']>(
120
148
  theme: options.theme,
121
149
  }) ?? backgroundColor;
122
150
  }
123
- setParsedSize('borderRadius', get('borderRadius') as any);
124
- setParsedSize('width', get('width') as any);
125
- setParsedSize('minWidth', get('minWidth') as any);
126
- setParsedSize('maxWidth', get('maxWidth') as any);
127
- setParsedSize('height', get('height') as any);
128
- setParsedSize('minHeight', get('minHeight') as any);
129
- setParsedSize('maxHeight', get('maxHeight') as any);
130
- const flex = get('flex') as any;
151
+ setParsedSize(
152
+ 'borderRadius',
153
+ get('borderRadius') as string | number | undefined,
154
+ );
155
+ setParsedSize('width', get('width') as string | number | undefined);
156
+ setParsedSize('minWidth', get('minWidth') as string | number | undefined);
157
+ setParsedSize('maxWidth', get('maxWidth') as string | number | undefined);
158
+ setParsedSize('height', get('height') as string | number | undefined);
159
+ setParsedSize('minHeight', get('minHeight') as string | number | undefined);
160
+ setParsedSize('maxHeight', get('maxHeight') as string | number | undefined);
161
+ const flex = get('flex') as number | undefined;
131
162
  if (flex !== undefined) style.flex = flex as React.CSSProperties['flex'];
132
- const position = get('position') as any;
133
- if (position) style.position = position as React.CSSProperties['position'];
134
- setParsedSize('top', get('top') as any);
135
- setParsedSize('bottom', get('bottom') as any);
136
- setParsedSize('left', get('left') as any);
137
- setParsedSize('right', get('right') as any);
138
- const zIndex = get('zIndex') as any;
163
+ const position = get('position') as
164
+ | React.CSSProperties['position']
165
+ | undefined;
166
+ if (position) style.position = position;
167
+ setParsedSize('top', get('top') as string | number | undefined);
168
+ setParsedSize('bottom', get('bottom') as string | number | undefined);
169
+ setParsedSize('left', get('left') as string | number | undefined);
170
+ setParsedSize('right', get('right') as string | number | undefined);
171
+ const zIndex = get('zIndex') as number | undefined;
139
172
  if (zIndex !== undefined)
140
173
  style.zIndex = zIndex as React.CSSProperties['zIndex'];
141
- return style;
174
+
175
+ // Filter out any text style properties that might have been included
176
+ const viewStyleProperties = new Set<keyof React.CSSProperties>([
177
+ 'display',
178
+ 'flexDirection',
179
+ 'flexWrap',
180
+ 'alignItems',
181
+ 'justifyContent',
182
+ 'gap',
183
+ 'padding',
184
+ 'paddingTop',
185
+ 'paddingBottom',
186
+ 'paddingLeft',
187
+ 'paddingRight',
188
+ 'margin',
189
+ 'marginTop',
190
+ 'marginBottom',
191
+ 'marginLeft',
192
+ 'marginRight',
193
+ 'backgroundColor',
194
+ 'borderRadius',
195
+ 'width',
196
+ 'minWidth',
197
+ 'maxWidth',
198
+ 'height',
199
+ 'minHeight',
200
+ 'maxHeight',
201
+ 'flex',
202
+ 'position',
203
+ 'top',
204
+ 'bottom',
205
+ 'left',
206
+ 'right',
207
+ 'zIndex',
208
+ 'overflowX',
209
+ 'overflowY',
210
+ ]);
211
+
212
+ const filteredStyle: React.CSSProperties = {};
213
+ for (const key in style) {
214
+ const typedKey = key as keyof React.CSSProperties;
215
+ if (viewStyleProperties.has(typedKey)) {
216
+ (filteredStyle as Record<string, unknown>)[key] = style[typedKey];
217
+ }
218
+ }
219
+
220
+ return filteredStyle;
142
221
  }
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-console */
2
+ // This file is a debug utility specifically designed to log to console for debugging purposes.
1
3
  import { useRenderStore } from '../store';
2
4
 
3
5
  export type LogRenderStoreOptions = {
@@ -17,7 +19,7 @@ function safeStringify(value: unknown): string {
17
19
  value,
18
20
  (_key, v) => {
19
21
  if (typeof v === 'function') {
20
- const name = (v as Function).name;
22
+ const name = (v as (...args: unknown[]) => unknown).name;
21
23
  return `[Function${name ? `: ${name}` : ''}]`;
22
24
  }
23
25
  if (typeof v === 'bigint') return v.toString();
@@ -82,7 +84,6 @@ export function logRenderStore(options: LogRenderStoreOptions = {}): void {
82
84
 
83
85
  if (isFn(groupCollapsed)) groupCollapsed(title);
84
86
  else {
85
- // eslint-disable-next-line no-console
86
87
  console.log(title);
87
88
  }
88
89
 
@@ -103,24 +104,21 @@ export function logRenderStore(options: LogRenderStoreOptions = {}): void {
103
104
 
104
105
  // NOTE: Logging objects in devtools can be confusing because they are "live" references.
105
106
  // This JSON string is a stable snapshot of this click, and is copy/paste-friendly.
106
- // eslint-disable-next-line no-console
107
+
107
108
  console.log('json', json);
108
109
 
109
- // eslint-disable-next-line no-console
110
110
  console.log('state', snapshot);
111
- // eslint-disable-next-line no-console
111
+
112
112
  console.log('actions', actions);
113
- // eslint-disable-next-line no-console
113
+
114
114
  console.log('rawState (includes functions)', state);
115
115
 
116
116
  if (includeLocalStorage) {
117
- // eslint-disable-next-line no-console
118
117
  console.log('localStorage.render-store (raw)', persistedRaw);
119
- // eslint-disable-next-line no-console
118
+
120
119
  console.log('localStorage.render-store (parsed)', persistedParsed);
121
120
  }
122
121
  if (extra) {
123
- // eslint-disable-next-line no-console
124
122
  console.log('extra', extra);
125
123
  }
126
124
 
@@ -24,19 +24,15 @@ function consoleLog(
24
24
  const prefix = `[${source}] ${message}`;
25
25
  switch (level) {
26
26
  case 'ERROR':
27
- // eslint-disable-next-line no-console
28
27
  console.error(prefix, payload);
29
28
  break;
30
29
  case 'WARN':
31
- // eslint-disable-next-line no-console
32
30
  console.warn(prefix, payload);
33
31
  break;
34
32
  case 'INFO':
35
- // eslint-disable-next-line no-console
36
33
  console.info(prefix, payload);
37
34
  break;
38
35
  case 'VERBOSE':
39
- // eslint-disable-next-line no-console
40
36
  console.debug(prefix, payload);
41
37
  break;
42
38
  default:
@@ -47,7 +43,7 @@ function consoleLog(
47
43
  export const logger = {
48
44
  setLevel(level: LogLevel) {
49
45
  useRenderStore.getState().setLogLevel(level);
50
- // eslint-disable-next-line no-console
46
+
51
47
  console.info(`[Logger] level set to ${level}`);
52
48
  },
53
49
  log(level: LogLevel, source: LogSource, message: string, payload?: unknown) {
@@ -53,10 +53,7 @@ function generateUniqueKey(type: string, usedKeys: Set<string>): string {
53
53
  *
54
54
  * `usedKeys` is mutated by design (to track uniqueness across recursion).
55
55
  */
56
- export function repairNodeKeys(
57
- root: Node,
58
- usedKeys: Set<string> = new Set(),
59
- ): Node {
56
+ export function repairNodeKeys(root: Node, usedKeys = new Set<string>()): Node {
60
57
  if (root === null || root === undefined) return root;
61
58
  if (typeof root === 'string') return root;
62
59