@shopify/create-hydrogen 5.0.1 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hydrogen/i18n/domains.ts +4 -11
- package/dist/assets/hydrogen/i18n/mock-i18n-types.ts +4 -2
- package/dist/assets/hydrogen/i18n/subdomains.ts +4 -11
- package/dist/assets/hydrogen/i18n/subfolders.ts +4 -11
- package/dist/assets/hydrogen/starter/CHANGELOG.md +165 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +5 -2
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +65 -19
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +42 -0
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +76 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +164 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +322 -0
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +10 -8
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/lib/context.ts +43 -0
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +53 -0
- package/dist/assets/hydrogen/starter/app/lib/search.ts +74 -24
- package/dist/assets/hydrogen/starter/app/root.tsx +4 -7
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +5 -19
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +11 -24
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +14 -27
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +12 -30
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +13 -27
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +9 -31
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +312 -73
- package/dist/assets/hydrogen/starter/app/styles/reset.css +12 -2
- package/dist/assets/hydrogen/starter/env.d.ts +11 -30
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +391 -0
- package/dist/assets/hydrogen/starter/guides/search/search.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/search/search.md +333 -0
- package/dist/assets/hydrogen/starter/package.json +4 -4
- package/dist/assets/hydrogen/starter/server.ts +18 -74
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +242 -172
- package/dist/assets/hydrogen/virtual-routes/components/{PageLayout.jsx → Layout.jsx} +2 -2
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +7 -6
- package/dist/{chunk-N57NIGCW.js → chunk-HM6MXADF.js} +70 -70
- package/dist/create-app.js +352 -367
- package/dist/{error-handler-7QYA5NK4.js → error-handler-VMJKTBFL.js} +1 -1
- package/dist/{morph-ZJCCGFNC.js → morph-HBPW4ZFI.js} +59 -59
- package/package.json +1 -1
- package/dist/assets/hydrogen/starter/app/components/Search.tsx +0 -514
- package/dist/assets/hydrogen/starter/app/routes/api.predictive-search.tsx +0 -318
|
@@ -2,13 +2,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
Links,
|
|
4
4
|
Meta,
|
|
5
|
+
Outlet,
|
|
5
6
|
Scripts,
|
|
6
7
|
ScrollRestoration,
|
|
7
8
|
isRouteErrorResponse,
|
|
8
9
|
useRouteError
|
|
9
10
|
} from "@remix-run/react";
|
|
10
11
|
import favicon from "./assets/favicon.svg";
|
|
11
|
-
import {
|
|
12
|
+
import { Layout } from "./components/Layout.jsx";
|
|
12
13
|
import { useNonce } from "@shopify/hydrogen";
|
|
13
14
|
import styles from "./assets/styles.css?url";
|
|
14
15
|
const links = () => {
|
|
@@ -17,7 +18,7 @@ const links = () => {
|
|
|
17
18
|
{ rel: "icon", type: "image/svg+xml", href: favicon }
|
|
18
19
|
];
|
|
19
20
|
};
|
|
20
|
-
function
|
|
21
|
+
function App() {
|
|
21
22
|
const nonce = useNonce();
|
|
22
23
|
return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
|
|
23
24
|
/* @__PURE__ */ jsxs("head", { children: [
|
|
@@ -35,7 +36,7 @@ function Layout({ children }) {
|
|
|
35
36
|
/* @__PURE__ */ jsx(Links, {})
|
|
36
37
|
] }),
|
|
37
38
|
/* @__PURE__ */ jsxs("body", { children: [
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
39
|
+
/* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(Outlet, {}) }),
|
|
39
40
|
/* @__PURE__ */ jsx(ScrollRestoration, { nonce }),
|
|
40
41
|
/* @__PURE__ */ jsx(Scripts, { nonce })
|
|
41
42
|
] })
|
|
@@ -51,14 +52,14 @@ function ErrorBoundary() {
|
|
|
51
52
|
} else if (error instanceof Error) {
|
|
52
53
|
errorMessage = error.message;
|
|
53
54
|
}
|
|
54
|
-
return /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
|
|
55
|
+
return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
|
|
55
56
|
/* @__PURE__ */ jsx("h1", { children: "Please report this error" }),
|
|
56
57
|
/* @__PURE__ */ jsx("h2", { children: errorStatus }),
|
|
57
58
|
errorMessage && /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("pre", { children: errorMessage }) })
|
|
58
|
-
] });
|
|
59
|
+
] }) });
|
|
59
60
|
}
|
|
60
61
|
export {
|
|
61
62
|
ErrorBoundary,
|
|
62
|
-
|
|
63
|
+
App as default,
|
|
63
64
|
links
|
|
64
65
|
};
|