@lightspeed/crane 1.4.1 → 2.0.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/CHANGELOG.md +51 -4
- package/UPGRADE.md +19 -0
- package/dist/app.d.mts +1 -1028
- package/dist/app.d.ts +1 -1028
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +20 -7
- package/package.json +6 -3
- package/template/footers/example-footer/ExampleFooter.vue +1 -1
- package/template/footers/example-footer/client.ts +1 -1
- package/template/footers/example-footer/component/LegalLinks.vue +1 -1
- package/template/footers/example-footer/component/MadeWith.vue +1 -1
- package/template/footers/example-footer/component/ReportAbuse.vue +1 -1
- package/template/footers/example-footer/entity/color.ts +2 -2
- package/template/footers/example-footer/server.ts +1 -1
- package/template/headers/example-header/client.ts +1 -1
- package/template/headers/example-header/component/Account.vue +1 -1
- package/template/headers/example-header/component/Cart.vue +1 -1
- package/template/headers/example-header/component/CategoriesDropdown.vue +1 -1
- package/template/headers/example-header/component/Logo.vue +1 -1
- package/template/headers/example-header/component/NavigationMenu.vue +1 -1
- package/template/headers/example-header/component/SearchForm.vue +1 -1
- package/template/headers/example-header/server.ts +1 -1
- package/template/index.d.ts +1 -1
- package/template/layouts/catalog/example-catalog/Main.vue +1 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/client.ts +1 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/server.ts +1 -1
- package/template/layouts/category/example-category/Main.vue +1 -1
- package/template/layouts/category/example-category/settings/content.ts +1 -1
- package/template/layouts/category/example-category/settings/design.ts +1 -1
- package/template/layouts/product/example-product/Main.vue +1 -1
- package/template/layouts/product/example-product/settings/content.ts +1 -1
- package/template/layouts/product/example-product/settings/design.ts +1 -1
- package/template/package.json +7 -3
- package/template/page-templates/example-template/pages/catalog.ts +1 -1
- package/template/page-templates/example-template/pages/category.ts +1 -1
- package/template/page-templates/example-template/pages/product.ts +1 -1
- package/template/preview/sections/preview.html +1 -1
- package/template/preview/shared/api-routes.ts +443 -0
- package/template/preview/shared/mock.ts +43 -41
- package/template/preview/shared/preview.ts +213 -101
- package/template/preview/shared/utils.ts +315 -2
- package/template/preview/ssr-server.ts +429 -0
- package/template/preview/vite.config.js +76 -34
- package/template/reference/sections/about-us/AboutUs.vue +1 -1
- package/template/reference/sections/about-us/client.ts +1 -1
- package/template/reference/sections/about-us/component/Image.vue +1 -1
- package/template/reference/sections/about-us/component/Stats.vue +2 -2
- package/template/reference/sections/about-us/component/Title.vue +1 -1
- package/template/reference/sections/about-us/server.ts +1 -1
- package/template/reference/sections/about-us/util/visibility-provider.ts +1 -1
- package/template/reference/sections/featured-products/FeaturedProducts.vue +65 -0
- package/template/reference/sections/featured-products/assets/arrow.svg +3 -0
- package/template/reference/sections/featured-products/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/featured-products/client.ts +5 -0
- package/template/reference/sections/featured-products/component/ProductItem.vue +71 -0
- package/template/reference/sections/featured-products/component/Title.vue +31 -0
- package/template/reference/sections/featured-products/entity/color.ts +4 -0
- package/template/reference/sections/featured-products/server.ts +5 -0
- package/template/reference/sections/featured-products/settings/content.ts +14 -0
- package/template/reference/sections/featured-products/settings/design.ts +33 -0
- package/template/reference/sections/featured-products/settings/translations.ts +24 -0
- package/template/reference/sections/featured-products/showcases/1.ts +28 -0
- package/template/reference/sections/featured-products/showcases/translations.ts +16 -0
- package/template/reference/sections/featured-products/type.ts +5 -0
- package/template/reference/sections/intro-slider/IntroSlider.vue +1 -1
- package/template/reference/sections/intro-slider/client.ts +1 -1
- package/template/reference/sections/intro-slider/component/Slider.vue +8 -2
- package/template/reference/sections/intro-slider/component/Title.vue +1 -1
- package/template/reference/sections/intro-slider/entity/color.ts +2 -2
- package/template/reference/sections/intro-slider/server.ts +1 -1
- package/template/reference/sections/tag-lines/TagLines.vue +1 -1
- package/template/reference/sections/tag-lines/client.ts +1 -1
- package/template/reference/sections/tag-lines/component/SectionImage.vue +1 -1
- package/template/reference/sections/tag-lines/component/Title.vue +1 -1
- package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +2 -2
- package/template/reference/sections/tag-lines/server.ts +1 -1
- package/template/reference/sections/trending-categories/TrendingCategories.vue +70 -0
- package/template/reference/sections/trending-categories/assets/arrow.svg +3 -0
- package/template/reference/sections/trending-categories/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/trending-categories/client.ts +5 -0
- package/template/reference/sections/trending-categories/component/CategoryItem.vue +62 -0
- package/template/reference/sections/trending-categories/component/Title.vue +32 -0
- package/template/reference/sections/trending-categories/entity/color.ts +4 -0
- package/template/reference/sections/trending-categories/server.ts +5 -0
- package/template/reference/sections/trending-categories/settings/content.ts +14 -0
- package/template/reference/sections/trending-categories/settings/design.ts +33 -0
- package/template/reference/sections/trending-categories/settings/translations.ts +24 -0
- package/template/reference/sections/trending-categories/showcases/1.ts +36 -0
- package/template/reference/sections/trending-categories/showcases/translations.ts +22 -0
- package/template/reference/sections/trending-categories/type.ts +5 -0
- package/template/reference/shared/components/Button.vue +1 -1
- package/template/reference/templates/reference-template-apparel/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-apparel/pages/product.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-bike/pages/product.ts +1 -1
- package/template/sections/example-section/ExampleSection.vue +8 -1
- package/template/sections/example-section/client.ts +1 -1
- package/template/sections/example-section/component/button/Button.vue +1 -1
- package/template/sections/example-section/component/image/Image.vue +1 -1
- package/template/sections/example-section/component/image/ImagesGrid.vue +1 -1
- package/template/sections/example-section/component/selectbox/Selectbox.vue +1 -1
- package/template/sections/example-section/component/title/Title.vue +1 -1
- package/template/sections/example-section/component/toggle/Toggle.vue +1 -1
- package/template/sections/example-section/entity/color.ts +2 -2
- package/template/sections/example-section/server.ts +1 -1
- package/template/sections/example-section/settings/translations.ts +1 -1
- package/template/sections/example-section/showcases/translations.ts +13 -13
- package/template/shared/components/LanguageSelector.vue +1 -1
- package/template/shared/translation.ts +16 -0
- package/template/shared/utils.ts +3 -1
- package/template/tsconfig.json +1 -0
- package/types.d.ts +6 -457
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightspeed/crane",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "bin/crane.js",
|
|
6
6
|
"main": "./dist/app.mjs",
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"dev": "unbuild --stub",
|
|
28
28
|
"build": "unbuild",
|
|
29
|
+
"link": "npm link",
|
|
29
30
|
"type-check": "tsc --noEmit",
|
|
30
|
-
"lint": "eslint \"
|
|
31
|
+
"lint": "eslint \"./**/*.{js,ts}\"",
|
|
31
32
|
"lint:all": "yarn lint && yarn type-check",
|
|
32
|
-
"test": "jest"
|
|
33
|
+
"test": "jest",
|
|
34
|
+
"test:end-to-end": "jest end-to-end.test.ts --no-coverage"
|
|
33
35
|
},
|
|
34
36
|
"engines": {
|
|
35
37
|
"node": "22"
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
},
|
|
63
65
|
"dependencies": {
|
|
64
66
|
"@jridgewell/sourcemap-codec": "^1.5.4",
|
|
67
|
+
"@lightspeed/crane-api": "1.0.0",
|
|
65
68
|
"@lightspeed/eslint-config-crane": "1.1.3",
|
|
66
69
|
"@types/prompts": "^2.4.2",
|
|
67
70
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
import { computed } from 'vue';
|
|
22
|
-
import { useBackgroundElementDesign } from '@lightspeed/crane';
|
|
22
|
+
import { useBackgroundElementDesign } from '@lightspeed/crane-api';
|
|
23
23
|
import ReportAbuse from './component/ReportAbuse.vue';
|
|
24
24
|
import MadeWith from './component/MadeWith.vue';
|
|
25
25
|
import { Design } from './type.ts';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
|
-
import { useVueBaseProps } from '@lightspeed/crane';
|
|
14
|
+
import { useVueBaseProps } from '@lightspeed/crane-api';
|
|
15
15
|
import { Design } from '../type.ts';
|
|
16
16
|
|
|
17
17
|
const baseProps = useVueBaseProps<unknown, Design>();
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup lang="ts">
|
|
31
|
-
import { useLogoElementContent, useLogoElementDesign } from '@lightspeed/crane';
|
|
31
|
+
import { useLogoElementContent, useLogoElementDesign } from '@lightspeed/crane-api';
|
|
32
32
|
import { computed } from 'vue';
|
|
33
33
|
|
|
34
34
|
function getColor(color: Color | undefined) {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
<script setup lang="ts">
|
|
40
40
|
import { ref, computed } from 'vue';
|
|
41
|
-
import { useNavigationMenuElementContent } from '@lightspeed/crane';
|
|
41
|
+
import { useNavigationMenuElementContent } from '@lightspeed/crane-api';
|
|
42
42
|
import CategoriesDropdown from './CategoriesDropdown.vue';
|
|
43
43
|
|
|
44
44
|
interface ActiveItem {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup lang="ts">
|
|
33
33
|
import { ref } from 'vue';
|
|
34
|
-
import { useInstantsiteJsApi } from '@lightspeed/crane';
|
|
34
|
+
import { useInstantsiteJsApi } from '@lightspeed/crane-api';
|
|
35
35
|
|
|
36
36
|
const instantsiteJsApi = useInstantsiteJsApi();
|
|
37
37
|
const searchInputRef = ref<HTMLInputElement>();
|
package/template/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="@lightspeed/crane
|
|
1
|
+
/// <reference types="@lightspeed/crane-api" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {} as const;
|
|
1
|
+
export default {} as const;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {} as const;
|
|
1
|
+
export default {} as const;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
import { HTMLAttributes } from 'vue';
|
|
22
|
-
import { ProductLayoutSlot as Slot } from '@lightspeed/crane';
|
|
22
|
+
import { ProductLayoutSlot as Slot } from '@lightspeed/crane-api';
|
|
23
23
|
|
|
24
24
|
interface Props {
|
|
25
25
|
availableProductClasses?: HTMLAttributes['class'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {} as const;
|
|
1
|
+
export default {} as const;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default {} as const;
|
|
1
|
+
export default {} as const;
|
package/template/package.json
CHANGED
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
"name": "__placeholder__",
|
|
3
3
|
"private": true,
|
|
4
4
|
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"build": "crane build",
|
|
7
8
|
"deploy": "crane build && crane deploy"
|
|
8
9
|
},
|
|
9
10
|
"dependencies": {
|
|
10
|
-
"@lightspeed/crane": "latest",
|
|
11
|
+
"@lightspeed/crane-api": "latest",
|
|
11
12
|
"@lightspeed/eslint-config-crane": "latest",
|
|
12
|
-
"
|
|
13
|
-
"eslint": "9.33.0"
|
|
13
|
+
"@swc/core": "^1.15.1",
|
|
14
|
+
"eslint": "9.33.0",
|
|
15
|
+
"linkedom": "^0.18.0",
|
|
16
|
+
"module-from-string": "^3.3.1",
|
|
17
|
+
"vue": "^3.4.0"
|
|
14
18
|
},
|
|
15
19
|
"engines": {
|
|
16
20
|
"node": ">=22"
|