@adobe-commerce/elsie 2.0.0 → 2.0.1-alpha-20260728135101

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 (249) hide show
  1. package/.elsie.js +3 -3
  2. package/CHANGELOG.md +385 -112
  3. package/LICENSE.md +257 -157
  4. package/README.md +4 -2
  5. package/__mocks__/svg.js +3 -3
  6. package/bin/builders/build/index.js +2 -1
  7. package/bin/builders/changeset/index.js +1 -1
  8. package/bin/builders/concurrently/index.js +1 -1
  9. package/bin/builders/generate/api/index.js +7 -7
  10. package/bin/builders/generate/component/index.js +8 -8
  11. package/bin/builders/generate/config/index.js +5 -5
  12. package/bin/builders/generate/config/templates/elsie.js +1 -1
  13. package/bin/builders/generate/container/index.js +7 -7
  14. package/bin/builders/generate/index.js +36 -36
  15. package/bin/builders/gql/index.js +28 -28
  16. package/bin/builders/gql/validate.js +116 -105
  17. package/bin/builders/lint/index.js +1 -1
  18. package/bin/builders/serve/index.js +1 -1
  19. package/bin/builders/storybook/index.js +9 -1
  20. package/bin/builders/types/index.js +1 -2
  21. package/bin/builders/types/validate-tsconfig.js +5 -5
  22. package/bin/index.js +12 -6
  23. package/bin/lib/cli.js +9 -8
  24. package/bin/lib/resolve-bin.js +9 -0
  25. package/bin/lib/validate-typeof.js +3 -3
  26. package/bin/lib/write-file.js +3 -3
  27. package/bin/lib/write-parent-index.js +4 -4
  28. package/config/eslint.mjs +2 -1
  29. package/config/jest.mjs +7 -2
  30. package/config/plugins/dts-normalize-relative-replacer.cjs +1 -1
  31. package/config/plugins/dts.mjs +4 -3
  32. package/config/prettier.json +25 -3
  33. package/config/setEnvVars.mjs +2 -2
  34. package/config/storybook/addon.js +5 -5
  35. package/config/storybook/components/FileTree/FileTree.jsx +4 -4
  36. package/config/storybook/components/FileTree/index.js +4 -4
  37. package/config/storybook/components/Flex/Flex.jsx +3 -3
  38. package/config/storybook/components/Flex/index.js +3 -3
  39. package/config/storybook/components/OptionsTable/OptionsTable.jsx +3 -3
  40. package/config/storybook/components/OptionsTable/index.js +4 -4
  41. package/config/storybook/components/Panel/Panel.tsx +7 -7
  42. package/config/storybook/components/Panel/index.ts +3 -3
  43. package/config/storybook/components/Screenshot/Screenshot.jsx +3 -3
  44. package/config/storybook/components/Screenshot/index.js +4 -4
  45. package/config/storybook/components/Steps/Steps.jsx +3 -3
  46. package/config/storybook/components/Steps/index.js +4 -4
  47. package/config/storybook/components/StoryWrapper/StoryWrapper.jsx +3 -3
  48. package/config/storybook/components/StoryWrapper/index.js +3 -3
  49. package/config/storybook/components/Summary/Summary.jsx +3 -3
  50. package/config/storybook/components/Summary/index.js +3 -3
  51. package/config/storybook/components/Variants/Variants.jsx +11 -7
  52. package/config/storybook/components/Variants/index.js +3 -3
  53. package/config/storybook/manager.js +3 -3
  54. package/config/storybook/preview.jsx +3 -3
  55. package/config/storybook/theming/fonts.css +12 -4
  56. package/config/storybook/theming/preview.css +3 -1
  57. package/config/storybook/theming/theme.js +3 -3
  58. package/config/vite.mjs +53 -26
  59. package/package.json +36 -34
  60. package/src/components/Accordion/Accordion.css +1 -1
  61. package/src/components/Accordion/Accordion.stories.tsx +18 -18
  62. package/src/components/Accordion/Accordion.tsx +12 -8
  63. package/src/components/Accordion/index.ts +3 -3
  64. package/src/components/ActionButton/ActionButton.stories.tsx +8 -8
  65. package/src/components/ActionButton/ActionButton.tsx +7 -5
  66. package/src/components/ActionButton/index.ts +3 -3
  67. package/src/components/ActionButtonGroup/ActionButtonGroup.stories.tsx +3 -3
  68. package/src/components/ActionButtonGroup/ActionButtonGroup.tsx +2 -2
  69. package/src/components/ActionButtonGroup/index.ts +3 -3
  70. package/src/components/AlertBanner/AlertBanner.stories.tsx +6 -6
  71. package/src/components/AlertBanner/AlertBanner.tsx +12 -10
  72. package/src/components/AlertBanner/index.ts +3 -3
  73. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +14 -14
  74. package/src/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
  75. package/src/components/Breadcrumbs/index.ts +3 -3
  76. package/src/components/Button/Button.mdx +24 -11
  77. package/src/components/Button/Button.stories.tsx +6 -6
  78. package/src/components/Button/Button.tsx +7 -8
  79. package/src/components/Button/index.ts +3 -3
  80. package/src/components/Card/Card.stories.tsx +6 -6
  81. package/src/components/Card/Card.tsx +3 -3
  82. package/src/components/Card/index.ts +3 -3
  83. package/src/components/CartItem/CartItem.stories.tsx +12 -12
  84. package/src/components/CartItem/CartItem.tsx +4 -2
  85. package/src/components/CartItem/CartItemSkeleton.tsx +3 -3
  86. package/src/components/CartItem/index.ts +3 -3
  87. package/src/components/CartList/CartList.tsx +3 -3
  88. package/src/components/CartList/index.ts +3 -3
  89. package/src/components/Checkbox/Checkbox.stories.tsx +17 -14
  90. package/src/components/Checkbox/Checkbox.tsx +8 -6
  91. package/src/components/Checkbox/index.ts +3 -3
  92. package/src/components/ColorSwatch/ColorSwatch.css +8 -4
  93. package/src/components/ColorSwatch/ColorSwatch.stories.tsx +6 -6
  94. package/src/components/ColorSwatch/ColorSwatch.tsx +8 -6
  95. package/src/components/ColorSwatch/index.ts +3 -3
  96. package/src/components/ContentGrid/ContentGrid.css +15 -15
  97. package/src/components/ContentGrid/ContentGrid.stories.tsx +4 -4
  98. package/src/components/ContentGrid/ContentGrid.tsx +3 -3
  99. package/src/components/ContentGrid/index.ts +3 -3
  100. package/src/components/Divider/Divider.stories.tsx +7 -4
  101. package/src/components/Divider/Divider.tsx +3 -3
  102. package/src/components/Divider/index.ts +4 -4
  103. package/src/components/Field/Field.stories.tsx +7 -7
  104. package/src/components/Field/Field.tsx +4 -2
  105. package/src/components/Field/index.ts +3 -3
  106. package/src/components/Header/Header.stories.tsx +9 -10
  107. package/src/components/Header/Header.tsx +11 -7
  108. package/src/components/Header/index.ts +3 -3
  109. package/src/components/Icon/Icon.stories.helpers.jsx +4 -4
  110. package/src/components/Icon/Icon.stories.tsx +74 -60
  111. package/src/components/Icon/Icon.tsx +77 -44
  112. package/src/components/Icon/index.ts +3 -3
  113. package/src/components/IllustratedMessage/IllustratedMessage.stories.tsx +8 -8
  114. package/src/components/IllustratedMessage/IllustratedMessage.tsx +7 -5
  115. package/src/components/IllustratedMessage/index.ts +3 -3
  116. package/src/components/Image/Image.stories.tsx +3 -3
  117. package/src/components/Image/Image.tsx +4 -4
  118. package/src/components/Image/index.ts +3 -3
  119. package/src/components/ImageSwatch/ImageSwatch.css +8 -4
  120. package/src/components/ImageSwatch/ImageSwatch.stories.tsx +10 -10
  121. package/src/components/ImageSwatch/ImageSwatch.tsx +25 -23
  122. package/src/components/ImageSwatch/index.ts +3 -3
  123. package/src/components/InLineAlert/InLineAlert.stories.tsx +12 -7
  124. package/src/components/InLineAlert/InLineAlert.tsx +4 -2
  125. package/src/components/InLineAlert/index.ts +3 -3
  126. package/src/components/Incrementer/Incrementer.stories.tsx +9 -9
  127. package/src/components/Incrementer/Incrementer.tsx +75 -37
  128. package/src/components/Incrementer/index.ts +3 -3
  129. package/src/components/Input/Input.css +4 -1
  130. package/src/components/Input/Input.stories.tsx +5 -5
  131. package/src/components/Input/Input.tsx +5 -3
  132. package/src/components/Input/index.ts +3 -3
  133. package/src/components/InputDate/InputDate.tsx +3 -3
  134. package/src/components/InputDate/index.ts +3 -3
  135. package/src/components/InputFile/InputFile.css +16 -16
  136. package/src/components/InputFile/InputFile.stories.tsx +21 -16
  137. package/src/components/InputFile/InputFile.tsx +8 -6
  138. package/src/components/InputFile/index.ts +5 -5
  139. package/src/components/InputPassword/InputPassword.stories.tsx +4 -4
  140. package/src/components/InputPassword/InputPassword.tsx +5 -4
  141. package/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx +1 -1
  142. package/src/components/InputPassword/PasswordStatusIndicator/index.ts +3 -3
  143. package/src/components/InputPassword/index.ts +3 -3
  144. package/src/components/Modal/Modal.stories.tsx +27 -16
  145. package/src/components/Modal/Modal.tsx +10 -11
  146. package/src/components/Modal/index.ts +3 -3
  147. package/src/components/MultiSelect/MultiSelect.stories.tsx +15 -15
  148. package/src/components/MultiSelect/MultiSelect.tsx +15 -15
  149. package/src/components/Pagination/Pagination.css +1 -1
  150. package/src/components/Pagination/Pagination.stories.tsx +0 -1
  151. package/src/components/Pagination/Pagination.tsx +17 -12
  152. package/src/components/Pagination/PaginationButton.tsx +2 -3
  153. package/src/components/Pagination/index.ts +3 -3
  154. package/src/components/Picker/Picker.css +3 -1
  155. package/src/components/Picker/Picker.stories.tsx +1 -1
  156. package/src/components/Picker/Picker.tsx +8 -6
  157. package/src/components/Picker/index.ts +3 -3
  158. package/src/components/Portal/Portal.stories.tsx +50 -44
  159. package/src/components/Portal/Portal.tsx +4 -4
  160. package/src/components/Price/Price.stories.tsx +3 -3
  161. package/src/components/Price/Price.tsx +4 -2
  162. package/src/components/Price/index.ts +3 -3
  163. package/src/components/PriceRange/PriceRange.stories.tsx +3 -3
  164. package/src/components/PriceRange/PriceRange.tsx +8 -6
  165. package/src/components/PriceRange/index.ts +3 -3
  166. package/src/components/ProductItemCard/ProductItemCard.tsx +4 -2
  167. package/src/components/ProductItemCard/ProductItemCardSkeleton.tsx +16 -16
  168. package/src/components/ProductItemCard/index.ts +4 -4
  169. package/src/components/ProgressSpinner/ProgressSpinner.stories.tsx +8 -8
  170. package/src/components/ProgressSpinner/ProgressSpinner.tsx +7 -5
  171. package/src/components/ProgressSpinner/index.ts +3 -3
  172. package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
  173. package/src/components/RadioButton/RadioButton.tsx +4 -2
  174. package/src/components/Skeleton/Skeleton.stories.tsx +4 -4
  175. package/src/components/Skeleton/Skeleton.tsx +11 -7
  176. package/src/components/Skeleton/index.ts +3 -3
  177. package/src/components/Table/Table.css +106 -99
  178. package/src/components/Table/Table.stories.tsx +404 -227
  179. package/src/components/Table/Table.tsx +11 -7
  180. package/src/components/Table/index.ts +4 -4
  181. package/src/components/Tag/Tag.stories.tsx +6 -6
  182. package/src/components/Tag/Tag.tsx +7 -5
  183. package/src/components/Tag/index.ts +3 -3
  184. package/src/components/TextArea/TextArea.css +3 -1
  185. package/src/components/TextArea/TextArea.stories.tsx +9 -6
  186. package/src/components/TextArea/TextArea.tsx +3 -3
  187. package/src/components/TextArea/index.ts +3 -3
  188. package/src/components/TextSwatch/TextSwatch.css +4 -2
  189. package/src/components/TextSwatch/TextSwatch.stories.tsx +8 -8
  190. package/src/components/TextSwatch/TextSwatch.tsx +12 -7
  191. package/src/components/TextSwatch/index.ts +3 -3
  192. package/src/components/ToggleButton/ToggleButton.css +6 -2
  193. package/src/components/ToggleButton/ToggleButton.stories.tsx +10 -6
  194. package/src/components/ToggleButton/ToggleButton.tsx +8 -3
  195. package/src/components/ToggleButton/index.ts +3 -3
  196. package/src/components/UIProvider/UIProvider.css +3 -2
  197. package/src/components/UIProvider/UIProvider.tsx +11 -7
  198. package/src/components/UIProvider/debugger.css +5 -6
  199. package/src/components/UIProvider/index.ts +3 -3
  200. package/src/docs/API/event-bus.mdx +64 -37
  201. package/src/docs/API/graphql.mdx +69 -36
  202. package/src/docs/API/initializer.mdx +58 -35
  203. package/src/docs/API/render.mdx +45 -32
  204. package/src/docs/Design/colors.mdx +10 -12
  205. package/src/docs/Design/grid.mdx +41 -14
  206. package/src/docs/Design/overview.mdx +20 -4
  207. package/src/docs/Design/shapes.mdx +8 -7
  208. package/src/docs/Design/spacing.mdx +3 -1
  209. package/src/docs/Design/typography.mdx +3 -2
  210. package/src/docs/Utilities/VComponent.mdx +27 -10
  211. package/src/docs/Utilities/classList.mdx +7 -5
  212. package/src/docs/Utilities/debounce.mdx +6 -7
  213. package/src/docs/Utilities/getCookie.mdx +1 -2
  214. package/src/docs/Utilities/getFormErrors.mdx +1 -2
  215. package/src/docs/Utilities/getFormValues.mdx +1 -2
  216. package/src/docs/Utilities/getPathValue.mdx +2 -4
  217. package/src/docs/Utilities/links.mdx +16 -7
  218. package/src/docs/cli-usage.mdx +8 -3
  219. package/src/docs/components/overview.mdx +14 -4
  220. package/src/docs/quick-start.mdx +69 -22
  221. package/src/docs/slots.mdx +74 -37
  222. package/src/docs/welcome.mdx +13 -4
  223. package/src/i18n/index.ts +3 -3
  224. package/src/lib/aem/assets.ts +9 -9
  225. package/src/lib/aem/configs.ts +16 -8
  226. package/src/lib/classes.ts +4 -4
  227. package/src/lib/config.ts +3 -3
  228. package/src/lib/debounce.ts +3 -3
  229. package/src/lib/deepmerge.ts +6 -13
  230. package/src/lib/deviceUtils.ts +3 -3
  231. package/src/lib/form-values.ts +3 -3
  232. package/src/lib/get-price-formatter.ts +8 -3
  233. package/src/lib/i18n.ts +3 -3
  234. package/src/lib/image-params-keymap.ts +4 -5
  235. package/src/lib/initializer.ts +11 -12
  236. package/src/lib/is-number.ts +3 -3
  237. package/src/lib/locale-config.ts +4 -4
  238. package/src/lib/render.tsx +14 -8
  239. package/src/lib/resolve-image.ts +19 -16
  240. package/src/lib/signals.ts +4 -4
  241. package/src/lib/slot.tsx +34 -27
  242. package/src/lib/tests.tsx +6 -8
  243. package/src/lib/types.ts +3 -3
  244. package/src/lib/vcomponent.tsx +3 -3
  245. package/src/shims/importmap.js +3107 -20
  246. package/static/assets/images/index.ts +3 -3
  247. package/storybook-stories.js +3 -3
  248. package/tests/__mocks__/browserMocks.ts +3 -3
  249. package/tests/__mocks__/fileMocks.ts +3 -3
