@coveo/atomic 3.34.0-pre.539809aa29 → 3.34.0-pre.54fd7336ff

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 (28) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/components/analytics-config.js +1 -1
  3. package/dist/atomic/components/components/commerce/atomic-product/atomic-product.js +26 -58
  4. package/dist/atomic/components/components/common/layout/custom-render-controller.js +37 -0
  5. package/dist/atomic/components/components/common/layout/item-layout-controller.js +103 -0
  6. package/dist/atomic/components/global/environment.js +1 -1
  7. package/dist/atomic/{p-53f8051c.entry.js → p-129e36cc.entry.js} +2 -2
  8. package/dist/atomic/{p-90122fdc.js → p-a32ddda2.js} +2 -2
  9. package/dist/atomic/{p-96010891.entry.js → p-a4c3fb48.entry.js} +2 -2
  10. package/dist/cjs/{analytics-config-bf3021ee.js → analytics-config-67510715.js} +2 -2
  11. package/dist/cjs/{analytics-config-bf3021ee.js.map → analytics-config-67510715.js.map} +1 -1
  12. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  13. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  14. package/dist/cjs/version.cjs.js +2 -2
  15. package/dist/esm/{analytics-config-3db5f07d.js → analytics-config-05021a6a.js} +2 -2
  16. package/dist/esm/{analytics-config-3db5f07d.js.map → analytics-config-05021a6a.js.map} +1 -1
  17. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  18. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  19. package/dist/esm/version.js +2 -2
  20. package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +4 -16
  21. package/dist/types/components/common/layout/custom-render-controller.d.ts +25 -0
  22. package/dist/types/components/common/layout/item-layout-controller.d.ts +47 -0
  23. package/dist/types/types/open-api.d.ts +3 -0
  24. package/docs/atomic-docs.json +1 -1
  25. package/package.json +16 -7
  26. /package/dist/atomic/{p-53f8051c.entry.js.map → p-129e36cc.entry.js.map} +0 -0
  27. /package/dist/atomic/{p-90122fdc.js.map → p-a32ddda2.js.map} +0 -0
  28. /package/dist/atomic/{p-96010891.entry.js.map → p-a4c3fb48.entry.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, s as setNonce, h, H as Host, g as getElement } from './index-3f35faca.js';
2
2
  import { m as markParentAsReady } from './init-queue-fbe942c3.js';
3
3
  import { buildResultsPerPage, loadFieldActions, buildInsightEngine } from '@coveo/headless/insight';
4
- import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-3db5f07d.js';
4
+ import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-05021a6a.js';
5
5
  import { A as ArrayProp } from './props-utils-e97ad6bd.js';
6
6
  import { D as DEFAULT_MOBILE_BREAKPOINT } from './replace-breakpoint-utils-7a336631.js';
7
7
  import { u as unsetLoadingFlag, s as setLoadingFlag, r as registerFacet, g as getFacetElements, w as waitUntilAppLoaded, a as createBaseStore } from './store-015afa83.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, s as setNonce, h, g as getElement } from './index-3f35faca.js';
2
2
  import { m as markParentAsReady } from './init-queue-fbe942c3.js';
3
3
  import { loadRecommendationActions, loadSearchConfigurationActions, EcommerceDefaultFieldsToInclude, loadFieldActions, buildRecommendationEngine } from '@coveo/headless/recommendation';
