@depict-ai/portal-components 2.7.7 → 2.7.8

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/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { SearchFilter } from "@depict-ai/types/api/SearchResponse";
3
3
  import { Locale } from "@depict-ai/react-ui/locales/latest";
4
4
  import { ReactNode } from "react";
5
5
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
6
- export const version = "2.7.7";
6
+ export const version = "2.7.8";
7
7
  type TextOptions = {
8
8
  /** Enabled */
9
9
  enabled: boolean;
package/dist/main.js CHANGED
@@ -18,7 +18,7 @@ $parcel$export(module.exports, "ExpandingSection", () => $2214dc111b9e2866$expor
18
18
  $parcel$export(module.exports, "ReactLookCard", () => $35bab9ff48bfe404$export$48787da2a5568bc);
19
19
  $parcel$export(module.exports, "version", () => $0a017be3a74fcc94$export$83d89fbfd8236492);
20
20
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
21
- const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.7";
21
+ const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.8";
22
22
 
23
23
 
24
24
 
@@ -188,7 +188,18 @@ function $3375ddd88f77967d$export$f11681c54c860912(display, info, configuredOpti
188
188
  })();
189
189
  const mainStyle = ()=>{
190
190
  const { alignment: alignment } = configuredOptions_();
191
- const flexAlignment = alignment === "center" ? alignment : "flex-" + alignment;
191
+ let flexAlignment;
192
+ switch(alignment){
193
+ case "left":
194
+ flexAlignment = "flex-start";
195
+ break;
196
+ case "right":
197
+ flexAlignment = "flex-end";
198
+ break;
199
+ default:
200
+ flexAlignment = alignment;
201
+ break;
202
+ }
192
203
  return {
193
204
  "--flex-alignment": flexAlignment,
194
205
  "--alignment": alignment
package/dist/module.js CHANGED
@@ -7,7 +7,7 @@ import {createContext as $2MCgq$createContext, createMemo as $2MCgq$createMemo,
7
7
  import {createPortal as $2MCgq$createPortal} from "react-dom";
8
8
 
9
9
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
10
- const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.7";
10
+ const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.8";
11
11
 
12
12
 
13
13
 
@@ -177,7 +177,18 @@ function $29535f590238371c$export$f11681c54c860912(display, info, configuredOpti
177
177
  })();
178
178
  const mainStyle = ()=>{
179
179
  const { alignment: alignment } = configuredOptions_();
180
- const flexAlignment = alignment === "center" ? alignment : "flex-" + alignment;
180
+ let flexAlignment;
181
+ switch(alignment){
182
+ case "left":
183
+ flexAlignment = "flex-start";
184
+ break;
185
+ case "right":
186
+ flexAlignment = "flex-end";
187
+ break;
188
+ default:
189
+ flexAlignment = alignment;
190
+ break;
191
+ }
181
192
  return {
182
193
  "--flex-alignment": flexAlignment,
183
194
  "--alignment": alignment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/portal-components",
3
- "version": "2.7.7",
3
+ "version": "2.7.8",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -98,8 +98,6 @@ const sizeOrder = [
98
98
  const ContainsColorSwatchesContext = /*@__PURE__*/ createContext<Signal<boolean>>();
99
99
  let colorCanvasContext: CanvasRenderingContext2D | undefined | null;
100
100
 
101
- // Remove weird spaces around swatches
102
-
103
101
  /**
104
102
  * ProductCard built according to this excerpt of our SDK docs https://docs.depict.ai/js-ui-guide/setup/product-card
105
103
  */
@@ -240,7 +238,18 @@ export function DefaultSolidProductCard(
240
238
  );
241
239
  const mainStyle = () => {
242
240
  const { alignment } = configuredOptions_();
243
- const flexAlignment = alignment === "center" ? alignment : "flex-" + alignment;
241
+ let flexAlignment: "flex-start" | "flex-end" | "center";
242
+ switch (alignment) {
243
+ case "left":
244
+ flexAlignment = "flex-start";
245
+ break;
246
+ case "right":
247
+ flexAlignment = "flex-end";
248
+ break;
249
+ default:
250
+ flexAlignment = alignment;
251
+ break;
252
+ }
244
253
  return { "--flex-alignment": flexAlignment, "--alignment": alignment };
245
254
  };
246
255