package/src/lib/slot.tsx CHANGED
@@ -45,10 +45,13 @@ interface SlotElement {
45
45
  interface PrivateContext<T> {
46
46
  _setProps: (s: StateUpdater<{}>) => void;
47
47
  _registerMethod: (
48
- cb: (next: T & DefaultSlotContext<T>, state: State) => void
48
+ cb: (next: T & DefaultSlotContext<T>, state: State) => void,
49
49
  ) => void;
50
50
  // eslint-disable-next-line no-undef
51
- _htmlElementToVNode: (element: HTMLElement, tag: keyof HTMLElementTagNameMap) => VNode;
51
+ _htmlElementToVNode: (
52
+ element: HTMLElement,
53
+ tag: keyof HTMLElementTagNameMap,
54
+ ) => VNode;
52
55
  }
53
56
 
54
57
  interface DefaultSlotContext<T> extends PrivateContext<T> {
@@ -68,11 +71,11 @@ type Context<T> = T & ThisType<DefaultSlotContext<T>>; // NOSONAR
68
71
 
69
72
  export type SlotProps<T = any> = (
70
73
  ctx: T & DefaultSlotContext<T>,
71
- element: HTMLDivElement | null
74
+ element: HTMLDivElement | null,
72
75
  ) => Promise<void> | void;
73
76
 
74
77
  export type SlotMethod<P = any> = (
75
- callback: (next: unknown, state: State) => P
78
+ callback: (next: unknown, state: State) => P,
76
79
  ) => void;
77
80
 
78
81
  // Slot Hook
@@ -84,7 +87,7 @@ export function useSlot<K, V extends HTMLElement>(
84
87
  children?: ComponentChildren,
85
88
  render?: Function,
86
89
  // eslint-disable-next-line no-undef
87
- contentTag: keyof HTMLElementTagNameMap = 'div'
90
+ contentTag: keyof HTMLElementTagNameMap = 'div',
88
91
  ): [RefObject<V>, Record<string, any>, 'loading' | 'pending' | 'ready'] {
89
92
  const slotsQueue = useContext(SlotQueueContext);
90
93
 
@@ -111,7 +114,7 @@ export function useSlot<K, V extends HTMLElement>(
111
114
  setState({ ...state, [key]: value });
112
115
  },
113
116
  }),
114
- [_state]
117
+ [_state],
115
118
  );
