@lightspeed/crane 3.2.1 → 3.4.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/UPGRADE.md +39 -0
  3. package/dist/cli.mjs +55 -48
  4. package/package.json +12 -13
  5. package/template/collections/example-collection/configuration.ts +6 -5
  6. package/template/eslint.config.js +1 -0
  7. package/template/footers/example-footer/component/MadeWith.vue +24 -8
  8. package/template/layouts/catalog/example-catalog/client.ts +6 -0
  9. package/template/layouts/catalog/example-catalog/settings/design.ts +229 -1
  10. package/template/layouts/catalog/example-catalog/settings/layout.ts +1 -0
  11. package/template/layouts/catalog/example-catalog/settings/translations.ts +285 -1
  12. package/template/layouts/category/example-category/Main.vue +2 -1
  13. package/template/layouts/category/example-category/client.ts +6 -0
  14. package/template/layouts/category/example-category/settings/design.ts +229 -1
  15. package/template/layouts/category/example-category/settings/layout.ts +1 -0
  16. package/template/layouts/category/example-category/settings/translations.ts +285 -0
  17. package/template/layouts/product/example-product/Main.vue +2 -1
  18. package/template/layouts/product/example-product/client.ts +6 -0
  19. package/template/layouts/product/example-product/settings/layout.ts +1 -0
  20. package/template/layouts/product/example-product/settings/translations.ts +1 -0
  21. package/template/package.json +1 -1
  22. package/template/preview/shared/api-routes.ts +27 -4
  23. package/template/preview/shared/mock.ts +9 -0
  24. package/template/preview/shared/preview.ts +3 -0
  25. package/template/preview/vite.config.js +4 -0
  26. package/template/reference/sections/tag-lines/TagLines.vue +6 -6
  27. package/template/eslint.config.cjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.4.0 - 2026-04-28
4
+
5
+ ### Added
6
+
7
+ - Add layout support for custom layouts
8
+ - Add storefront design setting to catalog and category custom layouts.
9
+ - Storefront product layout icons
10
+
11
+ ### Changed
12
+
13
+ - Disable footer navigation by default in custom layouts
14
+
15
+ ### Fixed
16
+
17
+ - Exclude custom.ts when running init --template from a dot-directory path (e.g. npx cache under ~/.npm/\_npx).
18
+
19
+ ## 3.3.0 - 2026-04-20
20
+
21
+ ### Added
22
+
23
+ - Add Custom content/design support for storefront custom pages
24
+ - Add missing dependencies when pulling an open-source section.
25
+ - Add build-time validation for collections.
26
+ - Add nested DECK settings support
27
+
28
+ ### Changed
29
+
30
+ - Align MadeWith vue template with the standard footer logic.
31
+ - Fixed local preview rebuild issue, when switching between showcases
32
+ - Exit with code 1 when manifest validation fails (preview mode unchanged).
33
+ - Allow optional `description` on COLOR_PICKER in section design validation.
34
+ - Move manifest generation into the build step
35
+ - Updated various dependencies.
36
+ - Updated dependencies
37
+ - @lightspeed/crane-api@2.3.0
38
+
39
+ ### Fixed
40
+
41
+ - Fix empty design defaults for selectbox and toggle.
42
+ - Accept both hash segment and full URL in info button link and support info design editor inside accordion.
43
+
3
44
  ## 3.2.1 - 2026-03-17
4
45
 
5
46
  ### Changed
package/UPGRADE.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Upgrades
2
2
 
3
+ ## 3.3.0 to 3.4.0
4
+
5
+ ### Custom layouts support for storefront layouts
6
+
7
+ Custom storefront layouts now support custom layout variants defined in `layout.ts` file. To upgrade, create a `layout.ts` file that default-exports an empty array inside each custom layout's settings folder:
8
+
9
+ **Create `layout.ts` at `layouts/<page>/<layoutId>/settings/layout.ts`:**
10
+
11
+ ```ts
12
+ export default [];
13
+ ```
14
+
15
+ > **Note:** The file can be empty initially, but later you will need to populate layout variants the same way you do for sections.
16
+
17
+ ## 3.2.1 to 3.3.0
18
+
19
+ ### Custom layout settings support
20
+
21
+ Custom storefront layouts now support settings (content/design). To build the app successfully, add the following files to each custom layout:
22
+
23
+ **1. Create `client.ts` at the root of each layout folder (`layouts/<page>/<layoutId>/client.ts`):**
24
+
25
+ ```ts
26
+ import { createLayoutApp } from '@lightspeed/crane-api';
27
+
28
+ import Main from './Main.vue';
29
+ import { Content, Design } from './type.ts';
30
+
31
+ export default createLayoutApp<Content, Design>(Main);
32
+ ```
33
+
34
+ > **Note:** If you renamed the default `Main.vue` file, update the import accordingly.
35
+
36
+ **2. Create `translations.ts` inside each layout's settings folder (`layouts/<page>/<layoutId>/settings/translations.ts`):**
37
+
38
+ ```ts
39
+ export default {} as const;
40
+ ```
41
+
3
42
  ## 2.0.x to 3.0.0
4
43
 
5
44
  ### Layout configuration changes