@lightspeed/crane 0.1.0 → 1.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/README.md +113 -0
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +6 -6
- package/package.json +12 -3
- package/template/package.json +2 -2
- package/template/sections/example-section/ExampleSection.vue +53 -0
- package/template/sections/example-section/assets/autumn_looks_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/autumn_looks_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/autumn_looks_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/autumn_looks_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/bianka_wardrobe_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/bianka_wardrobe_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/bianka_wardrobe_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/bianka_wardrobe_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/custom_section_showcase_1_preview.jpg +0 -0
- package/template/sections/example-section/assets/custom_section_showcase_2_preview.png +0 -0
- package/template/sections/example-section/assets/new_arrivals_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/new_arrivals_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/new_arrivals_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/new_arrivals_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/new_tshirts_collection_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/new_tshirts_collection_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/new_tshirts_collection_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/new_tshirts_collection_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/sport_look_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/sport_look_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/sport_look_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/sport_look_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/story_of_jane_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/story_of_jane_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/story_of_jane_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/story_of_jane_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/summer_accessories_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/summer_accessories_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/summer_accessories_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/summer_accessories_pc_low.jpeg +0 -0
- package/template/sections/example-section/assets/trending_footwear_mobile_high.jpeg +0 -0
- package/template/sections/example-section/assets/trending_footwear_mobile_low.jpeg +0 -0
- package/template/sections/example-section/assets/trending_footwear_pc_high.jpeg +0 -0
- package/template/sections/example-section/assets/trending_footwear_pc_low.jpeg +0 -0
- package/template/sections/example-section/client.ts +5 -0
- package/template/sections/example-section/component/image/Image.vue +161 -0
- package/template/sections/example-section/component/image/ImagesGrid.vue +244 -0
- package/template/sections/example-section/component/title/Title.vue +53 -0
- package/template/sections/example-section/entity/color.ts +4 -0
- package/template/sections/example-section/server.ts +5 -0
- package/template/sections/example-section/settings/content.ts +68 -0
- package/template/sections/{block-example → example-section}/settings/design.ts +30 -43
- package/template/sections/example-section/settings/translations.ts +59 -0
- package/template/sections/example-section/showcases/1.ts +160 -0
- package/template/sections/example-section/showcases/2.ts +156 -0
- package/template/sections/example-section/showcases/translations.ts +41 -0
- package/template/templates/template.ts +102 -79
- package/template/sections/block-example/CustomBlock.vue +0 -58
- package/template/sections/block-example/assets/showcase_preview_1.png +0 -0
- package/template/sections/block-example/assets/showcase_preview_2.png +0 -0
- package/template/sections/block-example/client.ts +0 -5
- package/template/sections/block-example/server.ts +0 -5
- package/template/sections/block-example/settings/content.ts +0 -41
- package/template/sections/block-example/settings/translations.ts +0 -35
- package/template/sections/block-example/showcases/1.ts +0 -88
- package/template/sections/block-example/showcases/2.ts +0 -88
- package/template/sections/block-example/showcases/translations.ts +0 -23
- /package/template/sections/{block-example → example-section}/type.ts +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
useInputboxElementContent,
|
|
4
|
-
useTextareaElementContent,
|
|
5
|
-
useButtonElementContent,
|
|
6
|
-
useImageElementContent,
|
|
7
|
-
useToggleElementContent,
|
|
8
|
-
useSelectboxElementContent,
|
|
9
|
-
} from '@lightspeed/crane';
|
|
10
|
-
import { Content } from './type.ts';
|
|
11
|
-
|
|
12
|
-
const inputboxContent = useInputboxElementContent<Content>('inputbox');
|
|
13
|
-
const textareaContent = useTextareaElementContent<Content>('textarea');
|
|
14
|
-
const buttonContent = useButtonElementContent<Content>('button');
|
|
15
|
-
const imageContent = useImageElementContent<Content>('image');
|
|
16
|
-
const toggleContent = useToggleElementContent<Content>('toggle');
|
|
17
|
-
const selectboxContent = useSelectboxElementContent<Content>('selectbox');
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div>
|
|
22
|
-
<div>
|
|
23
|
-
<h1 v-if="inputboxContent.hasContent">
|
|
24
|
-
{{ inputboxContent.value }}
|
|
25
|
-
</h1>
|
|
26
|
-
</div>
|
|
27
|
-
<div>
|
|
28
|
-
<h1 v-if="textareaContent.hasContent">
|
|
29
|
-
{{ textareaContent.value }}
|
|
30
|
-
</h1>
|
|
31
|
-
</div>
|
|
32
|
-
<div>
|
|
33
|
-
<!-- eslint-disable vue/html-button-has-type -->
|
|
34
|
-
<button
|
|
35
|
-
v-if="buttonContent.hasTitle"
|
|
36
|
-
@click="buttonContent.performAction"
|
|
37
|
-
>
|
|
38
|
-
{{ buttonContent.title }}
|
|
39
|
-
</button>
|
|
40
|
-
</div>
|
|
41
|
-
<div>
|
|
42
|
-
<img
|
|
43
|
-
v-if="imageContent.hasContent"
|
|
44
|
-
:src="imageContent.highResolutionDesktopImage"
|
|
45
|
-
>
|
|
46
|
-
</div>
|
|
47
|
-
<div>
|
|
48
|
-
<input
|
|
49
|
-
type="checkbox"
|
|
50
|
-
disabled="true"
|
|
51
|
-
:checked="toggleContent.value"
|
|
52
|
-
>
|
|
53
|
-
</div>
|
|
54
|
-
<div>
|
|
55
|
-
<h1>{{ selectboxContent.value }}</h1>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
Binary file
|
|
Binary file
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
inputbox: {
|
|
3
|
-
type: 'INPUTBOX',
|
|
4
|
-
label: '$label.inputbox.label',
|
|
5
|
-
placeholder: '$label.inputbox.placeholder',
|
|
6
|
-
},
|
|
7
|
-
textarea: {
|
|
8
|
-
type: 'TEXTAREA',
|
|
9
|
-
label: '$label.textarea.label',
|
|
10
|
-
placeholder: '$label.textarea.placeholder',
|
|
11
|
-
},
|
|
12
|
-
button: {
|
|
13
|
-
type: 'BUTTON',
|
|
14
|
-
label: '$label.button.label',
|
|
15
|
-
},
|
|
16
|
-
image: {
|
|
17
|
-
type: 'IMAGE',
|
|
18
|
-
label: '$label.image.label',
|
|
19
|
-
},
|
|
20
|
-
toggle: {
|
|
21
|
-
type: 'TOGGLE',
|
|
22
|
-
label: '$label.toggle.label',
|
|
23
|
-
description: '$label.toggle.description',
|
|
24
|
-
},
|
|
25
|
-
selectbox: {
|
|
26
|
-
type: 'SELECTBOX',
|
|
27
|
-
label: '$label.selectbox.label',
|
|
28
|
-
placeholder: '$label.selectbox.placeholder',
|
|
29
|
-
description: '$label.selectbox.description',
|
|
30
|
-
options: [
|
|
31
|
-
{
|
|
32
|
-
value: 'one',
|
|
33
|
-
label: '$label.selectbox.one.label',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
value: 'two',
|
|
37
|
-
label: '$label.selectbox.two.label',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
} as const;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
en: {
|
|
3
|
-
'$label.inputbox.label': 'Inputbox',
|
|
4
|
-
'$label.inputbox.placeholder': 'Input text',
|
|
5
|
-
'$label.textarea.label': 'Textarea',
|
|
6
|
-
'$label.textarea.placeholder': 'Input text',
|
|
7
|
-
'$label.button.label': 'Button',
|
|
8
|
-
'$label.image.label': 'Image',
|
|
9
|
-
'$label.toggle.label': 'Toggle',
|
|
10
|
-
'$label.toggle.description': 'On/off toggle',
|
|
11
|
-
'$label.selectbox.label': 'Selectbox',
|
|
12
|
-
'$label.selectbox.placeholder': 'Choose',
|
|
13
|
-
'$label.selectbox.description': 'Selectbox description',
|
|
14
|
-
'$label.selectbox.one.label': 'One',
|
|
15
|
-
'$label.selectbox.two.label': 'Two',
|
|
16
|
-
'$label.background.label': 'Background',
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
ru: {
|
|
20
|
-
'$label.inputbox.label': 'Текст',
|
|
21
|
-
'$label.inputbox.placeholder': 'Введите текст',
|
|
22
|
-
'$label.textarea.label': 'Многострочный текст',
|
|
23
|
-
'$label.textarea.placeholder': 'Введите текст',
|
|
24
|
-
'$label.button.label': 'Кнопка',
|
|
25
|
-
'$label.image.label': 'Картинка',
|
|
26
|
-
'$label.toggle.label': 'Тоггл',
|
|
27
|
-
'$label.toggle.description': 'Включить/выключить тоггл',
|
|
28
|
-
'$label.selectbox.label': 'Селектбокс',
|
|
29
|
-
'$label.selectbox.placeholder': 'Выберите',
|
|
30
|
-
'$label.selectbox.description': 'Описание селектбокса',
|
|
31
|
-
'$label.selectbox.one.label': 'Один',
|
|
32
|
-
'$label.selectbox.two.label': 'Два',
|
|
33
|
-
'$label.background.label': 'Фон',
|
|
34
|
-
},
|
|
35
|
-
} as const;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
showcaseId: '1',
|
|
3
|
-
previewImage: {
|
|
4
|
-
set: {
|
|
5
|
-
ORIGINAL: {
|
|
6
|
-
url: 'showcase_preview_1.png',
|
|
7
|
-
},
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
blockName: '$label.showcase_1.blockName',
|
|
11
|
-
content: {
|
|
12
|
-
inputbox: {
|
|
13
|
-
type: 'INPUTBOX',
|
|
14
|
-
text: '$label.showcase_1.inputbox.text',
|
|
15
|
-
},
|
|
16
|
-
textarea: {
|
|
17
|
-
type: 'TEXTAREA',
|
|
18
|
-
text: '$label.showcase_1.textarea.text',
|
|
19
|
-
},
|
|
20
|
-
button: {
|
|
21
|
-
type: 'BUTTON',
|
|
22
|
-
title: '$label.showcase_1.button.title',
|
|
23
|
-
buttonType: 'MAIL_LINK',
|
|
24
|
-
email: 'from@showcase.one.com',
|
|
25
|
-
},
|
|
26
|
-
image: {
|
|
27
|
-
type: 'IMAGE',
|
|
28
|
-
imageData: {
|
|
29
|
-
set: {
|
|
30
|
-
ORIGINAL: {
|
|
31
|
-
url: 'showcase_preview_1.png',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
borderInfo: {},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
toggle: {
|
|
38
|
-
type: 'TOGGLE',
|
|
39
|
-
enabled: true,
|
|
40
|
-
},
|
|
41
|
-
selectbox: {
|
|
42
|
-
type: 'SELECTBOX',
|
|
43
|
-
value: 'one',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
design: {
|
|
47
|
-
inputbox: {
|
|
48
|
-
type: 'TEXT',
|
|
49
|
-
font: 'global.fontFamily.body',
|
|
50
|
-
size: 18,
|
|
51
|
-
bold: true,
|
|
52
|
-
italic: false,
|
|
53
|
-
color: '#333',
|
|
54
|
-
visible: false,
|
|
55
|
-
},
|
|
56
|
-
button: {
|
|
57
|
-
type: 'BUTTON',
|
|
58
|
-
font: 'global.fontFamily.body',
|
|
59
|
-
size: 'MEDIUM',
|
|
60
|
-
appearance: 'OUTLINE',
|
|
61
|
-
shape: 'PILL',
|
|
62
|
-
color: '#333',
|
|
63
|
-
visible: false,
|
|
64
|
-
},
|
|
65
|
-
background: {
|
|
66
|
-
type: 'BACKGROUND',
|
|
67
|
-
style: 'COLOR',
|
|
68
|
-
color: 'global.color.background',
|
|
69
|
-
},
|
|
70
|
-
image: {
|
|
71
|
-
type: 'IMAGE',
|
|
72
|
-
overlay: 'COLOR',
|
|
73
|
-
color: '#333',
|
|
74
|
-
},
|
|
75
|
-
toggle: {
|
|
76
|
-
type: 'TOGGLE',
|
|
77
|
-
enabled: true,
|
|
78
|
-
},
|
|
79
|
-
color: {
|
|
80
|
-
type: 'COLOR_PICKER',
|
|
81
|
-
color: 'global.color.background',
|
|
82
|
-
},
|
|
83
|
-
selectbox: {
|
|
84
|
-
type: 'SELECTBOX',
|
|
85
|
-
value: 'one',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
} as const;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
showcaseId: '2',
|
|
3
|
-
previewImage: {
|
|
4
|
-
set: {
|
|
5
|
-
ORIGINAL: {
|
|
6
|
-
url: 'showcase_preview_1.png',
|
|
7
|
-
},
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
blockName: '$label.showcase_2.blockName',
|
|
11
|
-
content: {
|
|
12
|
-
inputbox: {
|
|
13
|
-
type: 'INPUTBOX',
|
|
14
|
-
text: '$label.showcase_2.inputbox.text',
|
|
15
|
-
},
|
|
16
|
-
textarea: {
|
|
17
|
-
type: 'TEXTAREA',
|
|
18
|
-
text: '$label.showcase_2.textarea.text',
|
|
19
|
-
},
|
|
20
|
-
button: {
|
|
21
|
-
type: 'BUTTON',
|
|
22
|
-
title: '$label.showcase_2.button.title',
|
|
23
|
-
buttonType: 'MAIL_LINK',
|
|
24
|
-
email: 'from@showcase.two.com',
|
|
25
|
-
},
|
|
26
|
-
image: {
|
|
27
|
-
type: 'IMAGE',
|
|
28
|
-
imageData: {
|
|
29
|
-
set: {
|
|
30
|
-
ORIGINAL: {
|
|
31
|
-
url: 'showcase_preview_2.png',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
borderInfo: {},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
toggle: {
|
|
38
|
-
type: 'TOGGLE',
|
|
39
|
-
enabled: false,
|
|
40
|
-
},
|
|
41
|
-
selectbox: {
|
|
42
|
-
type: 'SELECTBOX',
|
|
43
|
-
value: 'two',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
design: {
|
|
47
|
-
inputbox: {
|
|
48
|
-
type: 'TEXT',
|
|
49
|
-
font: 'global.fontFamily.body',
|
|
50
|
-
size: 18,
|
|
51
|
-
bold: true,
|
|
52
|
-
italic: false,
|
|
53
|
-
color: '#333',
|
|
54
|
-
visible: false,
|
|
55
|
-
},
|
|
56
|
-
button: {
|
|
57
|
-
type: 'BUTTON',
|
|
58
|
-
font: 'global.fontFamily.body',
|
|
59
|
-
size: 'MEDIUM',
|
|
60
|
-
appearance: 'OUTLINE',
|
|
61
|
-
shape: 'PILL',
|
|
62
|
-
color: '#333',
|
|
63
|
-
visible: false,
|
|
64
|
-
},
|
|
65
|
-
background: {
|
|
66
|
-
type: 'BACKGROUND',
|
|
67
|
-
style: 'COLOR',
|
|
68
|
-
color: 'global.color.background',
|
|
69
|
-
},
|
|
70
|
-
image: {
|
|
71
|
-
type: 'IMAGE',
|
|
72
|
-
overlay: 'COLOR',
|
|
73
|
-
color: '#333',
|
|
74
|
-
},
|
|
75
|
-
toggle: {
|
|
76
|
-
type: 'TOGGLE',
|
|
77
|
-
enabled: true,
|
|
78
|
-
},
|
|
79
|
-
color: {
|
|
80
|
-
type: 'COLOR_PICKER',
|
|
81
|
-
color: 'global.color.background',
|
|
82
|
-
},
|
|
83
|
-
selectbox: {
|
|
84
|
-
type: 'SELECTBOX',
|
|
85
|
-
value: 'one',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
} as const;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
en: {
|
|
3
|
-
'$label.showcase_1.blockName': 'Name of block 1',
|
|
4
|
-
'$label.showcase_1.inputbox.text': 'Input text 1',
|
|
5
|
-
'$label.showcase_1.textarea.text': 'Textarea 1',
|
|
6
|
-
'$label.showcase_1.button.title': 'Button 1',
|
|
7
|
-
'$label.showcase_2.blockName': 'Name of block 2',
|
|
8
|
-
'$label.showcase_2.inputbox.text': 'Input text 2',
|
|
9
|
-
'$label.showcase_2.textarea.text': 'Textarea 2',
|
|
10
|
-
'$label.showcase_2.button.title': 'Button 2',
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
ru: {
|
|
14
|
-
'$label.showcase_1.blockName': 'Имя блока 1',
|
|
15
|
-
'$label.showcase_1.inputbox.text': 'Введите текст 1',
|
|
16
|
-
'$label.showcase_1.textarea.text': 'Многострочный текст 1',
|
|
17
|
-
'$label.showcase_1.button.title': 'Кнопка 1',
|
|
18
|
-
'$label.showcase_2.blockName': 'Имя блока 2',
|
|
19
|
-
'$label.showcase_2.inputbox.text': 'Введите текст 2',
|
|
20
|
-
'$label.showcase_2.textarea.text': 'Многострочный текст 2',
|
|
21
|
-
'$label.showcase_2.button.title': 'Кнопка 2',
|
|
22
|
-
},
|
|
23
|
-
} as const;
|
|
File without changes
|