116
119
 
117
120
  /** Internationalization */
@@ -164,10 +167,10 @@ export function useSlot<K, V extends HTMLElement>(
164
167
  refElem?.appendChild(elem);
165
168
  },
166
169
  },
167
- null
170
+ null,
168
171
  );
169
172
  },
170
- [contentTag]
173
+ [contentTag],
171
174
  );
172
175
 
173
176
  // @ts-ignore
@@ -178,13 +181,13 @@ export function useSlot<K, V extends HTMLElement>(
178
181
  context.getSlotElement = useCallback(
179
182
  (key: string) => {
180
183
  const element = elementRef.current?.querySelector(
181
- `[data-slot-key="${key}"]`
184
+ `[data-slot-key="${key}"]`,
182
185
  );
183
186
 
184
187
  log(
185
188
  `🟦 "${name}" Slot getSlotElement: ${key}`,
186
189
  elementRef.current?.cloneNode(true),
187
- element?.cloneNode(true)
190
+ element?.cloneNode(true),
188
191
  );
189
192
 
190
193
  if (!element) return;
@@ -213,7 +216,7 @@ export function useSlot<K, V extends HTMLElement>(
213
216
  },
214
217
  };
215
218
  },
216
- [name]
219
+ [name],
217
220
  );
218
221
 
