├── .circleci └── config.yml ├── .codesandbox └── ci.json ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .git-blame-ignore-revs ├── .github ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.yml │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md ├── banner.png ├── example-e-commerce.png ├── example-media.png ├── example-tourism.png ├── react-instantsearch-banner.png └── workflows │ ├── enforce-do-not-merge-label.yml │ └── release-templates.yml ├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .yarn └── releases │ └── yarn-1.22.10.cjs ├── .yarnrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── babel.config.js ├── bundlesize.config.json ├── examples ├── .eslintrc.js ├── js │ ├── algolia-experiences │ │ ├── favicon.png │ │ ├── index.html │ │ ├── local.html │ │ ├── package.json │ │ └── toggle.html │ ├── calendar-widget │ │ ├── .gitignore │ │ ├── app.js │ │ ├── calendar.css │ │ ├── index.html │ │ ├── main.css │ │ └── package.json │ ├── e-commerce-umd │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── favicon.png │ │ ├── index.html │ │ ├── manifest.webmanifest │ │ ├── package.json │ │ ├── polyfills.js │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.mobile.css │ │ │ ├── app.ts │ │ │ ├── global.d.ts │ │ │ ├── images │ │ │ │ ├── cover-mobile.jpg │ │ │ │ └── cover.jpg │ │ │ ├── routing.ts │ │ │ ├── search.ts │ │ │ ├── templates │ │ │ │ └── panel.ts │ │ │ ├── theme.css │ │ │ ├── ui.ts │ │ │ └── widgets │ │ │ │ ├── Brands.ts │ │ │ │ ├── Categories.ts │ │ │ │ ├── ClearFilters.ts │ │ │ │ ├── ClearFiltersEmptyResults.ts │ │ │ │ ├── ClearFiltersMobile.ts │ │ │ │ ├── Configuration.ts │ │ │ │ ├── FreeShipping.ts │ │ │ │ ├── HitsPerPage.ts │ │ │ │ ├── Pagination.ts │ │ │ │ ├── PriceSlider.css │ │ │ │ ├── PriceSlider.ts │ │ │ │ ├── Products.ts │ │ │ │ ├── Ratings.ts │ │ │ │ ├── ResultsNumberMobile.ts │ │ │ │ ├── SaveFiltersMobile.ts │ │ │ │ ├── SearchBox.ts │ │ │ │ ├── SortBy.ts │ │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── e-commerce │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── favicon.png │ │ ├── index.html │ │ ├── manifest.webmanifest │ │ ├── package.json │ │ ├── polyfills.js │ │ ├── src │ │ │ ├── app.css │ │ │ ├── app.mobile.css │ │ │ ├── app.ts │ │ │ ├── images │ │ │ │ ├── cover-mobile.jpg │ │ │ │ └── cover.jpg │ │ │ ├── routing.ts │ │ │ ├── search.ts │ │ │ ├── templates │ │ │ │ └── panel.ts │ │ │ ├── theme.css │ │ │ ├── ui.ts │ │ │ └── widgets │ │ │ │ ├── Brands.ts │ │ │ │ ├── Categories.ts │ │ │ │ ├── ClearFilters.ts │ │ │ │ ├── ClearFiltersEmptyResults.ts │ │ │ │ ├── ClearFiltersMobile.ts │ │ │ │ ├── Configuration.ts │ │ │ │ ├── FreeShipping.ts │ │ │ │ ├── HitsPerPage.ts │ │ │ │ ├── Pagination.ts │ │ │ │ ├── PriceSlider.css │ │ │ │ ├── PriceSlider.ts │ │ │ │ ├── Products.ts │ │ │ │ ├── Ratings.ts │ │ │ │ ├── ResultsNumberMobile.ts │ │ │ │ ├── SaveFiltersMobile.ts │ │ │ │ ├── SearchBox.ts │ │ │ │ ├── SortBy.ts │ │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── getting-started │ │ ├── .gitignore │ │ ├── README.md │ │ ├── favicon.png │ │ ├── index.html │ │ ├── package.json │ │ ├── products.html │ │ └── src │ │ │ ├── app.css │ │ │ ├── app.js │ │ │ ├── index.css │ │ │ └── products.ts │ ├── media │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── capture.png │ │ ├── favicon.png │ │ ├── index.html │ │ ├── manifest.webmanifest │ │ ├── package.json │ │ └── src │ │ │ ├── app.css │ │ │ ├── app.desktop.css │ │ │ ├── app.ts │ │ │ ├── search.ts │ │ │ ├── theme.css │ │ │ ├── ui.ts │ │ │ ├── utils │ │ │ ├── dateRanges.ts │ │ │ ├── formatNumbers.ts │ │ │ ├── index.ts │ │ │ └── windowSize.ts │ │ │ └── widgets │ │ │ ├── Articles.ts │ │ │ ├── Authors.ts │ │ │ ├── ClearFilters.ts │ │ │ ├── Configuration.ts │ │ │ ├── Dates.ts │ │ │ ├── SearchBox.ts │ │ │ ├── SeeResults.ts │ │ │ ├── SelectedTopics.ts │ │ │ ├── Stats.ts │ │ │ ├── Topics.ts │ │ │ └── index.ts │ └── tourism │ │ ├── .gitignore │ │ ├── capture.png │ │ ├── index.html │ │ ├── logo-is.png │ │ ├── main.css │ │ ├── package.json │ │ └── search.js ├── react │ ├── default-theme │ │ ├── index.html │ │ ├── package.json │ │ └── src │ │ │ ├── App.css │ │ │ ├── App.tsx │ │ │ ├── components │ │ │ ├── NumericMenu.tsx │ │ │ ├── Panel.tsx │ │ │ ├── QueryRuleContext.tsx │ │ │ ├── QueryRuleCustomData.tsx │ │ │ ├── Refresh.css │ │ │ ├── Refresh.tsx │ │ │ ├── index.ts │ │ │ └── layout │ │ │ │ ├── Tabs.css │ │ │ │ ├── Tabs.tsx │ │ │ │ └── index.tsx │ │ │ ├── cx.ts │ │ │ ├── index.tsx │ │ │ └── isModifierClick.ts │ ├── e-commerce │ │ ├── App.css │ │ ├── App.mobile.css │ │ ├── App.tsx │ │ ├── Theme.css │ │ ├── assets │ │ │ ├── cover-mobile.png │ │ │ ├── cover.png │ │ │ ├── favicon.png │ │ │ └── manifest.webmanifest │ │ ├── components │ │ │ ├── AlgoliaSvg.tsx │ │ │ ├── ClearFilters.tsx │ │ │ ├── ClearFiltersMobile.tsx │ │ │ ├── NoResults.tsx │ │ │ ├── NoResultsBoundary.tsx │ │ │ ├── Pagination.css │ │ │ ├── Panel.tsx │ │ │ ├── PriceSlider.css │ │ │ ├── PriceSlider.tsx │ │ │ ├── Ratings.tsx │ │ │ ├── ResultsNumberMobile.tsx │ │ │ ├── SaveFiltersMobile.tsx │ │ │ ├── ScrollTo.tsx │ │ │ └── index.ts │ │ ├── cx.ts │ │ ├── index.html │ │ ├── index.tsx │ │ ├── package.json │ │ ├── routing.ts │ │ └── utils │ │ │ └── index.ts │ ├── getting-started │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── favicon.png │ │ ├── index.html │ │ ├── package.json │ │ ├── products.html │ │ └── src │ │ │ ├── App.css │ │ │ ├── App.tsx │ │ │ ├── Panel.tsx │ │ │ ├── Product.tsx │ │ │ ├── index.tsx │ │ │ └── products.tsx │ ├── next-app-router │ │ ├── .eslintrc │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app │ │ │ ├── Search.tsx │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── layout.tsx │ │ │ ├── page.module.css │ │ │ └── page.tsx │ │ ├── components │ │ │ └── Panel.tsx │ │ ├── lib │ │ │ └── client.tsx │ │ ├── next-env.d.ts │ │ ├── package.json │ │ └── tsconfig.json │ ├── next-routing │ │ ├── .eslintrc │ │ ├── .gitignore │ │ ├── README.md │ │ ├── components │ │ │ └── Panel.tsx │ │ ├── next-env.d.ts │ │ ├── next.config.js │ │ ├── package.json │ │ ├── pages │ │ │ ├── _app.js │ │ │ ├── index.tsx │ │ │ ├── other-page.tsx │ │ │ └── test.tsx │ │ ├── styles │ │ │ └── globals.css │ │ ├── tsconfig.json │ │ └── utils │ │ │ └── cx.ts │ ├── next │ │ ├── .eslintrc │ │ ├── .gitignore │ │ ├── README.md │ │ ├── components │ │ │ └── Panel.tsx │ │ ├── next-env.d.ts │ │ ├── package.json │ │ ├── pages │ │ │ ├── _app.js │ │ │ └── index.tsx │ │ ├── styles │ │ │ └── globals.css │ │ ├── tsconfig.json │ │ └── utils │ │ │ └── cx.ts │ ├── react-native │ │ ├── .eslintignore │ │ ├── .eslintrc │ │ ├── .expo-shared │ │ │ └── assets.json │ │ ├── .gitignore │ │ ├── App.tsx │ │ ├── README.md │ │ ├── app.json │ │ ├── assets │ │ │ ├── adaptive-icon.png │ │ │ ├── favicon.png │ │ │ ├── icon.png │ │ │ └── splash.png │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── src │ │ │ ├── Highlight.tsx │ │ │ ├── InfiniteHits.tsx │ │ │ └── SearchBox.tsx │ │ ├── tsconfig.json │ │ └── types │ │ │ └── ProductHit.ts │ └── ssr │ │ ├── .codesandbox │ │ └── tasks.json │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.json │ │ ├── package.json │ │ ├── src │ │ ├── App.js │ │ ├── browser.js │ │ ├── cx.js │ │ ├── searchClient.js │ │ └── server.js │ │ └── webpack.config.js └── vue │ ├── .eslintrc.js │ ├── default-theme │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── index.html │ ├── package.json │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── App.css │ │ ├── App.vue │ │ └── main.js │ └── vite.config.mjs │ ├── e-commerce │ ├── .editorconfig │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── babel.config.js │ ├── index.html │ ├── package.json │ ├── public │ │ ├── favicon.png │ │ └── manifest.webmanifest │ ├── src │ │ ├── App.css │ │ ├── App.mobile.css │ │ ├── App.vue │ │ ├── Theme.css │ │ ├── images │ │ │ ├── cover-mobile.jpg │ │ │ └── cover.jpg │ │ ├── main.js │ │ ├── routing.js │ │ ├── utils.js │ │ └── widgets │ │ │ ├── ClearRefinements.vue │ │ │ ├── NoResults.vue │ │ │ └── PriceSlider.css │ └── vite.config.mjs │ ├── getting-started │ ├── .editorconfig │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── index.html │ ├── package.json │ ├── public │ │ └── favicon.png │ ├── src │ │ ├── App.vue │ │ └── main.js │ └── vite.config.mjs │ ├── media │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── index.html │ ├── package.json │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── App.css │ │ ├── App.vue │ │ └── main.js │ └── vite.config.mjs │ ├── nuxt │ ├── README.md │ ├── layouts │ │ ├── README.md │ │ └── default.vue │ ├── nuxt.config.js │ ├── package.json │ ├── pages │ │ ├── README.md │ │ ├── index.vue │ │ └── search.vue │ └── static │ │ ├── README.md │ │ └── favicon.ico │ └── ssr │ ├── .browserslistrc │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── favicon.ico │ └── index.html │ ├── src │ ├── App.vue │ ├── entry-client.js │ ├── entry-server.js │ ├── main.js │ ├── router.js │ └── views │ │ ├── About.vue │ │ ├── Home.vue │ │ └── Search.vue │ └── vue.config.js ├── global.d.ts ├── jest.config.js ├── lerna.json ├── netlify.toml ├── package.json ├── packages ├── algolia-experiences │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── rollup.config.js │ └── src │ │ ├── __tests__ │ │ ├── get-configuration.test.ts │ │ ├── get-information.test.ts │ │ ├── render.test.ts │ │ └── setup-instantsearch.test.ts │ │ ├── banner.tsx │ │ ├── get-configuration.ts │ │ ├── get-information.ts │ │ ├── index.ts │ │ ├── render.tsx │ │ ├── setup-instantsearch.ts │ │ ├── types.ts │ │ ├── util.ts │ │ └── widgets.ts ├── algoliasearch-helper │ ├── .eslintignore │ ├── .prettierignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── documentation-src │ │ ├── content │ │ │ ├── concepts.md │ │ │ ├── examples.md │ │ │ ├── gettingstarted.md │ │ │ ├── images │ │ │ │ ├── al-helper-logo.svg │ │ │ │ ├── algolia-mark-white.svg │ │ │ │ ├── background_footer.svg │ │ │ │ ├── community-badge.svg │ │ │ │ ├── concepts │ │ │ │ │ ├── Events.svg │ │ │ │ │ ├── conjunctive-facets.svg │ │ │ │ │ ├── derive-simplified.svg │ │ │ │ │ ├── disjunctive-facets.svg │ │ │ │ │ ├── search-cycle.svg │ │ │ │ │ ├── search-states.svg │ │ │ │ │ ├── setting-parameters.svg │ │ │ │ │ └── state-is-immutable.svg │ │ │ │ ├── icon-arrow-pipe.svg │ │ │ │ ├── icon-github.svg │ │ │ │ ├── icon-heart-dark.svg │ │ │ │ ├── icon-heart-light.svg │ │ │ │ └── icon-search-white.svg │ │ │ ├── index.md │ │ │ ├── js │ │ │ │ └── main.js │ │ │ ├── reference.md │ │ │ └── upgrade.md │ │ ├── layouts │ │ │ ├── common │ │ │ │ ├── footer.pug │ │ │ │ ├── header.pug │ │ │ │ └── metas.pug │ │ │ ├── documentation.pug │ │ │ └── main.pug │ │ ├── metalsmith.js │ │ ├── partials │ │ │ ├── event.hbs │ │ │ ├── jsdoc.hbs │ │ │ ├── member.hbs │ │ │ ├── method.hbs │ │ │ ├── typedef.hbs │ │ │ └── types.hbs │ │ ├── plugins │ │ │ ├── handlebars-helpers.js │ │ │ ├── headings.js │ │ │ └── jsdoc-data.js │ │ └── stylesheets │ │ │ ├── components │ │ │ ├── _buttons.scss │ │ │ ├── _clipboard.scss │ │ │ ├── _code-highlight.scss │ │ │ ├── _containers.scss │ │ │ ├── _documentation.scss │ │ │ ├── _examples-intro.scss │ │ │ ├── _examples.scss │ │ │ ├── _fonts.scss │ │ │ ├── _footer.scss │ │ │ ├── _home.scss │ │ │ ├── _icons.scss │ │ │ ├── _inputs.scss │ │ │ ├── _media.scss │ │ │ ├── _sidebar.scss │ │ │ ├── _visual-helper.scss │ │ │ └── docs │ │ │ │ └── _method.scss │ │ │ ├── index.scss │ │ │ └── vendors │ │ │ ├── _animations.scss │ │ │ ├── _base.scss │ │ │ ├── _communityHeader.scss │ │ │ ├── _helpers.scss │ │ │ ├── _mixins.scss │ │ │ ├── _normalize.scss │ │ │ └── _variables.scss │ ├── examples │ │ └── readme.md │ ├── index.d.ts │ ├── index.html │ ├── index.js │ ├── jest.config.js │ ├── jest.setup.js │ ├── package.json │ ├── patches │ │ └── uglify-js+2.8.29.patch │ ├── scripts │ │ ├── build.sh │ │ ├── test.sh │ │ └── update-version.js │ ├── src │ │ ├── DerivedHelper │ │ │ └── index.js │ │ ├── RecommendParameters │ │ │ └── index.js │ │ ├── RecommendResults │ │ │ └── index.js │ │ ├── SearchParameters │ │ │ ├── RefinementList.js │ │ │ └── index.js │ │ ├── SearchResults │ │ │ ├── generate-hierarchical-tree.js │ │ │ └── index.js │ │ ├── algoliasearch.helper.js │ │ ├── functions │ │ │ ├── compact.js │ │ │ ├── defaultsPure.js │ │ │ ├── escapeFacetValue.js │ │ │ ├── find.js │ │ │ ├── findIndex.js │ │ │ ├── flat.js │ │ │ ├── formatSort.js │ │ │ ├── inherits.js │ │ │ ├── intersection.js │ │ │ ├── merge.js │ │ │ ├── mergeNumericMax.js │ │ │ ├── objectHasKeys.js │ │ │ ├── omit.js │ │ │ ├── orderBy.js │ │ │ └── valToNumber.js │ │ ├── requestBuilder.js │ │ ├── utils │ │ │ ├── isValidUserToken.js │ │ │ └── sortAndMergeRecommendations.js │ │ └── version.js │ ├── test │ │ ├── datasets │ │ │ ├── RecommendParameters │ │ │ │ └── recommend.dataset.js │ │ │ ├── SearchParameters │ │ │ │ └── search.dataset.js │ │ │ └── SearchResults │ │ │ │ ├── getFacetValues.dataset.js │ │ │ │ └── getRefinements.dataset.js │ │ ├── integration-spec │ │ │ ├── helper.derive.js │ │ │ ├── helper.distinct.facet.js │ │ │ ├── helper.filters.js │ │ │ ├── helper.geo.js │ │ │ ├── helper.highlight.js │ │ │ ├── helper.insights.js │ │ │ ├── helper.numerics.js │ │ │ ├── helper.results.getFacetValues.js │ │ │ ├── helper.searchForFacetValues.js │ │ │ ├── helper.searchOnce.js │ │ │ └── helper.tags.js │ │ ├── integration-utils.js │ │ ├── replayTools.js │ │ ├── run.js │ │ ├── spec │ │ │ ├── RecommendParameters │ │ │ │ ├── constructorFn.js │ │ │ │ └── methods.js │ │ │ ├── SearchParameters │ │ │ │ ├── RefinementList │ │ │ │ │ └── clear.js │ │ │ │ ├── _clearNumericRefinements.js │ │ │ │ ├── _parseNumbers.js │ │ │ │ ├── constructorFn.js │ │ │ │ ├── getConjunctiveRefinements.js │ │ │ │ ├── getDisjunctiveRefinements.js │ │ │ │ ├── getExcludeRefinements.js │ │ │ │ ├── hierarchical-facets │ │ │ │ │ ├── add.js │ │ │ │ │ └── remove.js │ │ │ │ ├── isDisjunctiveFacetRefined.js │ │ │ │ ├── isExcludeRefined.js │ │ │ │ ├── isFacetRefined.js │ │ │ │ ├── isHierarchicalFacetRefined.js │ │ │ │ ├── isNumericRefined.js │ │ │ │ ├── listAttributes.js │ │ │ │ ├── noChanges.js │ │ │ │ ├── numericAttributes.js │ │ │ │ ├── numericFilters.js │ │ │ │ ├── removeXFacet.js │ │ │ │ ├── removeXFacetRefinement.js │ │ │ │ ├── resetPage.js │ │ │ │ ├── setQueryParameter.js │ │ │ │ └── setQueryParameters.js │ │ │ ├── SearchResults │ │ │ │ ├── getFacet.js │ │ │ │ ├── getFacetStats.js │ │ │ │ ├── getFacetValues-facetOrdering.js │ │ │ │ ├── getFacetValues.js │ │ │ │ ├── getFacetValues │ │ │ │ │ ├── conjunctive.json │ │ │ │ │ ├── disjunctive-non-exhaustive.json │ │ │ │ │ ├── disjunctive.json │ │ │ │ │ ├── hierarchical-non-exhaustive.json │ │ │ │ │ ├── hierarchical.json │ │ │ │ │ ├── noFilters.json │ │ │ │ │ └── sparse.json │ │ │ │ ├── getRefinements.js │ │ │ │ ├── getRefinements │ │ │ │ │ ├── conjunctive-brand-apple.json │ │ │ │ │ ├── disjunctive-type-trendcase.json │ │ │ │ │ ├── dummy-tags.json │ │ │ │ │ ├── exclude-apple.json │ │ │ │ │ ├── exclude-artificial-results.json │ │ │ │ │ ├── hierarchical-cards.json │ │ │ │ │ ├── noFilters.json │ │ │ │ │ └── numeric-rating-3.json │ │ │ │ └── initialization.js │ │ │ ├── algoliasearch.helper │ │ │ │ ├── addFacetRefinement.js │ │ │ │ ├── clears.js │ │ │ │ ├── client.js │ │ │ │ ├── constructor.js │ │ │ │ ├── derive │ │ │ │ │ ├── detach.js │ │ │ │ │ ├── empty-index.js │ │ │ │ │ ├── events.js │ │ │ │ │ └── multiqueries.js │ │ │ │ ├── distinct.js │ │ │ │ ├── events.js │ │ │ │ ├── excludes.js │ │ │ │ ├── facetFilters.js │ │ │ │ ├── findAnswers.js │ │ │ │ ├── getNumericRefinement.js │ │ │ │ ├── getQuery.js │ │ │ │ ├── hasRefinements.js │ │ │ │ ├── incorrectFacetDefinition.js │ │ │ │ ├── numericFilters.js │ │ │ │ ├── pages.js │ │ │ │ ├── pendingSearch.js │ │ │ │ ├── queryID.js │ │ │ │ ├── recommendState.js │ │ │ │ ├── searchForFacetValues.js │ │ │ │ ├── searchOnce.js │ │ │ │ ├── setQueryParameter.js │ │ │ │ ├── state.js │ │ │ │ └── tags.js │ │ │ ├── functions │ │ │ │ ├── compact.js │ │ │ │ ├── defaultsPure.js │ │ │ │ ├── find.js │ │ │ │ ├── findIndex.js │ │ │ │ ├── formatSort.js │ │ │ │ ├── intersection.js │ │ │ │ ├── merge.js │ │ │ │ ├── mergeNumericMax.js │ │ │ │ ├── orderBy.js │ │ │ │ └── valToNumber.js │ │ │ ├── hierarchical-facets │ │ │ │ ├── add-remove.js │ │ │ │ ├── attributes-order.js │ │ │ │ ├── breadcrumb.js │ │ │ │ ├── custom-prefix-path.js │ │ │ │ ├── custom-separator.js │ │ │ │ ├── do-not-show-parent-level.js │ │ │ │ ├── facet-value-length.js │ │ │ │ ├── getFacetValues.js │ │ │ │ ├── no-refinement.js │ │ │ │ ├── no-trim.js │ │ │ │ ├── objects-with-multiple-categories.js │ │ │ │ ├── one-level.js │ │ │ │ ├── pagination.js │ │ │ │ ├── parent-toggleRefine.js │ │ │ │ ├── refined-no-result.js │ │ │ │ ├── show-parent-level.js │ │ │ │ ├── simple-usage.js │ │ │ │ ├── sort-by.js │ │ │ │ ├── two-facets.js │ │ │ │ ├── unknown-facet.js │ │ │ │ └── with-a-disjunctive-facet.js │ │ │ ├── recommend.js │ │ │ ├── refinements.js │ │ │ ├── requestBuilder.js │ │ │ ├── search.js │ │ │ └── utils │ │ │ │ ├── isValidUserToken.js │ │ │ │ └── sortAndMergeRecommendations.js │ │ └── types.ts │ ├── tsconfig.json │ └── types │ │ ├── algoliasearch.d.ts │ │ └── algoliasearch.js ├── create-instantsearch-app │ ├── .babelrc │ ├── .eslintrc.js │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── docs │ │ ├── custom-templates.md │ │ └── deploy.md │ ├── e2e │ │ ├── __image_snapshots__ │ │ │ ├── angular-instantsearch │ │ │ │ └── src │ │ │ │ │ ├── favicon.ico-snap.png │ │ │ │ │ └── favicon.png-snap.png │ │ │ ├── autocomplete.js-0.x │ │ │ │ └── favicon.png-snap.png │ │ │ ├── autocomplete.js │ │ │ │ └── favicon.png-snap.png │ │ │ ├── autocomplete │ │ │ │ ├── assets │ │ │ │ │ ├── adaptive-icon.png-snap.png │ │ │ │ │ ├── favicon.png-snap.png │ │ │ │ │ ├── icon.png-snap.png │ │ │ │ │ └── splash.png-snap.png │ │ │ │ └── favicon.png-snap.png │ │ │ ├── instantsearch-android │ │ │ │ └── app │ │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ └── res │ │ │ │ │ ├── drawable │ │ │ │ │ └── product_placeholder.png-snap.png │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png-snap.png │ │ │ │ │ └── ic_launcher_round.png-snap.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png-snap.png │ │ │ │ │ └── ic_launcher_round.png-snap.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png-snap.png │ │ │ │ │ └── ic_launcher_round.png-snap.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png-snap.png │ │ │ │ │ └── ic_launcher_round.png-snap.png │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png-snap.png │ │ │ │ │ └── ic_launcher_round.png-snap.png │ │ │ ├── instantsearch.js-2.x │ │ │ │ └── favicon.png-snap.png │ │ │ ├── instantsearch.js │ │ │ │ └── favicon.png-snap.png │ │ │ ├── javascript-client │ │ │ │ └── favicon.png-snap.png │ │ │ ├── javascript-helper-2.x │ │ │ │ └── favicon.png-snap.png │ │ │ ├── javascript-helper │ │ │ │ └── favicon.png-snap.png │ │ │ ├── react-instantsearch-native │ │ │ │ └── assets │ │ │ │ │ ├── adaptive-icon.png-snap.png │ │ │ │ │ ├── favicon.png-snap.png │ │ │ │ │ ├── icon.png-snap.png │ │ │ │ │ └── splash.png-snap.png │ │ │ ├── react-instantsearch │ │ │ │ ├── favicon.png-snap.png │ │ │ │ └── public │ │ │ │ │ └── favicon.png-snap.png │ │ │ ├── vue-instantsearch-1.x │ │ │ │ ├── favicon.png-snap.png │ │ │ │ └── public │ │ │ │ │ └── favicon.png-snap.png │ │ │ ├── vue-instantsearch-2.x │ │ │ │ └── public │ │ │ │ │ └── favicon.png-snap.png │ │ │ ├── vue-instantsearch-vue3 │ │ │ │ └── public │ │ │ │ │ └── favicon.png-snap.png │ │ │ └── vue-instantsearch │ │ │ │ ├── favicon.png-snap.png │ │ │ │ └── public │ │ │ │ ├── favicon.ico-snap.png │ │ │ │ └── favicon.png-snap.png │ │ ├── __snapshots__ │ │ │ └── templates.test.js.snap │ │ ├── installs.test.js │ │ └── templates.test.js │ ├── index.js │ ├── jest.config.js │ ├── package.json │ ├── preview.png │ ├── scripts │ │ ├── build-app.js │ │ └── release-templates.js │ └── src │ │ ├── api │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── index.test.js.snap │ │ │ ├── index.test.js │ │ │ └── resolve-template.test.js │ │ ├── check-config.js │ │ ├── index.js │ │ └── resolve-template.js │ │ ├── cli │ │ ├── __tests__ │ │ │ ├── getAnswersDefaultValues.js │ │ │ ├── getAttributesFromIndex.test.js │ │ │ ├── getConfiguration.test.js │ │ │ ├── getFacetsFromIndex.test.js │ │ │ ├── getInformationFromIndex.js │ │ │ ├── isQuestionAsked.test.js │ │ │ └── postProcessAnswers.js │ │ ├── getAnswersDefaultValues.js │ │ ├── getAttributesFromIndex.js │ │ ├── getConfiguration.js │ │ ├── getFacetsFromIndex.js │ │ ├── getInformationFromIndex.js │ │ ├── getPotentialImageAttributes.js │ │ ├── index.js │ │ ├── isQuestionAsked.js │ │ └── postProcessAnswers.js │ │ ├── tasks │ │ ├── android │ │ │ └── teardown.js │ │ ├── common │ │ │ ├── build.js │ │ │ └── clean.js │ │ ├── ios │ │ │ ├── install.js │ │ │ ├── setup.js │ │ │ └── teardown.js │ │ └── node │ │ │ ├── install.js │ │ │ └── teardown.js │ │ ├── templates │ │ ├── Autocomplete │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── app.js.hbs │ │ │ ├── favicon.png │ │ │ ├── index.html.hbs │ │ │ ├── manifest.webmanifest │ │ │ ├── package.json │ │ │ └── style.css │ │ ├── InstantSearch Android │ │ │ ├── .gitignore.template │ │ │ ├── .template.js │ │ │ ├── app │ │ │ │ ├── .gitignore.template │ │ │ │ ├── build.gradle │ │ │ │ ├── proguard-rules.pro │ │ │ │ └── src │ │ │ │ │ ├── androidTest │ │ │ │ │ └── java │ │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── instantsearch │ │ │ │ │ │ └── app │ │ │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── instantsearch │ │ │ │ │ │ └── app │ │ │ │ │ │ └── MainActivity.java │ │ │ │ │ └── res │ │ │ │ │ ├── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── hits_item.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ ├── gradle │ │ │ │ └── wrapper │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ ├── gradlew │ │ │ ├── gradlew.bat │ │ │ └── settings.gradle │ │ ├── InstantSearch iOS │ │ │ ├── .gitignore.template │ │ │ ├── .template.js │ │ │ ├── App.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ └── project.xcworkspace │ │ │ │ │ └── contents.xcworkspacedata │ │ │ ├── App.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ ├── App │ │ │ │ ├── AppDelegate.swift │ │ │ │ ├── Assets.xcassets │ │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Base.lproj │ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ │ └── Main.storyboard │ │ │ │ ├── Info.plist │ │ │ │ └── ViewController.swift │ │ │ └── Podfile │ │ ├── InstantSearch.js widget │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.cjs │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.md.hbs │ │ │ ├── README.md │ │ │ ├── babel.config.cjs │ │ │ ├── config │ │ │ │ └── api-extractor.json │ │ │ ├── example │ │ │ │ ├── index.css │ │ │ │ ├── index.html │ │ │ │ └── index.ts.hbs │ │ │ ├── package.json.hbs │ │ │ ├── src │ │ │ │ ├── connector.ts.hbs │ │ │ │ ├── index.ts.hbs │ │ │ │ ├── renderer.ts.hbs │ │ │ │ ├── types.ts.hbs │ │ │ │ └── widget.ts.hbs │ │ │ ├── tsconfig.declaration.json │ │ │ ├── tsconfig.json │ │ │ └── vite.config.js │ │ ├── InstantSearch.js │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── favicon.png │ │ │ ├── index.html.hbs │ │ │ ├── package.json.hbs │ │ │ ├── src │ │ │ │ ├── app.css │ │ │ │ ├── app.js.hbs │ │ │ │ ├── global.d.ts.hbs │ │ │ │ └── index.css │ │ │ └── tsconfig.json │ │ ├── JavaScript Client │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── favicon.png │ │ │ ├── index.html.hbs │ │ │ ├── manifest.webmanifest │ │ │ ├── package.json.hbs │ │ │ └── src │ │ │ │ ├── app.css │ │ │ │ ├── app.js.hbs │ │ │ │ └── index.css │ │ ├── JavaScript Helper │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── favicon.png │ │ │ ├── index.html.hbs │ │ │ ├── manifest.webmanifest │ │ │ ├── package.json │ │ │ └── src │ │ │ │ ├── app.css │ │ │ │ ├── app.js.hbs │ │ │ │ └── index.css │ │ ├── React InstantSearch Native │ │ │ ├── .expo-shared │ │ │ │ └── assets.json │ │ │ ├── .gitignore.template │ │ │ ├── .template.js │ │ │ ├── App.tsx.hbs │ │ │ ├── README.md │ │ │ ├── app.json │ │ │ ├── assets │ │ │ │ ├── adaptive-icon.png │ │ │ │ ├── favicon.png │ │ │ │ ├── icon.png │ │ │ │ └── splash.png │ │ │ ├── babel.config.js │ │ │ ├── package.json.hbs │ │ │ ├── src │ │ │ │ ├── Highlight.tsx │ │ │ │ ├── InfiniteHits.tsx │ │ │ │ └── SearchBox.tsx.hbs │ │ │ ├── tsconfig.json │ │ │ └── types │ │ │ │ └── ProductHit.ts │ │ ├── React InstantSearch │ │ │ ├── .editorconfig │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── favicon.png │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ └── src │ │ │ │ ├── App.css │ │ │ │ ├── App.tsx.hbs │ │ │ │ ├── Panel.tsx │ │ │ │ └── index.tsx │ │ ├── Vue InstantSearch with Vue 3 │ │ │ ├── .editorconfig │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── public │ │ │ │ └── favicon.png │ │ │ ├── src │ │ │ │ ├── App.vue │ │ │ │ └── main.js │ │ │ └── vite.config.js │ │ └── Vue InstantSearch │ │ │ ├── .editorconfig │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore.template │ │ │ ├── .prettierrc │ │ │ ├── .template.js │ │ │ ├── README.md │ │ │ ├── babel.config.js │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.png │ │ │ └── index.html │ │ │ └── src │ │ │ ├── App.vue │ │ │ └── main.js │ │ └── utils │ │ ├── __tests__ │ │ ├── fetchLibraryVersions.test.js │ │ └── index.test.js │ │ ├── fetchLibraryVersions.js │ │ └── index.js ├── instantsearch-codemods │ ├── CHANGELOG.md │ ├── README.md │ ├── __testfixtures__ │ │ ├── addWidget-to-addWidgets │ │ │ ├── global.input.js │ │ │ ├── global.output.js │ │ │ ├── imported.input.js │ │ │ ├── imported.output.js │ │ │ ├── mixed.input.js │ │ │ ├── mixed.output.js │ │ │ ├── remove.input.js │ │ │ └── remove.output.js │ │ ├── ris-v6-to-v7 │ │ │ ├── app-inline.input.js │ │ │ ├── app-inline.output.js │ │ │ ├── connectors.input.js │ │ │ ├── connectors.output.js │ │ │ ├── import-path.input.js │ │ │ ├── import-path.output.js │ │ │ ├── menuselect.input.js │ │ │ ├── menuselect.output.js │ │ │ ├── placeholder-not-inline.input.js │ │ │ ├── placeholder-not-inline.output.js │ │ │ ├── searchbox-icons.input.js │ │ │ ├── searchbox-icons.output.js │ │ │ ├── translations-functions-declaration.input.js │ │ │ ├── translations-functions-declaration.output.js │ │ │ ├── translations-functions-lambda.input.js │ │ │ ├── translations-functions-lambda.output.js │ │ │ ├── translations-functions-no-param.input.js │ │ │ ├── translations-functions-no-param.output.js │ │ │ ├── translations-functions-not-inline.input.js │ │ │ ├── translations-functions-not-inline.output.js │ │ │ ├── translations-not-inline.input.js │ │ │ └── translations-not-inline.output.js │ │ └── rish-to-ris │ │ │ ├── import.input.js │ │ │ ├── import.output.js │ │ │ ├── path.input.js │ │ │ ├── path.output.js │ │ │ ├── renderToString.input.js │ │ │ ├── renderToString.output.js │ │ │ ├── use.input.js │ │ │ └── use.output.js │ ├── __tests__ │ │ ├── addWidget-to-addWidgets.test.js │ │ ├── ris-v6-to-v7.test.ts │ │ ├── rish-to-ris.test.ts │ │ └── validate-config.test.ts │ ├── package.json │ └── src │ │ ├── addWidget-to-addWidgets.ts │ │ ├── codeshift.config.js │ │ ├── replaceImports.ts │ │ ├── ris-v6-to-v7.ts │ │ └── rish-to-ris.ts ├── instantsearch-ui-components │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── types.test.ts │ ├── global.d.ts │ ├── package.json │ ├── scripts │ │ └── version.cjs │ ├── src │ │ ├── components │ │ │ ├── Carousel.tsx │ │ │ ├── FrequentlyBoughtTogether.tsx │ │ │ ├── Highlight.tsx │ │ │ ├── Hits.tsx │ │ │ ├── LookingSimilar.tsx │ │ │ ├── RelatedProducts.tsx │ │ │ ├── TrendingItems.tsx │ │ │ ├── __tests__ │ │ │ │ ├── Carousel.test.tsx │ │ │ │ ├── FrequentlyBoughtTogether.test.tsx │ │ │ │ ├── Highlight.test.tsx │ │ │ │ ├── Hits.test.tsx │ │ │ │ ├── LookingSimilar.test.tsx │ │ │ │ ├── RelatedProducts.test.tsx │ │ │ │ └── TrendingItems.test.tsx │ │ │ ├── index.ts │ │ │ └── recommend-shared │ │ │ │ ├── DefaultEmpty.tsx │ │ │ │ ├── DefaultHeader.tsx │ │ │ │ ├── DefaultItem.tsx │ │ │ │ ├── List.tsx │ │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── cx.ts │ │ │ └── index.ts │ │ ├── types │ │ │ ├── Recommend.ts │ │ │ ├── Renderer.ts │ │ │ ├── index.ts │ │ │ └── shared.ts │ │ └── version.ts │ └── tsconfig.declaration.json ├── instantsearch.css │ ├── .gitignore │ ├── .npmignore │ ├── .stylelintrc.json │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── src │ │ └── themes │ │ ├── algolia.scss │ │ ├── reset.scss │ │ └── satellite.scss ├── instantsearch.js │ ├── .storybook │ │ ├── addons.ts │ │ ├── config.ts │ │ ├── decorators │ │ │ ├── index.ts │ │ │ ├── withHits.ts │ │ │ └── withLifecycle.ts │ │ ├── playgrounds │ │ │ ├── default.ts │ │ │ └── movies.ts │ │ ├── preview-head.html │ │ ├── static │ │ │ ├── answers.css │ │ │ └── storybook.css │ │ ├── utils │ │ │ ├── create-info-box.d.ts │ │ │ └── create-info-box.js │ │ └── webpack.config.js │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── scripts │ │ ├── rollup │ │ │ └── rollup.config.js │ │ ├── transforms │ │ │ ├── README.md │ │ │ ├── __testfixtures__ │ │ │ │ └── addWidget-to-addWidgets │ │ │ │ │ ├── global.input.js │ │ │ │ │ ├── global.output.js │ │ │ │ │ ├── imported.input.js │ │ │ │ │ ├── imported.output.js │ │ │ │ │ ├── mixed.input.js │ │ │ │ │ ├── mixed.output.js │ │ │ │ │ ├── remove.input.js │ │ │ │ │ └── remove.output.js │ │ │ ├── __tests__ │ │ │ │ └── addWidget-to-addWidgets.test.js │ │ │ └── addWidget-to-addWidgets.js │ │ ├── typescript │ │ │ ├── api-extractor.json │ │ │ ├── extract.js │ │ │ └── tsconfig.declaration.json │ │ └── version │ │ │ └── update-version.js │ ├── src │ │ ├── __tests__ │ │ │ ├── common-connectors.test.tsx │ │ │ ├── common-shared.test.tsx │ │ │ ├── common-widgets.test.tsx │ │ │ ├── index-es-test.ts │ │ │ └── index-test.ts │ │ ├── components │ │ │ ├── Answers │ │ │ │ ├── Answers.tsx │ │ │ │ └── __tests__ │ │ │ │ │ └── Answers-test.tsx │ │ │ ├── Breadcrumb │ │ │ │ ├── Breadcrumb.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── Breadcrumb-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── Breadcrumb-test.tsx.snap │ │ │ ├── ClearRefinements │ │ │ │ └── ClearRefinements.tsx │ │ │ ├── CurrentRefinements │ │ │ │ ├── CurrentRefinements.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── CurrentRefinements-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── CurrentRefinements-test.tsx.snap │ │ │ ├── GeoSearchControls │ │ │ │ ├── GeoSearchButton.tsx │ │ │ │ ├── GeoSearchControls.tsx │ │ │ │ ├── GeoSearchToggle.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── GeoSearchButton-test.tsx │ │ │ │ │ ├── GeoSearchControls-test.tsx │ │ │ │ │ ├── GeoSearchToggle-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── GeoSearchButton-test.tsx.snap │ │ │ │ │ ├── GeoSearchControls-test.tsx.snap │ │ │ │ │ └── GeoSearchToggle-test.tsx.snap │ │ │ ├── Highlight │ │ │ │ └── Highlight.tsx │ │ │ ├── InfiniteHits │ │ │ │ ├── InfiniteHits.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── InfiniteHits-test.tsx │ │ │ │ │ ├── InfiniteHits.test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── InfiniteHits-test.tsx.snap │ │ │ ├── InternalHighlight │ │ │ │ └── InternalHighlight.tsx │ │ │ ├── MenuSelect │ │ │ │ ├── MenuSelect.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── MenuSelect-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── MenuSelect-test.tsx.snap │ │ │ ├── Pagination │ │ │ │ └── Pagination.tsx │ │ │ ├── Panel │ │ │ │ ├── Panel.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── Panel-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── Panel-test.tsx.snap │ │ │ ├── PoweredBy │ │ │ │ ├── PoweredBy.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── PoweredBy-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── PoweredBy-test.tsx.snap │ │ │ ├── QueryRuleCustomData │ │ │ │ ├── QueryRuleCustomData.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── QueryRuleCustomData-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── QueryRuleCustomData-test.tsx.snap │ │ │ ├── RangeInput │ │ │ │ ├── RangeInput.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── RangeInput-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── RangeInput-test.tsx.snap │ │ │ ├── RefinementList │ │ │ │ ├── RefinementList.tsx │ │ │ │ ├── RefinementListItem.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── RefinementList-test.tsx │ │ │ │ │ ├── RefinementListItem-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── RefinementList-test.tsx.snap │ │ │ │ │ └── RefinementListItem-test.tsx.snap │ │ │ ├── RelevantSort │ │ │ │ ├── RelevantSort.tsx │ │ │ │ └── __tests__ │ │ │ │ │ └── RelevantSort-test.tsx │ │ │ ├── ReverseHighlight │ │ │ │ └── ReverseHighlight.tsx │ │ │ ├── ReverseSnippet │ │ │ │ └── ReverseSnippet.tsx │ │ │ ├── SearchBox │ │ │ │ └── SearchBox.tsx │ │ │ ├── Selector │ │ │ │ ├── Selector.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── Selector-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── Selector-test.tsx.snap │ │ │ ├── Slider │ │ │ │ ├── Pit.tsx │ │ │ │ ├── Rheostat.tsx │ │ │ │ ├── Slider.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── Slider-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── Slider-test.tsx.snap │ │ │ ├── Snippet │ │ │ │ └── Snippet.tsx │ │ │ ├── Stats │ │ │ │ ├── Stats.tsx │ │ │ │ └── __tests__ │ │ │ │ │ └── Stats-test.tsx │ │ │ ├── Template │ │ │ │ ├── Template.tsx │ │ │ │ └── __tests__ │ │ │ │ │ ├── Template-test.tsx │ │ │ │ │ └── __snapshots__ │ │ │ │ │ └── Template-test.tsx.snap │ │ │ ├── ToggleRefinement │ │ │ │ └── ToggleRefinement.tsx │ │ │ └── VoiceSearch │ │ │ │ ├── VoiceSearch.tsx │ │ │ │ └── __tests__ │ │ │ │ ├── VoiceSearch-test.tsx │ │ │ │ └── __snapshots__ │ │ │ │ └── VoiceSearch-test.tsx.snap │ │ ├── connectors │ │ │ ├── answers │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectAnswers-test.ts │ │ │ │ └── connectAnswers.ts │ │ │ ├── autocomplete │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectAutocomplete-test.ts │ │ │ │ └── connectAutocomplete.ts │ │ │ ├── breadcrumb │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectBreadcrumb-test.ts │ │ │ │ └── connectBreadcrumb.ts │ │ │ ├── clear-refinements │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectClearRefinements-test.ts │ │ │ │ └── connectClearRefinements.ts │ │ │ ├── configure-related-items │ │ │ │ ├── __tests__ │ │ │ │ │ ├── connectConfigureRelatedItems-test-bridge.ts │ │ │ │ │ └── connectConfigureRelatedItems-test.ts │ │ │ │ └── connectConfigureRelatedItems.ts │ │ │ ├── configure │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectConfigure-test.ts │ │ │ │ └── connectConfigure.ts │ │ │ ├── current-refinements │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectCurrentRefinements-test.ts │ │ │ │ └── connectCurrentRefinements.ts │ │ │ ├── dynamic-widgets │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectDynamicWidgets-test.ts │ │ │ │ └── connectDynamicWidgets.ts │ │ │ ├── frequently-bought-together │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectFrequentlyBoughtTogether-test.ts │ │ │ │ └── connectFrequentlyBoughtTogether.ts │ │ │ ├── geo-search │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectGeoSearch-test.ts │ │ │ │ └── connectGeoSearch.ts │ │ │ ├── hierarchical-menu │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectHierarchicalMenu-test.ts │ │ │ │ └── connectHierarchicalMenu.ts │ │ │ ├── hits-per-page │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectHitsPerPage-test.ts │ │ │ │ └── connectHitsPerPage.ts │ │ │ ├── hits │ │ │ │ ├── __tests__ │ │ │ │ │ ├── connectHits-test.ts │ │ │ │ │ └── connectHitsWithInsights-test.ts │ │ │ │ ├── connectHits.ts │ │ │ │ └── connectHitsWithInsights.ts │ │ │ ├── index.ts │ │ │ ├── infinite-hits │ │ │ │ ├── __tests__ │ │ │ │ │ ├── connectInfiniteHits-test.ts │ │ │ │ │ └── connectInfiniteHitsWithInsights-test.ts │ │ │ │ ├── connectInfiniteHits.ts │ │ │ │ └── connectInfiniteHitsWithInsights.ts │ │ │ ├── looking-similar │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectLookingSimilar-test.ts │ │ │ │ └── connectLookingSimilar.ts │ │ │ ├── menu │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectMenu-test.ts │ │ │ │ └── connectMenu.ts │ │ │ ├── numeric-menu │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectNumericMenu-test.ts │ │ │ │ └── connectNumericMenu.ts │ │ │ ├── pagination │ │ │ │ ├── Paginator.ts │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Paginator-test.ts │ │ │ │ │ └── connectPagination-test.ts │ │ │ │ └── connectPagination.ts │ │ │ ├── powered-by │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectPoweredBy-test.ts │ │ │ │ └── connectPoweredBy.ts │ │ │ ├── query-rules │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectQueryRules-test.ts │ │ │ │ └── connectQueryRules.ts │ │ │ ├── range │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectRange-test.ts │ │ │ │ └── connectRange.ts │ │ │ ├── rating-menu │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectRatingMenu-test.ts │ │ │ │ └── connectRatingMenu.ts │ │ │ ├── refinement-list │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectRefinementList-test.ts │ │ │ │ └── connectRefinementList.ts │ │ │ ├── related-products │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectRelatedProducts-test.ts │ │ │ │ └── connectRelatedProducts.ts │ │ │ ├── relevant-sort │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectRelevantSort-test.ts │ │ │ │ └── connectRelevantSort.ts │ │ │ ├── search-box │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectSearchBox-test.ts │ │ │ │ └── connectSearchBox.ts │ │ │ ├── sort-by │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectSortBy-test.ts │ │ │ │ └── connectSortBy.ts │ │ │ ├── stats │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectStats-test.ts │ │ │ │ └── connectStats.ts │ │ │ ├── toggle-refinement │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectToggleRefinement-test.ts │ │ │ │ ├── connectToggleRefinement.ts │ │ │ │ └── types.ts │ │ │ ├── trending-items │ │ │ │ ├── __tests__ │ │ │ │ │ └── connectTrendingItems-test.ts │ │ │ │ └── connectTrendingItems.ts │ │ │ └── voice-search │ │ │ │ ├── __tests__ │ │ │ │ └── connectVoiceSearch-test.ts │ │ │ │ └── connectVoiceSearch.ts │ │ ├── helpers │ │ │ ├── __tests__ │ │ │ │ ├── get-insights-anonymous-user-token-test.ts │ │ │ │ ├── highlight-test.ts │ │ │ │ ├── insights-test.ts │ │ │ │ ├── reverseHighlight-test.ts │ │ │ │ ├── reverseSnippet-test.ts │ │ │ │ └── snippet-test.ts │ │ │ ├── components │ │ │ │ ├── Highlight.tsx │ │ │ │ ├── ReverseHighlight.tsx │ │ │ │ ├── ReverseSnippet.tsx │ │ │ │ ├── Snippet.tsx │ │ │ │ ├── __tests__ │ │ │ │ │ ├── Highlight.test.tsx │ │ │ │ │ ├── ReverseHighlight.test.tsx │ │ │ │ │ ├── ReverseSnippet.test.tsx │ │ │ │ │ └── Snippet.test.tsx │ │ │ │ └── index.ts │ │ │ ├── get-insights-anonymous-user-token.ts │ │ │ ├── highlight.ts │ │ │ ├── index.ts │ │ │ ├── insights.ts │ │ │ ├── reverseHighlight.ts │ │ │ ├── reverseSnippet.ts │ │ │ └── snippet.ts │ │ ├── index.es.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── InstantSearch.ts │ │ │ ├── __tests__ │ │ │ │ ├── InstantSearch-composition-test.tsx │ │ │ │ ├── InstantSearch-integration-test.ts │ │ │ │ ├── InstantSearch-test.tsx │ │ │ │ ├── RoutingManager-test.ts │ │ │ │ ├── createHelpers.tests.ts │ │ │ │ ├── routing │ │ │ │ │ ├── correct-urls.test.ts │ │ │ │ │ ├── dispose-start-test.ts │ │ │ │ │ ├── duplicate-url-test.ts │ │ │ │ │ ├── external-influence-test.ts │ │ │ │ │ ├── modal-test.ts │ │ │ │ │ ├── spa-debounced-test.ts │ │ │ │ │ ├── spa-replace-state-test.ts │ │ │ │ │ └── spa-test.ts │ │ │ │ ├── server-composition.test.ts │ │ │ │ ├── server.test.ts │ │ │ │ ├── status.test.ts │ │ │ │ ├── suit-test.ts │ │ │ │ └── version-test.ts │ │ │ ├── createHelpers.ts │ │ │ ├── formatNumber.ts │ │ │ ├── infiniteHitsCache │ │ │ │ ├── __tests__ │ │ │ │ │ ├── sessionStorage-key.test.ts │ │ │ │ │ └── sessionStorage.test.ts │ │ │ │ ├── index.ts │ │ │ │ └── sessionStorage.ts │ │ │ ├── insights │ │ │ │ ├── __tests__ │ │ │ │ │ ├── client-test.js │ │ │ │ │ ├── insights-client-test.ts │ │ │ │ │ └── insights-listener-test.tsx │ │ │ │ ├── client.ts │ │ │ │ ├── index.ts │ │ │ │ └── listener.tsx │ │ │ ├── routers │ │ │ │ ├── __tests__ │ │ │ │ │ ├── history-integration.test.ts │ │ │ │ │ └── history.test.ts │ │ │ │ ├── history.ts │ │ │ │ └── index.ts │ │ │ ├── server.ts │ │ │ ├── stateMappings │ │ │ │ ├── __tests__ │ │ │ │ │ ├── simple-test.ts │ │ │ │ │ └── singleIndex-test.ts │ │ │ │ ├── index.ts │ │ │ │ ├── simple.ts │ │ │ │ └── singleIndex.ts │ │ │ ├── suit.ts │ │ │ ├── templating │ │ │ │ ├── __tests__ │ │ │ │ │ ├── prepareTemplateProps.test.ts │ │ │ │ │ └── renderTemplate.test.ts │ │ │ │ ├── index.ts │ │ │ │ ├── prepareTemplateProps.ts │ │ │ │ └── renderTemplate.ts │ │ │ ├── utils │ │ │ │ ├── __tests__ │ │ │ │ │ ├── capitalize-test.ts │ │ │ │ │ ├── clearRefinements-test.ts │ │ │ │ │ ├── concatHighlightedParts-test.ts │ │ │ │ │ ├── createSendEventForFacet-test.ts │ │ │ │ │ ├── createSendEventForHits-test.ts │ │ │ │ │ ├── debounce-test.ts │ │ │ │ │ ├── defer.ts │ │ │ │ │ ├── escape-highlight-test.ts │ │ │ │ │ ├── escape-html-test.ts │ │ │ │ │ ├── find-test.ts │ │ │ │ │ ├── findIndex-test.ts │ │ │ │ │ ├── geo-search-test.ts │ │ │ │ │ ├── getAppIdAndApiKey-test.ts │ │ │ │ │ ├── getContainerNode-test.ts │ │ │ │ │ ├── getHighlightFromSiblings-test.ts │ │ │ │ │ ├── getHighlightedParts-test.ts │ │ │ │ │ ├── getObjectType-test.ts │ │ │ │ │ ├── getPropertyByPath-test.ts │ │ │ │ │ ├── getRefinements-test.ts │ │ │ │ │ ├── getWidgetAttribute-test.ts │ │ │ │ │ ├── hits-absolute-position-test.ts │ │ │ │ │ ├── hits-query-id-test.ts │ │ │ │ │ ├── hydrateRecommendCache-test.ts │ │ │ │ │ ├── hydrateSearchClient-composition-test.ts │ │ │ │ │ ├── hydrateSearchClient-test.ts │ │ │ │ │ ├── isDomElement-test.ts │ │ │ │ │ ├── isEqual-test.ts │ │ │ │ │ ├── isPlainObject-test.ts │ │ │ │ │ ├── logger-test.ts │ │ │ │ │ ├── mergeSearchParameters-test.ts │ │ │ │ │ ├── noop-test.ts │ │ │ │ │ ├── range-test.ts │ │ │ │ │ ├── resolveSearchParameters-test.ts │ │ │ │ │ ├── reverseHighlightedParts-test.ts │ │ │ │ │ ├── safelyRunOnBrowser-test.ts │ │ │ │ │ ├── toArray-test.ts │ │ │ │ │ ├── uniq-test.ts │ │ │ │ │ └── walkIndex.test.ts │ │ │ │ ├── addWidgetId.ts │ │ │ │ ├── capitalize.ts │ │ │ │ ├── checkIndexUiState.ts │ │ │ │ ├── checkRendering.ts │ │ │ │ ├── clearRefinements.ts │ │ │ │ ├── concatHighlightedParts.ts │ │ │ │ ├── createConcurrentSafePromise.ts │ │ │ │ ├── createSendEventForFacet.ts │ │ │ │ ├── createSendEventForHits.ts │ │ │ │ ├── debounce.ts │ │ │ │ ├── defer.ts │ │ │ │ ├── documentation.ts │ │ │ │ ├── escape-highlight.ts │ │ │ │ ├── escape-html.ts │ │ │ │ ├── escapeFacetValue.ts │ │ │ │ ├── find.ts │ │ │ │ ├── findIndex.ts │ │ │ │ ├── geo-search.ts │ │ │ │ ├── getAppIdAndApiKey.ts │ │ │ │ ├── getContainerNode.ts │ │ │ │ ├── getHighlightFromSiblings.ts │ │ │ │ ├── getHighlightedParts.ts │ │ │ │ ├── getObjectType.ts │ │ │ │ ├── getPropertyByPath.ts │ │ │ │ ├── getRefinements.ts │ │ │ │ ├── getWidgetAttribute.ts │ │ │ │ ├── hits-absolute-position.ts │ │ │ │ ├── hits-query-id.ts │ │ │ │ ├── hydrateRecommendCache.ts │ │ │ │ ├── hydrateSearchClient.ts │ │ │ │ ├── index.ts │ │ │ │ ├── isDomElement.ts │ │ │ │ ├── isEqual.ts │ │ │ │ ├── isFacetRefined.ts │ │ │ │ ├── isFiniteNumber.ts │ │ │ │ ├── isIndexWidget.ts │ │ │ │ ├── isPlainObject.ts │ │ │ │ ├── isSpecialClick.ts │ │ │ │ ├── logger.ts │ │ │ │ ├── mergeSearchParameters.ts │ │ │ │ ├── noop.ts │ │ │ │ ├── omit.ts │ │ │ │ ├── range.ts │ │ │ │ ├── render-args.ts │ │ │ │ ├── resolveSearchParameters.ts │ │ │ │ ├── reverseHighlightedParts.ts │ │ │ │ ├── safelyRunOnBrowser.ts │ │ │ │ ├── serializer.ts │ │ │ │ ├── setIndexHelperState.ts │ │ │ │ ├── toArray.ts │ │ │ │ ├── typedObject.ts │ │ │ │ ├── uniq.ts │ │ │ │ ├── uuid.ts │ │ │ │ └── walkIndex.ts │ │ │ ├── version.ts │ │ │ └── voiceSearchHelper │ │ │ │ ├── __tests__ │ │ │ │ └── index-test.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ ├── middlewares │ │ │ ├── __tests__ │ │ │ │ ├── createInsightsMiddleware.ts │ │ │ │ ├── createMetadataMiddleware.ts │ │ │ │ └── createRouterMiddleware.ts │ │ │ ├── createInsightsMiddleware.ts │ │ │ ├── createMetadataMiddleware.ts │ │ │ ├── createRouterMiddleware.ts │ │ │ └── index.ts │ │ ├── templates │ │ │ ├── __tests__ │ │ │ │ └── carousel.test.tsx │ │ │ ├── carousel │ │ │ │ └── carousel.tsx │ │ │ └── index.ts │ │ ├── types │ │ │ ├── algoliasearch.ts │ │ │ ├── component.ts │ │ │ ├── connector.ts │ │ │ ├── index.ts │ │ │ ├── insights.ts │ │ │ ├── instantsearch.ts │ │ │ ├── middleware.ts │ │ │ ├── render-state.ts │ │ │ ├── results.ts │ │ │ ├── router.ts │ │ │ ├── templates.ts │ │ │ ├── ui-state.ts │ │ │ ├── utils.ts │ │ │ ├── widget-factory.ts │ │ │ └── widget.ts │ │ └── widgets │ │ │ ├── __tests__ │ │ │ └── index.test.ts │ │ │ ├── analytics │ │ │ ├── __tests__ │ │ │ │ └── analytics-test.ts │ │ │ └── analytics.ts │ │ │ ├── answers │ │ │ ├── __tests__ │ │ │ │ └── answers-test.ts │ │ │ ├── answers.tsx │ │ │ └── defaultTemplates.ts │ │ │ ├── breadcrumb │ │ │ ├── __tests__ │ │ │ │ └── breadcrumb.test.tsx │ │ │ ├── breadcrumb.tsx │ │ │ └── defaultTemplates.ts │ │ │ ├── clear-refinements │ │ │ ├── __tests__ │ │ │ │ └── clear-refinements.test.tsx │ │ │ ├── clear-refinements.tsx │ │ │ └── defaultTemplates.ts │ │ │ ├── configure-related-items │ │ │ ├── __tests__ │ │ │ │ └── configure-related-items-test.ts │ │ │ └── configure-related-items.ts │ │ │ ├── configure │ │ │ ├── __tests__ │ │ │ │ └── configure-test.ts │ │ │ └── configure.ts │ │ │ ├── current-refinements │ │ │ ├── __tests__ │ │ │ │ └── current-refinements.test.ts │ │ │ └── current-refinements.tsx │ │ │ ├── dynamic-widgets │ │ │ ├── __tests__ │ │ │ │ └── dynamic-widgets-test.ts │ │ │ └── dynamic-widgets.ts │ │ │ ├── frequently-bought-together │ │ │ ├── __tests__ │ │ │ │ └── frequently-bought-together.test.tsx │ │ │ └── frequently-bought-together.tsx │ │ │ ├── geo-search │ │ │ ├── GeoSearchRenderer.d.ts │ │ │ ├── GeoSearchRenderer.js │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── geo-search-test.ts.snap │ │ │ │ ├── createHTMLMarker-test.ts │ │ │ │ ├── geo-search-test.ts │ │ │ │ └── geo-search.test.tsx │ │ │ ├── createHTMLMarker.ts │ │ │ ├── defaultTemplates.tsx │ │ │ └── geo-search.ts │ │ │ ├── hierarchical-menu │ │ │ ├── __tests__ │ │ │ │ └── hierarchical-menu.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── hierarchical-menu.tsx │ │ │ ├── hits-per-page │ │ │ ├── __tests__ │ │ │ │ └── hits-per-page.test.tsx │ │ │ └── hits-per-page.tsx │ │ │ ├── hits │ │ │ ├── __tests__ │ │ │ │ └── hits.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── hits.tsx │ │ │ ├── index.ts │ │ │ ├── index │ │ │ ├── __tests__ │ │ │ │ └── index-test.ts │ │ │ └── index.ts │ │ │ ├── infinite-hits │ │ │ ├── __tests__ │ │ │ │ └── infinite-hits.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── infinite-hits.tsx │ │ │ ├── looking-similar │ │ │ ├── __tests__ │ │ │ │ └── looking-similar.test.tsx │ │ │ └── looking-similar.tsx │ │ │ ├── menu-select │ │ │ ├── __tests__ │ │ │ │ ├── menu-select-test.ts │ │ │ │ └── menu-select.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── menu-select.tsx │ │ │ ├── menu │ │ │ ├── __tests__ │ │ │ │ └── menu.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── menu.tsx │ │ │ ├── numeric-menu │ │ │ ├── __tests__ │ │ │ │ └── numeric-menu.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── numeric-menu.tsx │ │ │ ├── pagination │ │ │ ├── __tests__ │ │ │ │ └── pagination.test.tsx │ │ │ └── pagination.tsx │ │ │ ├── panel │ │ │ ├── __tests__ │ │ │ │ ├── panel-test.ts │ │ │ │ └── panel.test.tsx │ │ │ └── panel.tsx │ │ │ ├── places │ │ │ ├── __tests__ │ │ │ │ └── places-test.ts │ │ │ └── places.ts │ │ │ ├── powered-by │ │ │ ├── __tests__ │ │ │ │ └── powered-by-test.ts │ │ │ └── powered-by.tsx │ │ │ ├── query-rule-context │ │ │ ├── __tests__ │ │ │ │ └── query-rule-context-test.ts │ │ │ └── query-rule-context.tsx │ │ │ ├── query-rule-custom-data │ │ │ ├── __tests__ │ │ │ │ ├── query-rule-custom-data-test.ts │ │ │ │ └── query-rule-custom-data.test.tsx │ │ │ └── query-rule-custom-data.tsx │ │ │ ├── range-input │ │ │ ├── __tests__ │ │ │ │ └── range-input.test.tsx │ │ │ └── range-input.tsx │ │ │ ├── range-slider │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── range-slider-test.ts.snap │ │ │ │ └── range-slider-test.ts │ │ │ └── range-slider.tsx │ │ │ ├── rating-menu │ │ │ ├── __tests__ │ │ │ │ └── rating-menu.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── rating-menu.tsx │ │ │ ├── refinement-list │ │ │ ├── __tests__ │ │ │ │ └── refinement-list.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── refinement-list.tsx │ │ │ ├── related-products │ │ │ ├── __tests__ │ │ │ │ └── related-products.test.tsx │ │ │ └── related-products.tsx │ │ │ ├── relevant-sort │ │ │ ├── __tests__ │ │ │ │ ├── relevant-sort-test.ts │ │ │ │ └── relevant-sort.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── relevant-sort.tsx │ │ │ ├── search-box │ │ │ ├── __tests__ │ │ │ │ └── search-box.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── search-box.tsx │ │ │ ├── sort-by │ │ │ ├── __tests__ │ │ │ │ └── sort-by.test.tsx │ │ │ └── sort-by.tsx │ │ │ ├── stats │ │ │ ├── __tests__ │ │ │ │ └── stats.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── stats.tsx │ │ │ ├── toggle-refinement │ │ │ ├── __tests__ │ │ │ │ └── toggle-refinement.test.tsx │ │ │ ├── defaultTemplates.ts │ │ │ └── toggle-refinement.tsx │ │ │ ├── trending-items │ │ │ ├── __tests__ │ │ │ │ └── trending-items.test.tsx │ │ │ └── trending-items.tsx │ │ │ └── voice-search │ │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── voice-search-test.ts.snap │ │ │ ├── voice-search-test.ts │ │ │ └── voice-search.test.tsx │ │ │ ├── defaultTemplates.tsx │ │ │ └── voice-search.tsx │ ├── stories │ │ ├── analytics.stories.ts │ │ ├── answers.stories.ts │ │ ├── autocomplete.stories.ts │ │ ├── breadcrumb.stories.ts │ │ ├── clear-refinements.stories.ts │ │ ├── configure-related-items.stories.ts │ │ ├── configure.stories.ts │ │ ├── current-refinements.stories.ts │ │ ├── dynamic-widgets.stories.ts │ │ ├── geo-search.stories.ts │ │ ├── hierarchical-menu.stories.ts │ │ ├── hits-per-page.stories.ts │ │ ├── hits.stories.ts │ │ ├── index.stories.ts │ │ ├── infinite-hits.stories.ts │ │ ├── instantsearch.stories.ts │ │ ├── menu-select.stories.ts │ │ ├── menu.stories.ts │ │ ├── numeric-menu.stories.ts │ │ ├── pagination.stories.ts │ │ ├── panel.stories.ts │ │ ├── powered-by.stories.ts │ │ ├── query-rule-context.stories.ts │ │ ├── query-rule-custom-data.stories.ts │ │ ├── range-input.stories.ts │ │ ├── range-slider.stories.ts │ │ ├── rating-menu.stories.ts │ │ ├── refinement-list.stories.ts │ │ ├── relevant-sort.stories.ts │ │ ├── search-box.stories.ts │ │ ├── sort-by.stories.ts │ │ ├── stats.stories.ts │ │ ├── toggle-refinement.stories.ts │ │ └── voice-search.stories.ts │ └── test │ │ ├── createInstantSearch.ts │ │ ├── createWidget.ts │ │ └── module │ │ ├── is-cjs-module.cjs │ │ └── is-es-module.mjs ├── react-instantsearch-core │ ├── CHANGELOG.md │ ├── README.md │ ├── global.d.ts │ ├── package.json │ ├── rollup.config.js │ ├── scripts │ │ └── version.cjs │ ├── src │ │ ├── __tests__ │ │ │ ├── compat.test.tsx │ │ │ └── insights.test.tsx │ │ ├── components │ │ │ ├── Configure.tsx │ │ │ ├── DynamicWidgets.tsx │ │ │ ├── Index.tsx │ │ │ ├── InstantSearch.tsx │ │ │ ├── InstantSearchSSRProvider.tsx │ │ │ ├── InstantSearchServerContext.ts │ │ │ └── __tests__ │ │ │ │ ├── Configure.test.tsx │ │ │ │ ├── DynamicWidgets.test.tsx │ │ │ │ ├── Index.test.tsx │ │ │ │ ├── InstantSearch.test.tsx │ │ │ │ ├── InstantSearchSSRProvider.test.tsx │ │ │ │ ├── InstantSearchServerContext.test.tsx │ │ │ │ └── routing │ │ │ │ ├── dispose-start.test.tsx │ │ │ │ ├── external-influence.test.tsx │ │ │ │ ├── modal.test.tsx │ │ │ │ ├── spa-debounced.test.tsx │ │ │ │ ├── spa-replace-state.test.tsx │ │ │ │ └── spa.test.tsx │ │ ├── connectors │ │ │ ├── __tests__ │ │ │ │ ├── useBreadcrumb.test.tsx │ │ │ │ ├── useClearRefinements.test.tsx │ │ │ │ ├── useConfigure.test.tsx │ │ │ │ ├── useCurrentRefinements.test.tsx │ │ │ │ ├── useDynamicWidgets.test.tsx │ │ │ │ ├── useGeoSearch.test.tsx │ │ │ │ ├── useHierarchicalMenu.test.tsx │ │ │ │ ├── useHits.test.tsx │ │ │ │ ├── useHitsPerPage.test.tsx │ │ │ │ ├── useInfiniteHits.test.tsx │ │ │ │ ├── useMenu.test.tsx │ │ │ │ ├── useNumericMenu.test.tsx │ │ │ │ ├── usePagination.test.tsx │ │ │ │ ├── usePoweredBy.test.tsx │ │ │ │ ├── useQueryRules.test.tsx │ │ │ │ ├── useRange.test.tsx │ │ │ │ ├── useRefinementList.test.tsx │ │ │ │ ├── useRelatedProducts.test.tsx │ │ │ │ ├── useSearchBox.test.tsx │ │ │ │ ├── useSortBy.test.tsx │ │ │ │ ├── useStats.test.tsx │ │ │ │ ├── useToggleRefinement.test.tsx │ │ │ │ └── useTrendingItems.test.tsx │ │ │ ├── useBreadcrumb.ts │ │ │ ├── useClearRefinements.ts │ │ │ ├── useConfigure.ts │ │ │ ├── useCurrentRefinements.ts │ │ │ ├── useDynamicWidgets.ts │ │ │ ├── useFrequentlyBoughtTogether.ts │ │ │ ├── useGeoSearch.ts │ │ │ ├── useHierarchicalMenu.ts │ │ │ ├── useHits.ts │ │ │ ├── useHitsPerPage.ts │ │ │ ├── useInfiniteHits.ts │ │ │ ├── useLookingSimilar.ts │ │ │ ├── useMenu.ts │ │ │ ├── useNumericMenu.ts │ │ │ ├── usePagination.ts │ │ │ ├── usePoweredBy.ts │ │ │ ├── useQueryRules.ts │ │ │ ├── useRange.ts │ │ │ ├── useRefinementList.ts │ │ │ ├── useRelatedProducts.ts │ │ │ ├── useSearchBox.ts │ │ │ ├── useSortBy.ts │ │ │ ├── useStats.ts │ │ │ ├── useToggleRefinement.ts │ │ │ └── useTrendingItems.ts │ │ ├── hooks │ │ │ ├── __tests__ │ │ │ │ ├── useConnector.test.tsx │ │ │ │ └── useInstantSearch.test.tsx │ │ │ ├── useConnector.ts │ │ │ └── useInstantSearch.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── IndexContext.ts │ │ │ ├── InstantSearchContext.ts │ │ │ ├── InstantSearchRSCContext.ts │ │ │ ├── InstantSearchSSRContext.ts │ │ │ ├── __tests__ │ │ │ │ ├── IndexContext.test.tsx │ │ │ │ ├── InstantSearchContext.test.tsx │ │ │ │ ├── InstantSearchSSRContext.test.tsx │ │ │ │ ├── createSearchResults.test.ts │ │ │ │ ├── dequal.test.ts │ │ │ │ ├── invariant.test.ts │ │ │ │ ├── useSearchResults.test.tsx │ │ │ │ ├── useSearchState.test.tsx │ │ │ │ └── warn.test.ts │ │ │ ├── createSearchResults.ts │ │ │ ├── dequal.ts │ │ │ ├── getIndexSearchResults.ts │ │ │ ├── invariant.ts │ │ │ ├── noop.ts │ │ │ ├── use.ts │ │ │ ├── useForceUpdate.ts │ │ │ ├── useIndex.ts │ │ │ ├── useIndexContext.ts │ │ │ ├── useInstantSearchApi.ts │ │ │ ├── useInstantSearchContext.ts │ │ │ ├── useInstantSearchSSRContext.ts │ │ │ ├── useInstantSearchServerContext.ts │ │ │ ├── useIsomorphicLayoutEffect.ts │ │ │ ├── useRSCContext.ts │ │ │ ├── useSearchResults.ts │ │ │ ├── useSearchState.ts │ │ │ ├── useStableValue.ts │ │ │ ├── useWidget.ts │ │ │ ├── warn.ts │ │ │ └── wrapPromiseWithState.ts │ │ ├── server │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── getServerState.test.tsx.snap │ │ │ │ └── getServerState.test.tsx │ │ │ ├── getServerState.tsx │ │ │ └── index.ts │ │ └── version.ts │ ├── test │ │ └── module │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ └── tsconfig.declaration.json ├── react-instantsearch-nextjs │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── module │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ ├── package.json │ ├── src │ │ ├── InitializePromise.ts │ │ ├── InstantSearchNext.tsx │ │ ├── TriggerSearch.ts │ │ ├── __tests__ │ │ │ ├── InitializePromise-composition.test.tsx │ │ │ ├── InitializePromise.test.tsx │ │ │ ├── InstantSearchNext.test.tsx │ │ │ └── htmlEscape.test.ts │ │ ├── createInsertHTML.tsx │ │ ├── htmlEscape.ts │ │ ├── index.ts │ │ ├── useInstantSearchRouting.ts │ │ ├── useNextHeaders.tsx │ │ └── warn.ts │ └── tsconfig.declaration.json ├── react-instantsearch-router-nextjs │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ ├── e2e │ │ │ ├── backButton.test.ts │ │ │ ├── nextLink.test.ts │ │ │ ├── onStateChange.test.ts │ │ │ └── utils.ts │ │ └── module │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ ├── e2e.d.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── utils │ │ │ ├── __tests__ │ │ │ └── stripLocaleFromUrl.test.ts │ │ │ └── stripLocaleFromUrl.ts │ ├── tsconfig.declaration.json │ ├── tsconfig.wdio.json │ ├── wdio.conf.cjs │ └── wdio.saucelabs.conf.cjs ├── react-instantsearch │ ├── CHANGELOG.md │ ├── README.md │ ├── global.d.ts │ ├── package.json │ ├── rollup.config.js │ ├── src │ │ ├── __tests__ │ │ │ ├── common-connectors.test.tsx │ │ │ ├── common-shared.test.tsx │ │ │ └── common-widgets.test.tsx │ │ ├── components │ │ │ ├── Carousel.tsx │ │ │ ├── __tests__ │ │ │ │ └── Carousel.test.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── types │ │ │ ├── PartialKeys.ts │ │ │ ├── Translatable.ts │ │ │ └── index.ts │ │ ├── ui │ │ │ ├── Breadcrumb.tsx │ │ │ ├── ClearRefinements.tsx │ │ │ ├── CurrentRefinements.tsx │ │ │ ├── HierarchicalMenu.tsx │ │ │ ├── Highlight.tsx │ │ │ ├── HitsPerPage.tsx │ │ │ ├── InfiniteHits.tsx │ │ │ ├── InternalHighlight.tsx │ │ │ ├── Menu.tsx │ │ │ ├── Pagination.tsx │ │ │ ├── PoweredBy.tsx │ │ │ ├── RangeInput.tsx │ │ │ ├── RefinementList.tsx │ │ │ ├── SearchBox.tsx │ │ │ ├── ShowMoreButton.tsx │ │ │ ├── Snippet.tsx │ │ │ ├── SortBy.tsx │ │ │ ├── Stats.tsx │ │ │ ├── ToggleRefinement.tsx │ │ │ ├── __tests__ │ │ │ │ ├── Breadcrumb.test.tsx │ │ │ │ ├── ClearRefinements.test.tsx │ │ │ │ ├── CurrentRefinements.test.tsx │ │ │ │ ├── HierarchicalMenu.test.tsx │ │ │ │ ├── HitsPerPage.test.tsx │ │ │ │ ├── InfiniteHits.test.tsx │ │ │ │ ├── Menu.test.tsx │ │ │ │ ├── Pagination.test.tsx │ │ │ │ ├── PoweredBy.test.tsx │ │ │ │ ├── RangeInput.test.tsx │ │ │ │ ├── RefinementList.test.tsx │ │ │ │ ├── SearchBox.test.tsx │ │ │ │ ├── ShowMoreButton.test.tsx │ │ │ │ ├── SortBy.test.tsx │ │ │ │ ├── Stats.test.tsx │ │ │ │ └── ToggleRefinement.test.tsx │ │ │ └── lib │ │ │ │ ├── __tests__ │ │ │ │ └── isModifierClick.test.tsx │ │ │ │ ├── capitalize.ts │ │ │ │ ├── index.ts │ │ │ │ └── isModifierClick.ts │ │ └── widgets │ │ │ ├── Breadcrumb.tsx │ │ │ ├── ClearRefinements.tsx │ │ │ ├── CurrentRefinements.tsx │ │ │ ├── FrequentlyBoughtTogether.tsx │ │ │ ├── HierarchicalMenu.tsx │ │ │ ├── Highlight.tsx │ │ │ ├── Hits.tsx │ │ │ ├── HitsPerPage.tsx │ │ │ ├── InfiniteHits.tsx │ │ │ ├── LookingSimilar.tsx │ │ │ ├── Menu.tsx │ │ │ ├── Pagination.tsx │ │ │ ├── PoweredBy.tsx │ │ │ ├── RangeInput.tsx │ │ │ ├── RefinementList.tsx │ │ │ ├── RelatedProducts.tsx │ │ │ ├── SearchBox.tsx │ │ │ ├── Snippet.tsx │ │ │ ├── SortBy.tsx │ │ │ ├── Stats.tsx │ │ │ ├── ToggleRefinement.tsx │ │ │ ├── TrendingItems.tsx │ │ │ ├── __tests__ │ │ │ ├── Breadcrumb.test.tsx │ │ │ ├── ClearRefinements.test.tsx │ │ │ ├── CurrentRefinements.test.tsx │ │ │ ├── FrequentlyBoughtTogether.test.tsx │ │ │ ├── HierarchicalMenu.test.tsx │ │ │ ├── Highlight.test.tsx │ │ │ ├── Hits.test.tsx │ │ │ ├── HitsPerPage.test.tsx │ │ │ ├── InfiniteHits.test.tsx │ │ │ ├── LookingSimilar.test.tsx │ │ │ ├── Menu.test.tsx │ │ │ ├── Pagination.test.tsx │ │ │ ├── PoweredBy.test.tsx │ │ │ ├── RangeInput.test.tsx │ │ │ ├── RefinementList.test.tsx │ │ │ ├── RelatedProducts.test.tsx │ │ │ ├── SearchBox.test.tsx │ │ │ ├── Snippet.test.tsx │ │ │ ├── SortBy.test.tsx │ │ │ ├── Stats.test.tsx │ │ │ ├── ToggleRefinement.test.tsx │ │ │ ├── TrendingItems.test.tsx │ │ │ ├── __utils__ │ │ │ │ └── all-widgets.tsx │ │ │ ├── all-components.test.tsx │ │ │ └── all-widgets.test.tsx │ │ │ └── index.ts │ ├── test │ │ └── module │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ └── tsconfig.declaration.json └── vue-instantsearch │ ├── .eslintrc.js │ ├── .storybook │ ├── addons.js │ ├── config.js │ ├── styles.css │ └── webpack.config.js │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── __mocks__ │ └── instantsearch.js │ │ └── es.js │ ├── package.json │ ├── rollup.config.js │ ├── src │ ├── __tests__ │ │ ├── common-connectors.test.js │ │ ├── common-shared.test.js │ │ ├── common-widgets.test.js │ │ └── index.js │ ├── components │ │ ├── Autocomplete.vue │ │ ├── Breadcrumb.vue │ │ ├── ClearRefinements.vue │ │ ├── Configure.js │ │ ├── ConfigureRelatedItems.js │ │ ├── CurrentRefinements.vue │ │ ├── DynamicWidgets.js │ │ ├── ExperimentalDynamicWidgets.js │ │ ├── HierarchicalMenu.vue │ │ ├── HierarchicalMenuList.vue │ │ ├── Highlight.vue │ │ ├── Highlighter.js │ │ ├── Hits.js │ │ ├── HitsPerPage.vue │ │ ├── Index.js │ │ ├── InfiniteHits.vue │ │ ├── InstantSearch.js │ │ ├── InstantSearchSsr.js │ │ ├── Menu.vue │ │ ├── MenuSelect.vue │ │ ├── NumericMenu.vue │ │ ├── Pagination.vue │ │ ├── Panel.vue │ │ ├── PoweredBy.vue │ │ ├── QueryRuleContext.js │ │ ├── QueryRuleCustomData.vue │ │ ├── RangeInput.vue │ │ ├── RatingMenu.vue │ │ ├── RefinementList.vue │ │ ├── RelevantSort.vue │ │ ├── SearchBox.vue │ │ ├── SearchInput.vue │ │ ├── Snippet.vue │ │ ├── SortBy.vue │ │ ├── StateResults.vue │ │ ├── Stats.vue │ │ ├── ToggleRefinement.vue │ │ ├── VoiceSearch.vue │ │ ├── __Template.vue │ │ └── __tests__ │ │ │ ├── Autocomplete.js │ │ │ ├── Breadcrumb.js │ │ │ ├── ClearRefinements.js │ │ │ ├── Configure.js │ │ │ ├── ConfigureRelatedItems.js │ │ │ ├── CurrentRefinements.js │ │ │ ├── DynamicWidgets.js │ │ │ ├── ExperimentalDynamicWidgets.js │ │ │ ├── HierarchicalMenu.js │ │ │ ├── Highlight.js │ │ │ ├── Hits.js │ │ │ ├── Index-integration.js │ │ │ ├── Index.js │ │ │ ├── InfiniteHits.js │ │ │ ├── InstantSearch-integration.js │ │ │ ├── InstantSearch.js │ │ │ ├── InstantSearchSsr.js │ │ │ ├── Menu.js │ │ │ ├── MenuSelect.js │ │ │ ├── NumericMenu.js │ │ │ ├── Panel.js │ │ │ ├── QueryRuleContext.js │ │ │ ├── QueryRuleCustomData.js │ │ │ ├── RangeInput.js │ │ │ ├── RatingMenu.js │ │ │ ├── RelevantSort.js │ │ │ ├── SearchBox.js │ │ │ ├── Snippet.js │ │ │ ├── SortBy.js │ │ │ ├── StateResults.js │ │ │ ├── ToggleRefinement.js │ │ │ ├── VoiceSearch.js │ │ │ ├── __Template.js │ │ │ └── __snapshots__ │ │ │ ├── Autocomplete.js.snap │ │ │ ├── Breadcrumb.js.snap │ │ │ ├── ClearRefinements.js.snap │ │ │ ├── Configure.js.snap │ │ │ ├── CurrentRefinements.js.snap │ │ │ ├── HierarchicalMenu.js.snap │ │ │ ├── Highlight.js.snap │ │ │ ├── InfiniteHits.js.snap │ │ │ ├── InstantSearch.js.snap │ │ │ ├── MenuSelect.js.snap │ │ │ ├── NumericMenu.js.snap │ │ │ ├── Panel.js.snap │ │ │ ├── Snippet.js.snap │ │ │ ├── SortBy.js.snap │ │ │ ├── StateResults.js.snap │ │ │ ├── ToggleRefinement.js.snap │ │ │ ├── VoiceSearch.js.snap │ │ │ └── __Template.js.snap │ ├── connectors │ │ ├── connectStateResults.js │ │ └── connectStateResults.test.js │ ├── instantsearch.js │ ├── instantsearch.umd.js │ ├── mixins │ │ ├── __mocks__ │ │ │ ├── panel.js │ │ │ └── widget.js │ │ ├── __tests__ │ │ │ ├── panel.test.js │ │ │ ├── suit.test.js │ │ │ └── widget.test.js │ │ ├── panel.js │ │ ├── suit.js │ │ └── widget.js │ ├── plugin.js │ ├── util │ │ ├── __tests__ │ │ │ ├── createServerRootMixin.test.js │ │ │ ├── parseAlgoliaHit.test.js │ │ │ ├── renderCompat.test.js │ │ │ ├── suit.test.js │ │ │ ├── unescape.test.js │ │ │ └── warn.test.js │ │ ├── createInstantSearchComponent.js │ │ ├── createServerRootMixin.js │ │ ├── parseAlgoliaHit.js │ │ ├── polyfills.js │ │ ├── pragma.js │ │ ├── suit.js │ │ ├── testutils │ │ │ ├── client.js │ │ │ └── helper.js │ │ ├── unescape.js │ │ ├── vue-compat │ │ │ ├── Highlighter │ │ │ │ ├── Highlighter-vue2.vue │ │ │ │ ├── index-vue2.js │ │ │ │ ├── index-vue3.js │ │ │ │ └── index.js │ │ │ ├── index-vue2.js │ │ │ ├── index-vue3.js │ │ │ └── index.js │ │ └── warn.js │ └── widgets.js │ ├── stories │ ├── Autocomplete.stories.js │ ├── Breadcrumb.stories.js │ ├── ClearRefinements.stories.js │ ├── Configure.stories.js │ ├── ConfigureRelatedItems.stories.js │ ├── CurrentRefinements.stories.js │ ├── DynamicWidgets.stories.js │ ├── HierarchicalMenu.stories.js │ ├── Highlight.stories.js │ ├── Hits.stories.js │ ├── HitsPerPage.stories.js │ ├── Index.stories.js │ ├── InfiniteHits.stories.js │ ├── InstantSearch.stories.js │ ├── MemoryRouter.js │ ├── Menu.stories.js │ ├── MenuSelect.stories.js │ ├── NumericMenu.stories.js │ ├── Pagination.stories.js │ ├── Panel.stories.js │ ├── PoweredBy.stories.js │ ├── QueryRuleContext.stories.js │ ├── QueryRuleCustomData.stories.js │ ├── RangeInput.stories.js │ ├── RatingMenu.stories.js │ ├── RefinementList.stories.js │ ├── RelevantSort.stories.js │ ├── SearchBox.stories.js │ ├── Snippet.stories.js │ ├── SortBy.stories.js │ ├── StateResults.stories.js │ ├── Stats.stories.js │ ├── ToggleRefinement.stories.js │ ├── VoiceSearch.stories.js │ ├── __Template.stories.js │ └── utils.js │ ├── test │ ├── module │ │ ├── vue2 │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ │ └── vue3 │ │ │ ├── is-cjs-module.cjs │ │ │ └── is-es-module.mjs │ └── utils │ │ ├── index.js │ │ └── sortedHtmlSerializer.js │ └── vue-instantsearch-readme.png ├── patches ├── doctoc+1.4.0.patch └── metalsmith-in-place+1.4.4.patch ├── scripts ├── .eslintrc.js ├── babel │ ├── __mocks__ │ │ └── fs.js │ ├── __tests__ │ │ ├── extension-resolver.test.js │ │ └── wrap-warning-with-dev-check.test.js │ ├── extension-resolver.js │ └── wrap-warning-with-dev-check.js ├── legacy │ ├── algoliasearch-v4-dependency-container │ │ ├── package.json │ │ └── yarn.lock │ ├── algoliasearch-v5-dependency-container │ │ ├── package.json │ │ └── yarn.lock │ ├── algoliasearch@4-dependency-container │ │ ├── package.json │ │ └── yarn.lock │ ├── algoliasearch@5-dependency-container │ │ ├── package.json │ │ └── yarn.lock │ ├── downgrade-algoliasearch-dependency.js │ └── downgrade-algoliasearch-v4.js ├── prepare-cjs.sh ├── prepare-vue3.js ├── retry.sh └── wdio │ ├── local.conf.js │ └── saucelabs.conf.js ├── ship.config.js ├── specs ├── .gitignore ├── CHANGELOG.md ├── astro.config.mjs ├── package.json ├── src │ ├── components │ │ ├── Header.astro │ │ ├── ThemeSelector.astro │ │ ├── WidgetContent.astro │ │ └── WidgetsList.astro │ ├── config.ts │ ├── env.d.ts │ ├── layouts │ │ ├── MainLayout.astro │ │ └── WidgetLayout.astro │ ├── main.js │ ├── pages │ │ ├── demo.astro │ │ ├── index.astro │ │ └── widgets │ │ │ ├── answers.md │ │ │ ├── breadcrumb.md │ │ │ ├── carousel.md │ │ │ ├── clear-refinements.md │ │ │ ├── configure.md │ │ │ ├── current-refinements.md │ │ │ ├── frequently-bought-together.md │ │ │ ├── geo-search.md │ │ │ ├── hierarchical-menu.md │ │ │ ├── highlight.md │ │ │ ├── hits-per-page.md │ │ │ ├── hits.md │ │ │ ├── infinite-hits.md │ │ │ ├── looking-similar.md │ │ │ ├── menu-select.md │ │ │ ├── menu.md │ │ │ ├── numeric-menu.md │ │ │ ├── numeric-selector.md │ │ │ ├── pagination.md │ │ │ ├── panel.md │ │ │ ├── powered-by.md │ │ │ ├── range-input.md │ │ │ ├── range-slider.md │ │ │ ├── rating-menu.md │ │ │ ├── refinement-list.md │ │ │ ├── related-products.md │ │ │ ├── reverseHighlight.md │ │ │ ├── reverseSnippet.md │ │ │ ├── search-box.md │ │ │ ├── smart-sort.md │ │ │ ├── snippet.md │ │ │ ├── sort-by.md │ │ │ ├── stats.md │ │ │ ├── toggle-refinement.md │ │ │ ├── trending-items.md │ │ │ └── voice-search.md │ ├── styles │ │ └── index.scss │ └── types.ts └── tsconfig.json ├── tests ├── babel-testfixture │ ├── nested │ │ └── index │ │ │ └── index.js │ └── package.json ├── common │ ├── .eslintrc │ ├── README.md │ ├── common.ts │ ├── connectors │ │ ├── breadcrumb │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── current-refinements │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── frequently-bought-together │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ └── state.ts │ │ ├── hierarchical-menu │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── hits-per-page │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── index.ts │ │ ├── looking-similar │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ └── state.ts │ │ ├── menu │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── numeric-menu │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── pagination │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── rating-menu │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── refinement-list │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ ├── related-products │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ └── state.ts │ │ ├── toggle-refinement │ │ │ ├── index.ts │ │ │ └── routing.ts │ │ └── trending-items │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ └── state.ts │ ├── index.ts │ ├── package.json │ ├── shared │ │ ├── index.ts │ │ ├── insights.ts │ │ └── routing.ts │ └── widgets │ │ ├── breadcrumb │ │ ├── index.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── clear-refinements │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.tsx │ │ ├── current-refinements │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── dynamic-widgets │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── frequently-bought-together │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── hierarchical-menu │ │ ├── index.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── hits-per-page │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── hits │ │ ├── index.ts │ │ ├── insights.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── index.ts │ │ ├── infinite-hits │ │ ├── index.ts │ │ ├── insights.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── instantsearch │ │ ├── algolia-agent.ts │ │ └── index.ts │ │ ├── looking-similar │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── menu-select │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── menu │ │ ├── index.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── numeric-menu │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── pagination │ │ ├── index.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── powered-by │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── range-input │ │ ├── behaviour.ts │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── rating-menu │ │ ├── behaviour.ts │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── refinement-list │ │ ├── index.ts │ │ ├── links.ts │ │ ├── optimistic-ui.ts │ │ └── options.ts │ │ ├── related-products │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── search-box │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── sort-by │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── stats │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ ├── toggle-refinement │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts │ │ └── trending-items │ │ ├── index.ts │ │ ├── links.ts │ │ └── options.ts ├── e2e │ ├── .gitignore │ ├── CONTRIBUTING.md │ ├── README.md │ ├── all-flavors.spec.ts │ ├── flavors.js │ ├── helpers │ │ ├── clickClearRefinements.ts │ │ ├── clickHierarchicalMenuItem.ts │ │ ├── clickNextPage.ts │ │ ├── clickPage.ts │ │ ├── clickPreviousPage.ts │ │ ├── clickRatingMenuItem.ts │ │ ├── clickRefinementListItem.ts │ │ ├── clickToggleRefinement.ts │ │ ├── dragAndDropByOffset.ts │ │ ├── dragRangeSliderLowerBoundTo.ts │ │ ├── dragRangeSliderUpperBoundTo.ts │ │ ├── getCurrentPage.ts │ │ ├── getHitsPerPage.ts │ │ ├── getHitsTitles.ts │ │ ├── getRangeSliderLowerBoundValue.ts │ │ ├── getRangeSliderUpperBoundValue.ts │ │ ├── getSearchBoxValue.ts │ │ ├── getSelectedHierarchicalMenuItems.ts │ │ ├── getSelectedRatingMenuItem.ts │ │ ├── getSelectedRefinementListItem.ts │ │ ├── getSortByValue.ts │ │ ├── getTextFromSelector.ts │ │ ├── getToggleRefinementStatus.ts │ │ ├── index.ts │ │ ├── selectors.ts │ │ ├── setHitsPerPage.ts │ │ ├── setSearchBoxValue.ts │ │ ├── setSortByValue.ts │ │ └── waitForElement.ts │ ├── index.js │ ├── package.json │ ├── specs │ │ ├── brand-and-query.spec.ts │ │ ├── category.spec.ts │ │ ├── initial-state-from-route.spec.ts │ │ ├── pagination.spec.ts │ │ └── price-range.spec.ts │ ├── tsconfig.json │ ├── wdio.base.conf.js │ ├── wdio.local.conf.js │ └── wdio.saucelabs.conf.js ├── mocks │ ├── __tests__ │ │ └── createAPIResponse.test.ts │ ├── createAPIResponse.ts │ ├── createAlgoliaSearchClient.ts │ ├── createCompositionClient.ts │ ├── createInsightsClient.ts │ ├── createSearchClient.ts │ ├── fixtures │ │ ├── index.ts │ │ └── recommendations.ts │ ├── index.ts │ └── package.json ├── umd.test.ts ├── utils │ ├── InstantSearchTestWrapper.tsx │ ├── ansiSnapshotSerializer.cjs │ ├── castToJestMock.ts │ ├── createInstantSearchSpy.tsx │ ├── enzyme.ts │ ├── index.ts │ ├── matchers │ │ ├── __tests__ │ │ │ └── toWarnDev-test.ts │ │ ├── index.ts │ │ ├── toMatchNormalizedInlineSnapshot.ts │ │ ├── toWarnDev.ts │ │ └── vue.ts │ ├── normalizeSnapshot.ts │ ├── package.json │ ├── runAllMicroTasks.ts │ ├── setupTests.ts │ ├── wait.ts │ └── widgetSnapshotSerializer.ts └── versions │ └── index.js ├── tsconfig.declaration.json ├── tsconfig.json ├── tsconfig.v3.json ├── tsconfig.v4.json ├── website ├── _redirects └── stories │ └── .gitkeep └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Introduced prettier 2 | 25cd787e6a06502ee3a85648f90f693276cca671 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Feature Request 4 | url: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage&title=Feature%20request%3A%20 5 | about: Request a feature to add to InstantSearch. 6 | - name: Ask a Question 7 | url: https://github.com/algolia/instantsearch/discussions/new?category=q-a&labels=triage 8 | about: Ask questions and discuss with other community members. 9 | -------------------------------------------------------------------------------- /.github/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/.github/banner.png -------------------------------------------------------------------------------- /.github/example-e-commerce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/.github/example-e-commerce.png -------------------------------------------------------------------------------- /.github/example-media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/.github/example-media.png -------------------------------------------------------------------------------- /.github/example-tourism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/.github/example-tourism.png -------------------------------------------------------------------------------- /.github/react-instantsearch-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/.github/react-instantsearch-banner.png -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20.10.0 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | packages/*/CHANGELOG.md 2 | examples/**/polyfills.js 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | save-prefix "" 6 | yarn-path ".yarn/releases/yarn-1.22.10.cjs" 7 | -------------------------------------------------------------------------------- /examples/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | extends: path.join(__dirname, '..', '.eslintrc.js'), 5 | rules: { 6 | 'import/no-unresolved': 'off', 7 | 'import/named': 'off', 8 | 'react/prop-types': 'off', 9 | '@typescript-eslint/consistent-type-imports': ['off'], 10 | '@typescript-eslint/no-use-before-define': ['off'], 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /examples/js/algolia-experiences/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/algolia-experiences/favicon.png -------------------------------------------------------------------------------- /examples/js/calendar-widget/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | .cache 3 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce-umd/favicon.png -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "E-commerce UMD", 3 | "name": "InstantSearch.js E-commerce UMD Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#e2a400", 14 | "background_color": "#fff" 15 | } 16 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/app.ts: -------------------------------------------------------------------------------- 1 | import search from './search'; 2 | import { attachEventListeners } from './ui'; 3 | 4 | search.start(); 5 | attachEventListeners(); 6 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/global.d.ts: -------------------------------------------------------------------------------- 1 | import instantsearch from 'instantsearch.js/dist/instantsearch.production.min'; 2 | 3 | declare global { 4 | interface Window { 5 | instantsearch: typeof instantsearch; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/images/cover-mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce-umd/src/images/cover-mobile.jpg -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce-umd/src/images/cover.jpg -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/widgets/Configuration.ts: -------------------------------------------------------------------------------- 1 | const { configure } = window.instantsearch.widgets; 2 | 3 | export const configuration = configure({ 4 | attributesToSnippet: ['description:10'], 5 | snippetEllipsisText: '…', 6 | removeWordsIfNoResults: 'allOptional', 7 | }); 8 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/widgets/PriceSlider.css: -------------------------------------------------------------------------------- 1 | .ais-RangeSlider .rheostat-tooltip::before { 2 | color: #e2a400; 3 | content: '$'; 4 | font-size: 0.6; 5 | margin-right: 4px; 6 | } 7 | 8 | @media (max-width: 899px) { 9 | .ais-RangeSlider .rheostat-handle { 10 | height: 1.5rem; 11 | top: -12px; 12 | width: 1.5rem; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/widgets/ResultsNumberMobile.ts: -------------------------------------------------------------------------------- 1 | const { stats } = window.instantsearch.widgets; 2 | 3 | export const resultsNumberMobile = stats({ 4 | container: '[data-widget="results-number-mobile"]', 5 | templates: { 6 | text({ nbHits }, { html }) { 7 | return html`${nbHits.toLocaleString()} results`; 8 | }, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/src/widgets/SaveFiltersMobile.ts: -------------------------------------------------------------------------------- 1 | const { stats } = window.instantsearch.widgets; 2 | 3 | export const saveFiltersMobile = stats({ 4 | container: '[data-widget="save-filters-mobile"]', 5 | templates: { 6 | text({ nbHits }, { html }) { 7 | return html` 8 | 11 | `; 12 | }, 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /examples/js/e-commerce-umd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es6", "dom", "dom.iterable"], 4 | "baseUrl": ".", 5 | "downlevelIteration": true, 6 | "esModuleInterop": true, 7 | "strict": true, 8 | "noImplicitAny": true, 9 | }, 10 | "include": [ 11 | "src", 12 | "src/global.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /examples/js/e-commerce/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /examples/js/e-commerce/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /examples/js/e-commerce/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /examples/js/e-commerce/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce/favicon.png -------------------------------------------------------------------------------- /examples/js/e-commerce/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "E-commerce", 3 | "name": "InstantSearch.js E-commerce Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#e2a400", 14 | "background_color": "#fff" 15 | } 16 | -------------------------------------------------------------------------------- /examples/js/e-commerce/src/app.ts: -------------------------------------------------------------------------------- 1 | import search from './search'; 2 | import { attachEventListeners } from './ui'; 3 | 4 | import 'instantsearch.css/themes/reset.css'; 5 | 6 | search.start(); 7 | attachEventListeners(); 8 | -------------------------------------------------------------------------------- /examples/js/e-commerce/src/images/cover-mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce/src/images/cover-mobile.jpg -------------------------------------------------------------------------------- /examples/js/e-commerce/src/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/e-commerce/src/images/cover.jpg -------------------------------------------------------------------------------- /examples/js/e-commerce/src/widgets/Configuration.ts: -------------------------------------------------------------------------------- 1 | import { configure } from 'instantsearch.js/es/widgets'; 2 | 3 | export const configuration = configure({ 4 | attributesToSnippet: ['description:10'], 5 | snippetEllipsisText: '…', 6 | removeWordsIfNoResults: 'allOptional', 7 | }); 8 | -------------------------------------------------------------------------------- /examples/js/e-commerce/src/widgets/PriceSlider.css: -------------------------------------------------------------------------------- 1 | .ais-RangeSlider .rheostat-tooltip::before { 2 | color: #e2a400; 3 | content: '$'; 4 | font-size: 0.6; 5 | margin-right: 4px; 6 | } 7 | 8 | @media (max-width: 899px) { 9 | .ais-RangeSlider .rheostat-handle { 10 | height: 1.5rem; 11 | top: -12px; 12 | width: 1.5rem; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/js/e-commerce/src/widgets/ResultsNumberMobile.ts: -------------------------------------------------------------------------------- 1 | import { stats } from 'instantsearch.js/es/widgets'; 2 | 3 | export const resultsNumberMobile = stats({ 4 | container: '[data-widget="results-number-mobile"]', 5 | templates: { 6 | text({ nbHits }, { html }) { 7 | return html`${nbHits.toLocaleString()} results`; 8 | }, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /examples/js/e-commerce/src/widgets/SaveFiltersMobile.ts: -------------------------------------------------------------------------------- 1 | import { stats } from 'instantsearch.js/es/widgets'; 2 | 3 | export const saveFiltersMobile = stats({ 4 | container: '[data-widget="save-filters-mobile"]', 5 | templates: { 6 | text({ nbHits }, { html }) { 7 | return html` 8 | 11 | `; 12 | }, 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /examples/js/e-commerce/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es6", "dom", "dom.iterable"], 4 | "baseUrl": ".", 5 | "downlevelIteration": true, 6 | "esModuleInterop": true, 7 | "strict": true, 8 | "noImplicitAny": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/js/getting-started/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /examples/js/getting-started/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/getting-started/favicon.png -------------------------------------------------------------------------------- /examples/js/getting-started/src/index.css: -------------------------------------------------------------------------------- 1 | body, 2 | h1 { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 9 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 10 | } 11 | -------------------------------------------------------------------------------- /examples/js/media/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /examples/js/media/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /examples/js/media/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /examples/js/media/capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/media/capture.png -------------------------------------------------------------------------------- /examples/js/media/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/media/favicon.png -------------------------------------------------------------------------------- /examples/js/media/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Media", 3 | "name": "InstantSearch.js Media Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#667eea", 14 | "background_color": "#fcfefe" 15 | } 16 | -------------------------------------------------------------------------------- /examples/js/media/src/app.ts: -------------------------------------------------------------------------------- 1 | import search from './search'; 2 | import { enhanceUi } from './ui'; 3 | 4 | search.start(); 5 | enhanceUi(); 6 | -------------------------------------------------------------------------------- /examples/js/media/src/utils/formatNumbers.ts: -------------------------------------------------------------------------------- 1 | export function formatNumber(value: number) { 2 | return Number(value).toLocaleString(); 3 | } 4 | -------------------------------------------------------------------------------- /examples/js/media/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dateRanges'; 2 | export * from './formatNumbers'; 3 | export * from './windowSize'; 4 | -------------------------------------------------------------------------------- /examples/js/media/src/utils/windowSize.ts: -------------------------------------------------------------------------------- 1 | export function isWindowMaxSize(size: number) { 2 | return window.matchMedia(`(max-width: ${size}px)`).matches; 3 | } 4 | 5 | export const isWindowMediumSize = isWindowMaxSize(1200); 6 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/ClearFilters.ts: -------------------------------------------------------------------------------- 1 | import { clearRefinements } from 'instantsearch.js/es/widgets'; 2 | 3 | export const createClearFilters = ({ container }: { container: string }) => 4 | clearRefinements({ 5 | container, 6 | excludedAttributes: ['categories', 'query'], 7 | templates: { 8 | resetLabel() { 9 | return 'Clear filters'; 10 | }, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/Configuration.ts: -------------------------------------------------------------------------------- 1 | import { configure } from 'instantsearch.js/es/widgets'; 2 | 3 | export const configuration = configure({ 4 | attributesToSnippet: ['content:20'], 5 | snippetEllipsisText: '…', 6 | }); 7 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/SearchBox.ts: -------------------------------------------------------------------------------- 1 | import { searchBox as searchBoxWidget } from 'instantsearch.js/es/widgets'; 2 | 3 | export const searchBox = searchBoxWidget({ 4 | container: '[data-widget="searchbox"]', 5 | placeholder: 'Articles, categories or authors', 6 | showSubmit: false, 7 | }); 8 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/SeeResults.ts: -------------------------------------------------------------------------------- 1 | import { stats } from 'instantsearch.js/es/widgets'; 2 | 3 | export const seeResults = stats({ 4 | container: '[data-widget="see-results-button"]', 5 | templates: { 6 | text({ nbHits }, { html }) { 7 | return html` See ${nbHits.toLocaleString()} articles `; 8 | }, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/SelectedTopics.ts: -------------------------------------------------------------------------------- 1 | import { currentRefinements } from 'instantsearch.js/es/widgets'; 2 | 3 | export const createSelectedTopics = ({ container }: { container: string }) => 4 | currentRefinements({ 5 | container, 6 | includedAttributes: ['categories'], 7 | }); 8 | -------------------------------------------------------------------------------- /examples/js/media/src/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Articles'; 2 | export * from './Authors'; 3 | export * from './ClearFilters'; 4 | export * from './Configuration'; 5 | export * from './Dates'; 6 | export * from './SearchBox'; 7 | export * from './SelectedTopics'; 8 | export * from './Stats'; 9 | export * from './Topics'; 10 | export * from './SeeResults'; 11 | -------------------------------------------------------------------------------- /examples/js/tourism/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | .cache 3 | -------------------------------------------------------------------------------- /examples/js/tourism/capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/tourism/capture.png -------------------------------------------------------------------------------- /examples/js/tourism/logo-is.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/js/tourism/logo-is.png -------------------------------------------------------------------------------- /examples/react/default-theme/src/components/QueryRuleContext.tsx: -------------------------------------------------------------------------------- 1 | import { useQueryRules, UseQueryRulesProps } from 'react-instantsearch-core'; 2 | 3 | export type QueryRuleContextProps = Partial< 4 | Pick 5 | >; 6 | 7 | export function QueryRuleContext(props: QueryRuleContextProps) { 8 | useQueryRules(props); 9 | return null; 10 | } 11 | -------------------------------------------------------------------------------- /examples/react/default-theme/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './NumericMenu'; 2 | export * from './Panel'; 3 | export * from './QueryRuleContext'; 4 | export * from './QueryRuleCustomData'; 5 | export * from './Refresh'; 6 | -------------------------------------------------------------------------------- /examples/react/default-theme/src/components/layout/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './Tabs'; 2 | -------------------------------------------------------------------------------- /examples/react/default-theme/src/cx.ts: -------------------------------------------------------------------------------- 1 | export function cx( 2 | ...classNames: Array 3 | ) { 4 | return classNames.filter(Boolean).join(' '); 5 | } 6 | -------------------------------------------------------------------------------- /examples/react/default-theme/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | 4 | import { App } from './App'; 5 | 6 | createRoot(document.getElementById('root')!).render(); 7 | -------------------------------------------------------------------------------- /examples/react/default-theme/src/isModifierClick.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function isModifierClick(event: React.MouseEvent) { 4 | const isMiddleClick = event.button === 1; 5 | return Boolean( 6 | isMiddleClick || 7 | event.altKey || 8 | event.ctrlKey || 9 | event.metaKey || 10 | event.shiftKey 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /examples/react/e-commerce/assets/cover-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/e-commerce/assets/cover-mobile.png -------------------------------------------------------------------------------- /examples/react/e-commerce/assets/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/e-commerce/assets/cover.png -------------------------------------------------------------------------------- /examples/react/e-commerce/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/e-commerce/assets/favicon.png -------------------------------------------------------------------------------- /examples/react/e-commerce/assets/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "E-commerce", 3 | "name": "React InstantSearch E-commerce Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "../index.html", 12 | "display": "standalone", 13 | "theme_color": "#e2a400", 14 | "background_color": "#fff" 15 | } 16 | -------------------------------------------------------------------------------- /examples/react/e-commerce/components/Pagination.css: -------------------------------------------------------------------------------- 1 | .ais-Pagination--noRefinement { 2 | display: none; 3 | } 4 | -------------------------------------------------------------------------------- /examples/react/e-commerce/components/ResultsNumberMobile.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useInstantSearch } from 'react-instantsearch'; 3 | 4 | import { formatNumber } from '../utils'; 5 | 6 | export function ResultsNumberMobile() { 7 | const { 8 | results: { nbHits }, 9 | } = useInstantSearch(); 10 | 11 | return ( 12 |
13 | {formatNumber(nbHits)} results 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /examples/react/e-commerce/components/SaveFiltersMobile.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useInstantSearch } from 'react-instantsearch'; 3 | 4 | import { formatNumber } from '../utils'; 5 | 6 | export function SaveFiltersMobile({ onClick }: { onClick: () => void }) { 7 | const { 8 | results: { nbHits }, 9 | } = useInstantSearch(); 10 | 11 | return ( 12 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /examples/react/e-commerce/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './AlgoliaSvg'; 2 | export * from './ClearFilters'; 3 | export * from './ClearFiltersMobile'; 4 | export * from './NoResults'; 5 | export * from './NoResultsBoundary'; 6 | export * from './Panel'; 7 | export * from './PriceSlider'; 8 | export * from './Ratings'; 9 | export * from './ResultsNumberMobile'; 10 | export * from './SaveFiltersMobile'; 11 | -------------------------------------------------------------------------------- /examples/react/e-commerce/cx.ts: -------------------------------------------------------------------------------- 1 | export function cx( 2 | ...classNames: Array 3 | ) { 4 | return classNames.filter(Boolean).join(' '); 5 | } 6 | -------------------------------------------------------------------------------- /examples/react/e-commerce/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | 4 | import { App } from './App'; 5 | 6 | createRoot(document.getElementById('root')!).render(); 7 | -------------------------------------------------------------------------------- /examples/react/e-commerce/utils/index.ts: -------------------------------------------------------------------------------- 1 | export function formatNumber(number: string | number): string { 2 | return Number(number).toLocaleString(); 3 | } 4 | 5 | export function cx( 6 | ...classNames: Array 7 | ) { 8 | return classNames.filter(Boolean).join(' '); 9 | } 10 | -------------------------------------------------------------------------------- /examples/react/getting-started/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /examples/react/getting-started/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | .parcel-cache 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode 17 | .idea 18 | .DS_Store 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /examples/react/getting-started/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/getting-started/favicon.png -------------------------------------------------------------------------------- /examples/react/getting-started/src/Panel.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | type PanelProps = React.PropsWithChildren<{ 4 | header: string; 5 | }>; 6 | 7 | export function Panel({ header, children }: PanelProps) { 8 | return ( 9 |
10 |
11 | {header} 12 |
13 |
{children}
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /examples/react/getting-started/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | 4 | import { App } from './App'; 5 | 6 | createRoot(document.getElementById('root')!).render(); 7 | -------------------------------------------------------------------------------- /examples/react/getting-started/src/products.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | 4 | import { Product } from './Product'; 5 | 6 | const searchParams = new URLSearchParams(document.location.search); 7 | 8 | const pid = searchParams.get('pid'); 9 | 10 | createRoot(document.getElementById('root')!).render(); 11 | -------------------------------------------------------------------------------- /examples/react/next-app-router/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@next/next/recommended"], 3 | "rules": { 4 | // This rule is not able to find the `pages/` folder in the monorepo. 5 | "@next/next/no-html-link-for-pages": ["off"], 6 | "react/react-in-jsx-scope": "off", 7 | "spaced-comment": ["error", "always", { "markers": ["/"] }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/react/next-app-router/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/next-app-router/app/favicon.ico -------------------------------------------------------------------------------- /examples/react/next-app-router/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css'; 2 | import 'instantsearch.css/themes/satellite-min.css'; 3 | import React from 'react'; 4 | 5 | export const metadata = { 6 | title: 'Next.js', 7 | description: 'Generated by Next.js', 8 | }; 9 | 10 | export default function RootLayout({ 11 | children, 12 | }: { 13 | children: React.ReactNode; 14 | }) { 15 | return ( 16 | 17 | {children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /examples/react/next-app-router/app/page.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { responsesCache } from '../lib/client'; 4 | 5 | import Search from './Search'; 6 | 7 | export const dynamic = 'force-dynamic'; 8 | 9 | export default function Page() { 10 | responsesCache.clear(); 11 | 12 | return ; 13 | } 14 | -------------------------------------------------------------------------------- /examples/react/next-app-router/lib/client.tsx: -------------------------------------------------------------------------------- 1 | import { createMemoryCache } from '@algolia/client-common'; 2 | import { liteClient as algoliasearch } from 'algoliasearch/lite'; 3 | 4 | export const responsesCache = createMemoryCache(); 5 | export const client = algoliasearch( 6 | 'latency', 7 | '6be0576ff61c053d5f9a3225e2a90f76', 8 | { responsesCache } 9 | ); 10 | -------------------------------------------------------------------------------- /examples/react/next-app-router/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /examples/react/next-routing/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@next/next/recommended"], 3 | "rules": { 4 | // This rule is not able to find the `pages/` folder in the monorepo. 5 | "@next/next/no-html-link-for-pages": ["off"], 6 | "react/react-in-jsx-scope": "off", 7 | "spaced-comment": ["error", "always", { "markers": ["/"] }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/react/next-routing/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /examples/react/next-routing/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | i18n: { 3 | // These are all the locales you want to support in 4 | // your application 5 | locales: ['en-US', 'fr', 'nl-NL'], 6 | // This is the default locale you want to be used when visiting 7 | // a non-locale prefixed path e.g. `/hello` 8 | defaultLocale: 'en-US', 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /examples/react/next-routing/pages/_app.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import '../styles/globals.css'; 3 | import 'instantsearch.css/themes/satellite-min.css'; 4 | 5 | function MyApp({ Component, pageProps }) { 6 | return ; 7 | } 8 | 9 | export default MyApp; 10 | -------------------------------------------------------------------------------- /examples/react/next-routing/pages/other-page.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import type { NextPage } from 'next'; 4 | 5 | const OtherPage: NextPage = () => { 6 | return <>Other page; 7 | }; 8 | 9 | export default OtherPage; 10 | -------------------------------------------------------------------------------- /examples/react/next-routing/utils/cx.ts: -------------------------------------------------------------------------------- 1 | export function cx( 2 | ...classNames: Array 3 | ) { 4 | return classNames.filter(Boolean).join(' '); 5 | } 6 | -------------------------------------------------------------------------------- /examples/react/next/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@next/next/recommended"], 3 | "rules": { 4 | // This rule is not able to find the `pages/` folder in the monorepo. 5 | "@next/next/no-html-link-for-pages": ["off"], 6 | "react/react-in-jsx-scope": "off", 7 | "spaced-comment": ["error", "always", { "markers": ["/"] }] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/react/next/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /examples/react/next/pages/_app.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import '../styles/globals.css'; 3 | import 'instantsearch.css/themes/satellite-min.css'; 4 | 5 | function MyApp({ Component, pageProps }) { 6 | return ; 7 | } 8 | 9 | export default MyApp; 10 | -------------------------------------------------------------------------------- /examples/react/next/styles/globals.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | padding: 0; 4 | margin: 0; 5 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 6 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 7 | } 8 | 9 | body { 10 | padding: 0.5rem; 11 | } 12 | 13 | * { 14 | box-sizing: border-box; 15 | } 16 | 17 | .Container { 18 | display: grid; 19 | align-items: flex-start; 20 | grid-template-columns: minmax(min-content, 200px) 1fr; 21 | gap: 0.5rem; 22 | } 23 | -------------------------------------------------------------------------------- /examples/react/next/utils/cx.ts: -------------------------------------------------------------------------------- 1 | export function cx( 2 | ...classNames: Array 3 | ) { 4 | return classNames.filter(Boolean).join(' '); 5 | } 6 | -------------------------------------------------------------------------------- /examples/react/react-native/.eslintignore: -------------------------------------------------------------------------------- 1 | *.tsx? 2 | -------------------------------------------------------------------------------- /examples/react/react-native/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | // This rule fails on code from the `react-native` module. 4 | "import/namespace": "off" 5 | }, 6 | "parserOptions": { 7 | "project": "tsconfig.json" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/react/react-native/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /examples/react/react-native/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /examples/react/react-native/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/react-native/assets/adaptive-icon.png -------------------------------------------------------------------------------- /examples/react/react-native/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/react-native/assets/favicon.png -------------------------------------------------------------------------------- /examples/react/react-native/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/react-native/assets/icon.png -------------------------------------------------------------------------------- /examples/react/react-native/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/react/react-native/assets/splash.png -------------------------------------------------------------------------------- /examples/react/react-native/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /examples/react/react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/react/ssr/.codesandbox/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://codesandbox.io/schemas/tasks.json", 3 | "setupTasks": [ 4 | "yarn config set cache-folder /project/workspace/.cache", 5 | "yarn install" 6 | ], 7 | "tasks": { 8 | "start-app": { 9 | "name": "Run Dev Server", 10 | "command": "yarn start", 11 | "runAtStart": true, 12 | "preview": { 13 | "port": 8080 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/react/ssr/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | // this example is using CJS 4 | 'no-restricted-imports': 'off', 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/react/ssr/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_STORE 3 | .idea 4 | dist 5 | npm-debug.log 6 | -------------------------------------------------------------------------------- /examples/react/ssr/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "browsers": ["last 2 versions", "ie >= 9"] 8 | } 9 | } 10 | ], 11 | "@babel/preset-react" 12 | ], 13 | "plugins": ["@babel/plugin-transform-optional-chaining"] 14 | } 15 | -------------------------------------------------------------------------------- /examples/react/ssr/src/browser.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { hydrateRoot } from 'react-dom/client'; 3 | 4 | import App from './App'; 5 | 6 | const SERVER_STATE = window.__SERVER_STATE__; 7 | 8 | delete window.__SERVER_STATE__; 9 | 10 | hydrateRoot( 11 | document.querySelector('#root'), 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /examples/react/ssr/src/cx.js: -------------------------------------------------------------------------------- 1 | export function cx(...classNames) { 2 | return classNames.filter(Boolean).join(' '); 3 | } 4 | -------------------------------------------------------------------------------- /examples/react/ssr/src/searchClient.js: -------------------------------------------------------------------------------- 1 | import { createMemoryCache } from '@algolia/client-common'; 2 | import { liteClient as algoliasearch } from 'algoliasearch/lite'; 3 | 4 | export const responsesCache = createMemoryCache(); 5 | export const searchClient = algoliasearch( 6 | 'latency', 7 | '6be0576ff61c053d5f9a3225e2a90f76', 8 | { 9 | responsesCache, 10 | } 11 | ); 12 | -------------------------------------------------------------------------------- /examples/vue/default-theme/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /examples/vue/default-theme/README.md: -------------------------------------------------------------------------------- 1 | # default-theme 2 | 3 | [![Edit default-theme](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/algolia/instantsearch/tree/master/examples/vue/default-theme) 4 | 5 | ## Project setup 6 | 7 | ``` 8 | yarn install 9 | ``` 10 | 11 | ### Compiles and hot-reloads for development 12 | 13 | ``` 14 | yarn run dev 15 | ``` 16 | 17 | ### Compiles and minifies for production 18 | 19 | ``` 20 | yarn run build 21 | ``` 22 | -------------------------------------------------------------------------------- /examples/vue/default-theme/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: ['@babel/plugin-proposal-optional-chaining'], 4 | sourceType: 'unambiguous', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/default-theme/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/default-theme/public/favicon.ico -------------------------------------------------------------------------------- /examples/vue/default-theme/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import InstantSearch from 'vue-instantsearch/vue2/es'; 3 | 4 | import './App.css'; 5 | import App from './App.vue'; 6 | 7 | Vue.use(InstantSearch); 8 | 9 | Vue.config.productionTip = false; 10 | 11 | new Vue({ 12 | render: (h) => h(App), 13 | }).$mount('#app'); 14 | -------------------------------------------------------------------------------- /examples/vue/default-theme/vite.config.mjs: -------------------------------------------------------------------------------- 1 | import vue from '@vitejs/plugin-vue2'; 2 | import { defineConfig } from 'vite'; 3 | import commonjs from 'vite-plugin-commonjs'; 4 | 5 | export default defineConfig({ 6 | plugins: [commonjs(), vue()], 7 | }); 8 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "proseWrap": "never", 3 | "singleQuote": true, 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/README.md: -------------------------------------------------------------------------------- 1 | # E-commerce demo 2 | 3 | [![Edit e-commerce](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/algolia/instantsearch/tree/master/examples/vue/e-commerce) 4 | 5 | ## Project setup 6 | 7 | ``` 8 | yarn install 9 | ``` 10 | 11 | ### Compiles and hot-reloads for development 12 | 13 | ``` 14 | yarn run dev 15 | ``` 16 | 17 | ### Compiles and minifies for production 18 | 19 | ``` 20 | yarn run build 21 | ``` 22 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: ['@babel/plugin-proposal-optional-chaining'], 4 | sourceType: 'unambiguous', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/e-commerce/public/favicon.png -------------------------------------------------------------------------------- /examples/vue/e-commerce/public/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "E-commerce", 3 | "name": "Vue InstantSearch E-commerce Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#e2a400", 14 | "background_color": "#fff" 15 | } 16 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/src/images/cover-mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/e-commerce/src/images/cover-mobile.jpg -------------------------------------------------------------------------------- /examples/vue/e-commerce/src/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/e-commerce/src/images/cover.jpg -------------------------------------------------------------------------------- /examples/vue/e-commerce/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import InstantSearch from 'vue-instantsearch'; 3 | 4 | import './Theme.css'; 5 | import './App.css'; 6 | import './App.mobile.css'; 7 | import './widgets/PriceSlider.css'; 8 | import App from './App.vue'; 9 | 10 | Vue.use(InstantSearch); 11 | 12 | Vue.config.productionTip = false; 13 | 14 | new Vue({ 15 | render: (h) => h(App), 16 | }).$mount('#app'); 17 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/src/utils.js: -------------------------------------------------------------------------------- 1 | export function formatNumber(value) { 2 | return Number(value).toLocaleString(); 3 | } 4 | -------------------------------------------------------------------------------- /examples/vue/e-commerce/vite.config.mjs: -------------------------------------------------------------------------------- 1 | import vue from '@vitejs/plugin-vue2'; 2 | import { defineConfig } from 'vite'; 3 | import commonjs from 'vite-plugin-commonjs'; 4 | 5 | export default defineConfig({ 6 | plugins: [commonjs(), vue()], 7 | build: { 8 | commonjsOptions: { 9 | requireReturnsDefault: 'preferred', 10 | }, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /examples/vue/getting-started/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /examples/vue/getting-started/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /examples/vue/getting-started/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: ['@babel/plugin-syntax-dynamic-import'], 4 | sourceType: 'unambiguous', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/getting-started/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/getting-started/public/favicon.png -------------------------------------------------------------------------------- /examples/vue/getting-started/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import InstantSearch from 'vue-instantsearch'; 3 | 4 | import App from './App.vue'; 5 | 6 | Vue.config.productionTip = false; 7 | 8 | Vue.use(InstantSearch); 9 | 10 | new Vue({ 11 | render: (h) => h(App), 12 | }).$mount('#app'); 13 | -------------------------------------------------------------------------------- /examples/vue/getting-started/vite.config.mjs: -------------------------------------------------------------------------------- 1 | import vue from '@vitejs/plugin-vue2'; 2 | import { defineConfig } from 'vite'; 3 | import commonjs from 'vite-plugin-commonjs'; 4 | 5 | export default defineConfig({ 6 | plugins: [commonjs(), vue()], 7 | }); 8 | -------------------------------------------------------------------------------- /examples/vue/media/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /examples/vue/media/README.md: -------------------------------------------------------------------------------- 1 | # media 2 | 3 | [![Edit media](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/algolia/instantsearch/tree/master/examples/vue/media) 4 | 5 | ## Project setup 6 | 7 | ``` 8 | yarn install 9 | ``` 10 | 11 | ### Compiles and hot-reloads for development 12 | 13 | ``` 14 | yarn run dev 15 | ``` 16 | 17 | ### Compiles and minifies for production 18 | 19 | ``` 20 | yarn run build 21 | ``` 22 | -------------------------------------------------------------------------------- /examples/vue/media/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: ['@babel/plugin-proposal-optional-chaining'], 4 | sourceType: 'unambiguous', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/media/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/media/public/favicon.ico -------------------------------------------------------------------------------- /examples/vue/media/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import InstantSearch from 'vue-instantsearch'; 3 | 4 | import './App.css'; 5 | import App from './App.vue'; 6 | 7 | Vue.use(InstantSearch); 8 | 9 | Vue.config.productionTip = false; 10 | 11 | new Vue({ 12 | render: (h) => h(App), 13 | }).$mount('#app'); 14 | -------------------------------------------------------------------------------- /examples/vue/media/vite.config.mjs: -------------------------------------------------------------------------------- 1 | import vue from '@vitejs/plugin-vue2'; 2 | import { defineConfig } from 'vite'; 3 | import commonjs from 'vite-plugin-commonjs'; 4 | 5 | export default defineConfig({ 6 | plugins: [commonjs(), vue()], 7 | }); 8 | -------------------------------------------------------------------------------- /examples/vue/nuxt/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Application Layouts. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). 8 | -------------------------------------------------------------------------------- /examples/vue/nuxt/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 26 | -------------------------------------------------------------------------------- /examples/vue/nuxt/nuxt.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | build: { 3 | transpile: ['vue-instantsearch', 'instantsearch.js/es'], 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/nuxt/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. The framework reads all the `*.vue` files inside this directory and create the router of your application. 4 | 5 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). 6 | -------------------------------------------------------------------------------- /examples/vue/nuxt/pages/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /examples/vue/nuxt/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your static files. Each file inside this directory is mapped to `/`. 6 | 7 | Example: `/static/robots.txt` is mapped as `/robots.txt`. 8 | 9 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static). 10 | -------------------------------------------------------------------------------- /examples/vue/nuxt/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/nuxt/static/favicon.ico -------------------------------------------------------------------------------- /examples/vue/ssr/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /examples/vue/ssr/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /examples/vue/ssr/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | }; 4 | -------------------------------------------------------------------------------- /examples/vue/ssr/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {}, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /examples/vue/ssr/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/examples/vue/ssr/public/favicon.ico -------------------------------------------------------------------------------- /examples/vue/ssr/src/entry-client.js: -------------------------------------------------------------------------------- 1 | import { loadAsyncComponents } from '@akryum/vue-cli-plugin-ssr/client'; 2 | 3 | import { createApp } from './main'; 4 | 5 | createApp({ 6 | async beforeApp({ router }) { 7 | await loadAsyncComponents({ router }); 8 | }, 9 | 10 | afterApp({ app }) { 11 | app.$mount('#app'); 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /examples/vue/ssr/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /examples/vue/ssr/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /examples/vue/ssr/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | pluginOptions: { 3 | ssr: { 4 | nodeExternalsWhitelist: [ 5 | /\.css$/, 6 | /\?vue&type=style/, 7 | /vue-instantsearch/, 8 | /instantsearch.js/, 9 | ], 10 | }, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "useWorkspaces": true, 4 | "$schema": "node_modules/lerna/schemas/lerna-schema.json", 5 | "version": "independent" 6 | } 7 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command=""" \ 3 | yarn build:ci && \ 4 | yarn website:storybook && \ 5 | yarn website:examples --concurrency=1 && \ 6 | yarn workspace algoliasearch-helper doc 7 | """ 8 | publish="website" 9 | 10 | [build.environment] 11 | YARN_VERSION = "1.13.0" 12 | -------------------------------------------------------------------------------- /packages/algolia-experiences/src/index.ts: -------------------------------------------------------------------------------- 1 | import { setupInstantSearch } from './setup-instantsearch'; 2 | 3 | if (typeof window === 'object') { 4 | if (document.readyState === 'loading') { 5 | document.addEventListener('DOMContentLoaded', setupInstantSearch); 6 | } else { 7 | setupInstantSearch(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/algolia-experiences/src/util.ts: -------------------------------------------------------------------------------- 1 | // @TODO: hook up to some way it can be set runtime, maybe query params 2 | const VERBOSE = true; 3 | 4 | export function error(message: string) { 5 | if (VERBOSE) { 6 | // eslint-disable-next-line no-console 7 | console.error(`[Algolia Experiences] ${message}`); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | documentation-src/ 3 | documentation/ 4 | scripts/rollup.esm.config.js 5 | *.ts 6 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/.prettierignore: -------------------------------------------------------------------------------- 1 | documentation-src/partials 2 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/content/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: main.pug 3 | title: Algolia JS Helper 4 | subtitle: A set of utilities for further customizing search behavior 5 | --- 6 | 7 | Don't sweat, the content of this file won't be read. 8 | 9 | It needs to be there so that we can render the layout. 10 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/partials/jsdoc.hbs: -------------------------------------------------------------------------------- 1 | {{!-- 2 | The kinds "typedef", "member" and "event" have self-named partials. 3 | "function" and "module" are special cases of "kind" that are mapped to "method". 4 | --}} 5 | {{> (lookup this "kind") }} 6 | {{#*inline "function"}}{{> method this}}{{/inline}} 7 | {{#*inline "module"}}{{> method this}}{{/inline}} 8 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/partials/member.hbs: -------------------------------------------------------------------------------- 1 |
2 |
{{name}} - {{> types type}}
3 |
4 | 5 | {{{description}}} 6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/partials/types.hbs: -------------------------------------------------------------------------------- 1 | {{#each this.names}}{{#type}}{{this}}{{/type}}{{/each}} 2 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/stylesheets/components/_clipboard.scss: -------------------------------------------------------------------------------- 1 | .code { 2 | position: relative; 3 | 4 | .clipboard { 5 | position: absolute; 6 | top: 0; 7 | right: 0; 8 | opacity: 0; 9 | transition: opacity 150ms; 10 | } 11 | 12 | &:hover { 13 | .clipboard { 14 | opacity: 1; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/stylesheets/components/_home.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: $font-settings; 3 | } 4 | 5 | .container { 6 | width: 100%; 7 | height: 100%; 8 | margin: $navigation-height auto; 9 | } 10 | 11 | .welcome { 12 | padding: 2em 0; 13 | text-align: center; 14 | border: 1px solid rgba(black, 0.1); 15 | max-width: $max-container-width; 16 | margin: 6em auto 0; 17 | } 18 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/documentation-src/stylesheets/components/_inputs.scss: -------------------------------------------------------------------------------- 1 | input { 2 | outline: none; 3 | border-radius: 4px; 4 | 5 | @include appearance(none !important); 6 | &::-webkit-search-decoration, 7 | &::-webkit-search-cancel-button, 8 | &::-webkit-search-results-button, 9 | &::-webkit-search-results-decoration { 10 | display: none !important; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/examples/readme.md: -------------------------------------------------------------------------------- 1 | The examples moved to [codepen](http://codepen.io/collection/nwWJbe/). 2 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/jest.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | testEnvironment: 'node', 5 | testMatch: ['/test/spec/**/*.[jt]s?(x)'], 6 | watchPlugins: [ 7 | 'jest-watch-typeahead/filename', 8 | 'jest-watch-typeahead/testname', 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/jest.setup.js: -------------------------------------------------------------------------------- 1 | /* eslint-env jest */ 2 | 3 | 'use strict'; 4 | 5 | jest.setTimeout(20000); 6 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # exit when error 4 | 5 | [ -z $CIRCLE_BUILD_NUM ] && CI='false' || CI='true' 6 | 7 | if [ $CI == 'true' ]; then 8 | set -x # debug messages 9 | fi 10 | 11 | node test/run.js 12 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/scripts/update-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const version = require('../package.json').version; 7 | 8 | fs.writeFileSync( 9 | path.resolve(__dirname, '../src/version.js'), 10 | `'use strict'; 11 | 12 | module.exports = '${version}';\n` 13 | ); 14 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/compact.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function compact(array) { 4 | if (!Array.isArray(array)) { 5 | return []; 6 | } 7 | 8 | return array.filter(Boolean); 9 | }; 10 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/find.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // @MAJOR can be replaced by native Array#find when we change support 4 | module.exports = function find(array, comparator) { 5 | if (!Array.isArray(array)) { 6 | return undefined; 7 | } 8 | 9 | for (var i = 0; i < array.length; i++) { 10 | if (comparator(array[i])) { 11 | return array[i]; 12 | } 13 | } 14 | 15 | return undefined; 16 | }; 17 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/findIndex.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // @MAJOR can be replaced by native Array#findIndex when we change support 4 | module.exports = function find(array, comparator) { 5 | if (!Array.isArray(array)) { 6 | return -1; 7 | } 8 | 9 | for (var i = 0; i < array.length; i++) { 10 | if (comparator(array[i])) { 11 | return i; 12 | } 13 | } 14 | return -1; 15 | }; 16 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/flat.js: -------------------------------------------------------------------------------- 1 | // @MAJOR: remove this function and use Array.prototype.flat 2 | module.exports = function flat(arr) { 3 | return arr.reduce(function (acc, val) { 4 | return acc.concat(val); 5 | }, []); 6 | }; 7 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/inherits.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function inherits(ctor, superCtor) { 4 | ctor.prototype = Object.create(superCtor.prototype, { 5 | constructor: { 6 | value: ctor, 7 | enumerable: false, 8 | writable: true, 9 | configurable: true, 10 | }, 11 | }); 12 | } 13 | 14 | module.exports = inherits; 15 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/intersection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function intersection(arr1, arr2) { 4 | return arr1.filter(function (value, index) { 5 | return ( 6 | arr2.indexOf(value) > -1 && 7 | arr1.indexOf(value) === index /* skips duplicates */ 8 | ); 9 | }); 10 | } 11 | 12 | module.exports = intersection; 13 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/objectHasKeys.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function objectHasKeys(obj) { 4 | return obj && Object.keys(obj).length > 0; 5 | } 6 | 7 | module.exports = objectHasKeys; 8 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/functions/valToNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function valToNumber(v) { 4 | if (typeof v === 'number') { 5 | return v; 6 | } else if (typeof v === 'string') { 7 | return parseFloat(v); 8 | } else if (Array.isArray(v)) { 9 | return v.map(valToNumber); 10 | } 11 | 12 | throw new Error( 13 | 'The value should be a number, a parsable string or an array of those.' 14 | ); 15 | } 16 | 17 | module.exports = valToNumber; 18 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/utils/isValidUserToken.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function isValidUserToken(userToken) { 4 | if (userToken === null) { 5 | return false; 6 | } 7 | return /^[a-zA-Z0-9_-]{1,64}$/.test(userToken); 8 | }; 9 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/src/version.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = '3.25.0'; 4 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/test/spec/RecommendParameters/constructorFn.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var RecommendParameters = require('../../../src/RecommendParameters'); 4 | 5 | test('accepts initial parameters', () => { 6 | var params = [{ $$id: '1', objectID: 'objectID', model: 'bought-together' }]; 7 | 8 | var recommendParameters = new RecommendParameters({ params }); 9 | expect(recommendParameters.params).toEqual(params); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/test/spec/functions/valToNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var valToNumber = require('../../../src/functions/valToNumber'); 4 | 5 | test('valToNumber makes numbers, strings and arrays of strings and numbers to be numbers', function () { 6 | expect(valToNumber(2)).toBe(2); 7 | expect(valToNumber('2')).toBe(2); 8 | expect(valToNumber([2, '45', 44])).toEqual([2, 45, 44]); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "lib": ["es2015"], 5 | "esModuleInterop": true 6 | }, 7 | "files": ["./index.d.ts", "test/types.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/algoliasearch-helper/types/algoliasearch.js: -------------------------------------------------------------------------------- 1 | // fake file to allow `export * from 'algoliasearch-helper/types/algoliasearch'` 2 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-typescript", "@babel/preset-env"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['algolia', 'algolia/jest'], 3 | rules: { 4 | 'import/no-commonjs': 'off', 5 | 'no-console': 'off', 6 | 'no-process-exit': 'off', 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/.gitignore: -------------------------------------------------------------------------------- 1 | # release 2 | /build 3 | /sample 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/angular-instantsearch/src/favicon.ico-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/angular-instantsearch/src/favicon.ico-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/angular-instantsearch/src/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/angular-instantsearch/src/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete.js-0.x/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete.js-0.x/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete.js/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete.js/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/adaptive-icon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/adaptive-icon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/icon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/icon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/splash.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/assets/splash.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/autocomplete/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/drawable/product_placeholder.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/drawable/product_placeholder.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-hdpi/ic_launcher.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-hdpi/ic_launcher.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-mdpi/ic_launcher.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-mdpi/ic_launcher.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch.js-2.x/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch.js-2.x/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch.js/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/instantsearch.js/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-client/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-client/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-helper-2.x/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-helper-2.x/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-helper/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/javascript-helper/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/adaptive-icon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/adaptive-icon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/icon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/icon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/splash.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch-native/assets/splash.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch/public/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/react-instantsearch/public/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-1.x/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-1.x/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-1.x/public/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-1.x/public/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-2.x/public/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-2.x/public/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-vue3/public/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch-vue3/public/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/public/favicon.ico-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/public/favicon.ico-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/public/favicon.png-snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/e2e/__image_snapshots__/vue-instantsearch/public/favicon.png-snap.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/index.js: -------------------------------------------------------------------------------- 1 | const createInstantSearchApp = require('./src/api'); 2 | 3 | module.exports = createInstantSearchApp; 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'node', 3 | testPathIgnorePatterns: [ 4 | '/node_modules/', 5 | '/src/templates/', 6 | ], 7 | transform: { 8 | '^.+\\.(j|t)sx?$': 'babel-jest', 9 | }, 10 | snapshotSerializers: ['@instantsearch/testutils/ansiSnapshotSerializer.cjs'], 11 | }; 12 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/preview.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/cli/getAnswersDefaultValues.js: -------------------------------------------------------------------------------- 1 | module.exports = function getAnswersDefaultValues( 2 | optionsFromArguments, 3 | configuration, 4 | template 5 | ) { 6 | return { 7 | ...configuration, 8 | ...optionsFromArguments, 9 | template, 10 | // name has a default of '', as it's a special case in Commander 11 | name: optionsFromArguments.name || configuration.name, 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/cli/getFacetsFromIndex.js: -------------------------------------------------------------------------------- 1 | const getInformationFromIndex = require('./getInformationFromIndex'); 2 | 3 | module.exports = async function getFacetsFromIndex({ 4 | appId, 5 | apiKey, 6 | indexName, 7 | } = {}) { 8 | try { 9 | const { facets } = await getInformationFromIndex({ 10 | appId, 11 | apiKey, 12 | indexName, 13 | }); 14 | return Object.keys(facets); 15 | } catch (err) { 16 | return []; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/cli/isQuestionAsked.js: -------------------------------------------------------------------------------- 1 | module.exports = function isQuestionAsked({ question, args }) { 2 | // if there's a config, ask no questions, even if it would be invalid 3 | if (args.config || !args.interactive) { 4 | return true; 5 | } 6 | 7 | const argument = args[question.name]; 8 | 9 | // Skip if the arg in the command is valid 10 | if (question.validate) { 11 | return question.validate(argument); 12 | } 13 | 14 | return argument !== undefined; 15 | }; 16 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/tasks/common/clean.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | 3 | const exec = util.promisify(require('child_process').exec); 4 | const chalk = require('chalk'); 5 | 6 | module.exports = async function clean(config) { 7 | const logger = config.silent ? { log() {}, error() {} } : console; 8 | 9 | logger.log(); 10 | logger.log(`✨ Cleaning up ${chalk.green(config.path)}.`); 11 | logger.log(); 12 | 13 | await exec(`rm -rf ${config.path}`); 14 | }; 15 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.eslintignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | /.cache 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs */ 2 | 3 | module.exports = { 4 | extends: ['algolia', 'algolia/react'], 5 | settings: { 6 | react: { 7 | pragma: 'React', 8 | version: 'preact', 9 | }, 10 | }, 11 | rules: { 12 | 'jsdoc/check-tag-names': [ 13 | 'error', 14 | { 15 | jsxTags: true, 16 | }, 17 | ], 18 | 'react/jsx-filename-extension': 'off', 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.gitignore.template: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/.template.js: -------------------------------------------------------------------------------- 1 | const install = require('../../tasks/node/install'); 2 | const teardown = require('../../tasks/node/teardown'); 3 | 4 | module.exports = { 5 | category: 'Web', 6 | libraryName: '@algolia/autocomplete-js', 7 | templateName: 'autocomplete', 8 | appName: 'autocomplete-app', 9 | keywords: ['algolia', 'autocomplete'], 10 | tasks: { 11 | install, 12 | teardown, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/Autocomplete/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Autocomplete/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "{{name}}", 3 | "name": "{{name}} Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/.gitignore.template: -------------------------------------------------------------------------------- 1 | # IDE Files 2 | *.iml 3 | .idea/* 4 | projectFilesBackup 5 | 6 | # Build 7 | .gradle 8 | /.idea/workspace.xml 9 | /.idea/libraries 10 | /build 11 | /captures 12 | 13 | # Local setup 14 | /local.properties 15 | 16 | # OS Files 17 | .DS_Store 18 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/.template.js: -------------------------------------------------------------------------------- 1 | const setup = require('../../tasks/ios/setup'); 2 | const install = require('../../tasks/ios/install'); 3 | const teardown = require('../../tasks/android/teardown'); 4 | 5 | module.exports = { 6 | category: 'Mobile', 7 | templateName: 'instantsearch-android', 8 | appName: 'instantsearch-android-app', 9 | tasks: { 10 | teardown, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/.gitignore.template: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | {{name}} 3 | 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch Android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 03 16:02:11 CEST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip 7 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch Android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch iOS/.template.js: -------------------------------------------------------------------------------- 1 | const setup = require('../../tasks/ios/setup'); 2 | const install = require('../../tasks/ios/install'); 3 | const teardown = require('../../tasks/ios/teardown'); 4 | 5 | module.exports = { 6 | category: 'Mobile', 7 | templateName: 'instantsearch-ios', 8 | appName: 'instantsearch-ios-app', 9 | tasks: { 10 | setup, 11 | install, 12 | teardown, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch iOS/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch iOS/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch iOS/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch iOS/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'App' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for App 9 | pod 'InstantSearch' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/.eslintignore: -------------------------------------------------------------------------------- 1 | # Vendors 2 | node_modules 3 | 4 | # Artifacts 5 | dist 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/.gitignore.template: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | yarn-debug.log 4 | yarn-error.log 5 | dist/ 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/example/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | } 4 | 5 | [class^='ais-'] { 6 | font-size: 1em; 7 | } 8 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/src/index.ts.hbs: -------------------------------------------------------------------------------- 1 | export * from './widget'; 2 | export * from './connector'; 3 | export * from './renderer'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "outDir": "dist/_types", 5 | "stripInternal": true, 6 | "noEmit": false, 7 | "declaration": true, 8 | "emitDeclarationOnly": true, 9 | "declarationMap": true 10 | }, 11 | "include": ["src"], 12 | "exclude": ["**/__tests__","**/index.cjs.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js widget/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "moduleResolution": "node", 5 | "noEmit": true, 6 | "strict": true, 7 | "skipLibCheck": true, 8 | "allowSyntheticDefaultImports": true 9 | }, 10 | "exclude": ["dist"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/.eslintignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | /.cache 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: 'algolia', 3 | }; 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/.gitignore.template: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/InstantSearch.js/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/src/index.css: -------------------------------------------------------------------------------- 1 | body, 2 | h1 { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 9 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 10 | } 11 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/InstantSearch.js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "esModuleInterop": true, 5 | "sourceMap": true, 6 | "allowJs": true, 7 | "lib": [ 8 | "es6", 9 | "dom" 10 | ], 11 | "rootDir": "src", 12 | "moduleResolution": "node" 13 | }, 14 | "include": [ 15 | "src", 16 | "src/global.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.eslintignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | /.cache 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: 'algolia', 3 | }; 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.gitignore.template: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/.template.js: -------------------------------------------------------------------------------- 1 | const install = require('../../tasks/node/install'); 2 | const teardown = require('../../tasks/node/teardown'); 3 | 4 | module.exports = { 5 | libraryName: 'algoliasearch', 6 | templateName: 'javascript-client', 7 | appName: 'javascript-client-app', 8 | keywords: ['algolia', 'JavaScript', 'Client', 'algoliasearch'], 9 | tasks: { 10 | install, 11 | teardown, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/JavaScript Client/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "{{name}}", 3 | "name": "{{name}} Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Client/src/index.css: -------------------------------------------------------------------------------- 1 | body, 2 | h1 { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 9 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 10 | } 11 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/.eslintignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /dist 3 | /.cache 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: 'algolia', 3 | }; 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/.gitignore.template: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /dist 11 | /.cache 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/JavaScript Helper/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "{{name}}", 3 | "name": "{{name}} Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/JavaScript Helper/src/index.css: -------------------------------------------------------------------------------- 1 | body, 2 | h1 { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 9 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 10 | } 11 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/.gitignore.template: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/adaptive-icon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/icon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/React InstantSearch Native/assets/splash.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch Native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/.gitignore.template: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | .parcel-cache 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode 17 | .idea 18 | .DS_Store 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/React InstantSearch/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/src/Panel.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | type PanelProps = React.PropsWithChildren<{ 4 | header: string; 5 | }>; 6 | 7 | export function Panel({ header, children }: PanelProps) { 8 | return ( 9 |
10 |
11 | {header} 12 |
13 |
{children}
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/React InstantSearch/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | 4 | import { App } from './App'; 5 | 6 | createRoot(document.getElementById('root')!).render(); 7 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/.gitignore.template: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode 17 | .idea 18 | .DS_Store 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/public/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import InstantSearch from 'vue-instantsearch/vue3/es'; 3 | import App from './App.vue'; 4 | 5 | const app = createApp(App); 6 | app.use(InstantSearch); 7 | app.mount('#app'); 8 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch with Vue 3/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import vue from '@vitejs/plugin-vue'; 3 | import vueJsx from '@vitejs/plugin-vue-jsx'; 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | }); 9 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // extends from 'prettier/vue' until we update the Algolia configuration 3 | extends: ['algolia/vue', 'prettier/vue'], 4 | rules: { 5 | 'import/no-commonjs': 'off', 6 | // enable the rule until we update the Algolia configuration 7 | 'vue/component-name-in-template-casing': ['error', 'kebab-case'], 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/.gitignore.template: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "proseWrap": "never", 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/create-instantsearch-app/src/templates/Vue InstantSearch/public/favicon.png -------------------------------------------------------------------------------- /packages/create-instantsearch-app/src/templates/Vue InstantSearch/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import InstantSearch from 'vue-instantsearch'; 3 | import App from './App.vue'; 4 | 5 | Vue.config.productionTip = false; 6 | 7 | Vue.use(InstantSearch); 8 | 9 | new Vue({ 10 | render: (h) => h(App), 11 | }).$mount('#app'); 12 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/global.input.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidget(instantsearch.widgets.hits({})); 6 | search.addWidget(instantsearch.widgets.hits({})); 7 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/global.output.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidgets([instantsearch.widgets.hits({})]); 6 | search.addWidgets([instantsearch.widgets.hits({})]); 7 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/imported.input.js: -------------------------------------------------------------------------------- 1 | import instantsearch from 'instantsearch.js'; 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidget(instantsearch.widgets.hits({})); 6 | search.addWidget(instantsearch.widgets.hits({})); 7 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/imported.output.js: -------------------------------------------------------------------------------- 1 | import instantsearch from 'instantsearch.js'; 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidgets([instantsearch.widgets.hits({})]); 6 | search.addWidgets([instantsearch.widgets.hits({})]); 7 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/remove.input.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | const hits = instantsearch.widgets.hits({}); 6 | 7 | search.addWidget(hits); 8 | 9 | search.removeWidget(hits); 10 | 11 | search.addWidget(hits); 12 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/addWidget-to-addWidgets/remove.output.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | const hits = instantsearch.widgets.hits({}); 6 | 7 | search.addWidgets([hits]); 8 | 9 | search.removeWidgets([hits]); 10 | 11 | search.addWidgets([hits]); 12 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/import-path.input.js: -------------------------------------------------------------------------------- 1 | import { SearchBox } from 'react-instantsearch-dom/dist/es/widgets/SearchBox'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/import-path.output.js: -------------------------------------------------------------------------------- 1 | import { SearchBox } from 'react-instantsearch/dist/es/widgets/SearchBox'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/menuselect.input.js: -------------------------------------------------------------------------------- 1 | import { InstantSearch, MenuSelect } from 'react-instantsearch-dom'; 2 | 3 | function App() { 4 | return ( 5 | 6 | 7 | 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/placeholder-not-inline.input.js: -------------------------------------------------------------------------------- 1 | function MySearchbox() { 2 | const placeholder = 'Search here'; 3 | return ( 4 | 9 | ); 10 | } 11 | 12 | function MyRefinementList() { 13 | const placeholder = 'Search here'; 14 | return ( 15 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/placeholder-not-inline.output.js: -------------------------------------------------------------------------------- 1 | function MySearchbox() { 2 | const placeholder = 'Search here'; 3 | return ; 4 | } 5 | 6 | function MyRefinementList() { 7 | const placeholder = 'Search here'; 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/searchbox-icons.input.js: -------------------------------------------------------------------------------- 1 | function Search() { 2 | const reset =
Reset
; 3 | 4 | const renderLoadingIndicator = () =>
Loading
; 5 | 6 | return ( 7 | Submit} 9 | reset={reset} 10 | loadingIndicator={renderLoadingIndicator()} 11 | /> 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/searchbox-icons.output.js: -------------------------------------------------------------------------------- 1 | function Search() { 2 | const reset =
Reset
; 3 | 4 | const renderLoadingIndicator = () =>
Loading
; 5 | 6 | return ( 7 |
Submit
} 9 | resetIconComponent={() => reset} 10 | loadingIconComponent={() => renderLoadingIndicator()} 11 | /> 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/translations-not-inline.input.js: -------------------------------------------------------------------------------- 1 | function MyBreadcrumb() { 2 | const translations = { rootLabel: 'Home' }; 3 | return ( 4 | 7 | ); 8 | } 9 | 10 | export default MyBreadcrumb; 11 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/ris-v6-to-v7/translations-not-inline.output.js: -------------------------------------------------------------------------------- 1 | function MyBreadcrumb() { 2 | const translations = { rootLabel: 'Home' }; 3 | return ( 4 | 9 | ); 10 | } 11 | 12 | export default MyBreadcrumb; 13 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/rish-to-ris/import.input.js: -------------------------------------------------------------------------------- 1 | import { useSearchBox } from 'react-instantsearch-hooks'; 2 | import { SearchBox } from 'react-instantsearch-hooks-web'; 3 | import { getServerState } from 'react-instantsearch-hooks-server'; 4 | import { createInstantSearchRouterNext } from 'react-instantsearch-hooks-router-nextjs'; 5 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/rish-to-ris/import.output.js: -------------------------------------------------------------------------------- 1 | import { useSearchBox } from 'react-instantsearch-core'; 2 | import { SearchBox } from 'react-instantsearch'; 3 | import { getServerState } from 'react-instantsearch'; 4 | import { createInstantSearchRouterNext } from 'react-instantsearch-router-nextjs'; 5 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/rish-to-ris/path.input.js: -------------------------------------------------------------------------------- 1 | import { useSearchBox } from 'react-instantsearch-hooks/dist/es/connectors/useSearchBox'; 2 | import { SearchBox } from 'react-instantsearch-hooks-web/dist/es/widgets/SearchBox'; 3 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__testfixtures__/rish-to-ris/path.output.js: -------------------------------------------------------------------------------- 1 | import { useSearchBox } from 'react-instantsearch-core/dist/es/connectors/useSearchBox'; 2 | import { SearchBox } from 'react-instantsearch/dist/es/widgets/SearchBox'; 3 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__tests__/rish-to-ris.test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-commonjs */ 2 | const define = require('jscodeshift/dist/testUtils').defineTest; 3 | 4 | define(__dirname, 'src/rish-to-ris', null, 'rish-to-ris/import'); 5 | define(__dirname, 'src/rish-to-ris', null, 'rish-to-ris/path'); 6 | define(__dirname, 'src/rish-to-ris', null, 'rish-to-ris/use'); 7 | define(__dirname, 'src/rish-to-ris', null, 'rish-to-ris/renderToString'); 8 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/__tests__/validate-config.test.ts: -------------------------------------------------------------------------------- 1 | import { isValidConfig } from '@codeshift/validator'; 2 | 3 | test('is valid config', () => { 4 | const validConfig = isValidConfig(require('../src/codeshift.config')); 5 | 6 | expect(validConfig).toBe(true); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/instantsearch-codemods/src/codeshift.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | description: 'Codemods for InstantSearch libraries', 3 | transforms: {}, 4 | presets: { 5 | 'ris-v6-to-v7': require('./ris-v6-to-v7'), 6 | 'rish-to-ris': require('./rish-to-ris'), 7 | 'addWidget-to-addWidgets': require('./addWidget-to-addWidgets'), 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/global.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-empty-interface */ 2 | import type { JSX as ReactJSX } from 'react'; 3 | 4 | declare global { 5 | namespace JSX { 6 | interface Element extends ReactJSX.Element {} 7 | interface IntrinsicElements extends ReactJSX.IntrinsicElements {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/scripts/version.cjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const version = require('../package.json').version; 7 | 8 | fs.writeFileSync( 9 | path.resolve(__dirname, '../src/version.ts'), 10 | `export default '${version}';\n` 11 | ); 12 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Carousel'; 2 | export * from './FrequentlyBoughtTogether'; 3 | export * from './Highlight'; 4 | export * from './Hits'; 5 | export * from './LookingSimilar'; 6 | export * from './RelatedProducts'; 7 | export * from './TrendingItems'; 8 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/components/recommend-shared/DefaultEmpty.tsx: -------------------------------------------------------------------------------- 1 | /** @jsx createElement */ 2 | 3 | import type { Renderer } from '../../types'; 4 | 5 | export function createDefaultEmptyComponent({ 6 | createElement, 7 | Fragment, 8 | }: Renderer) { 9 | return function DefaultEmpty() { 10 | return No results; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/components/recommend-shared/DefaultItem.tsx: -------------------------------------------------------------------------------- 1 | /** @jsx createElement */ 2 | 3 | import type { RecommendItemComponentProps, Renderer } from '../../types'; 4 | 5 | export function createDefaultItemComponent({ 6 | createElement, 7 | Fragment, 8 | }: Renderer) { 9 | return function DefaultItem( 10 | userProps: RecommendItemComponentProps 11 | ) { 12 | return {JSON.stringify(userProps.item, null, 2)}; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/components/recommend-shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DefaultEmpty'; 2 | export * from './DefaultHeader'; 3 | export * from './DefaultItem'; 4 | export * from './List'; 5 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './lib'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/lib/cx.ts: -------------------------------------------------------------------------------- 1 | type ClassValue = string | undefined | boolean | null | number; 2 | 3 | export function cx(...classNames: Array) { 4 | return classNames 5 | .reduce((acc, className) => { 6 | if (Array.isArray(className)) { 7 | return acc.concat(className); 8 | } 9 | return acc.concat([className]); 10 | }, []) 11 | .filter(Boolean) 12 | .join(' '); 13 | } 14 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cx'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Renderer'; 2 | export * from './Recommend'; 3 | export * from './shared'; 4 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/src/version.ts: -------------------------------------------------------------------------------- 1 | export default '0.11.1'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch-ui-components/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.declaration" 3 | } 4 | -------------------------------------------------------------------------------- /packages/instantsearch.css/.gitignore: -------------------------------------------------------------------------------- 1 | /themes 2 | -------------------------------------------------------------------------------- /packages/instantsearch.css/.npmignore: -------------------------------------------------------------------------------- 1 | !/themes/ 2 | src/ 3 | -------------------------------------------------------------------------------- /packages/instantsearch.js/.storybook/addons.ts: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-actions/register'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/.storybook/decorators/index.ts: -------------------------------------------------------------------------------- 1 | export * from './withHits'; 2 | export * from './withLifecycle'; 3 | -------------------------------------------------------------------------------- /packages/instantsearch.js/.storybook/preview-head.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | -------------------------------------------------------------------------------- /packages/instantsearch.js/.storybook/utils/create-info-box.d.ts: -------------------------------------------------------------------------------- 1 | declare class InfoBox { 2 | div_: HTMLDivElement; 3 | setOptions({ pixelOffset: any }); 4 | open(map: google.maps.Map, marker: google.maps.Marker): void; 5 | close(): void; 6 | getMap(): google.maps.Map; 7 | setContent(html: string): void; 8 | addListener(event: string, cb: () => void); 9 | } 10 | 11 | declare const createInfoBox: ( 12 | googleReference: typeof google 13 | ) => new () => InfoBox; 14 | 15 | export default createInfoBox; 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/global.input.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidget(instantsearch.widgets.hits({})); 6 | search.addWidget(instantsearch.widgets.hits({})); 7 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/global.output.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidgets([instantsearch.widgets.hits({})]); 6 | search.addWidgets([instantsearch.widgets.hits({})]); 7 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/imported.input.js: -------------------------------------------------------------------------------- 1 | import instantsearch from 'instantsearch.js'; 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidget(instantsearch.widgets.hits({})); 6 | search.addWidget(instantsearch.widgets.hits({})); 7 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/imported.output.js: -------------------------------------------------------------------------------- 1 | import instantsearch from 'instantsearch.js'; 2 | 3 | const search = instantsearch(); 4 | 5 | search.addWidgets([instantsearch.widgets.hits({})]); 6 | search.addWidgets([instantsearch.widgets.hits({})]); 7 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/mixed.input.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | function someRandomFunction() {} 6 | 7 | search.addWidget(instantsearch.widgets.hits({})); 8 | 9 | someRandomFunction(); 10 | 11 | search.addWidget(instantsearch.widgets.hits({})); 12 | 13 | search.addWidgets([instantsearch.widgets.hits({})]); 14 | 15 | search.addWidget(instantsearch.widgets.hits({})); 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/mixed.output.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | function someRandomFunction() {} 6 | 7 | search.addWidgets([instantsearch.widgets.hits({})]); 8 | 9 | someRandomFunction(); 10 | 11 | search.addWidgets([instantsearch.widgets.hits({})]); 12 | 13 | search.addWidgets([instantsearch.widgets.hits({})]); 14 | 15 | search.addWidgets([instantsearch.widgets.hits({})]); 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/remove.input.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | const hits = instantsearch.widgets.hits({}); 6 | 7 | search.addWidget(hits); 8 | 9 | search.removeWidget(hits); 10 | 11 | search.addWidget(hits); 12 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/__testfixtures__/addWidget-to-addWidgets/remove.output.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch */ 2 | 3 | const search = instantsearch(); 4 | 5 | const hits = instantsearch.widgets.hits({}); 6 | 7 | search.addWidgets([hits]); 8 | 9 | search.removeWidgets([hits]); 10 | 11 | search.addWidgets([hits]); 12 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/transforms/addWidget-to-addWidgets.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console, import/no-commonjs */ 2 | 3 | // @MAJOR: remove this file and only keep only the `instantsearch-codemods` one 4 | // also ensure this is removed from package.json 5 | console.warn( 6 | "This file is deprecated. Please use `npx @codeshift/cli --packages 'instantsearch-codemods#addWidget-to-addWidgets' ` instead." 7 | ); 8 | 9 | module.exports = require('instantsearch-codemods/src/addWidget-to-addWidgets'); 10 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/typescript/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig", 3 | "compilerOptions": { 4 | "stripInternal": true, 5 | "noEmit": false, 6 | "declaration": true, 7 | "emitDeclarationOnly": true, 8 | "allowJs": true 9 | }, 10 | "include": ["../../src", "../../global.d.ts"], 11 | "exclude": ["../../**/__tests__"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/instantsearch.js/scripts/version/update-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-disable import/no-commonjs */ 3 | 4 | const fs = require('fs'); 5 | const path = require('path'); 6 | 7 | const version = require('../../package.json').version; 8 | 9 | fs.writeFileSync( 10 | path.resolve(__dirname, '../../src/lib/version.ts'), 11 | `export default '${version}';\n` 12 | ); 13 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/components/InternalHighlight/InternalHighlight.tsx: -------------------------------------------------------------------------------- 1 | import { createHighlightComponent } from 'instantsearch-ui-components'; 2 | import { createElement, Fragment } from 'preact'; 3 | 4 | export const InternalHighlight = createHighlightComponent({ 5 | createElement, 6 | Fragment, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/components/QueryRuleCustomData/__tests__/__snapshots__/QueryRuleCustomData-test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`QueryRuleCustomData renders with empty items 1`] = ` 4 |
5 |
8 |
9 | `; 10 | 11 | exports[`QueryRuleCustomData renders with items 1`] = ` 12 |
13 |
16 | image-1.png image-2.png 17 |
18 |
19 | `; 20 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/connectors/toggle-refinement/types.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | /** @deprecated import from connectToggleRefinement directly */ 3 | ToggleRefinementConnector, 4 | /** @deprecated import from connectToggleRefinement directly */ 5 | ToggleRefinementWidgetDescription, 6 | } from './connectToggleRefinement'; 7 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/helpers/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Highlight'; 2 | export * from './ReverseHighlight'; 3 | export * from './ReverseSnippet'; 4 | export * from './Snippet'; 5 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/__tests__/version-test.ts: -------------------------------------------------------------------------------- 1 | import version from '../version'; 2 | 3 | describe('version', () => { 4 | it('includes the latest version', () => { 5 | expect(version).toMatch(/^(\d+\.)?(\d+\.)?(\*|\d+)(-beta.\d+)?$/); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/formatNumber.ts: -------------------------------------------------------------------------------- 1 | export function formatNumber(value: number, numberLocale?: string) { 2 | return value.toLocaleString(numberLocale); 3 | } 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/infiniteHitsCache/index.ts: -------------------------------------------------------------------------------- 1 | export { default as createInfiniteHitsSessionStorageCache } from './sessionStorage'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/insights/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | default as withInsights, 3 | inferPayload as inferInsightsPayload, 4 | } from './client'; 5 | export { default as withInsightsListener } from './listener'; 6 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/routers/index.ts: -------------------------------------------------------------------------------- 1 | export { default as history } from './history'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/stateMappings/index.ts: -------------------------------------------------------------------------------- 1 | export { default as simple } from './simple'; 2 | export { default as singleIndex } from './singleIndex'; 3 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/templating/index.ts: -------------------------------------------------------------------------------- 1 | export * from './prepareTemplateProps'; 2 | export * from './renderTemplate'; 3 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/__tests__/capitalize-test.ts: -------------------------------------------------------------------------------- 1 | import { capitalize } from '../capitalize'; 2 | 3 | describe('capitalize', () => { 4 | it('should capitalize the first character only', () => { 5 | expect(capitalize('hello')).toBe('Hello'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/__tests__/noop-test.ts: -------------------------------------------------------------------------------- 1 | import { noop } from '../noop'; 2 | 3 | describe('noop', () => { 4 | test('does nothing', () => { 5 | expect(noop).toBeInstanceOf(Function); 6 | expect(noop()).toBeUndefined(); 7 | // Checks that `noop` acts like a function. 8 | expect(noop.toString).toBe(Function.prototype.toString); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/__tests__/toArray-test.ts: -------------------------------------------------------------------------------- 1 | import { toArray } from '../toArray'; 2 | 3 | describe('toArray', () => { 4 | test('cast to array if necessary', () => { 5 | expect(toArray).toBeInstanceOf(Function); 6 | expect(toArray('a')).toEqual(['a']); 7 | expect(toArray(['a'])).toEqual(['a']); 8 | // Checks that `toArray` acts like a function. 9 | expect(toArray.toString).toBe(Function.prototype.toString); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/addWidgetId.ts: -------------------------------------------------------------------------------- 1 | import type { Widget } from '../../types'; 2 | 3 | let id = 0; 4 | 5 | export function addWidgetId(widget: Widget) { 6 | if (widget.dependsOn !== 'recommend') { 7 | return; 8 | } 9 | 10 | widget.$$id = id++; 11 | } 12 | 13 | export function resetWidgetId() { 14 | id = 0; 15 | } 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/capitalize.ts: -------------------------------------------------------------------------------- 1 | export function capitalize(text: string): string { 2 | return text.toString().charAt(0).toUpperCase() + text.toString().slice(1); 3 | } 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/getObjectType.ts: -------------------------------------------------------------------------------- 1 | export function getObjectType(object: unknown): string { 2 | return Object.prototype.toString.call(object).slice(8, -1); 3 | } 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/getPropertyByPath.ts: -------------------------------------------------------------------------------- 1 | export function getPropertyByPath( 2 | object: Record | undefined, 3 | path: string | string[] 4 | ): any { 5 | const parts = Array.isArray(path) ? path : path.split('.'); 6 | 7 | return parts.reduce((current, key) => current && current[key], object); 8 | } 9 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/hits-absolute-position.ts: -------------------------------------------------------------------------------- 1 | import type { AlgoliaHit } from '../../types'; 2 | 3 | export function addAbsolutePosition( 4 | hits: THit[], 5 | page: number, 6 | hitsPerPage: number 7 | ): Array { 8 | return hits.map((hit, idx) => ({ 9 | ...hit, 10 | __position: hitsPerPage * page + idx + 1, 11 | })); 12 | } 13 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/hits-query-id.ts: -------------------------------------------------------------------------------- 1 | import type { AlgoliaHit } from '../../types'; 2 | 3 | export function addQueryID( 4 | hits: THit[], 5 | queryID?: string 6 | ): Array { 7 | if (!queryID) { 8 | return hits; 9 | } 10 | return hits.map((hit) => ({ 11 | ...hit, 12 | __queryID: queryID, 13 | })); 14 | } 15 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/isDomElement.ts: -------------------------------------------------------------------------------- 1 | export function isDomElement(object: any): object is HTMLElement { 2 | return ( 3 | object instanceof HTMLElement || (Boolean(object) && object.nodeType > 0) 4 | ); 5 | } 6 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/isFiniteNumber.ts: -------------------------------------------------------------------------------- 1 | // This is the `Number.isFinite()` polyfill recommended by MDN. 2 | // We do not provide any tests for this function. 3 | // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill 4 | // @MAJOR Replace with the native `Number.isFinite` method 5 | export function isFiniteNumber(value: any): value is number { 6 | return typeof value === 'number' && isFinite(value); 7 | } 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/isIndexWidget.ts: -------------------------------------------------------------------------------- 1 | import type { Widget, IndexWidget } from '../../types'; 2 | 3 | export function isIndexWidget( 4 | widget: Widget | IndexWidget 5 | ): widget is IndexWidget { 6 | return widget.$$type === 'ais.index'; 7 | } 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/isSpecialClick.ts: -------------------------------------------------------------------------------- 1 | export function isSpecialClick(event: MouseEvent): boolean { 2 | const isMiddleClick = event.button === 1; 3 | 4 | return ( 5 | isMiddleClick || 6 | event.altKey || 7 | event.ctrlKey || 8 | event.metaKey || 9 | event.shiftKey 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/noop.ts: -------------------------------------------------------------------------------- 1 | export function noop(..._args: any[]): void {} 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/serializer.ts: -------------------------------------------------------------------------------- 1 | export function serializePayload(payload: TPayload): string { 2 | return btoa(encodeURIComponent(JSON.stringify(payload))); 3 | } 4 | 5 | export function deserializePayload(serialized: string): TPayload { 6 | return JSON.parse(decodeURIComponent(atob(serialized))); 7 | } 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/toArray.ts: -------------------------------------------------------------------------------- 1 | type ToArray = T extends unknown[] ? T : T[]; 2 | 3 | export function toArray(value: T): ToArray { 4 | return (Array.isArray(value) ? value : [value]) as ToArray; 5 | } 6 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/typedObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A typed version of Object.keys, to use when looping over a static object 3 | * inspired from https://stackoverflow.com/a/65117465/3185307 4 | */ 5 | export const keys = Object.keys as >( 6 | yourObject: TObject 7 | ) => Array; 8 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/uniq.ts: -------------------------------------------------------------------------------- 1 | export function uniq(array: TItem[]): TItem[] { 2 | return array.filter((value, index, self) => self.indexOf(value) === index); 3 | } 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/utils/uuid.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Create UUID according to 3 | * https://www.ietf.org/rfc/rfc4122.txt. 4 | * 5 | * @returns Generated UUID. 6 | */ 7 | export function createUUID(): string { 8 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { 9 | /* eslint-disable no-bitwise */ 10 | const r = (Math.random() * 16) | 0; 11 | const v = c === 'x' ? r : (r & 0x3) | 0x8; 12 | /* eslint-enable */ 13 | return v.toString(16); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/lib/version.ts: -------------------------------------------------------------------------------- 1 | export default '4.78.3'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/middlewares/index.ts: -------------------------------------------------------------------------------- 1 | export * from './createInsightsMiddleware'; 2 | export * from './createRouterMiddleware'; 3 | export * from './createMetadataMiddleware'; 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/templates/index.ts: -------------------------------------------------------------------------------- 1 | export * from './carousel/carousel'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/types/algoliasearch.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/extensions 2 | export * from 'algoliasearch-helper/types/algoliasearch.js'; 3 | 4 | export {}; 5 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/types/component.ts: -------------------------------------------------------------------------------- 1 | export type ComponentCSSClasses = Required<{ 2 | [className in keyof TCSSClasses]: string; 3 | }>; 4 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/types/instantsearch.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | default as InstantSearch, 3 | InstantSearchOptions, 4 | InstantSearchStatus, 5 | } from '../lib/InstantSearch'; 6 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/answers/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import type { AnswersComponentTemplates } from '../../components/Answers/Answers'; 2 | 3 | const defaultTemplates: AnswersComponentTemplates = { 4 | header() { 5 | return ''; 6 | }, 7 | loader() { 8 | return ''; 9 | }, 10 | item(item) { 11 | return JSON.stringify(item); 12 | }, 13 | }; 14 | 15 | export default defaultTemplates; 16 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/breadcrumb/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import type { BreadcrumbComponentTemplates } from '../../components/Breadcrumb/Breadcrumb'; 2 | 3 | const defaultTemplates: BreadcrumbComponentTemplates = { 4 | home() { 5 | return 'Home'; 6 | }, 7 | separator() { 8 | return '>'; 9 | }, 10 | }; 11 | 12 | export default defaultTemplates; 13 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/clear-refinements/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import type { ClearRefinementsComponentTemplates } from '../../components/ClearRefinements/ClearRefinements'; 2 | 3 | const defaultTemplates: ClearRefinementsComponentTemplates = { 4 | resetLabel() { 5 | return 'Clear refinements'; 6 | }, 7 | }; 8 | 9 | export default defaultTemplates; 10 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/menu-select/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import { formatNumber } from '../../lib/formatNumber'; 2 | 3 | import type { MenuSelectComponentTemplates } from '../../components/MenuSelect/MenuSelect'; 4 | 5 | const defaultTemplates: MenuSelectComponentTemplates = { 6 | item({ label, count }) { 7 | return `${label} (${formatNumber(count)})`; 8 | }, 9 | defaultOption() { 10 | return 'See all'; 11 | }, 12 | }; 13 | 14 | export default defaultTemplates; 15 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/powered-by/__tests__/powered-by-test.ts: -------------------------------------------------------------------------------- 1 | import poweredBy from '../powered-by'; 2 | 3 | describe('poweredBy call', () => { 4 | it('throws an exception when no container', () => { 5 | expect(poweredBy).toThrowErrorMatchingInlineSnapshot(` 6 | "The \`container\` option is required. 7 | 8 | See documentation: https://www.algolia.com/doc/api-reference/widgets/powered-by/js/" 9 | `); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/relevant-sort/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import type { RelevantSortComponentTemplates } from '../../components/RelevantSort/RelevantSort'; 2 | 3 | const defaultTemplates: RelevantSortComponentTemplates = { 4 | text() { 5 | return ''; 6 | }, 7 | button({ isRelevantSorted }) { 8 | return isRelevantSorted ? 'See all results' : 'See relevant results'; 9 | }, 10 | }; 11 | 12 | export default defaultTemplates; 13 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/stats/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | export { defaultTemplates as default } from './stats'; 2 | -------------------------------------------------------------------------------- /packages/instantsearch.js/src/widgets/toggle-refinement/defaultTemplates.ts: -------------------------------------------------------------------------------- 1 | import type { ToggleRefinementComponentTemplates } from '../../components/ToggleRefinement/ToggleRefinement'; 2 | 3 | const defaultTemplates: ToggleRefinementComponentTemplates = { 4 | labelText({ name }) { 5 | return name; 6 | }, 7 | }; 8 | 9 | export default defaultTemplates; 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/global.d.ts: -------------------------------------------------------------------------------- 1 | declare const __DEV__: boolean; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/scripts/version.cjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const version = require('../package.json').version; 7 | 8 | fs.writeFileSync( 9 | path.resolve(__dirname, '../src/version.ts'), 10 | `export default '${version}';\n` 11 | ); 12 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/components/Configure.tsx: -------------------------------------------------------------------------------- 1 | import { useConfigure } from '../connectors/useConfigure'; 2 | 3 | import type { UseConfigureProps } from '../connectors/useConfigure'; 4 | 5 | export type ConfigureProps = UseConfigureProps; 6 | 7 | export function Configure(props: ConfigureProps) { 8 | useConfigure({ ...props }, { $$widgetType: 'ais.configure' }); 9 | 10 | return null; 11 | } 12 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/components/__tests__/InstantSearchServerContext.test.tsx: -------------------------------------------------------------------------------- 1 | import { InstantSearchServerContext } from '../InstantSearchServerContext'; 2 | 3 | describe('InstantSearchServerContext', () => { 4 | test('exposes a displayName', () => { 5 | expect(InstantSearchServerContext.displayName).toEqual( 6 | 'InstantSearchServer' 7 | ); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/IndexContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | import type { IndexWidget } from 'instantsearch.js/es/widgets/index/index'; 4 | 5 | export const IndexContext = createContext(null); 6 | 7 | if (__DEV__) { 8 | IndexContext.displayName = 'Index'; 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/InstantSearchContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | import type { InstantSearch } from 'instantsearch.js'; 4 | 5 | export const InstantSearchContext = createContext(null); 6 | 7 | if (__DEV__) { 8 | InstantSearchContext.displayName = 'InstantSearch'; 9 | } 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/InstantSearchRSCContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | import type { PromiseWithState } from './wrapPromiseWithState'; 4 | import type { MutableRefObject } from 'react'; 5 | 6 | export type InstantSearchRSCContextApi = 7 | MutableRefObject | null> | null; 8 | 9 | export const InstantSearchRSCContext = 10 | createContext(null); 11 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/__tests__/IndexContext.test.tsx: -------------------------------------------------------------------------------- 1 | import { IndexContext } from '../IndexContext'; 2 | 3 | describe('IndexContext', () => { 4 | test('exposes a displayName', () => { 5 | expect(IndexContext.displayName).toEqual('Index'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/__tests__/InstantSearchContext.test.tsx: -------------------------------------------------------------------------------- 1 | import { InstantSearchContext } from '../InstantSearchContext'; 2 | 3 | describe('InstantSearchContext', () => { 4 | test('exposes a displayName', () => { 5 | expect(InstantSearchContext.displayName).toEqual('InstantSearch'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/__tests__/InstantSearchSSRContext.test.tsx: -------------------------------------------------------------------------------- 1 | import { InstantSearchSSRContext } from '../InstantSearchSSRContext'; 2 | 3 | describe('InstantSearchSSRContext', () => { 4 | test('exposes a displayName', () => { 5 | expect(InstantSearchSSRContext.displayName).toEqual('InstantSearchSSR'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/noop.ts: -------------------------------------------------------------------------------- 1 | export const noop = (..._args: any[]) => {}; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/use.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | type Use = (promise: Promise) => T; 4 | const useKey = 'use' as keyof typeof React; 5 | 6 | // @TODO: Remove this file and import directly from React when available. 7 | export const use = React[useKey] as Use; 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/useForceUpdate.ts: -------------------------------------------------------------------------------- 1 | import { useReducer } from 'react'; 2 | 3 | /** 4 | * Forces a React update that triggers a rerender. 5 | * @link https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate 6 | */ 7 | export function useForceUpdate() { 8 | const [, forceUpdate] = useReducer((x) => x + 1, 0); 9 | 10 | return forceUpdate; 11 | } 12 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/useIsomorphicLayoutEffect.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useLayoutEffect } from 'react'; 2 | 3 | /** 4 | * `useLayoutEffect` that doesn't show a warning when server-side rendering. 5 | * 6 | * It uses `useEffect` on the server (no-op), and `useLayoutEffect` on the browser. 7 | */ 8 | export const useIsomorphicLayoutEffect = 9 | typeof window !== 'undefined' ? useLayoutEffect : useEffect; 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/useRSCContext.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { InstantSearchRSCContext } from './InstantSearchRSCContext'; 4 | 5 | export function useRSCContext() { 6 | return useContext(InstantSearchRSCContext); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/lib/useStableValue.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | 3 | import { dequal } from './dequal'; 4 | 5 | export function useStableValue(value: TValue) { 6 | const [stableValue, setStableValue] = useState(() => value); 7 | 8 | if (!dequal(stableValue, value)) { 9 | setStableValue(value); 10 | } 11 | 12 | return stableValue; 13 | } 14 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/server/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getServerState'; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/src/version.ts: -------------------------------------------------------------------------------- 1 | export default '7.15.8'; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/test/module/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const assert = require('assert'); 4 | 5 | const ReactInstantSearchCore = require('react-instantsearch-core'); 6 | 7 | assert.ok(ReactInstantSearchCore); 8 | 9 | console.log('react-instantsearch-core is valid CJS'); 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/test/module/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import assert from 'assert'; 3 | 4 | import * as ReactInstantSearchCore from 'react-instantsearch-core'; 5 | 6 | assert.ok(ReactInstantSearchCore); 7 | 8 | console.log('react-instantsearch-core is valid ESM'); 9 | -------------------------------------------------------------------------------- /packages/react-instantsearch-core/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.declaration" 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-instantsearch-nextjs/__tests__/module/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-process-exit */ 2 | /* eslint-disable no-console */ 3 | 4 | const assert = require('assert'); 5 | 6 | require('next'); 7 | 8 | const ReactInstantSearchSSRNext = require('react-instantsearch-nextjs'); 9 | 10 | assert.ok(ReactInstantSearchSSRNext); 11 | 12 | console.log('react-instantsearch-nextjs is valid CJS'); 13 | 14 | process.exit(0); 15 | -------------------------------------------------------------------------------- /packages/react-instantsearch-nextjs/__tests__/module/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-process-exit */ 2 | /* eslint-disable no-console */ 3 | import assert from 'assert'; 4 | 5 | import 'next'; 6 | import * as ReactInstantSearchSSRNext from 'react-instantsearch-nextjs'; 7 | 8 | assert.ok(ReactInstantSearchSSRNext); 9 | 10 | console.log('react-instantsearch-nextjs is valid ESM'); 11 | 12 | process.exit(0); 13 | -------------------------------------------------------------------------------- /packages/react-instantsearch-nextjs/src/__tests__/htmlEscape.test.ts: -------------------------------------------------------------------------------- 1 | import { htmlEscapeJsonString } from '../htmlEscape'; 2 | 3 | it('encodes HTML related characters into entities that are decoded by JSON.parse', () => { 4 | const input = { description: '

Hello

' }; 5 | const output = htmlEscapeJsonString(JSON.stringify(input)); 6 | 7 | expect(output).toBe( 8 | '{"description":"\\u003ch1\\u003eHello\\u003c/h1\\u003e"}' 9 | ); 10 | expect(JSON.parse(output)).toEqual(input); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/react-instantsearch-nextjs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './InstantSearchNext'; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch-nextjs/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.declaration", 3 | "exclude": ["**/__tests__/**/*", "**/dist/**/*"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/__tests__/e2e/utils.ts: -------------------------------------------------------------------------------- 1 | export async function waitForUrl(url: string) { 2 | return await browser.waitUntil(async () => (await browser.getUrl()) === url); 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/__tests__/module/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const assert = require('assert'); 4 | 5 | const ReactInstantSearchRouterNext = require('react-instantsearch-router-nextjs'); 6 | 7 | assert.ok(ReactInstantSearchRouterNext); 8 | 9 | console.log('react-instantsearch-router-nextjs is valid CJS'); 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/__tests__/module/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import assert from 'assert'; 3 | 4 | import * as ReactInstantSearchRouterNext from 'react-instantsearch-router-nextjs'; 5 | 6 | assert.ok(ReactInstantSearchRouterNext); 7 | 8 | console.log('react-instantsearch-router-nextjs is valid ESM'); 9 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/e2e.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable spaced-comment */ 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/src/utils/stripLocaleFromUrl.ts: -------------------------------------------------------------------------------- 1 | export function stripLocaleFromUrl( 2 | url: string, 3 | locale: string | undefined, 4 | includePrefixSeparator = true 5 | ): string { 6 | if (!locale) { 7 | return url; 8 | } 9 | 10 | return url.replace( 11 | new RegExp(`${includePrefixSeparator ? '/' : ''}${locale}(\\/|\\?|$)`), 12 | '$1' 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/react-instantsearch-router-nextjs/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.declaration", 3 | "exclude": [ 4 | "**/__tests__/e2e/**/*", 5 | "**/src/**/*.test.ts", 6 | "**/dist/**/*", 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/react-instantsearch/global.d.ts: -------------------------------------------------------------------------------- 1 | declare const __DEV__: boolean; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Carousel'; 2 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from 'react-instantsearch-core'; 2 | export * from './widgets'; 3 | export * from './components'; 4 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/types/PartialKeys.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Make certain keys of an object optional. 3 | */ 4 | export type PartialKeys = Omit & 5 | Partial>; 6 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/types/Translatable.ts: -------------------------------------------------------------------------------- 1 | export type Translatable< 2 | TProps extends { 3 | translations: Record string)>; 4 | } 5 | > = Omit & { 6 | translations?: Partial; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PartialKeys'; 2 | export * from './Translatable'; 3 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/ui/InternalHighlight.tsx: -------------------------------------------------------------------------------- 1 | import { createHighlightComponent } from 'instantsearch-ui-components'; 2 | import { createElement, Fragment } from 'react'; 3 | 4 | import type { Pragma } from 'instantsearch-ui-components'; 5 | 6 | export const InternalHighlight = createHighlightComponent({ 7 | createElement: createElement as Pragma, 8 | Fragment, 9 | }); 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/ui/lib/capitalize.ts: -------------------------------------------------------------------------------- 1 | export function capitalize(text: string): string { 2 | return text.toString().charAt(0).toUpperCase() + text.toString().slice(1); 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/ui/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './capitalize'; 2 | export * from './isModifierClick'; 3 | -------------------------------------------------------------------------------- /packages/react-instantsearch/src/ui/lib/isModifierClick.ts: -------------------------------------------------------------------------------- 1 | import type React from 'react'; 2 | 3 | export function isModifierClick(event: React.MouseEvent) { 4 | const isMiddleClick = event.button === 1; 5 | 6 | return Boolean( 7 | isMiddleClick || 8 | event.altKey || 9 | event.ctrlKey || 10 | event.metaKey || 11 | event.shiftKey 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/react-instantsearch/test/module/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const assert = require('assert'); 4 | 5 | const ReactInstantSearch = require('react-instantsearch'); 6 | 7 | assert.ok(ReactInstantSearch); 8 | 9 | console.log('react-instantsearch is valid CJS'); 10 | -------------------------------------------------------------------------------- /packages/react-instantsearch/test/module/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import assert from 'assert'; 3 | 4 | import * as ReactInstantSearch from 'react-instantsearch'; 5 | 6 | assert.ok(ReactInstantSearch); 7 | 8 | console.log('react-instantsearch is valid ESM'); 9 | -------------------------------------------------------------------------------- /packages/react-instantsearch/tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.declaration" 3 | } 4 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/.storybook/addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-knobs/register'; 2 | import '@storybook/addon-options/register'; 3 | import '@storybook/addon-actions/register'; 4 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/components/ExperimentalDynamicWidgets.js: -------------------------------------------------------------------------------- 1 | import { warn } from '../util/warn'; 2 | 3 | import AisDynamicWidgets from './DynamicWidgets'; 4 | 5 | // @MAJOR remove this file 6 | export default Object.assign({}, AisDynamicWidgets, { 7 | name: 'AisExperimentalDynamicWidgets', 8 | mounted() { 9 | warn('Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.'); 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/components/__tests__/__snapshots__/Configure.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders with scoped slots 1`] = ` 4 |
5 | 6 | hitsPerPage: 5 7 | 8 |
9 | `; 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/components/__tests__/__snapshots__/InstantSearch.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders correctly (empty) 1`] = ` 4 |
5 |
6 | `; 7 | 8 | exports[`renders correctly (with slot used) 1`] = ` 9 |
10 |
11 | Hi there, this is the main slot 12 |
13 |
14 | `; 15 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/components/__tests__/__snapshots__/SortBy.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders with scoped slots 1`] = ` 4 |
5 | 16 |
17 | `; 18 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/components/__tests__/__snapshots__/__Template.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders correctly 1`] = ` 4 |
5 | 8 |
9 | `; 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/instantsearch.js: -------------------------------------------------------------------------------- 1 | export { createSuitMixin } from './mixins/suit'; 2 | export { createWidgetMixin } from './mixins/widget'; 3 | export * from './widgets'; 4 | export { plugin as default } from './plugin'; 5 | export { createServerRootMixin } from './util/createServerRootMixin'; 6 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/instantsearch.umd.js: -------------------------------------------------------------------------------- 1 | import { plugin } from './plugin'; 2 | import { isVue2 } from './util/vue-compat'; 3 | 4 | // Automatically register Algolia Search components if Vue 2.x is available globally. 5 | if (typeof window !== 'undefined' && window.Vue && isVue2) { 6 | window.Vue.use(plugin); 7 | } 8 | 9 | export { createSuitMixin } from './mixins/suit'; 10 | export { createWidgetMixin } from './mixins/widget'; 11 | export * from './widgets'; 12 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/mixins/__mocks__/panel.js: -------------------------------------------------------------------------------- 1 | export const createPanelProviderMixin = jest.fn(() => ({})); 2 | 3 | export const createPanelConsumerMixin = jest.fn(() => ({})); 4 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/plugin.js: -------------------------------------------------------------------------------- 1 | /* eslint import/namespace: ['error', { allowComputed: true }]*/ 2 | 3 | import * as widgets from './widgets'; 4 | 5 | export const plugin = { 6 | install(localVue) { 7 | Object.keys(widgets).forEach((widgetName) => { 8 | localVue.component(widgets[widgetName].name, widgets[widgetName]); 9 | }); 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/testutils/client.js: -------------------------------------------------------------------------------- 1 | export const createFakeClient = () => ({ 2 | search: jest.fn((requests) => 3 | Promise.resolve({ 4 | results: requests.map(({ params: { query } }) => ({ query })), 5 | }) 6 | ), 7 | }); 8 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/vue-compat/Highlighter/index-vue2.js: -------------------------------------------------------------------------------- 1 | export { default } from './Highlighter-vue2.vue'; 2 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/vue-compat/Highlighter/index-vue3.js: -------------------------------------------------------------------------------- 1 | export { default } from '../../../components/Highlighter'; 2 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/vue-compat/Highlighter/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './index-vue2'; 2 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/vue-compat/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | By default, we maintain this repository based on Vue 2. 3 | That's why this file is exporting from `index-vue2`, 4 | which includes all the variables and methods for Vue 2. 5 | When `scripts/build-vue3.sh` runs, it will replace with 6 | > export * from './index-vue3'; 7 | and revert it back after finished. 8 | */ 9 | export * from './index-vue2'; 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/src/util/warn.js: -------------------------------------------------------------------------------- 1 | const cache = new Set(); 2 | 3 | export function warn(message) { 4 | if (cache.has(message)) return; 5 | cache.add(message); 6 | // eslint-disable-next-line no-console 7 | console.warn(message); 8 | } 9 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/stories/MemoryRouter.js: -------------------------------------------------------------------------------- 1 | export class MemoryRouter { 2 | constructor(initialState = {}) { 3 | this._memoryState = initialState; 4 | } 5 | write(routeState) { 6 | this._memoryState = routeState; 7 | } 8 | read() { 9 | return this._memoryState; 10 | } 11 | createURL() { 12 | return ''; 13 | } 14 | onUpdate() { 15 | return {}; 16 | } 17 | dispose() {} 18 | } 19 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/test/module/vue2/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const assert = require('assert'); 4 | 5 | const VueInstantSearch2 = require('vue-instantsearch/vue2/cjs/index.js'); 6 | 7 | assert.ok(VueInstantSearch2); 8 | 9 | console.log('vue-instantsearch/vue2 is valid CJS'); 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/test/module/vue2/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import assert from 'assert'; 4 | 5 | import * as VueInstantSearch2 from 'vue-instantsearch/vue2/es/index.js'; 6 | import * as Vue2Widgets from 'vue-instantsearch/vue2/es/src/widgets.js'; 7 | 8 | assert.ok(VueInstantSearch2); 9 | assert.ok(Vue2Widgets); 10 | 11 | console.log('vue-instantsearch/vue2 is valid ESM'); 12 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/test/module/vue3/is-cjs-module.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | const assert = require('assert'); 4 | 5 | const VueInstantSearch3 = require('vue-instantsearch/vue3/cjs/index.js'); 6 | 7 | assert.ok(VueInstantSearch3); 8 | 9 | console.log('vue-instantsearch/vue3 is valid CJS'); 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/test/module/vue3/is-es-module.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import assert from 'assert'; 4 | 5 | import * as VueInstantSearch3 from 'vue-instantsearch/vue3/es/index.js'; 6 | import * as Vue3Widgets from 'vue-instantsearch/vue3/es/src/widgets.js'; 7 | 8 | assert.ok(VueInstantSearch3); 9 | assert.ok(Vue3Widgets); 10 | 11 | console.log('vue-instantsearch/vue3 is valid ESM'); 12 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/test/utils/sortedHtmlSerializer.js: -------------------------------------------------------------------------------- 1 | import createSerializer from 'jest-serializer-html/createSerializer'; 2 | 3 | expect.addSnapshotSerializer( 4 | createSerializer({ 5 | print: { 6 | sortAttributes: (names) => names.sort(), 7 | }, 8 | }) 9 | ); 10 | -------------------------------------------------------------------------------- /packages/vue-instantsearch/vue-instantsearch-readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/vue-instantsearch/vue-instantsearch-readme.png -------------------------------------------------------------------------------- /scripts/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | extends: path.join(__dirname, '..', '.eslintrc.js'), 5 | rules: { 6 | 'import/no-commonjs': 'off', 7 | 'no-console': 'off', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /scripts/wdio/local.conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | ...require('@instantsearch/e2e-tests').local, 3 | // you can override the default options if needed here 4 | }; 5 | -------------------------------------------------------------------------------- /scripts/wdio/saucelabs.conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | ...require('@instantsearch/e2e-tests').saucelabs, 3 | }; 4 | -------------------------------------------------------------------------------- /specs/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # dependencies 5 | node_modules/ 6 | 7 | # logs 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | pnpm-debug.log* 12 | 13 | 14 | # environment variables 15 | .env 16 | .env.production 17 | 18 | # macOS-specific files 19 | .DS_Store 20 | 21 | /public 22 | /themes 23 | -------------------------------------------------------------------------------- /specs/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | 3 | export default defineConfig({ 4 | site: 'https://instantsearchjs.netlify.app/', 5 | base: '/specs', 6 | outDir: '../website/specs', 7 | }); 8 | -------------------------------------------------------------------------------- /specs/src/components/WidgetsList.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const allWidgets = await Astro.glob('../pages/widgets/*.md'); 3 | --- 4 | 5 | 17 | -------------------------------------------------------------------------------- /specs/src/config.ts: -------------------------------------------------------------------------------- 1 | export const GITHUB_EDIT_URL = `https://github.com/algolia/instantsearch/edit/master`; 2 | -------------------------------------------------------------------------------- /specs/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /specs/src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import MainLayout from '../layouts/MainLayout.astro'; 3 | 4 | const { BASE_URL } = import.meta.env; 5 | --- 6 | 7 | 8 |
9 |

Common specifications for InstantSearch

10 | View widgets 11 |
12 |
13 | -------------------------------------------------------------------------------- /specs/src/pages/widgets/configure.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ../../layouts/WidgetLayout.astro 3 | title: Configure 4 | type: widget 5 | options: 6 | - name: (all parameters) 7 | description: Each parameter will be translated to a [search parameter](https://www.algolia.com/doc/api-reference/search-api-parameters/) 8 | --- 9 | -------------------------------------------------------------------------------- /specs/src/pages/widgets/stats.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ../../layouts/WidgetLayout.astro 3 | title: Stats 4 | type: widget 5 | html: | 6 |
7 | 20,337 results found in 1ms. 8 |
9 | classes: 10 | - name: .ais-Stats 11 | description: the root div of the widget 12 | - name: .ais-Stats-text 13 | description: the text of the widget 14 | --- 15 | -------------------------------------------------------------------------------- /specs/src/types.ts: -------------------------------------------------------------------------------- 1 | export type WidgetFrontmatter = { 2 | title: string; 3 | html?: string; 4 | alt1?: string; 5 | althtml1?: string; 6 | alt2?: string; 7 | althtml2?: string; 8 | info?: string; 9 | classes?: Array<{ name: string; description: string }>; 10 | options?: Array<{ name: string; description: string; default?: string }>; 11 | translations?: Array<{ name: string; description: string; default?: string }>; 12 | }; 13 | -------------------------------------------------------------------------------- /specs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict", 3 | "compilerOptions": { 4 | "jsx": "preserve", 5 | "skipLibCheck": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/babel-testfixture/nested/index/index.js: -------------------------------------------------------------------------------- 1 | // @instantsearch/babel-testfixture/nested/index/index.js 2 | -------------------------------------------------------------------------------- /tests/babel-testfixture/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@instantsearch/babel-testfixture", 3 | "private": true, 4 | "description": "A package to use as a test in extension-resolver", 5 | "version": "0.0.1", 6 | "main": "nested/index" 7 | } 8 | -------------------------------------------------------------------------------- /tests/common/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "jest/no-export": "off", 4 | "no-lone-blocks": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tests/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './connectors'; 2 | export * from './widgets'; 3 | export * from './shared'; 4 | export * from './common'; 5 | -------------------------------------------------------------------------------- /tests/common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@instantsearch/tests", 3 | "private": true, 4 | "version": "1.74.0", 5 | "description": "Common tests for all InstantSearch flavors.", 6 | "dependencies": { 7 | "instantsearch.js": "4.78.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/e2e/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | yarn-error.log 4 | .DS_Store 5 | tests/* 6 | !tests/*.sh 7 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getCurrentPage.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getCurrentPage: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getCurrentPage', async () => { 8 | const page = await browser.$('.ais-Pagination-item--selected'); 9 | 10 | return Number(await page.getText()); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getHitsPerPage.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getHitsPerPage: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getHitsPerPage', async () => { 8 | const hitsPerPage = await browser.$('.ais-HitsPerPage-select'); 9 | 10 | return Number(await hitsPerPage.getValue()); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getHitsTitles.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getHitsTitles: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getHitsTitles', () => 8 | browser.getTextFromSelector('.hit h1') 9 | ); 10 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getSearchBoxValue.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getSearchBoxValue: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getSearchBoxValue', async () => { 8 | const searchBox = await browser.$('.ais-SearchBox [type=search]'); 9 | 10 | return searchBox.getValue(); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getSelectedRatingMenuItem.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getSelectedRatingMenuItem: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getSelectedRatingMenuItem', async () => { 8 | const rating = await browser.$( 9 | '.ais-RatingMenu-item--selected .ais-RatingMenu-link' 10 | ); 11 | 12 | return rating.getAttribute('aria-label'); 13 | }); 14 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getSelectedRefinementListItem.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getSelectedRefinementListItem: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getSelectedRefinementListItem', async () => { 8 | const item = await browser.$( 9 | '.ais-RefinementList-item--selected .ais-RefinementList-labelText' 10 | ); 11 | return await item.getText(); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getSortByValue.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getSortByValue: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getSortByValue', async () => { 8 | const sortBy = await browser.$('.ais-SortBy-select'); 9 | 10 | return sortBy.getValue(); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/e2e/helpers/getToggleRefinementStatus.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | getToggleRefinementStatus: () => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('getToggleRefinementStatus', async () => { 8 | const checkbox = await browser.$('.ais-ToggleRefinement-checkbox'); 9 | 10 | return checkbox.isSelected(); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/e2e/helpers/waitForElement.ts: -------------------------------------------------------------------------------- 1 | declare namespace WebdriverIOAsync { 2 | interface Browser { 3 | waitForElement: (selector: string) => Promise; 4 | } 5 | } 6 | 7 | browser.addCommand('waitForElement', (selector: string) => 8 | browser.waitUntil( 9 | async () => (await browser.$$(selector)).length > 0, 10 | undefined, 11 | `Element matching selector "${selector}" wasn't found` 12 | ) 13 | ); 14 | -------------------------------------------------------------------------------- /tests/e2e/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | local: require('./wdio.local.conf'), 3 | saucelabs: require('./wdio.saucelabs.conf'), 4 | }; 5 | -------------------------------------------------------------------------------- /tests/mocks/fixtures/index.ts: -------------------------------------------------------------------------------- 1 | export * from './recommendations'; 2 | -------------------------------------------------------------------------------- /tests/mocks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './createAPIResponse'; 2 | export * from './createCompositionClient'; 3 | export * from './createInsightsClient'; 4 | export * from './createSearchClient'; 5 | export * from './createAlgoliaSearchClient'; 6 | -------------------------------------------------------------------------------- /tests/mocks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@instantsearch/mocks", 3 | "version": "1.74.0", 4 | "private": true, 5 | "dependencies": { 6 | "algoliasearch-helper": "3.25.0", 7 | "instantsearch.js": "4.78.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/utils/castToJestMock.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Assert that a function is actually a mocked function. 3 | */ 4 | export const castToJestMock = any>( 5 | func: TFunction 6 | ) => func as jest.MockedFunction; 7 | -------------------------------------------------------------------------------- /tests/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './castToJestMock'; 2 | export * from './createInstantSearchSpy'; 3 | export * from './enzyme'; 4 | export * from './InstantSearchTestWrapper'; 5 | export * from './normalizeSnapshot'; 6 | export * from './runAllMicroTasks'; 7 | export * from './wait'; 8 | export * from './widgetSnapshotSerializer'; 9 | -------------------------------------------------------------------------------- /tests/utils/matchers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './toMatchNormalizedInlineSnapshot'; 2 | export * from './toWarnDev'; 3 | export * from './vue'; 4 | -------------------------------------------------------------------------------- /tests/utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@instantsearch/testutils", 3 | "version": "1.63.0", 4 | "private": true, 5 | "dependencies": { 6 | "@types/enzyme": "3.1.15", 7 | "enzyme": "3.11.0", 8 | "enzyme-adapter-preact-pure": "2.2.0", 9 | "enzyme-to-json": "3.6.2", 10 | "instantsearch.js": "4.78.3", 11 | "jest-serializer-html": "7.1.0", 12 | "preact": "^10.10.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/utils/runAllMicroTasks.ts: -------------------------------------------------------------------------------- 1 | export const runAllMicroTasks = () => Promise.resolve(); 2 | -------------------------------------------------------------------------------- /tests/utils/wait.ts: -------------------------------------------------------------------------------- 1 | /** Promise for a timeout of a certain number of ms */ 2 | export const wait = (ms: number = 0) => 3 | new Promise((resolve) => setTimeout(resolve, ms)); 4 | -------------------------------------------------------------------------------- /tsconfig.declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "emitDeclarationOnly": true, 6 | "noEmit": false 7 | }, 8 | "exclude": ["**/__tests__/**/*", "**/dist/**/*"], 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.v4.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": [ 4 | "**/es", 5 | "**/dist", 6 | "tests/e2e", 7 | "examples/react/next/next-env.d.ts", 8 | "examples/react/react-native", 9 | "packages/create-instantsearch-app/src/templates/**/*", 10 | "packages/algolia-experiences" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /website/stories/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/website/stories/.gitkeep --------------------------------------------------------------------------------