@vue-storefront/next 6.0.0 → 6.1.0-next.1
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/client.js +9 -5
- package/dist/client.mjs +9 -5
- package/package.json +11 -8
package/dist/client.js
CHANGED
|
@@ -66,6 +66,7 @@ __export(client_exports, {
|
|
|
66
66
|
module.exports = __toCommonJS(client_exports);
|
|
67
67
|
|
|
68
68
|
// src/alokai-provider.tsx
|
|
69
|
+
var import_instrumentation_next_component = require("@alokai/instrumentation-next-component");
|
|
69
70
|
var import_script = __toESM(require("next/script"));
|
|
70
71
|
var import_react2 = __toESM(require("react"));
|
|
71
72
|
|
|
@@ -174,12 +175,15 @@ function createAlokaiContext() {
|
|
|
174
175
|
initialData,
|
|
175
176
|
sdk
|
|
176
177
|
}) {
|
|
178
|
+
const metaTagScript = `
|
|
179
|
+
const vsfMetaTag = document.createElement("meta");
|
|
180
|
+
vsfMetaTag.setAttribute("name", "generator");
|
|
181
|
+
vsfMetaTag.setAttribute("content", "Alokai Storefront");
|
|
182
|
+
document.head.appendChild(vsfMetaTag);
|
|
183
|
+
`;
|
|
177
184
|
return /* @__PURE__ */ import_react2.default.createElement(SdkContext.Provider, { value: sdk }, /* @__PURE__ */ import_react2.default.createElement(import_script.default, { id: "vsfMetaTag", strategy: "beforeInteractive" }, `
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
vsfMetaTag.setAttribute("content", "Alokai Storefront");
|
|
181
|
-
document.head.appendChild(vsfMetaTag);
|
|
182
|
-
`), /* @__PURE__ */ import_react2.default.createElement(SfStateProvider, { initialData }, children));
|
|
185
|
+
${metaTagScript}
|
|
186
|
+
`), /* @__PURE__ */ import_react2.default.createElement(import_instrumentation_next_component.AlokaiInstrumentation, null), /* @__PURE__ */ import_react2.default.createElement(SfStateProvider, { initialData }, children));
|
|
183
187
|
}
|
|
184
188
|
const useSdk = () => {
|
|
185
189
|
const contextSdk = (0, import_react2.useContext)(SdkContext);
|
package/dist/client.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-FWCSY2DS.mjs";
|
|
7
7
|
|
|
8
8
|
// src/alokai-provider.tsx
|
|
9
|
+
import { AlokaiInstrumentation } from "@alokai/instrumentation-next-component";
|
|
9
10
|
import Script from "next/script";
|
|
10
11
|
import React2, { createContext as createContext2, useContext as useContext2 } from "react";
|
|
11
12
|
|
|
@@ -118,12 +119,15 @@ function createAlokaiContext() {
|
|
|
118
119
|
initialData,
|
|
119
120
|
sdk
|
|
120
121
|
}) {
|
|
122
|
+
const metaTagScript = `
|
|
123
|
+
const vsfMetaTag = document.createElement("meta");
|
|
124
|
+
vsfMetaTag.setAttribute("name", "generator");
|
|
125
|
+
vsfMetaTag.setAttribute("content", "Alokai Storefront");
|
|
126
|
+
document.head.appendChild(vsfMetaTag);
|
|
127
|
+
`;
|
|
121
128
|
return /* @__PURE__ */ React2.createElement(SdkContext.Provider, { value: sdk }, /* @__PURE__ */ React2.createElement(Script, { id: "vsfMetaTag", strategy: "beforeInteractive" }, `
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
vsfMetaTag.setAttribute("content", "Alokai Storefront");
|
|
125
|
-
document.head.appendChild(vsfMetaTag);
|
|
126
|
-
`), /* @__PURE__ */ React2.createElement(SfStateProvider, { initialData }, children));
|
|
129
|
+
${metaTagScript}
|
|
130
|
+
`), /* @__PURE__ */ React2.createElement(AlokaiInstrumentation, null), /* @__PURE__ */ React2.createElement(SfStateProvider, { initialData }, children));
|
|
127
131
|
}
|
|
128
132
|
const useSdk = () => {
|
|
129
133
|
const contextSdk = useContext2(SdkContext);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vue-storefront/next",
|
|
3
3
|
"description": "Alokai dedicated features for Next.js",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "6.0.
|
|
5
|
+
"version": "6.1.0-next.1",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -27,23 +27,26 @@
|
|
|
27
27
|
"version": "cp CHANGELOG.md ../../docs/enterprise/content/storefront/6.change-log/next.md"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@alokai/instrumentation-next-component": "1.0.0-next.13",
|
|
30
31
|
"zustand": "^4.5.4"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@alokai/connect": "^1.0.0",
|
|
34
|
+
"@alokai/connect": "^1.1.0-next.0",
|
|
34
35
|
"@types/react": "18.3.2",
|
|
35
36
|
"@types/react-dom": "18.3.0",
|
|
37
|
+
"eslint": "9.23.0",
|
|
38
|
+
"next": "14.2.25",
|
|
39
|
+
"prettier": "3.3.2",
|
|
40
|
+
"react": "18.3.1",
|
|
36
41
|
"react-dom": "18.3.1",
|
|
37
42
|
"start-server-and-test": "^2.0.11",
|
|
38
43
|
"tsup": "8.3.0",
|
|
39
|
-
"vitest": "2.1.
|
|
40
|
-
"react": "18.3.1",
|
|
41
|
-
"next": "14.2.25"
|
|
44
|
+
"vitest": "2.1.9"
|
|
42
45
|
},
|
|
43
46
|
"peerDependencies": {
|
|
44
|
-
"@alokai/connect": "^1.0.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
+
"@alokai/connect": "^1.1.0-next.0",
|
|
48
|
+
"next": "^13.4.7 || ^14.0.0",
|
|
49
|
+
"react": "^18.2.0"
|
|
47
50
|
},
|
|
48
51
|
"engines": {
|
|
49
52
|
"npm": ">=8.0.0",
|