219
222
  // @ts-ignore
@@ -238,7 +241,7 @@ export function useSlot<K, V extends HTMLElement>(
238
241
  next._setProps({ children: [children] });
239
242
  });
240
243
  },
241
- [_htmlElementToVNode, _registerMethod]
244
+ [_htmlElementToVNode, _registerMethod],
242
245
  );
243
246
 
244
247
  // @ts-ignore
@@ -257,7 +260,7 @@ export function useSlot<K, V extends HTMLElement>(
257
260
  });
258
261
  });
259
262
  },
260
- [_htmlElementToVNode, _registerMethod]
263
+ [_htmlElementToVNode, _registerMethod],
261
264
  );
262
265
 
263
266
  // @ts-ignore
@@ -276,7 +279,7 @@ export function useSlot<K, V extends HTMLElement>(
276
279
  });
277
280
  });
278
281
  },
279
- [_htmlElementToVNode, _registerMethod]
282
+ [_htmlElementToVNode, _registerMethod],
280
283
  );
281
284
 
282
285
  // @ts-ignore
@@ -289,7 +292,7 @@ export function useSlot<K, V extends HTMLElement>(
289
292
  parent?.insertBefore(elem, elementRef.current?.nextSibling ?? null);
290
293
  });
291
294
  },
292
- [_registerMethod]
295
+ [_registerMethod],
293
296
  );
