@coveo/atomic 3.34.0-pre.d9575786e7 → 3.34.0-pre.db5a030986
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/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
- package/dist/atomic/components/atomic-result-table-placeholder2.js.map +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-facet-number-input/atomic-commerce-facet-number-input.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-product/atomic-product.js +26 -58
- package/dist/atomic/components/components/common/layout/custom-render-controller.js +37 -0
- package/dist/atomic/components/components/common/layout/item-layout-controller.js +103 -0
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/{p-852fbcd4.js → p-265fafbe.js} +2 -2
- package/dist/atomic/{p-9a6ec803.entry.js → p-308db03c.entry.js} +2 -2
- package/dist/atomic/{p-9a6ec803.entry.js.map → p-308db03c.entry.js.map} +1 -1
- package/dist/atomic/{p-4a71315f.entry.js → p-41280e17.entry.js} +2 -2
- package/dist/atomic/{p-f0064e10.entry.js → p-c00d5203.entry.js} +2 -2
- package/dist/cjs/{analytics-config-c700ceb3.js → analytics-config-59e83e5a.js} +2 -2
- package/dist/cjs/{analytics-config-c700ceb3.js.map → analytics-config-59e83e5a.js.map} +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js.map +1 -1
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/{analytics-config-c0ff31a9.js → analytics-config-f22843d1.js} +2 -2
- package/dist/esm/{analytics-config-c0ff31a9.js.map → analytics-config-f22843d1.js.map} +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js.map +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-product/atomic-product.d.ts +4 -16
- package/dist/types/components/common/layout/custom-render-controller.d.ts +25 -0
- package/dist/types/components/common/layout/item-layout-controller.d.ts +47 -0
- package/docs/atomic-docs.json +1 -1
- package/package.json +15 -10
- /package/dist/atomic/{p-852fbcd4.js.map → p-265fafbe.js.map} +0 -0
- /package/dist/atomic/{p-4a71315f.entry.js.map → p-41280e17.entry.js.map} +0 -0
- /package/dist/atomic/{p-f0064e10.entry.js.map → p-c00d5203.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-
|
4
|
+
import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-f22843d1.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-
|
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-f22843d1.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';
|
@@ -107,7 +107,7 @@ const AtomicResultTablePlaceholder = class {
|
|
107
107
|
return getItemDisplayClasses('table', this.density, this.imageSize);
|
108
108
|
}
|
109
109
|
render() {
|
110
|
-
return (h("table", { key: 'ed3f575082ec1c2a9927251e2b09d5c0f70d78b5', class: `list-root animate-pulse ${this.getClasses().join(' ')}` }, h("thead", { key: '
|
110
|
+
return (h("table", { key: 'ed3f575082ec1c2a9927251e2b09d5c0f70d78b5', class: `list-root animate-pulse ${this.getClasses().join(' ')}` }, h("thead", { key: 'eaed97a7aadc3e76880b6f92b4ea7e99e82bc8db', "aria-hidden": "true" }, h("tr", { key: '904e042bc380d1ecad4dae1b19711e325b090f3b' }, h("th", { key: 'c6e0f34558ac9f9970b77f200ba2807e1ed77c27' }, h("div", { key: '21addd6241b4d0e94acb6593839e147f9b34f505', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '14.5rem' } })), h("th", { key: 'cedd03d8b316bab13b74defaa53449c1267a8452' }, h("div", { key: '647d298367fdbeda8e5d99edbe186781f7edf724', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '9.75rem' } })), h("th", { key: 'ceb12b35d77241c976665dc8842480a3d68e3387' }, h("div", { key: '8f2c70bd1f3df58f8361bba309ceca23d88ddae1', class: `mt-2 h-8 ${placeholderClasses}`, style: { width: '6.5rem' } })))), h("tbody", { key: 'fd3055adda17ec8d22cc06374220623e2906e53b' }, Array.from({ length: this.rows }, () => (h("tr", null, h("td", null, h("div", { class: `mb-6 h-8 ${placeholderClasses}`, style: { width: '22.875rem' } }), h("div", { class: `mb-2 h-5 ${placeholderClasses}`, style: { width: '23.75rem' } }), h("div", { class: `h-5 ${placeholderClasses}`, style: { width: '11.5rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '11rem' } })), h("td", null, h("div", { class: `mt-1.5 h-5 ${placeholderClasses}`, style: { width: '4.875rem' } }))))))));
|
111
111
|
}
|
112
112
|
};
|
113
113
|
AtomicResultTablePlaceholder.style = AtomicResultTablePlaceholderStyle0;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"atomic-result-placeholder.atomic-result-section-actions.atomic-result-section-badges.atomic-result-section-bottom-metadata.atomic-result-section-excerpt.atomic-result-section-title.atomic-result-section-visual.atomic-result-table-placeholder.entry.js","mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,ml2WAAml2W,CAAC;AACvn2W,sCAAe,0BAA0B;;ACOzC,MAAMA,oBAAkB,GAAG,wCAAwC,CAAC;MAWvD,uBAAuB;;;;;;;IAK1B,iBAAiB,CAAC,KAAa;QACrC,QACE,WACE,KAAK,EAAE;gBACL,MAAM,EAAE,oBAAoB;gBAC5B,KAAK;aACN,IAED,WACE,KAAK,EAAEA,oBAAkB,EACzB,KAAK,EAAE,EAAC,MAAM,EAAE,kBAAkB,EAAC,GAC9B,CACH,EACN;KACH;IAEM,MAAM;QACX,QACE,4DACE,KAAK,EAAE,uDAAuD,qBAAqB,CACjF,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,EAAC,KAAK,EAAE,OAAO,EAAC,GAClB,CACJ,EACL,cACE,WACE,KAAK,EAAE,cAAc,kBAAkB,EAAE,EACzC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,GACrB,CACJ,CACF,CACN,CAAC,CACI,CACF,EACR;KACH;;;;;;","names":["placeholderClasses"],"sources":["src/components/common/atomic-result-placeholder/atomic-result-placeholder.pcss?tag=atomic-result-placeholder&encapsulation=shadow","src/components/common/atomic-result-placeholder/atomic-result-placeholder.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-actions.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-badges.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-bottom-metadata.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-excerpt.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-title.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.tsx","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.pcss?tag=atomic-result-table-placeholder&encapsulation=shadow","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n@import '../template-system/template-system.pcss';\n\n:host {\n @apply atomic-template-system;\n\n .result-root {\n &.display-grid {\n atomic-result-section-actions {\n display: none;\n }\n }\n\n .badge {\n width: 14rem;\n }\n\n .action {\n width: 10rem;\n }\n\n .title {\n display: grid;\n grid-auto-flow: column;\n grid-gap: 0.5rem;\n height: var(--line-height);\n width: 30rem;\n max-width: 100%;\n }\n\n .fields-placeholder {\n display: grid;\n grid-template-columns: repeat(auto-fill, min(11rem, 40%));\n grid-column-gap: 0.5rem;\n\n .field-value-placeholder {\n height: var(--font-size);\n margin: calc((var(--line-height) - var(--font-size)) / 2) 0;\n }\n }\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayLayout,\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral w-full h-full rounded';\n\n/**\n * The `atomic-result-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-placeholder',\n styleUrl: 'atomic-result-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultPlaceholder {\n @Prop() display!: ItemDisplayLayout;\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n\n private renderExcerptLine(width: string) {\n return (\n <div\n style={{\n height: 'var(--line-height)',\n width,\n }}\n >\n <div\n class={placeholderClasses}\n style={{height: 'var(--font-size)'}}\n ></div>\n </div>\n );\n }\n\n public render() {\n return (\n <div\n class={`result-root placeholder with-sections animate-pulse ${getItemDisplayClasses(\n this.display,\n this.density,\n this.imageSize\n )\n .join(' ')\n .trim()}`}\n >\n <atomic-result-section-visual>\n <div class={placeholderClasses}></div>\n </atomic-result-section-visual>\n <atomic-result-section-badges>\n <div class={`badge ${placeholderClasses}`}></div>\n </atomic-result-section-badges>\n <atomic-result-section-actions>\n <div class={`action ${placeholderClasses}`}></div>\n </atomic-result-section-actions>\n <atomic-result-section-title>\n <div class={`title ${placeholderClasses}`}></div>\n </atomic-result-section-title>\n <atomic-result-section-excerpt>\n {this.renderExcerptLine('100%')}\n {this.renderExcerptLine('95%')}\n {this.renderExcerptLine('98%')}\n </atomic-result-section-excerpt>\n <atomic-result-section-bottom-metadata>\n <div class=\"fields-placeholder\">\n {Array.from({length: 4}, () => (\n <div\n class={`field-value-placeholder ${placeholderClasses}`}\n ></div>\n ))}\n </div>\n </atomic-result-section-bottom-metadata>\n </div>\n );\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section allows the information seeker to perform an action on an item without having to view its details.\n * For example, in Commerce you can add an item to the cart directly or add it to a wish list to view at a later time.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-actions',\n shadow: false,\n})\nexport class AtomicResultSectionActions {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section provides badges that highlight special features of the item.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-badges',\n shadow: false,\n})\nexport class AtomicResultSectionBadges {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays additional descriptive information about the item.\n *\n * Behavior:\n * * Has a maximum height of two lines.\n * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.\n * * Exposes the `--line-height` variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n * * Has a font weight.\n */\n@Component({\n tag: 'atomic-result-section-bottom-metadata',\n shadow: false,\n})\nexport class AtomicResultSectionBottomMetadata {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section contains an informative summary of the item's content.\n *\n * Behavior:\n * * Has a fixed height of one to three lines, depending on the layout and density.\n * * Ellipses overflowing text.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-excerpt',\n shadow: false,\n})\nexport class AtomicResultSectionExcerpt {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section identifies the item by its name, and its main use is to make the result list scannable.\n * This is usually the page title.\n *\n * Behavior:\n * * Has a fixed height of two lines on grid layouts.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-title',\n shadow: false,\n})\nexport class AtomicResultSectionTitle {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component, Prop} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\n\n/**\n * This section provides visual information about the item.\n * For example, in Commerce, an image is a great shorthand for a product category.\n * An icon can quickly show the item type, or an avatar can help identify to whom it is related.\n *\n * Behavior:\n * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.\n * ** When the image size is set to `icon`, this section stays very small.\n * ** You should ensure that elements inside of it take the available space.\n * * Always has a 1:1 aspect ratio.\n */\n@Component({\n tag: 'atomic-result-section-visual',\n shadow: false,\n})\nexport class AtomicResultSectionVisual {\n @Element() private host!: HTMLElement;\n\n /**\n * How large or small the visual section of results using this template should be.\n */\n @Prop({reflect: true}) public imageSize?: ItemDisplayImageSize;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","@import '../../../global/global.pcss';\n@import '../../common/item-list/styles/mixins.pcss';\n\n:host {\n display: grid;\n}\n\n.list-root.display-table {\n @apply atomic-result-table border-neutral rounded-xl border;\n\n thead tr,\n tbody tr:not(:last-child) {\n position: relative;\n\n &::after {\n content: ' ';\n display: block;\n position: absolute;\n height: 1px;\n bottom: 0;\n left: var(--padding);\n right: var(--padding);\n @apply bg-neutral;\n }\n }\n\n th,\n td {\n border-color: transparent;\n border-radius: initial;\n }\n\n th {\n background-color: transparent;\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral rounded';\n\n/**\n * The `atomic-result-table-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-table-placeholder',\n styleUrl: 'atomic-result-table-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultTablePlaceholder {\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n @Prop() rows!: number;\n\n private getClasses() {\n return getItemDisplayClasses('table', this.density, this.imageSize);\n }\n\n public render() {\n return (\n <table class={`list-root animate-pulse ${this.getClasses().join(' ')}`}>\n <thead>\n <tr>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '14.5rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '9.75rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '6.5rem'}}\n ></div>\n </th>\n </tr>\n </thead>\n <tbody>\n {Array.from({length: this.rows}, () => (\n <tr>\n <td>\n <div\n class={`mb-6 h-8 ${placeholderClasses}`}\n style={{width: '22.875rem'}}\n ></div>\n <div\n class={`mb-2 h-5 ${placeholderClasses}`}\n style={{width: '23.75rem'}}\n ></div>\n <div\n class={`h-5 ${placeholderClasses}`}\n style={{width: '11.5rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '11rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '4.875rem'}}\n ></div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"atomic-result-placeholder.atomic-result-section-actions.atomic-result-section-badges.atomic-result-section-bottom-metadata.atomic-result-section-excerpt.atomic-result-section-title.atomic-result-section-visual.atomic-result-table-placeholder.entry.js","mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,ml2WAAml2W,CAAC;AACvn2W,sCAAe,0BAA0B;;ACOzC,MAAMA,oBAAkB,GAAG,wCAAwC,CAAC;MAWvD,uBAAuB;;;;;;;IAK1B,iBAAiB,CAAC,KAAa;QACrC,QACE,WACE,KAAK,EAAE;gBACL,MAAM,EAAE,oBAAoB;gBAC5B,KAAK;aACN,IAED,WACE,KAAK,EAAEA,oBAAkB,EACzB,KAAK,EAAE,EAAC,MAAM,EAAE,kBAAkB,EAAC,GAC9B,CACH,EACN;KACH;IAEM,MAAM;QACX,QACE,4DACE,KAAK,EAAE,uDAAuD,qBAAqB,CACjF,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,CACf;iBACE,IAAI,CAAC,GAAG,CAAC;iBACT,IAAI,EAAE,EAAE,IAEX,uFACE,4DAAK,KAAK,EAAEA,oBAAkB,GAAQ,CACT,EAC/B,uFACE,4DAAK,KAAK,EAAE,SAASA,oBAAkB,EAAE,GAAQ,CACpB,EAC/B,wFACE,4DAAK,KAAK,EAAE,UAAUA,oBAAkB,EAAE,GAAQ,CACpB,EAChC,sFACE,4DAAK,KAAK,EAAE,SAASA,oBAAkB,EAAE,GAAQ,CACrB,EAC9B,wFACG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC9B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAC7B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CACA,EAChC,gGACE,4DAAK,KAAK,EAAC,oBAAoB,IAC5B,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,EAAE,OACvB,WACE,KAAK,EAAE,2BAA2BA,oBAAkB,EAAE,GACjD,CACR,CAAC,CACE,CACgC,CACpC,E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B,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAC,GACnB,CACJ,CACF,CACC,EACR,gEACG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAC,EAAE,OAC/B,cACE,cACE,WACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,WAAW,EAAC,GACtB,EACP,WACE,KAAK,EAAE,YAAY,kBAAkB,EAAE,EACvC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,GACrB,EACP,WACE,KAAK,EAAE,OAAO,kBAAkB,EAAE,EAClC,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAC,GACpB,CACJ,EACL,cACE,WACE,KAAK,EAAE,cAAc,kBAAkB,EAAE,EACzC,KAAK,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,GAClB,CACJ,EACL,cACE,WACE,KAAK,EAAE,cAAc,kBAAkB,EAAE,EACzC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAC,GACrB,CACJ,CACF,CACN,CAAC,CACI,CACF,EACR;KACH;;;;;;","names":["placeholderClasses"],"sources":["src/components/common/atomic-result-placeholder/atomic-result-placeholder.pcss?tag=atomic-result-placeholder&encapsulation=shadow","src/components/common/atomic-result-placeholder/atomic-result-placeholder.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-actions.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-badges.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-bottom-metadata.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-excerpt.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-title.tsx","src/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.tsx","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.pcss?tag=atomic-result-table-placeholder&encapsulation=shadow","src/components/search/atomic-result-table-placeholder/atomic-result-table-placeholder.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n\n@import '../template-system/template-system.pcss';\n\n:host {\n @apply atomic-template-system;\n\n .result-root {\n &.display-grid {\n atomic-result-section-actions {\n display: none;\n }\n }\n\n .badge {\n width: 14rem;\n }\n\n .action {\n width: 10rem;\n }\n\n .title {\n display: grid;\n grid-auto-flow: column;\n grid-gap: 0.5rem;\n height: var(--line-height);\n width: 30rem;\n max-width: 100%;\n }\n\n .fields-placeholder {\n display: grid;\n grid-template-columns: repeat(auto-fill, min(11rem, 40%));\n grid-column-gap: 0.5rem;\n\n .field-value-placeholder {\n height: var(--font-size);\n margin: calc((var(--line-height) - var(--font-size)) / 2) 0;\n }\n }\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayLayout,\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral w-full h-full rounded';\n\n/**\n * The `atomic-result-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-placeholder',\n styleUrl: 'atomic-result-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultPlaceholder {\n @Prop() display!: ItemDisplayLayout;\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n\n private renderExcerptLine(width: string) {\n return (\n <div\n style={{\n height: 'var(--line-height)',\n width,\n }}\n >\n <div\n class={placeholderClasses}\n style={{height: 'var(--font-size)'}}\n ></div>\n </div>\n );\n }\n\n public render() {\n return (\n <div\n class={`result-root placeholder with-sections animate-pulse ${getItemDisplayClasses(\n this.display,\n this.density,\n this.imageSize\n )\n .join(' ')\n .trim()}`}\n >\n <atomic-result-section-visual>\n <div class={placeholderClasses}></div>\n </atomic-result-section-visual>\n <atomic-result-section-badges>\n <div class={`badge ${placeholderClasses}`}></div>\n </atomic-result-section-badges>\n <atomic-result-section-actions>\n <div class={`action ${placeholderClasses}`}></div>\n </atomic-result-section-actions>\n <atomic-result-section-title>\n <div class={`title ${placeholderClasses}`}></div>\n </atomic-result-section-title>\n <atomic-result-section-excerpt>\n {this.renderExcerptLine('100%')}\n {this.renderExcerptLine('95%')}\n {this.renderExcerptLine('98%')}\n </atomic-result-section-excerpt>\n <atomic-result-section-bottom-metadata>\n <div class=\"fields-placeholder\">\n {Array.from({length: 4}, () => (\n <div\n class={`field-value-placeholder ${placeholderClasses}`}\n ></div>\n ))}\n </div>\n </atomic-result-section-bottom-metadata>\n </div>\n );\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section allows the information seeker to perform an action on an item without having to view its details.\n * For example, in Commerce you can add an item to the cart directly or add it to a wish list to view at a later time.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-actions',\n shadow: false,\n})\nexport class AtomicResultSectionActions {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section provides badges that highlight special features of the item.\n *\n * Behavior:\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * ** You should ensure that elements inside of it have `height: var(--line-height)`.\n * * Is a wrapping flexbox with a gap.\n * * May appear over, next to, or beneath the visual section.\n */\n@Component({\n tag: 'atomic-result-section-badges',\n shadow: false,\n})\nexport class AtomicResultSectionBadges {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section displays additional descriptive information about the item.\n *\n * Behavior:\n * * Has a maximum height of two lines.\n * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.\n * * Exposes the `--line-height` variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n * * Has a font weight.\n */\n@Component({\n tag: 'atomic-result-section-bottom-metadata',\n shadow: false,\n})\nexport class AtomicResultSectionBottomMetadata {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section contains an informative summary of the item's content.\n *\n * Behavior:\n * * Has a fixed height of one to three lines, depending on the layout and density.\n * * Ellipses overflowing text.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-excerpt',\n shadow: false,\n})\nexport class AtomicResultSectionExcerpt {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\n\n/**\n * This section identifies the item by its name, and its main use is to make the result list scannable.\n * This is usually the page title.\n *\n * Behavior:\n * * Has a fixed height of two lines on grid layouts.\n * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.\n * * Has a defined CSS `color` property for text.\n */\n@Component({\n tag: 'atomic-result-section-title',\n shadow: false,\n})\nexport class AtomicResultSectionTitle {\n @Element() private host!: HTMLElement;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","import {Element, Component, Prop} from '@stencil/core';\nimport {hideEmptySection} from '../../../../utils/item-section-utils';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\n\n/**\n * This section provides visual information about the item.\n * For example, in Commerce, an image is a great shorthand for a product category.\n * An icon can quickly show the item type, or an avatar can help identify to whom it is related.\n *\n * Behavior:\n * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.\n * ** When the image size is set to `icon`, this section stays very small.\n * ** You should ensure that elements inside of it take the available space.\n * * Always has a 1:1 aspect ratio.\n */\n@Component({\n tag: 'atomic-result-section-visual',\n shadow: false,\n})\nexport class AtomicResultSectionVisual {\n @Element() private host!: HTMLElement;\n\n /**\n * How large or small the visual section of results using this template should be.\n */\n @Prop({reflect: true}) public imageSize?: ItemDisplayImageSize;\n\n public componentDidRender() {\n hideEmptySection(this.host);\n }\n}\n","@import '../../../global/global.pcss';\n@import '../../common/item-list/styles/mixins.pcss';\n\n:host {\n display: grid;\n}\n\n.list-root.display-table {\n @apply atomic-result-table border-neutral rounded-xl border;\n\n thead tr,\n tbody tr:not(:last-child) {\n position: relative;\n\n &::after {\n content: ' ';\n display: block;\n position: absolute;\n height: 1px;\n bottom: 0;\n left: var(--padding);\n right: var(--padding);\n @apply bg-neutral;\n }\n }\n\n th,\n td {\n border-color: transparent;\n border-radius: initial;\n }\n\n th {\n background-color: transparent;\n }\n}\n","import {Component, h, Prop} from '@stencil/core';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n getItemDisplayClasses,\n} from '../../common/layout/display-options';\n\nconst placeholderClasses = 'block bg-neutral rounded';\n\n/**\n * The `atomic-result-table-placeholder` component provides an intermediate visual state that is rendered before the first results are available.\n * @internal\n */\n@Component({\n tag: 'atomic-result-table-placeholder',\n styleUrl: 'atomic-result-table-placeholder.pcss',\n shadow: true,\n})\nexport class AtomicResultTablePlaceholder {\n @Prop() density!: ItemDisplayDensity;\n @Prop() imageSize!: ItemDisplayImageSize;\n @Prop() rows!: number;\n\n private getClasses() {\n return getItemDisplayClasses('table', this.density, this.imageSize);\n }\n\n public render() {\n return (\n <table class={`list-root animate-pulse ${this.getClasses().join(' ')}`}>\n <thead aria-hidden=\"true\">\n <tr>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '14.5rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '9.75rem'}}\n ></div>\n </th>\n <th>\n <div\n class={`mt-2 h-8 ${placeholderClasses}`}\n style={{width: '6.5rem'}}\n ></div>\n </th>\n </tr>\n </thead>\n <tbody>\n {Array.from({length: this.rows}, () => (\n <tr>\n <td>\n <div\n class={`mb-6 h-8 ${placeholderClasses}`}\n style={{width: '22.875rem'}}\n ></div>\n <div\n class={`mb-2 h-5 ${placeholderClasses}`}\n style={{width: '23.75rem'}}\n ></div>\n <div\n class={`h-5 ${placeholderClasses}`}\n style={{width: '11.5rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '11rem'}}\n ></div>\n </td>\n <td>\n <div\n class={`mt-1.5 h-5 ${placeholderClasses}`}\n style={{width: '4.875rem'}}\n ></div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n}\n"],"version":3}
|
package/dist/esm/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const headlessVersion = '3.31.
|
2
|
-
export const atomicVersion = '3.34.0-pre.
|
1
|
+
export const headlessVersion = '3.31.2-pre.db5a030986';
|
2
|
+
export const atomicVersion = '3.34.0-pre.db5a030986';
|
@@ -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 {
|
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
|
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
|
+
}
|
package/docs/atomic-docs.json
CHANGED
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.
|
4
|
+
"version": "3.34.0-pre.db5a030986",
|
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": "
|
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 &&
|
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",
|
@@ -61,8 +61,9 @@
|
|
61
61
|
"prod": "npx serve www -l 3333 --no-request-logging",
|
62
62
|
"test": "npm run test:stencil && npm run test:lit",
|
63
63
|
"test:stencil": "stencil test --spec -- src/utils/initialization-utils.spec.ts",
|
64
|
-
"test:lit": "vitest run",
|
65
|
-
"test:watch": "vitest",
|
64
|
+
"test:lit": "vitest run --project=atomic-default",
|
65
|
+
"test:watch": "vitest --project=atomic-default",
|
66
|
+
"test:storybook": "vitest run --project=storybook",
|
66
67
|
"e2e": "cypress run --browser chrome",
|
67
68
|
"e2e:firefox": "cypress run --browser firefox",
|
68
69
|
"e2e:watch": "cypress open --browser chrome --e2e",
|
@@ -77,11 +78,12 @@
|
|
77
78
|
"release:phase3": "npm run-script -w=@coveo/ci npm-publish",
|
78
79
|
"release:phase1": "npm run-script -w=@coveo/ci bump",
|
79
80
|
"promote:npm:latest": "npm run-script -w=@coveo/ci promote-npm-prod",
|
80
|
-
"validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts"
|
81
|
+
"validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts",
|
82
|
+
"chromatic": "npx chromatic"
|
81
83
|
},
|
82
84
|
"dependencies": {
|
83
|
-
"@coveo/bueno": "1.1.
|
84
|
-
"@coveo/headless": "3.31.
|
85
|
+
"@coveo/bueno": "1.1.3-pre.db5a030986",
|
86
|
+
"@coveo/headless": "3.31.2-pre.db5a030986",
|
85
87
|
"@lit/context": "1.1.6",
|
86
88
|
"@open-wc/lit-helpers": "0.7.0",
|
87
89
|
"@popperjs/core": "2.11.8",
|
@@ -110,6 +112,7 @@
|
|
110
112
|
"@stencil/react-output-target": "0.5.3",
|
111
113
|
"@storybook/addon-a11y": "9.1.2",
|
112
114
|
"@storybook/addon-docs": "9.1.2",
|
115
|
+
"@storybook/addon-vitest": "9.1.2",
|
113
116
|
"@storybook/icons": "1.4.0",
|
114
117
|
"@storybook/web-components-vite": "9.1.2",
|
115
118
|
"@tailwindcss/postcss": "4.1.13",
|
@@ -118,8 +121,10 @@
|
|
118
121
|
"@types/jest": "29.5.14",
|
119
122
|
"@types/puppeteer": "7.0.4",
|
120
123
|
"@vitest/browser": "3.2.4",
|
124
|
+
"@vitest/coverage-v8": "^3.2.4",
|
121
125
|
"@wc-toolkit/storybook-helpers": "9.0.1",
|
122
126
|
"axe-core": "4.10.3",
|
127
|
+
"chromatic": "13.3.0",
|
123
128
|
"cypress": "13.7.3",
|
124
129
|
"cypress-axe": "1.6.0",
|
125
130
|
"cypress-repeat": "2.3.9",
|
@@ -152,8 +157,8 @@
|
|
152
157
|
"wait-on": "8.0.4"
|
153
158
|
},
|
154
159
|
"peerDependencies": {
|
155
|
-
"@coveo/bueno": "1.1.
|
156
|
-
"@coveo/headless": "3.31.
|
160
|
+
"@coveo/bueno": "1.1.3-pre.db5a030986",
|
161
|
+
"@coveo/headless": "3.31.2-pre.db5a030986",
|
157
162
|
"typescript": ">=5.0.0"
|
158
163
|
},
|
159
164
|
"peerDependenciesMeta": {
|
File without changes
|
File without changes
|
File without changes
|