@shopware/cms-base-layer 3.1.0 → 4.1.0
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/README.md +79 -23
- package/app/app.config.ts +3 -3
- package/app/assets/css/rich-text.css +80 -0
- package/app/components/SwCategoryNavigationLink.vue +4 -5
- package/app/components/SwContactForm.vue +2 -1
- package/app/components/SwFilterChips.vue +29 -7
- package/app/components/SwMedia3D.vue +8 -3
- package/app/components/SwNewsletterForm.vue +2 -1
- package/app/components/SwProductAddToCart.vue +27 -4
- package/app/components/SwProductCard.vue +26 -4
- package/app/components/SwProductCardDetails.vue +9 -2
- package/app/components/SwProductCardImage.vue +5 -1
- package/app/components/SwProductListingFilter.vue +6 -1
- package/app/components/SwProductListingFilters.vue +13 -189
- package/app/components/SwProductListingFiltersHorizontal.vue +20 -172
- package/app/components/SwStockInfo.vue +5 -2
- package/app/components/SwVariantConfigurator.vue +8 -3
- package/app/components/listing-filters/SwFilterCategories.vue +158 -0
- package/app/components/public/cms/CmsBlockSpatialViewer.vue +7 -7
- package/app/components/public/cms/CmsGenericBlock.vue +6 -10
- package/app/components/public/cms/CmsGenericElement.md +11 -5
- package/app/components/public/cms/CmsGenericElement.vue +17 -11
- package/app/components/public/cms/FrontendAccountCustomerGroupRegistrationPage.vue +1 -1
- package/app/components/public/cms/block/CmsBlockAppRenderer.vue +48 -0
- package/app/components/public/cms/block/CmsBlockCategoryHeading.vue +19 -0
- package/app/components/public/cms/block/CmsBlockCategoryNavigation.vue +3 -2
- package/app/components/public/cms/block/CmsBlockCenterText.vue +5 -4
- package/app/components/public/cms/block/CmsBlockCrossSelling.vue +3 -2
- package/app/components/public/cms/block/CmsBlockCustomForm.vue +3 -2
- package/app/components/public/cms/block/CmsBlockForm.vue +3 -2
- package/app/components/public/cms/block/CmsBlockGalleryBuybox.vue +4 -3
- package/app/components/public/cms/block/CmsBlockImage.vue +3 -2
- package/app/components/public/cms/block/CmsBlockImageBubbleRow.vue +5 -4
- package/app/components/public/cms/block/CmsBlockImageCover.vue +3 -2
- package/app/components/public/cms/block/CmsBlockImageFourColumn.vue +6 -5
- package/app/components/public/cms/block/CmsBlockImageGallery.vue +3 -2
- package/app/components/public/cms/block/CmsBlockImageGalleryBig.vue +3 -2
- package/app/components/public/cms/block/CmsBlockImageHighlightRow.vue +5 -4
- package/app/components/public/cms/block/CmsBlockImageSimpleGrid.vue +5 -4
- package/app/components/public/cms/block/CmsBlockImageSlider.vue +3 -2
- package/app/components/public/cms/block/CmsBlockImageText.vue +4 -3
- package/app/components/public/cms/block/CmsBlockImageTextBubble.vue +8 -7
- package/app/components/public/cms/block/CmsBlockImageTextCover.vue +4 -3
- package/app/components/public/cms/block/CmsBlockImageTextGallery.vue +39 -16
- package/app/components/public/cms/block/CmsBlockImageTextRow.vue +8 -7
- package/app/components/public/cms/block/CmsBlockImageThreeColumn.vue +5 -4
- package/app/components/public/cms/block/CmsBlockImageThreeCover.vue +5 -4
- package/app/components/public/cms/block/CmsBlockImageTwoColumn.vue +4 -3
- package/app/components/public/cms/block/CmsBlockProductDescriptionReviews.vue +3 -2
- package/app/components/public/cms/block/CmsBlockProductHeading.vue +4 -3
- package/app/components/public/cms/block/CmsBlockProductListing.vue +3 -2
- package/app/components/public/cms/block/CmsBlockProductThreeColumn.vue +5 -4
- package/app/components/public/cms/block/CmsBlockSidebarFilter.vue +7 -5
- package/app/components/public/cms/block/CmsBlockText.vue +3 -2
- package/app/components/public/cms/block/CmsBlockTextHero.vue +3 -2
- package/app/components/public/cms/block/CmsBlockTextOnImage.vue +3 -2
- package/app/components/public/cms/block/CmsBlockTextThreeColumn.vue +5 -4
- package/app/components/public/cms/block/CmsBlockTextTwoColumn.vue +4 -3
- package/app/components/public/cms/block/CmsBlockVideo.vue +19 -0
- package/app/components/public/cms/block/CmsBlockVimeoVideo.vue +3 -2
- package/app/components/public/cms/block/CmsBlockYoutubeVideo.vue +3 -2
- package/app/components/public/cms/element/CmsElementBuyBox.vue +4 -1
- package/app/components/public/cms/element/CmsElementCategoryName.md +8 -0
- package/app/components/public/cms/element/CmsElementCategoryName.vue +35 -0
- package/app/components/public/cms/element/CmsElementCrossSelling.vue +2 -1
- package/app/components/public/cms/element/CmsElementHtml.vue +1 -1
- package/app/components/public/cms/element/CmsElementImage.vue +41 -1
- package/app/components/public/cms/element/CmsElementImageGallery.vue +2 -1
- package/app/components/public/cms/element/CmsElementProductDescriptionReviews.vue +2 -2
- package/app/components/public/cms/element/CmsElementProductListing.vue +58 -25
- package/app/components/public/cms/element/CmsElementText.md +77 -0
- package/app/components/public/cms/element/CmsElementText.vue +15 -41
- package/app/components/public/cms/element/CmsElementVideo.md +27 -0
- package/app/components/public/cms/element/CmsElementVideo.vue +193 -0
- package/app/components/public/cms/section/CmsSectionSidebar.vue +4 -4
- package/app/composables/useListingFilters.ts +189 -0
- package/app/composables/useSelectedListingFilters.ts +46 -0
- package/app/helpers/cms/getAppRendererLayout.test.ts +93 -0
- package/app/helpers/cms/getAppRendererLayout.ts +36 -0
- package/app/helpers/cms/getCategoryNameContent.test.ts +57 -0
- package/app/helpers/cms/getCategoryNameContent.ts +15 -0
- package/app/helpers/cms/getTextElementContent.test.ts +79 -0
- package/app/helpers/cms/getTextElementContent.ts +37 -0
- package/app/helpers/cms/getVideoElementOptions.test.ts +384 -0
- package/app/helpers/cms/getVideoElementOptions.ts +142 -0
- package/app/helpers/html-to-vue/renderToHtml.test.ts +71 -0
- package/app/helpers/html-to-vue/renderToHtml.ts +5 -1
- package/app/helpers/html-to-vue/renderer.ts +13 -4
- package/app/helpers/product/shouldShowBuyButton.test.ts +21 -0
- package/app/helpers/product/shouldShowBuyButton.ts +6 -0
- package/app/utils/{useSelectedListingFilters.test.ts → listingFilterState.test.ts} +14 -4
- package/app/utils/{useSelectedListingFilters.ts → listingFilterState.ts} +4 -33
- package/app/utils/listingFilters.test.ts +39 -0
- package/app/utils/listingFilters.ts +19 -0
- package/component-dirs.json +20 -0
- package/index.d.ts +2 -2
- package/nuxt.config.ts +11 -28
- package/package.json +23 -26
- package/dist/index.d.mts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.mjs +0 -31
- package/index.cjs +0 -7
|
@@ -3,22 +3,32 @@ import { describe, expect, it } from "vitest";
|
|
|
3
3
|
import {
|
|
4
4
|
applyQueryToFilters,
|
|
5
5
|
createEmptyFilterState,
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./listingFilterState";
|
|
7
7
|
|
|
8
8
|
describe("applyQueryToFilters", () => {
|
|
9
9
|
it("populates sets from pipe-joined values", () => {
|
|
10
10
|
const state = createEmptyFilterState();
|
|
11
|
-
applyQueryToFilters(state, {
|
|
11
|
+
applyQueryToFilters(state, {
|
|
12
|
+
manufacturer: "a|b",
|
|
13
|
+
properties: "x",
|
|
14
|
+
categories: "c1|c2",
|
|
15
|
+
});
|
|
12
16
|
expect([...state.manufacturer]).toEqual(["a", "b"]);
|
|
13
17
|
expect([...state.properties]).toEqual(["x"]);
|
|
18
|
+
expect([...state.categories]).toEqual(["c1", "c2"]);
|
|
14
19
|
});
|
|
15
20
|
|
|
16
21
|
it("clears removed filters when the query no longer has them (Back/Forward)", () => {
|
|
17
22
|
const state = createEmptyFilterState();
|
|
18
|
-
applyQueryToFilters(state, {
|
|
19
|
-
|
|
23
|
+
applyQueryToFilters(state, {
|
|
24
|
+
manufacturer: "a|b",
|
|
25
|
+
categories: "c1",
|
|
26
|
+
search: "shirt",
|
|
27
|
+
});
|
|
28
|
+
applyQueryToFilters(state, { search: "shirt" }); // manufacturer + categories removed
|
|
20
29
|
expect(state.manufacturer.size).toBe(0);
|
|
21
30
|
expect(state.properties.size).toBe(0);
|
|
31
|
+
expect(state.categories.size).toBe(0);
|
|
22
32
|
});
|
|
23
33
|
|
|
24
34
|
it("clears removed scalar filters on resync", () => {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { reactive, watch } from "vue";
|
|
2
|
-
import type { UnwrapNestedRefs } from "vue";
|
|
3
|
-
import { useRoute } from "vue-router";
|
|
4
1
|
import type { LocationQuery } from "vue-router";
|
|
5
2
|
|
|
6
3
|
import { firstQueryValue, toNumber } from "./routeQuery";
|
|
@@ -8,6 +5,7 @@ import { firstQueryValue, toNumber } from "./routeQuery";
|
|
|
8
5
|
export type FilterState = {
|
|
9
6
|
manufacturer: Set<string>;
|
|
10
7
|
properties: Set<string>;
|
|
8
|
+
categories: Set<string>;
|
|
11
9
|
"min-price": number | undefined;
|
|
12
10
|
"max-price": number | undefined;
|
|
13
11
|
rating: number | undefined;
|
|
@@ -18,6 +16,7 @@ export type FilterState = {
|
|
|
18
16
|
export const createEmptyFilterState = (): FilterState => ({
|
|
19
17
|
manufacturer: new Set<string>(),
|
|
20
18
|
properties: new Set<string>(),
|
|
19
|
+
categories: new Set<string>(),
|
|
21
20
|
"min-price": undefined,
|
|
22
21
|
"max-price": undefined,
|
|
23
22
|
rating: undefined,
|
|
@@ -46,13 +45,14 @@ export const applyQueryToFilters = (
|
|
|
46
45
|
// (props bound to them stay reactive); replace scalars with undefined.
|
|
47
46
|
state.manufacturer.clear();
|
|
48
47
|
state.properties.clear();
|
|
48
|
+
state.categories.clear();
|
|
49
49
|
state["min-price"] = undefined;
|
|
50
50
|
state["max-price"] = undefined;
|
|
51
51
|
state.rating = undefined;
|
|
52
52
|
state["shipping-free"] = undefined;
|
|
53
53
|
|
|
54
54
|
// 2) Repopulate from the current query.
|
|
55
|
-
for (const code of ["manufacturer", "properties"] as const) {
|
|
55
|
+
for (const code of ["manufacturer", "properties", "categories"] as const) {
|
|
56
56
|
const value = firstQueryValue(query[code]);
|
|
57
57
|
if (!value) continue;
|
|
58
58
|
for (const element of value.split("|")) {
|
|
@@ -74,32 +74,3 @@ export const applyQueryToFilters = (
|
|
|
74
74
|
state["shipping-free"] = shippingFree === "true";
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Returns the reactive filter state, populated from the current route.query at
|
|
80
|
-
* setup (runs on server AND client -> identical first render, no hydration
|
|
81
|
-
* mismatch) and kept in sync on every subsequent query-only navigation
|
|
82
|
-
* (Back/Forward, manual URL edits, the component's own executeSearch push).
|
|
83
|
-
*
|
|
84
|
-
* The watcher is intentionally NOT immediate: the setup-time apply already
|
|
85
|
-
* covers the first render, and an immediate watcher would re-run during
|
|
86
|
-
* hydration. It only resyncs UI state - it never navigates or fetches - so it
|
|
87
|
-
* cannot loop with executeSearch() nor cause an extra listing request.
|
|
88
|
-
*/
|
|
89
|
-
export const useSelectedListingFilters = (): UnwrapNestedRefs<FilterState> => {
|
|
90
|
-
const route = useRoute();
|
|
91
|
-
const state = reactive<FilterState>(createEmptyFilterState());
|
|
92
|
-
|
|
93
|
-
// Initial parse (SSR + first client render).
|
|
94
|
-
applyQueryToFilters(state as FilterState, route.query);
|
|
95
|
-
|
|
96
|
-
// Resync on query-only route changes while the component stays mounted.
|
|
97
|
-
watch(
|
|
98
|
-
() => route.query,
|
|
99
|
-
(query) => {
|
|
100
|
-
applyQueryToFilters(state as FilterState, query);
|
|
101
|
-
},
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
return state;
|
|
105
|
-
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { getVisibleListingFilters } from "./listingFilters";
|
|
4
|
+
|
|
5
|
+
describe("getVisibleListingFilters", () => {
|
|
6
|
+
const filters = [
|
|
7
|
+
{ code: "manufacturer" },
|
|
8
|
+
{ code: "categories" },
|
|
9
|
+
{ code: "price" },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
it("should keep the categories filter on a search listing", () => {
|
|
13
|
+
expect(
|
|
14
|
+
getVisibleListingFilters(filters, { isProductSearch: true }),
|
|
15
|
+
).toStrictEqual(filters);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("should drop the categories filter on a non-search listing", () => {
|
|
19
|
+
expect(
|
|
20
|
+
getVisibleListingFilters(filters, { isProductSearch: false }),
|
|
21
|
+
).toStrictEqual([{ code: "manufacturer" }, { code: "price" }]);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("should leave listings without a categories filter untouched", () => {
|
|
25
|
+
const withoutCategories = [{ code: "manufacturer" }, { code: "rating" }];
|
|
26
|
+
expect(
|
|
27
|
+
getVisibleListingFilters(withoutCategories, { isProductSearch: false }),
|
|
28
|
+
).toStrictEqual(withoutCategories);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("should return an empty array for missing filters", () => {
|
|
32
|
+
expect(
|
|
33
|
+
getVisibleListingFilters(undefined, { isProductSearch: true }),
|
|
34
|
+
).toStrictEqual([]);
|
|
35
|
+
expect(
|
|
36
|
+
getVisibleListingFilters(null, { isProductSearch: false }),
|
|
37
|
+
).toStrictEqual([]);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CATEGORY_AGGREGATION_NAME } from "@shopware/helpers";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Narrows the listing filters to the ones the current listing can act on.
|
|
5
|
+
*
|
|
6
|
+
* The category selection is only written to the `categories` URL param and to
|
|
7
|
+
* the criteria `post-filter` on search listings. A category listing that
|
|
8
|
+
* happens to request the category aggregations would otherwise render a
|
|
9
|
+
* checkbox that the next query sync resets and that never changes the result
|
|
10
|
+
* set, so the filter is dropped there.
|
|
11
|
+
*/
|
|
12
|
+
export const getVisibleListingFilters = <T extends { code: string }>(
|
|
13
|
+
filters: T[] | undefined | null,
|
|
14
|
+
{ isProductSearch }: { isProductSearch: boolean },
|
|
15
|
+
): T[] => {
|
|
16
|
+
if (!filters) return [];
|
|
17
|
+
if (isProductSearch) return filters;
|
|
18
|
+
return filters.filter((filter) => filter.code !== CATEGORY_AGGREGATION_NAME);
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dirs": [
|
|
3
|
+
{
|
|
4
|
+
"path": "./app/components",
|
|
5
|
+
"pattern": "Sw*",
|
|
6
|
+
"global": true
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"path": "./app/components/public",
|
|
10
|
+
"pathPrefix": false,
|
|
11
|
+
"global": true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"path": "./app/components/ui",
|
|
15
|
+
"prefix": "Sw",
|
|
16
|
+
"global": true
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"excluded": ["SwMedia3D"]
|
|
20
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="@nuxt/schema" />
|
|
2
2
|
|
|
3
|
-
export * from "@shopware/composables";
|
|
4
|
-
export * from "./.nuxt/imports";
|
|
5
3
|
|
|
6
4
|
type CmsBaseLayerAppConfig = {
|
|
7
5
|
/** Placeholder shown while CMS images are loading */
|
|
@@ -42,3 +40,5 @@ declare module "@nuxt/schema" {
|
|
|
42
40
|
interface AppConfig extends CmsBaseLayerAppConfig {}
|
|
43
41
|
interface AppConfigInput extends CmsBaseLayerAppConfig {}
|
|
44
42
|
}
|
|
43
|
+
|
|
44
|
+
export {};
|
package/nuxt.config.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { NuxtConfig } from "@nuxt/schema";
|
|
|
3
3
|
import { defineNuxtConfig } from "nuxt/config";
|
|
4
4
|
import type { LoggingFunction, RollupLog } from "rollup";
|
|
5
5
|
|
|
6
|
+
import componentDirs from "./component-dirs.json";
|
|
7
|
+
|
|
6
8
|
const { resolve: resolveLayer } = createResolver(import.meta.url);
|
|
7
9
|
|
|
8
10
|
export default defineNuxtConfig({
|
|
@@ -15,19 +17,15 @@ export default defineNuxtConfig({
|
|
|
15
17
|
// the UnoCSS setup lives in @shopware/unocss-design-tokens-layer (or your own config),
|
|
16
18
|
// so apps that don't use UnoCSS can still extend this layer.
|
|
17
19
|
modules: ["@nuxt/image"],
|
|
20
|
+
css: [resolveLayer("./app/assets/css/rich-text.css")],
|
|
18
21
|
|
|
19
22
|
hooks: {
|
|
20
23
|
"components:extend"(components) {
|
|
21
24
|
// Exclude SwMedia3D from auto-import to prevent bundling heavy 3D libraries
|
|
22
25
|
// It should be dynamically imported when needed using defineAsyncComponent.
|
|
23
|
-
const
|
|
24
|
-
(c) =>
|
|
25
|
-
|
|
26
|
-
c.kebabName === "sw-media3-d" ||
|
|
27
|
-
c.filePath?.includes("SwMedia3D.vue"),
|
|
28
|
-
);
|
|
29
|
-
if (index > -1) {
|
|
30
|
-
components.splice(index, 1);
|
|
26
|
+
for (const name of componentDirs.excluded) {
|
|
27
|
+
const index = components.findIndex((c) => c.pascalName === name);
|
|
28
|
+
if (index > -1) components.splice(index, 1);
|
|
31
29
|
}
|
|
32
30
|
},
|
|
33
31
|
},
|
|
@@ -90,26 +88,11 @@ export default defineNuxtConfig({
|
|
|
90
88
|
},
|
|
91
89
|
},
|
|
92
90
|
|
|
93
|
-
components:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
global: true,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
path: resolveLayer("./app/components/ui"),
|
|
102
|
-
extensions: [".vue"],
|
|
103
|
-
prefix: "Sw",
|
|
104
|
-
global: true,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
path: resolveLayer("./app/components/public"),
|
|
108
|
-
pathPrefix: false,
|
|
109
|
-
global: true,
|
|
110
|
-
extensions: [".vue"],
|
|
111
|
-
},
|
|
112
|
-
],
|
|
91
|
+
components: componentDirs.dirs.map(({ path, ...dir }) => ({
|
|
92
|
+
...dir,
|
|
93
|
+
path: resolveLayer(path),
|
|
94
|
+
extensions: [".vue"],
|
|
95
|
+
})),
|
|
113
96
|
alias: {
|
|
114
97
|
"@cms-assets": resolveLayer("./app/assets"),
|
|
115
98
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware/cms-base-layer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Vue CMS Nuxt Layer for Shopware",
|
|
5
5
|
"author": "Shopware",
|
|
6
6
|
"repository": {
|
|
@@ -21,55 +21,52 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "./nuxt.config.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./nuxt.config.ts",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
24
28
|
"files": [
|
|
25
|
-
"dist",
|
|
26
29
|
"app",
|
|
27
|
-
"
|
|
28
|
-
"index.cjs",
|
|
30
|
+
"component-dirs.json",
|
|
29
31
|
"index.d.ts",
|
|
30
|
-
"app.config.ts",
|
|
31
32
|
"nuxt.config.ts"
|
|
32
33
|
],
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@iconify-json/carbon": "1.2.
|
|
35
|
-
"@nuxt/image": "2.
|
|
36
|
-
"@nuxt/kit": "4.
|
|
37
|
-
"@tresjs/cientos": "5.
|
|
35
|
+
"@iconify-json/carbon": "1.2.27",
|
|
36
|
+
"@nuxt/image": "2.1.0",
|
|
37
|
+
"@nuxt/kit": "4.5.2",
|
|
38
|
+
"@tresjs/cientos": "5.8.1",
|
|
38
39
|
"@tresjs/nuxt": "^5.6.3",
|
|
39
40
|
"@vuelidate/core": "2.0.3",
|
|
40
41
|
"@vuelidate/validators": "2.0.4",
|
|
41
|
-
"@vueuse/core": "
|
|
42
|
+
"@vueuse/core": "15.0.0",
|
|
42
43
|
"entities": "8.0.0",
|
|
43
44
|
"scule": "1.3.0",
|
|
44
45
|
"html-to-ast": "0.0.6",
|
|
45
|
-
"three": "0.
|
|
46
|
-
"vue": "3.5.
|
|
46
|
+
"three": "0.185.1",
|
|
47
|
+
"vue": "3.5.43",
|
|
47
48
|
"xss": "1.0.15",
|
|
48
|
-
"@shopware/api-client": "1.
|
|
49
|
-
"@shopware/composables": "1.
|
|
50
|
-
"@shopware/helpers": "1.
|
|
49
|
+
"@shopware/api-client": "1.7.0",
|
|
50
|
+
"@shopware/composables": "1.14.0",
|
|
51
|
+
"@shopware/helpers": "1.8.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@nuxt/schema": "4.
|
|
54
|
+
"@nuxt/schema": "4.5.2",
|
|
54
55
|
"@types/three": "0.182.0",
|
|
55
56
|
"@typescript/native-preview": "7.0.0-dev.20260205.1",
|
|
56
|
-
"@vitest/coverage-v8": "
|
|
57
|
-
"nuxt": "4.
|
|
57
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
58
|
+
"nuxt": "4.5.2",
|
|
58
59
|
"typescript": "5.9.3",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"vue-
|
|
62
|
-
"vue-tsc": "3.3.7",
|
|
60
|
+
"vitest": "5.0.0",
|
|
61
|
+
"vue-router": "5.3.1",
|
|
62
|
+
"vue-tsc": "3.3.11",
|
|
63
63
|
"tsconfig": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
|
-
"build": "nuxt prepare && unbuild",
|
|
67
|
-
"dev": "unbuild --stub",
|
|
68
66
|
"lint": "oxlint . && oxfmt --check .",
|
|
69
67
|
"lint:fix": "oxlint --fix . && oxfmt --write . && pnpm run typecheck",
|
|
70
68
|
"typecheck": "pnpm nuxt prepare && tsgo --noEmit",
|
|
71
69
|
"test": "vitest run",
|
|
72
|
-
"test:watch": "vitest"
|
|
73
|
-
"check-colors": "tsx scripts/check-unused-colors.ts"
|
|
70
|
+
"test:watch": "vitest"
|
|
74
71
|
}
|
|
75
72
|
}
|
package/dist/index.d.mts
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'node:path';
|
|
2
|
-
import { defineNuxtModule } from '@nuxt/kit';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// -- Unbuild CommonJS Shims --
|
|
7
|
-
import __cjs_url__ from 'url';
|
|
8
|
-
import __cjs_path__ from 'path';
|
|
9
|
-
import __cjs_mod__ from 'module';
|
|
10
|
-
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = __cjs_path__.dirname(__filename);
|
|
12
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
13
|
-
const index = defineNuxtModule({
|
|
14
|
-
meta: {
|
|
15
|
-
name: "@shopware/cms-base",
|
|
16
|
-
configKey: "shopware-cms"
|
|
17
|
-
},
|
|
18
|
-
setup(_, nuxt) {
|
|
19
|
-
nuxt.hook("components:dirs", (c) => {
|
|
20
|
-
c.push({
|
|
21
|
-
path: resolve(__dirname, "../components/public"),
|
|
22
|
-
global: true
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
nuxt.options.imports.transform = nuxt.options.imports.transform || {};
|
|
26
|
-
nuxt.options.imports.transform.include = nuxt.options.imports.transform?.include || [];
|
|
27
|
-
nuxt.options.imports.transform?.include.push(/.+cms-base.+/);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export { index as default };
|
package/index.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
|
|
2
|
-
module.exports = function (...args) {
|
|
3
|
-
return import("./dist/index.mjs").then((m) => m.default.call(this, ...args));
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line
|
|
7
|
-
module.exports.meta = require("./package.json");
|