Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- **client:** refactored client to simplify requesters - added config for endpoints in each requester ([c2304fd](https://github.com/AthosCommerce/snap/commit/c2304fd69ed8e6b370c1fa7becc4a5e9bd9fe2e0))

# [1.0.0](https://github.com/AthosCommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
4 changes: 2 additions & 2 deletions docs/REFERENCE_CONFIGURATION_TARGETERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Each object in the array defines an entry point on the page where a component wi
| `component` | `function` | A function that returns a reference to the component to render at the target selector. Making this an async function is recommended to allow for code splitting. |
| `hideTarget` | `boolean` | Whether to hide the target node before the component is mounted and rendered. It is recommended to enable this to prevent flashy behaviour. |
| `autoRetarget` | `boolean` | Whether to continuously query for the selector in the DOM until it finds it and triggers a retarget. This is useful for dynamically generated selectors that might not exist at dom ready. |
| `skeleton` | `function` | A function that returns a reference to the component to render immediately at the target selector to show briefly while the data is returning and the real component is rendering. You can use any component you want for this, although `snap-preact-components` provides a `skeleton` component for you to use if preferred. |
| `skeleton` | `function` | A function that returns a reference to the component to render immediately at the target selector to show briefly while the data is returning and the real component is rendering. You can use any component you want for this, although `@athoscommerce/snap-preact/components` provides a `Skeleton` component for you to use if preferred. |
| `props` | `object` | Convenient way of passing additional props to the component, by default we pass `controller` |
| `onTarget` | `function` | Callback that fires after a target is found. This is useful for triggering other actions such as initializing the controller. |
| `name` | `string` | Name to give the targeter for later reference using `controller.targeters` |
Expand Down Expand Up @@ -72,7 +72,7 @@ A [Skeleton component](https://athoscommerce.github.io/snap/preact-components?pa

```jsx
import { Snap } from '@athoscommerce/snap-preact';
import { Skeleton } from '@athoscommerce/snap-preact-components';
import { Skeleton } from '@athoscommerce/snap-preact/components';

const ContentSkeleton = () => {
return (<Skeleton height="300px" width="250px" />);
Expand Down
4 changes: 2 additions & 2 deletions docs/SNAP_AUTOCOMPLETE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const snap = new Snap({
selector: 'header input[type="search"]',
hideTarget: true,
component: async () => {
return (await import('@athoscommerce/snap-preact-components')).Autocomplete;
return (await import('@athoscommerce/snap-preact/components')).Autocomplete;
},
},
],
Expand All @@ -56,7 +56,7 @@ const snap = new Snap({

## Autocomplete Store

It is recommended to utilizing the [Autocomplete](https://athoscommerce.github.io/snap/preact-components?params=?path=/story/organisms-autocomplete--default) component from `@athoscommerce/snap-preact-components` to display Autocomplete.
It is recommended to utilizing the [Autocomplete](https://athoscommerce.github.io/snap/preact-components?params=?path=/story/organisms-autocomplete--default) component from `@athoscommerce/snap-preact/components` to display Autocomplete.

The following properties are specific to an Autocomplete Store via an Autocomplete Controller.

Expand Down
2 changes: 1 addition & 1 deletion docs/SNAP_FINDER.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Note: When using fields that are not of hierarchy type, `levels` are not require

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { ControllerProvider } from '@athoscommerce/snap-preact-components';
import { ControllerProvider } from '@athoscommerce/snap-preact/components';

export const Finder = observer((props) => {
const { controller } = props;
Expand Down
6 changes: 3 additions & 3 deletions docs/SNAP_OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ const snap = new Snap({

The `Content` component is considered a root level component since it is being rendered onto the page using a targeter.

To provide a reference to the controller via props to any subcomponents, we can utilize the `ControllerProvider` component from the `@athoscommerce/snap-preact-components` package.
To provide a reference to the controller via props to any subcomponents, we can utilize the `ControllerProvider` component from the `@athoscommerce/snap-preact/components` package.

```jsx
// src/components/Content/Content.jsx

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { ControllerProvider } from '@athoscommerce/snap-preact-components';
import { ControllerProvider } from '@athoscommerce/snap-preact/components';
import { Results } from '../Results/Results';

export const Content = observer((props) => {
Expand All @@ -75,7 +75,7 @@ Finally, the `observer` higher order component is used to make the component rea

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController, InlineBanner, Result } from '@athoscommerce/snap-preact-components';
import { withController, InlineBanner, Result } from '@athoscommerce/snap-preact/components';

export const Results = withController(observer((props) => {
const { controller } = props;
Expand Down
6 changes: 3 additions & 3 deletions docs/SNAP_RECOMMENDATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ This example assumes a `recently-viewed` profile has been configured in the Atho


### Recommendation Component
In this example, the `Recs` component is a wrapper around the `Recommendation` component from the `@athoscommerce/snap-preact-components` package. See [Components Preact > Recommendation](https://athoscommerce.github.io/snap/preact-components?params=%3Fpath%3D%2Fstory%2Forganisms-recommendation--default) for more details.
In this example, the `Recs` component is a wrapper around the `Recommendation` component from the `@athoscommerce/snap-preact/components` package. See [Components Preact > Recommendation](https://athoscommerce.github.io/snap/preact-components?params=%3Fpath%3D%2Fstory%2Forganisms-recommendation--default) for more details.

```jsx
// components/Recommendations/Recs.jsx

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { useEffect } from 'preact/hooks';
import { Recommendation } from '@athoscommerce/snap-preact-components';
import { Recommendation } from '@athoscommerce/snap-preact/components';

import './Recs.scss';

Expand Down Expand Up @@ -162,7 +162,7 @@ The example `Bundled` component below uses the `RecommendationBundle` component
import { h } from 'preact';
import { useEffect } from 'preact/hooks';
import { observer } from 'mobx-react-lite';
import { RecommendationBundle } from '@athoscommerce/snap-preact-components';
import { RecommendationBundle } from '@athoscommerce/snap-preact/components';

import './Bundled.scss';

Expand Down
22 changes: 11 additions & 11 deletions docs/SNAP_SEARCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ const snap = new Snap({

## Search Store

This section covers the properties available on the Search Store via a Search Controller with examples of how to implement common custom components. Alternatively, equivalent and additional components are available in the `@athoscommerce/snap-preact-components` package. See [Preact Component Library](https://athoscommerce.github.io/snap/preact-components) for all available components and their usage.
This section covers the properties available on the Search Store via a Search Controller with examples of how to implement common custom components. Alternatively, equivalent and additional components are available in the `@athoscommerce/snap-preact/components` package. See [Preact Component Library](https://athoscommerce.github.io/snap/preact-components) for all available components and their usage.


### SearchController.store.merchandising

The `merchandising` property contains merchandising redirects and banner content. It is recommended to utilize the `<Banner/>` component from `@athoscommerce/snap-preact-components` to display the various merchandising banners.
The `merchandising` property contains merchandising redirects and banner content. It is recommended to utilize the `<Banner/>` component from `@athoscommerce/snap-preact/components` to display the various merchandising banners.

The available banner types include: `header`, `banner`, `footer`, `left`, `inline`

Expand All @@ -114,7 +114,7 @@ For inline banners, the `<InlineBanner/>` component should be used instead. An e

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { ControllerProvider, Banner, Pagination } from '@athoscommerce/snap-preact-components';
import { ControllerProvider, Banner, Pagination } from '@athoscommerce/snap-preact/components';
import { Results } from '../Results/Results';
import { NoResults } from '../NoResults/NoResults';
import { SearchHeader } from '../SearchHeader/SearchHeader';
Expand Down Expand Up @@ -150,7 +150,7 @@ The `search` property contains information about the current query, typically di

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController } from '@athoscommerce/snap-preact-components';
import { withController } from '@athoscommerce/snap-preact/components';

export const SearchHeader = withController(observer((props) => {
const { controller } = props;
Expand Down Expand Up @@ -208,7 +208,7 @@ The `pagination` property is not only used for information about the current que

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController } from '@athoscommerce/snap-preact-components';
import { withController } from '@athoscommerce/snap-preact/components';

export const Pagination = withController(observer((props) => {
const { controller } = props;
Expand Down Expand Up @@ -257,7 +257,7 @@ Sorting settings can be configured in the [Athos Search & Product Discovery Cons

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController } from '@athoscommerce/snap-preact-components';
import { withController } from '@athoscommerce/snap-preact/components';

export const SortBy = withController(observer((props) => {
const { controller } = props;
Expand Down Expand Up @@ -320,7 +320,7 @@ Note: if you will be creating a custom Result component, the `withTracking` hook

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController, withTracking, InlineBanner, Price } from '@athoscommerce/snap-preact-components';
import { withController, withTracking, InlineBanner, Price } from '@athoscommerce/snap-preact/components';

export const Results = withController(observer((props) => {
const { controller } = props;
Expand Down Expand Up @@ -376,7 +376,7 @@ Each result object contains the following notable properties:

The example below displays a custom `FacetOptionsList` component for facets with a display type of `list`.

The `@athoscommerce/snap-preact-components` component library includes the following components that can be imported or used as a reference: `FacetListOptions`, `FacetGridOptions`, `FacetPaletteOptions`, `FacetHierarchyOptions`, `FacetSlider`
The `@athoscommerce/snap-preact/components` component library includes the following components that can be imported or used as a reference: `FacetListOptions`, `FacetGridOptions`, `FacetPaletteOptions`, `FacetHierarchyOptions`, `FacetSlider`

`facet.type` the facet type - Available facet types: `range`, `value`, `range-buckets`.

Expand All @@ -399,7 +399,7 @@ Facets with a `type` value of `value` or `range-buckets` will contain the follow

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController, SearchInput, FacetGridOptions, FacetPaletteOptions, FacetOptionsHierarchy, FacetSlider } from '@athoscommerce/snap-preact-components';
import { withController, SearchInput, FacetGridOptions, FacetPaletteOptions, FacetHierarchyOptions, FacetSlider } from '@athoscommerce/snap-preact/components';

export const Facets = withController(observer((props) => {
const { controller } = props;
Expand Down Expand Up @@ -442,7 +442,7 @@ const Facet = withController(observer((props) => {
) : null;
}));

// custom FacetOptionsList component instead of importing from @athoscommerce/snap-preact-components
// custom FacetOptionsList component instead of importing from @athoscommerce/snap-preact/components
const FacetOptionsList = withController(observer((props) => {
const { facet } = props;
const values = facet.refinedValues;
Expand Down Expand Up @@ -475,7 +475,7 @@ Typically used to display a filter summary with options to remove filters.

import { h } from 'preact';
import { observer } from 'mobx-react-lite';
import { withController } from '@athoscommerce/snap-preact-components';
import { withController } from '@athoscommerce/snap-preact/components';

export const FilterSummary = withController(observer((props) => {
const { controller } = props;
Expand Down
6 changes: 3 additions & 3 deletions docs/SNAP_TRACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ controller.store.results.map(result => {
```

### Impressions
Impression tracking occurs when products come into the viewport. It is recommended to use the `withTracking` hook within custom product result cards to track impressions. Alternatively, the `ResultTracker` component can be used to track impressions as well - be aware that this component adds an additional wrapping element. This does not need to be implemented if using the default `Result` component from @athoscommerce/snap-preact-components or default Autocomplete component without custom result cards.
Impression tracking occurs when products come into the viewport. It is recommended to use the `withTracking` hook within custom product result cards to track impressions. Alternatively, the `ResultTracker` component can be used to track impressions as well - be aware that this component adds an additional wrapping element. This does not need to be implemented if using the default `Result` component from @athoscommerce/snap-preact/components or default Autocomplete component without custom result cards.

### Typical Tracking Integration Example
```jsx
import { withTracking } from '@athoscommerce/snap-preact-components';
import { withTracking } from '@athoscommerce/snap-preact/components';

const Results = withController((props) => {
const { controller } = props;
Expand Down Expand Up @@ -75,7 +75,7 @@ Note that a `key` is required on the custom result component to ensure that the
### Alternative Tracking Integration Example using `ResultTracker`

```jsx
import { ResultTracker } from '@athoscommerce/snap-preact-components';
import { ResultTracker } from '@athoscommerce/snap-preact/components';

const Results = withController((props) => {
const { controller } = props;
Expand Down
2 changes: 1 addition & 1 deletion docs/documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ var documents = [
label: 'Preact Components',
route: '/preact-components',
type: 'iframe',
url: './packages/snap-preact-components/docs/',
url: './packages/snap-preact/components/docs/',
searchable: false,
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/snap-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- **client:** refactored client to simplify requesters - added config for endpoints in each requester ([c2304fd](https://github.com/athoscommerce/snap/commit/c2304fd69ed8e6b370c1fa7becc4a5e9bd9fe2e0))

# [1.0.0](https://github.com/athoscommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
2 changes: 1 addition & 1 deletion packages/snap-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

**Note:** Version bump only for package @athoscommerce/snap-controller

# [1.0.0](https://github.com/athoscommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
2 changes: 1 addition & 1 deletion packages/snap-controller/src/Search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ By default when using the infinite configuration, additional pages are appended
import { h, Fragment, Component } from 'preact';
import { useRef } from 'preact/hooks';
import { observer } from 'mobx-react-lite';
import { ControllerProvider, useIntersection, Results } from '@athoscommerce/snap-preact-components';
import { ControllerProvider, useIntersection, Results } from '@athoscommerce/snap-preact/components';

@observer
export class Content extends Component {
Expand Down
2 changes: 1 addition & 1 deletion packages/snap-event-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

**Note:** Version bump only for package @athoscommerce/snap-event-manager

# [1.0.0](https://github.com/athoscommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
2 changes: 1 addition & 1 deletion packages/snap-logger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

**Note:** Version bump only for package @athoscommerce/snap-logger

# [1.0.0](https://github.com/athoscommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
2 changes: 1 addition & 1 deletion packages/snap-platforms/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

**Note:** Version bump only for package @athoscommerce/snap-platforms

# [1.0.0](https://github.com/athoscommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
2 changes: 1 addition & 1 deletion packages/snap-preact-demo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- **client:** refactored client to simplify requesters - added config for endpoints in each requester ([c2304fd](https://github.com/AthosCommerce/snap/commit/c2304fd69ed8e6b370c1fa7becc4a5e9bd9fe2e0))

# [1.0.0](https://github.com/AthosCommerce/snap/compare/v0.74.0...v1.0.0) (2026-03-04)
# 1.0.0 (2026-03-04)
Loading
Loading