slicejs-web-framework 1.0.19 → 1.0.21

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 (82) hide show
  1. package/Slice/Components/Structural/Debugger/Debugger.js +3 -3
  2. package/Slice/Slice.js +2 -1
  3. package/package.json +1 -1
  4. package/src/Components/AppComponents/HomePage/HomePage.css +203 -0
  5. package/src/Components/AppComponents/HomePage/HomePage.html +49 -0
  6. package/src/Components/AppComponents/HomePage/HomePage.js +196 -0
  7. package/src/Components/AppComponents/Playground/Playground.js +0 -15
  8. package/src/Components/components.js +2 -24
  9. package/src/routes.js +4 -86
  10. package/src/sliceConfig.json +0 -3
  11. package/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.css +0 -16
  12. package/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.html +0 -22
  13. package/src/Components/AppComponents/ButtonDocumentation/ButtonDocumentation.js +0 -102
  14. package/src/Components/AppComponents/CardDocumentation/CardDocumentation.css +0 -15
  15. package/src/Components/AppComponents/CardDocumentation/CardDocumentation.html +0 -38
  16. package/src/Components/AppComponents/CardDocumentation/CardDocumentation.js +0 -113
  17. package/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.css +0 -21
  18. package/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.html +0 -35
  19. package/src/Components/AppComponents/CheckboxDocumentation/CheckboxDocumentation.js +0 -103
  20. package/src/Components/AppComponents/Documentation/Documentation.css +0 -0
  21. package/src/Components/AppComponents/Documentation/Documentation.html +0 -30
  22. package/src/Components/AppComponents/Documentation/Documentation.js +0 -75
  23. package/src/Components/AppComponents/DocumentationPage/DocumentationPage.css +0 -62
  24. package/src/Components/AppComponents/DocumentationPage/DocumentationPage.html +0 -0
  25. package/src/Components/AppComponents/DocumentationPage/DocumentationPage.js +0 -283
  26. package/src/Components/AppComponents/InputDocumentation/InputDocumentation.css +0 -41
  27. package/src/Components/AppComponents/InputDocumentation/InputDocumentation.html +0 -95
  28. package/src/Components/AppComponents/InputDocumentation/InputDocumentation.js +0 -315
  29. package/src/Components/AppComponents/Installation/Installation.css +0 -185
  30. package/src/Components/AppComponents/Installation/Installation.html +0 -102
  31. package/src/Components/AppComponents/Installation/Installation.js +0 -61
  32. package/src/Components/AppComponents/LandingMenu/LandingMenu.css +0 -108
  33. package/src/Components/AppComponents/LandingMenu/LandingMenu.html +0 -16
  34. package/src/Components/AppComponents/LandingMenu/LandingMenu.js +0 -33
  35. package/src/Components/AppComponents/LandingPage/LandingPage.css +0 -14
  36. package/src/Components/AppComponents/LandingPage/LandingPage.html +0 -0
  37. package/src/Components/AppComponents/LandingPage/LandingPage.js +0 -53
  38. package/src/Components/AppComponents/MainMenu/MainMenu.css +0 -80
  39. package/src/Components/AppComponents/MainMenu/MainMenu.html +0 -39
  40. package/src/Components/AppComponents/MainMenu/MainMenu.js +0 -42
  41. package/src/Components/AppComponents/MyLayout/MyLayout.css +0 -0
  42. package/src/Components/AppComponents/MyLayout/MyLayout.html +0 -0
  43. package/src/Components/AppComponents/MyLayout/MyLayout.js +0 -13
  44. package/src/Components/AppComponents/MyNavigation/MyNavigation.css +0 -49
  45. package/src/Components/AppComponents/MyNavigation/MyNavigation.html +0 -1
  46. package/src/Components/AppComponents/MyNavigation/MyNavigation.js +0 -60
  47. package/src/Components/AppComponents/RoutingDocumentation/RoutingDocumentation.css +0 -89
  48. package/src/Components/AppComponents/RoutingDocumentation/RoutingDocumentation.html +0 -108
  49. package/src/Components/AppComponents/RoutingDocumentation/RoutingDocumentation.js +0 -177
  50. package/src/Components/AppComponents/ServiceDocumentation/ServiceDocumentation.css +0 -82
  51. package/src/Components/AppComponents/ServiceDocumentation/ServiceDocumentation.html +0 -74
  52. package/src/Components/AppComponents/ServiceDocumentation/ServiceDocumentation.js +0 -416
  53. package/src/Components/AppComponents/SliceStylesDocumentation/SliceStylesDocumentation.css +0 -56
  54. package/src/Components/AppComponents/SliceStylesDocumentation/SliceStylesDocumentation.html +0 -28
  55. package/src/Components/AppComponents/SliceStylesDocumentation/SliceStylesDocumentation.js +0 -134
  56. package/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.css +0 -104
  57. package/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.html +0 -12
  58. package/src/Components/AppComponents/SliceTeamCard/SliceTeamCard.js +0 -74
  59. package/src/Components/AppComponents/StructuralDocumentation/StructuralDocumentation.css +0 -72
  60. package/src/Components/AppComponents/StructuralDocumentation/StructuralDocumentation.html +0 -98
  61. package/src/Components/AppComponents/StructuralDocumentation/StructuralDocumentation.js +0 -219
  62. package/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.css +0 -21
  63. package/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.html +0 -35
  64. package/src/Components/AppComponents/SwitchDocumentation/SwitchDocumentation.js +0 -103
  65. package/src/Components/AppComponents/TheBuildMethod/TheBuildMethod.css +0 -296
  66. package/src/Components/AppComponents/TheBuildMethod/TheBuildMethod.html +0 -89
  67. package/src/Components/AppComponents/TheBuildMethod/TheBuildMethod.js +0 -86
  68. package/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.css +0 -208
  69. package/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.html +0 -18
  70. package/src/Components/AppComponents/TheSliceTeam/TheSliceTeam.js +0 -111
  71. package/src/Components/AppComponents/ThemesDocumentation/ThemesDocumentation.css +0 -61
  72. package/src/Components/AppComponents/ThemesDocumentation/ThemesDocumentation.html +0 -80
  73. package/src/Components/AppComponents/ThemesDocumentation/ThemesDocumentation.js +0 -149
  74. package/src/Components/AppComponents/VisualDocumentation/VisualDocumentation.css +0 -70
  75. package/src/Components/AppComponents/VisualDocumentation/VisualDocumentation.html +0 -67
  76. package/src/Components/AppComponents/VisualDocumentation/VisualDocumentation.js +0 -193
  77. package/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.css +0 -475
  78. package/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.html +0 -389
  79. package/src/Components/AppComponents/WhatIsSlice/WhatIsSlice.js +0 -95
  80. /package/src/Components/{AppComponents → Visual}/CodeVisualizer/CodeVisualizer.css +0 -0
  81. /package/src/Components/{AppComponents → Visual}/CodeVisualizer/CodeVisualizer.html +0 -0
  82. /package/src/Components/{AppComponents → Visual}/CodeVisualizer/CodeVisualizer.js +0 -0