294
297
 
295
298
  // @ts-ignore
@@ -302,7 +305,7 @@ export function useSlot<K, V extends HTMLElement>(
302
305
  parent?.insertBefore(elem, elementRef.current);
303
306
  });
304
307
  },
305
- [_registerMethod]
308
+ [_registerMethod],
306
309
  );
307
310
 
308
311
  // @ts-ignore
@@ -344,7 +347,7 @@ export function useSlot<K, V extends HTMLElement>(
344
347
  log(`🟩 "${name}" Slot Initialized`);
345
348
  await callback(
346
349
  context as K & DefaultSlotContext<K>,
347
- elementRef.current as HTMLDivElement | null
350
+ elementRef.current as HTMLDivElement | null,
348
351
  );
349
352
  } catch (error) {
350
353
  console.error(`Error in "${callback.name}" Slot callback`, error);
@@ -380,18 +383,18 @@ export function useSlot<K, V extends HTMLElement>(
380
383
 
381
384
  /**
382
385
  * Recursively processes children elements to conditionally prevent image loading.
383
- *
386
+ *
384
387
  * This function traverses the children tree and modifies img elements to prevent
385
388
  * premature loading during slot initialization. When isReady is false, img src
386
389
  * attributes are set to empty string to prevent network requests, while preserving
387
390
  * the original src in a data attribute for debugging purposes.
388
- *
391
+ *
389
392
  * @param children - The children elements to process (can be any React/Preact children)
390
393
  * @param isReady - Whether the slot is ready to load images (true) or should prevent loading (false)
391
394
  * @returns Processed children with conditional image src attributes
392
395
  */
393
396
  const processChildren = (children: any, isReady: boolean): any => {
394
- return Children.map(children, child => {
397
+ return Children.map(children, (child) => {
395
398
  // Handle text nodes, numbers, etc.
396
399
  if (!isValidElement(child)) {
397
400
  return child;
@@ -401,7 +404,7 @@ const processChildren = (children: any, isReady: boolean): any => {
401
404
  if (child.props.src) {
402
405
  return cloneElement(child, {
403
406
  ...child.props,
404
- src: isReady ? child.props.src : "",
407
+ src: isReady ? child.props.src : '',
405
408
  // Optionally preserve original src in data attribute for debugging
406
409
  'data-original-src': child.props.src,
407
410
  });
@@ -421,8 +424,10 @@ const processChildren = (children: any, isReady: boolean): any => {
421
424
  };
422
425
 
423
426
  // Slot Component
424
- interface SlotPropsComponent<T>
425
- extends Omit<HTMLAttributes<HTMLElement>, 'slot'> {
427
+ interface SlotPropsComponent<T> extends Omit<
428
+ HTMLAttributes<HTMLElement>,
429
+ 'slot'
430
+ > {
426
431
  name: string;
427
432
  lazy?: boolean;
428
433
  slot?: SlotProps<T>;
@@ -458,7 +463,7 @@ export function Slot<T>({
458
463
  slot,
459
464
  children,
460
465
  render,
461
- contentTag
466
+ contentTag,
462
467
  );
463
468
 
464
469
  useMemo(() => {
@@ -480,7 +485,7 @@ export function Slot<T>({
480
485
  ref: elementRef,
481
486
  'data-slot': name,
482
487
  },
483
- processChildren(slotProps.children, status === 'ready')
488
+ processChildren(slotProps.children, status === 'ready'),
484
489
  );
485
490
  }
486
491
 
@@ -491,7 +496,9 @@ window.DROPINS = window.DROPINS || {};
491
496
 
492
497
  // @ts-ignore
493
498
  window.DROPINS.showSlots = async (state) => {
494
- console.warn('[Dropins] DROPINS.showSlots() is deprecated. Use DROPINS.showOverlays() instead.');
499
+ console.warn(
500
+ '[Dropins] DROPINS.showSlots() is deprecated. Use DROPINS.showOverlays() instead.',
501
+ );
495
502
  // @ts-ignore
496
503
  await window.DROPINS.showOverlays?.(state);
497
504
  };
@@ -510,5 +517,5 @@ window.DROPINS.logSlots = async (state) => {
510
517
 
511
518
  // @ts-ignore
512
519
  window.DROPINS.logSlots(
513
- window.sessionStorage.getItem('dropin-debugger--log-slots') === 'true'
520
+ window.sessionStorage.getItem('dropin-debugger--log-slots') === 'true',
514
521
  );
package/src/lib/tests.tsx CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright 2024 Adobe
3
3
  * All Rights Reserved.
4
4
  *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this
6
- * file in accordance with the terms of the Adobe license agreement
7
- * accompanying it.
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
10
  import {
@@ -34,14 +34,12 @@ const langDefinitions = jsonFiles.reduce((acc, file) => {
34
34
 
35
35
  export const render = (
36
36
  ui: any,
37
- options?: Omit<RenderOptions, 'queries'>
37
+ options?: Omit<RenderOptions, 'queries'>,
38
38
  ): RenderResult => {
39
39
  return originalRender(
40
40
  <UIProvider lang={'en_US'} langDefinitions={langDefinitions}>
41
- <div className="dropin-design">
42
- {ui}
43
- </div>
41
+ <div className="dropin-design">{ui}</div>
44
42
  </UIProvider>,
45
- options
43
+ options,
46
44
  );
47
45
  };
package/src/lib/types.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright 2024 Adobe
3
3
  * All Rights Reserved.
4
4
  *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this
6
- * file in accordance with the terms of the Adobe license agreement
7
- * accompanying it.
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
10
  import { FunctionComponent } from 'preact';
@@ -2,9 +2,9 @@
2
2
  * Copyright 2024 Adobe
3
3
  * All Rights Reserved.
4
4
  *
5
- * NOTICE: Adobe permits you to use, modify, and distribute this
6
- * file in accordance with the terms of the Adobe license agreement
7
- * accompanying it.
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
10
  import { VNode, ComponentChildren } from 'preact';