4
- import { g as getNextAnalyticsConfig, c as augmentAnalyticsConfigWithDocument, d as augmentAnalyticsConfigWithAtomicVersion, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-3db5f07d.js';
4
+ import { g as getNextAnalyticsConfig, c as augmentAnalyticsConfigWithDocument, d as augmentAnalyticsConfigWithAtomicVersion, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-05021a6a.js';
5
5
  import { A as ArrayProp } from './props-utils-e97ad6bd.js';
6
6
  import { u as unsetLoadingFlag, s as setLoadingFlag, a as createBaseStore } from './store-015afa83.js';
7
7
  import './dayjs.min-d04628c6.js';
@@ -1,2 +1,2 @@
1
- export const headlessVersion = '3.31.1';
2
- export const atomicVersion = '3.34.0-pre.539809aa29';
1
+ export const headlessVersion = '3.31.2-pre.54fd7336ff';
2
+ export const atomicVersion = '3.34.0-pre.54fd7336ff';
@@ -1,20 +1,19 @@
1
1
  import type { InteractiveProduct, Product } from '@coveo/headless/commerce';
2
2
  import { type CSSResultGroup, LitElement } from 'lit';
3
+ import type { CommerceStore } from "../atomic-commerce-interface/store";
4
+ import type { CommerceRecommendationStore } from "../atomic-commerce-recommendation-interface/store";
3
5
  import type { DisplayConfig } from "../../common/item-list/context/item-display-config-context-controller";
4
6
  import { type ItemRenderingFunction } from "../../common/item-list/item-list-common";
5
- import { type ItemDisplayDensity, type ItemDisplayImageSize, type ItemDisplayLayout } from "../../common/layout/display-options";
7
+ import type { ItemDisplayDensity, ItemDisplayImageSize, ItemDisplayLayout } from "../../common/layout/display-options";
6
8
  import type { InteractiveProductContextEvent, ProductContextEvent } from "../../../decorators/commerce/product-template-decorators";
7
- import type { CommerceStore } from '../atomic-commerce-interface/store';
8
- import type { CommerceRecommendationStore } from '../atomic-commerce-recommendation-interface/store';
9
9
  declare const AtomicProduct_base: typeof LitElement;
10
10
  /**
11
11
  * The `atomic-product` component is used internally by the `atomic-commerce-product-list` and `atomic-commerce-recommendation-list` components.
12
12
  */
13
13
  export declare class AtomicProduct extends AtomicProduct_base {
14
- private layout;
15
14
  private productRootRef?;
16
15
  private linkContainerRef?;
17
- private executedRenderingFunctionOnce;
16
+ private itemLayoutController;
18
17
  static styles: CSSResultGroup;
19
18
  /**
20
19
  * Whether `atomic-product-link` components nested in the `atomic-product` should stop click event propagation.
@@ -84,25 +83,14 @@ export declare class AtomicProduct extends AtomicProduct_base {
84
83
  clickLinkContainer: () => void;
85
84
  connectedCallback(): Promise<void>;
86
85
  disconnectedCallback(): void;
87
- private get isCustomRenderFunctionMode();
88
86
  private getContentHTML;
89
87
  private getLinkHTML;
90
- private shouldExecuteRenderFunction;
91
88
  render(): import("lit-html").TemplateResult<1>;
92
89
  firstUpdated(_changedProperties: Map<string, unknown>): void;
93
- private getCombinedClasses;
94
- private applyClassesToChildren;
95
- updated(_changedProperties: Map<string, unknown>): void;
96
90
  }
97
91
  declare global {
98
92
  interface HTMLElementTagNameMap {
99
93
  'atomic-product': AtomicProduct;
100
94
  }
101
- interface HTMLElementEventMap {
102
- 'atomic/resolveResult': ProductContextEvent;
103
- 'atomic/resolveInteractiveResult': InteractiveProductContextEvent;
104
- 'atomic/resolveStopPropagation': CustomEvent;
105
- 'atomic/resolveResultDisplayConfig': ProductContextEvent<DisplayConfig>;
106
- }
107
95
  }
108
96
  export {};
@@ -0,0 +1,25 @@
1
+ import type { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { ItemRenderingFunction } from "../item-list/item-list-common";
3
+ import type { AnyItem } from "../item-list/unfolded-item";
4
+ export interface CustomRenderHost extends ReactiveControllerHost {
5
+ shadowRoot?: ShadowRoot | null;
6
+ }
7
+ export interface CustomRenderOptions {
8
+ renderingFunction: () => ItemRenderingFunction<AnyItem> | undefined;
9
+ itemData: () => AnyItem | undefined;
10
+ rootElementRef: () => HTMLElement | undefined;
11
+ linkContainerRef?: () => HTMLElement | undefined;
12
+ onRenderComplete?: (element: HTMLElement, output: string) => void;
13
+ }
14
+ /**
15
+ * A reactive controller that manages custom rendering function execution for item components.
16
+ */
17
+ export declare class CustomRenderController implements ReactiveController {
18
+ private options;
19
+ private hasExecutedRenderFunction;
20
+ constructor(host: CustomRenderHost & LitElement, options: CustomRenderOptions);
21
+ hostConnected(): void;
22
+ hostUpdated(): void;
23
+ private resetRenderState;
24
+ private executeRenderFunction;
25
+ }
@@ -0,0 +1,47 @@
1
+ import type { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { ItemRenderingFunction } from "../item-list/item-list-common";
3
+ import type { AnyItem } from "../item-list/unfolded-item";
4
+ import { type ItemDisplayDensity, type ItemDisplayImageSize, type ItemDisplayLayout, ItemLayout } from './display-options';
5
+ export interface ItemLayoutHost extends ReactiveControllerHost {
6
+ shadowRoot?: ShadowRoot | null;
7
+ }
8
+ export interface LayoutDisplayConfig {
9
+ display: ItemDisplayLayout;
10
+ density: ItemDisplayDensity;
11
+ imageSize: ItemDisplayImageSize;
12
+ }
13
+ export interface ItemLayoutOptions {
14
+ elementPrefix: string;
15
+ renderingFunction: () => ItemRenderingFunction<AnyItem> | undefined;
16
+ content: () => ParentNode | undefined;
17
+ layoutConfig: () => LayoutDisplayConfig;
18
+ itemClasses: () => string;
19
+ }
20
+ /**
21
+ * A reactive controller that manages layout creation and class application for item components.
22
+ */
23
+ export declare class ItemLayoutController implements ReactiveController {
24
+ private host;
25
+ private options;
26
+ private layoutInstance;
27
+ constructor(host: ItemLayoutHost & LitElement, options: ItemLayoutOptions);
28
+ hostConnected(): void;
29
+ hostUpdated(): void;
30
+ /**
31
+ * Gets the current layout instance
32
+ */
33
+ getLayout(): ItemLayout | null;
34
+ /**
35
+ * Gets combined layout and extra classes
36
+ */
37
+ getCombinedClasses(additionalContent?: string): string[];
38
+ /**
39
+ * Applies layout classes to a specific element (useful for custom rendering)
40
+ */
41
+ applyLayoutClassesToElement(element: HTMLElement, additionalContent?: string): void;
42
+ private applyLayoutClasses;
43
+ private createLayout;
44
+ private hasCustomRenderFunction;
45
+ private addClassesToElements;
46
+ private observeAndApplyClasses;
47
+ }
@@ -0,0 +1,3 @@
1
+ declare module 'https://platform.cloud.coveo.com/api-docs/*' {
2
+ export default any;
3
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-10-07T15:58:12",
2
+ "timestamp": "2025-10-08T02:34:12",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.34.0-pre.539809aa29",
4
+ "version": "3.34.0-pre.54fd7336ff",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -47,10 +47,10 @@
47
47
  "licenses/"
48
48
  ],
49
49
  "scripts": {
50
- "clean": "rimraf -rf dist/* dist-storybook/* www/* docs/* playwright-report/*",
50
+ "clean": "node ../../utils/ci/rm-rf.mjs dist/* dist-storybook/* www/* docs/* playwright-report/*",
51
51
  "build:storybook": "storybook build -o dist-storybook",
52
52
  "build:cem": "cem analyze",
53
- "build:stencil-lit": "node --max_old_space_size=6144 ../../node_modules/@stencil/core/bin/stencil build --tsConfig tsconfig.stencil.json && node ./scripts/stencil-proxy.mjs && node ./scripts/build.mjs --config=tsconfig.lit.json && esbuild src/autoloader/index.ts --format=esm --outfile=dist/atomic/autoloader/index.esm.js && esbuild src/autoloader/index.ts --format=cjs --outfile=dist/atomic/autoloader/index.cjs.js && rollup -c rollup.config.js && rimraf ./dist/atomic/loader/package.json && tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts",
53
+ "build:stencil-lit": "node --max_old_space_size=6144 ../../node_modules/@stencil/core/bin/stencil build --tsConfig tsconfig.stencil.json && node ./scripts/stencil-proxy.mjs && node ./scripts/build.mjs --config=tsconfig.lit.json && esbuild src/autoloader/index.ts --format=esm --outfile=dist/atomic/autoloader/index.esm.js && esbuild src/autoloader/index.ts --format=cjs --outfile=dist/atomic/autoloader/index.cjs.js && rollup -c rollup.config.js && node ../../utils/ci/rm-rf.mjs ./dist/atomic/loader/package.json && tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts",
54
54
  "build:angular": "npx turbo gen:lit --filter=@coveo/atomic-angular-builder",
55
55
  "build:react": "npx turbo gen:lit --filter=@coveo/atomic-react",
56
56
  "build:locales": "node ./scripts/create-generated-folder.mjs && node ./scripts/split-locales.mjs && node ./scripts/copy-dayjs-locales.mjs",
@@ -80,8 +80,8 @@
80
80
  "validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts"
81
81
  },
82
82
  "dependencies": {
83
- "@coveo/bueno": "1.1.2",
84
- "@coveo/headless": "3.31.1",
83
+ "@coveo/bueno": "1.1.3-pre.54fd7336ff",
84
+ "@coveo/headless": "3.31.2-pre.54fd7336ff",
85
85
  "@lit/context": "1.1.6",
86
86
  "@open-wc/lit-helpers": "0.7.0",
87
87
  "@popperjs/core": "2.11.8",
@@ -100,6 +100,7 @@
100
100
  "devDependencies": {
101
101
  "@axe-core/playwright": "4.10.2",
102
102
  "@custom-elements-manifest/analyzer": "0.10.4",
103
+ "@mswjs/source": "0.4.1",
103
104
  "@playwright/test": "1.54.1",
104
105
  "@rollup/plugin-commonjs": "28.0.6",
105
106
  "@rollup/plugin-json": "6.1.0",
@@ -130,7 +131,10 @@
130
131
  "jest-cli": "29.7.0",
131
132
  "jest-localstorage-mock": "2.4.26",
132
133
  "local-web-server": "5.4.0",
134
+ "msw": "2.10.5",
135
+ "msw-storybook-addon": "2.0.5",
133
136
  "natural-orderby": "5.0.0",
137
+ "openapi-types": "12.1.3",
134
138
  "playwright": "1.54.1",
135
139
  "postcss": "8.5.6",
136
140
  "postcss-load-config": "6.0.1",
@@ -152,8 +156,8 @@
152
156
  "wait-on": "8.0.4"
153
157
  },
154
158
  "peerDependencies": {
155
- "@coveo/bueno": "1.1.2",
156
- "@coveo/headless": "3.31.1",
159
+ "@coveo/bueno": "1.1.3-pre.54fd7336ff",
160
+ "@coveo/headless": "3.31.2-pre.54fd7336ff",
157
161
  "typescript": ">=5.0.0"
158
162
  },
159
163
  "peerDependenciesMeta": {
@@ -164,5 +168,10 @@
164
168
  "license": "Apache-2.0",
165
169
  "engines": {
166
170
  "node": "^20.9.0 || ^22.11.0"
171
+ },
172
+ "msw": {
173
+ "workerDirectory": [
174
+ "public"
175
+ ]
167
176
  }
168
177
  }