@@ -1,315 +0,0 @@
1
- export default class InputDocumentation extends HTMLElement {
2
- constructor(props) {
3
- super();
4
- slice.attachTemplate(this);
5
-
6
- slice.controller.setComponentProps(this, props);
7
- this.debuggerProps = [];
8
- }
9
-
10
- async init() {
11
- await this.createInput(this.querySelector('.myInput'), {});
12
- //Props
13
- await this.createInput(
14
- this.querySelector('.inputPlaceholder'),
15
- { placeholder: 'Enter text here' },
16
- `{
17
- placeholder: "Enter text here"
18
- }`
19
- );
20
- await this.createInput(
21
- this.querySelector('.requiredProp'),
22
- {
23
- placeholder: 'Enter text here',
24
- required: true,
25
- },
26
- `{
27
- placeholder: "Enter text here",
28
- required: true
29
- }`
30
- );
31
- await this.createInput(
32
- this.querySelector('.disabledProp'),
33
- {
34
- placeholder: 'Enter text here',
35
- disabled: true,
36
- },
37
- `{
38
- placeholder: "Enter text here",
39
- disabled: true
40
- }`
41
- );
42
- //Types
43
- await this.createInput(
44
- this.querySelector('.typeText'),
45
- {
46
- placeholder: 'Enter text here',
47
- type: 'text',
48
- },
49
- `{
50
- placeholder: "Enter text here",
51
- type: "text"
52
- }`
53
- );
54
- await this.createInput(
55
- this.querySelector('.typeNumber'),
56
- {
57
- placeholder: 'Enter numbers here',
58
- type: 'number',
59
- },
60
- `{
61
- placeholder: "Enter numbers here",
62
- type: "number"
63
- }`
64
- );
65
- await this.createInput(
66
- this.querySelector('.typePassword'),
67
- {
68
- placeholder: 'Password',
69
- type: 'password',
70
- },
71
- `{
72
- placeholder: "Password",
73
- type: "password"
74
- }`
75
- );
76
- await this.createInput(
77
- this.querySelector('.secretProp'),
78
- {
79
- placeholder: 'Password',
80
- type: 'password',
81
- secret: true,
82
- },
83
- `{
84
- placeholder: "Password",
85
- type: "password",
86
- secret: true
87
- }`
88
- );
89
- await this.createInput(
90
- this.querySelector('.emailType'),
91
- { placeholder: 'Email', type: 'email' },
92
- `{
93
- placeholder: "Email",
94
- type: "email"
95
- }`
96
- );
97
- await this.createInput(
98
- this.querySelector('.dateType'),
99
- { placeholder: 'Date', type: 'date' },
100
- `{
101
- placeholder: "Date",
102
- type: "date"
103
- }`
104
- );
105
- const conditionsInput = await this.createInput(
106
- this.querySelector('.inputConditions'),
107
- {
108
- placeholder: 'Password',
109
- type: 'password',
110
- secret: true,
111
- conditions: {
112
- // regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
113
- minLength: 8,
114
- maxLength: 10,
115
- minMinusc: 1,
116
- maxMinusc: 4,
117
- minMayusc: 1,
118
- maxMayusc: 6,
119
- minNumber: 1,
120
- maxNumber: 6,
121
- minSymbol: 1,
122
- maxSymbol: 10,
123
- },
124
- },
125
- `{
126
- placeholder: "Password",
127
- type: "password",
128
- secret: true,
129
- conditions: {
130
- // regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
131
- minLength: 8,
132
- maxLength: 10,
133
- minMinusc: 1,
134
- maxMinusc: 4,
135
- minMayusc: 1,
136
- maxMayusc: 6,
137
- minNumber: 1,
138
- maxNumber: 6,
139
- minSymbol: 1,
140
- maxSymbol: 10,
141
- },
142
- }`,
143
- 'Validate Conditions'
144
- );
145
- const regexInput = await this.createInput(
146
- this.querySelector('.inputRegex'),
147
- {
148
- placeholder: 'Password with regex',
149
- type: 'password',
150
- secret: true,
151
- conditions: {
152
- // regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
153
- minLength: 8,
154
- maxLength: 10,
155
- minMinusc: 1,
156
- maxMinusc: 4,
157
- minMayusc: 1,
158
- maxMayusc: 6,
159
- minNumber: 1,
160
- maxNumber: 6,
161
- minSymbol: 1,
162
- maxSymbol: 10,
163
- },
164
- },
165
- `{
166
- placeholder: "Password with regex",
167
- type: "password",
168
- secret: true,
169
- conditions: {
170
- regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
171
- // minLength: 8,
172
- // maxLength: 10,
173
- // minMinusc: 1,
174
- // maxMinusc: 4,
175
- // minMayusc: 1,
176
- // maxMayusc: 6,
177
- // minNumber: 1,
178
- // maxNumber: 6,
179
- // minSymbol: 1,
180
- // maxSymbol: 10,
181
- },
182
- }`,
183
- 'Validate Regex'
184
- );
185
- await this.inputMethos(
186
- this.querySelector('.inputMethods'),
187
- {
188
- placeholder: 'Methods',
189
- conditions: {
190
- minLength: 8,
191
- minNumber: 1,
192
- minSymbol: 1,
193
- },
194
- },
195
- `{
196
- placeholder: "Methods",
197
- conditions: {
198
- minLength: 8,
199
- minNumber: 1,
200
- minSymbol: 1,
201
- }
202
- }`
203
- );
204
- }
205
-
206
- async createInput(appendTo, inputProps, codeProps, validate) {
207
- if (!codeProps) {
208
- codeProps = '{}';
209
- }
210
- const myInput = await slice.build('Input', inputProps);
211
-
212
- const componentCode = await slice.build('CodeVisualizer', {
213
- value: `const myInput = await slice.build("Input", ${codeProps});
214
-
215
- `,
216
- language: 'javascript',
217
- });
218
-
219
- const div = document.createElement('div');
220
- const inputDiv = document.createElement('div');
221
- inputDiv.classList.add('inputs');
222
- inputDiv.appendChild(myInput);
223
-
224
- div.classList.add('inputsContainer');
225
- div.appendChild(inputDiv);
226
- if (validate) {
227
- const validateButton = await slice.build('Button', {
228
- value: validate,
229
- onClickCallback: () => {
230
- myInput.validateValue();
231
- },
232
- });
233
- div.appendChild(validateButton);
234
- }
235
- div.appendChild(componentCode);
236
-
237
- appendTo.appendChild(div);
238
-
239
- return myInput;
240
- }
241
-
242
- async inputMethos(appendTo, inputProps, codeProps) {
243
- if (!codeProps) {
244
- codeProps = '{}';
245
- }
246
- const myInput = await slice.build('Input', inputProps);
247
-
248
- const componentCode = await slice.build('CodeVisualizer', {
249
- value: `const myInput = await slice.build("Input", ${codeProps});
250
-
251
- myInput.validateValue();
252
- myInput.clear();
253
- myInput.triggerError();
254
- myInput.triggerSuccess();
255
-
256
- `,
257
- language: 'javascript',
258
- });
259
-
260
- const div = document.createElement('div');
261
- const inputDiv = document.createElement('div');
262
- inputDiv.classList.add('inputs');
263
- inputDiv.appendChild(myInput);
264
-
265
- div.classList.add('inputsContainer');
266
- div.appendChild(inputDiv);
267
- const buttons = document.createElement('div');
268
- buttons.classList.add('inputButtons');
269
- const validateButton = await slice.build('Button', {
270
- value: 'Validate',
271
- onClickCallback: () => {
272
- myInput.validateValue();
273
- },
274
- });
275
- const clearButton = await slice.build('Button', {
276
- value: 'Clear',
277
- customColor: {
278
- button: 'var(--medium-color)',
279
- },
280
- onClickCallback: () => {
281
- myInput.clear();
282
- },
283
- });
284
- const errorButton = await slice.build('Button', {
285
- value: 'Error',
286
- customColor: {
287
- button: 'var(--danger-color)',
288
- },
289
- onClickCallback: () => {
290
- myInput.triggerError();
291
- },
292
- });
293
- const successButton = await slice.build('Button', {
294
- value: 'Success',
295
- customColor: {
296
- button: 'var(--success-color)',
297
- },
298
- onClickCallback: () => {
299
- myInput.triggerSuccess();
300
- },
301
- });
302
- buttons.appendChild(validateButton);
303
- buttons.appendChild(clearButton);
304
- buttons.appendChild(errorButton);
305
- buttons.appendChild(successButton);
306
- div.appendChild(buttons);
307
- div.appendChild(componentCode);
308
-
309
- appendTo.appendChild(div);
310
-
311
- return myInput;
312
- }
313
- }
314
-
315
- customElements.define('slice-inputdocumentation', InputDocumentation);
@@ -1,185 +0,0 @@
1
- slice-installation {
2
- font-family: var(--font-family);
3
- color: var(--font-primary-color);
4
- }
5
-
6
- slice-installation .installation-container {
7
- width: 100%;
8
- max-width: 800px;
9
- margin: 0 auto;
10
- padding: 20px;
11
- }
12
-
13
- slice-installation h1 {
14
- color: var(--primary-color);
15
- margin-bottom: 30px;
16
- }
17
-
18
- slice-installation h2 {
19
- color: var(--primary-color);
20
- margin: 30px 0 15px 0;
21
- padding-bottom: 8px;
22
- border-bottom: 1px solid var(--secondary-background-color);
23
- }
24
-
25
- slice-installation .installation-intro {
26
- font-size: 1.1em;
27
- line-height: 1.6;
28
- margin-bottom: 30px;
29
- }
30
-
31
- slice-installation .installation-step {
32
- margin-bottom: 40px;
33
- padding: 20px;
34
- background-color: var(--secondary-background-color);
35
- border-radius: var(--border-radius-slice);
36
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
37
- }
38
-
39
- slice-installation .installation-step-code {
40
- position: relative;
41
- margin: 15px 0;
42
- background-color: var(--primary-background-color);
43
- border-radius: var(--border-radius-slice);
44
- border: 1px solid var(--primary-color-shade);
45
- overflow: hidden;
46
- }
47
-
48
- slice-installation pre {
49
- margin: 0;
50
- padding: 15px;
51
- overflow-x: auto;
52
- }
53
-
54
- slice-installation code {
55
- font-family: 'Courier New', monospace;
56
- color: var(--font-primary-color);
57
- }
58
-
59
- slice-installation .copy-button {
60
- position: absolute;
61
- top: 5px;
62
- right: 5px;
63
- background-color: var(--primary-color);
64
- color: var(--primary-color-contrast);
65
- border: none;
66
- border-radius: var(--border-radius-slice);
67
- padding: 5px 10px;
68
- cursor: pointer;
69
- font-size: 0.8em;
70
- transition: all 0.3s ease;
71
- }
72
-
73
- slice-installation .copy-button:hover {
74
- background-color: var(--secondary-color);
75
- }
76
-
77
- slice-installation .terminal {
78
- background-color: #1e1e1e;
79
- border-radius: var(--border-radius-slice);
80
- margin: 15px 0;
81
- overflow: hidden;
82
- }
83
-
84
- slice-installation .terminal-header {
85
- background-color: #323232;
86
- padding: 8px 15px;
87
- display: flex;
88
- align-items: center;
89
- }
90
-
91
- slice-installation .terminal-dot {
92
- height: 12px;
93
- width: 12px;
94
- border-radius: 50%;
95
- margin-right: 6px;
96
- }
97
-
98
- slice-installation .red {
99
- background-color: #ff5f56;
100
- }
101
-
102
- slice-installation .yellow {
103
- background-color: #ffbd2e;
104
- }
105
-
106
- slice-installation .green {
107
- background-color: #27c93f;
108
- }
109
-
110
- slice-installation .terminal-title {
111
- color: #cccccc;
112
- margin-left: 10px;
113
- font-size: 0.9em;
114
- }
115
-
116
- slice-installation .terminal-content {
117
- padding: 15px;
118
- color: #f8f8f2;
119
- font-family: 'Courier New', monospace;
120
- font-size: 0.9em;
121
- line-height: 1.5;
122
- min-height: 60px;
123
- }
124
-
125
- slice-installation .terminal-output {
126
- white-space: pre-wrap;
127
- }
128
-
129
- slice-installation .note {
130
- font-size: 0.9em;
131
- font-style: italic;
132
- color: var(--font-secondary-color);
133
- margin-top: 10px;
134
- }
135
-
136
- slice-installation .installation-next-steps {
137
- margin-top: 40px;
138
- padding: 20px;
139
- background-color: var(--primary-background-color);
140
- border: 1px solid var(--primary-color);
141
- border-radius: var(--border-radius-slice);
142
- }
143
-
144
- slice-installation .installation-next-steps ul {
145
- list-style-type: none;
146
- padding-left: 0;
147
- }
148
-
149
- slice-installation .installation-next-steps li {
150
- margin-bottom: 10px;
151
- padding-left: 24px;
152
- position: relative;
153
- }
154
-
155
- slice-installation .installation-next-steps li:before {
156
- content: "→";
157
- position: absolute;
158
- left: 0;
159
- color: var(--primary-color);
160
- }
161
-
162
- slice-installation .installation-next-steps code {
163
- background-color: var(--secondary-background-color);
164
- padding: 2px 6px;
165
- border-radius: 3px;
166
- }
167
-
168
- @media only screen and (max-width: 770px) {
169
- slice-installation .installation-container {
170
- padding: 10px;
171
- }
172
-
173
- slice-installation .installation-step {
174
- padding: 15px;
175
- }
176
-
177
- slice-installation pre {
178
- padding: 10px;
179
- font-size: 0.9em;
180
- }
181
-
182
- slice-installation .terminal-content {
183
- font-size: 0.8em;
184
- }
185
- }
@@ -1,102 +0,0 @@
1
- <div class="installation-container">
2
- <h1 id="installation-title">Installation Guide</h1>
3
-
4
- <p class="installation-intro">
5
- Getting started with Slice.js is easy! Follow these simple steps to create your first Slice.js project:
6
- </p>
7
-
8
- <div class="installation-steps">
9
- <div class="installation-step">
10
- <h2 id="step1">Step 1: Initialize your project</h2>
11
- <p>First, create a new directory for your project and initialize it with npm:</p>
12
- <div class="installation-step-code">
13
- <pre><code>npm init</code></pre>
14
- <button class="copy-button">Copy</button>
15
- </div>
16
- <div class="terminal">
17
- <div class="terminal-header">
18
- <span class="terminal-dot red"></span>
19
- <span class="terminal-dot yellow"></span>
20
- <span class="terminal-dot green"></span>
21
- <span class="terminal-title">Terminal</span>
22
- </div>
23
- <div class="terminal-content">
24
- <div class="terminal-output">Follow the prompts to set up your package.json file. You can press Enter to accept the default values or customize as needed.</div>
25
- </div>
26
- </div>
27
- </div>
28
-
29
- <div class="installation-step">
30
- <h2 id="step2">Step 2: Install Slice.js CLI</h2>
31
- <p>Next, install the Slice.js CLI tool which will help you create components and manage your project:</p>
32
- <div class="installation-step-code">
33
- <pre><code>npm i slicejs-cli</code></pre>
34
- <button class="copy-button">Copy</button>
35
- </div>
36
- <div class="terminal">
37
- <div class="terminal-header">
38
- <span class="terminal-dot red"></span>
39
- <span class="terminal-dot yellow"></span>
40
- <span class="terminal-dot green"></span>
41
- <span class="terminal-title">Terminal</span>
42
- </div>
43
- <div class="terminal-content">
44
- <div class="terminal-output">added X packages, and audited Y packages in Zs</div>
45
- </div>
46
- </div>
47
- </div>
48
-
49
- <div class="installation-step">
50
- <h2 id="step3">Step 3: Initialize Slice.js</h2>
51
- <p>Initialize the Slice.js folder structure in your project:</p>
52
- <div class="installation-step-code">
53
- <pre><code>npm run slice:init</code></pre>
54
- <button class="copy-button">Copy</button>
55
- </div>
56
- <div class="terminal">
57
- <div class="terminal-header">
58
- <span class="terminal-dot red"></span>
59
- <span class="terminal-dot yellow"></span>
60
- <span class="terminal-dot green"></span>
61
- <span class="terminal-title">Terminal</span>
62
- </div>
63
- <div class="terminal-content">
64
- <div class="terminal-output">Creating folder structure...
65
- Slice framework initialized successfully!</div>
66
- </div>
67
- </div>
68
- <p class="note">This command creates the necessary folder structure for your Slice.js project, including directories for components, styles, and themes.</p>
69
- </div>
70
-
71
- <div class="installation-step">
72
- <h2 id="step4">Step 4: Start the Server</h2>
73
- <p>Finally, start the development server to see your Slice.js application in action:</p>
74
- <div class="installation-step-code">
75
- <pre><code>npm run slice:start</code></pre>
76
- <button class="copy-button">Copy</button>
77
- </div>
78
- <div class="terminal">
79
- <div class="terminal-header">
80
- <span class="terminal-dot red"></span>
81
- <span class="terminal-dot yellow"></span>
82
- <span class="terminal-dot green"></span>
83
- <span class="terminal-title">Terminal</span>
84
- </div>
85
- <div class="terminal-content">
86
- <div class="terminal-output">Server is running on port 3001, http://localhost:3001</div>
87
- </div>
88
- </div>
89
- </div>
90
- </div>
91
-
92
- <div class="installation-next-steps">
93
- <h2 id="next-steps">Next Steps</h2>
94
- <p>Congratulations! You've successfully set up your Slice.js project. Here's what you can do next:</p>
95
- <ul>
96
- <li>Explore the documentation to learn about components</li>
97
- <li>Create your first component with <code>npm run slice:create</code></li>
98
- <li>Check out the built-in Visual components library</li>
99
- <li>Build your application by adding routes and services</li>
100
- </ul>
101
- </div>
102
- </div>
@@ -1,61 +0,0 @@
1
- export default class Installation extends HTMLElement {
2
- constructor(props) {
3
- super();
4
- slice.attachTemplate(this);
5
-
6
- slice.controller.setComponentProps(this, props);
7
- this.debuggerProps = [];
8
- }
9
-
10
- async init() {
11
- // Add code for installation steps visualization
12
-
13
- // Get all code blocks with copy buttons
14
- const codeBlocks = this.querySelectorAll('.installation-step-code');
15
-
16
- // Add copy functionality to each code block
17
- codeBlocks.forEach(block => {
18
- const copyButton = block.querySelector('.copy-button');
19
- const codeText = block.querySelector('code');
20
-
21
- copyButton.addEventListener('click', () => {
22
- navigator.clipboard.writeText(codeText.textContent.trim());
23
- copyButton.textContent = 'Copied!';
24
-
25
- setTimeout(() => {
26
- copyButton.textContent = 'Copy';
27
- }, 2000);
28
- });
29
- });
30
-
31
- // Add animation for terminal output
32
- const terminals = this.querySelectorAll('.terminal-output');
33
- terminals.forEach(terminal => {
34
- const text = terminal.textContent;
35
- terminal.textContent = '';
36
- let i = 0;
37
-
38
- const typeEffect = () => {
39
- if (i < text.length) {
40
- terminal.textContent += text.charAt(i);
41
- i++;
42
- setTimeout(typeEffect, 10);
43
- }
44
- };
45
-
46
- // Start the typing effect when element is in view
47
- const observer = new IntersectionObserver(entries => {
48
- entries.forEach(entry => {
49
- if (entry.isIntersecting) {
50
- typeEffect();
51
- observer.unobserve(entry.target);
52
- }
53
- });
54
- });
55
-
56
- observer.observe(terminal);
57
- });
58
- }
59
- }
60
-
61
- customElements.define('slice-installation', Installation);