@mlightcad/ribbon 0.0.1

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 (46) hide show
  1. package/.github/workflows/ci.yml +110 -0
  2. package/.vscode/extensions.json +3 -0
  3. package/AGENTS.md +42 -0
  4. package/README.md +168 -0
  5. package/docs/requirements.md +96 -0
  6. package/eslint.config.js +41 -0
  7. package/images/ribbon.jpg +0 -0
  8. package/index.html +13 -0
  9. package/package.json +43 -0
  10. package/playwright/ribbon.spec.ts +6 -0
  11. package/playwright.config.ts +10 -0
  12. package/public/favicon.svg +1 -0
  13. package/public/icons.svg +24 -0
  14. package/src/App.vue +418 -0
  15. package/src/assets/hero.png +0 -0
  16. package/src/assets/vite.svg +1 -0
  17. package/src/assets/vue.svg +1 -0
  18. package/src/components/HelloWorld.vue +106 -0
  19. package/src/main.ts +9 -0
  20. package/src/ribbon/components/Ribbon.vue +844 -0
  21. package/src/ribbon/components/RibbonCollection.vue +51 -0
  22. package/src/ribbon/components/RibbonGroup.vue +327 -0
  23. package/src/ribbon/components/RibbonGroupContent.vue +61 -0
  24. package/src/ribbon/components/RibbonItemHost.vue +221 -0
  25. package/src/ribbon/components/RibbonTab.vue +44 -0
  26. package/src/ribbon/components/RibbonTabs.vue +49 -0
  27. package/src/ribbon/composables/useRibbonState.ts +272 -0
  28. package/src/ribbon/context.ts +4 -0
  29. package/src/ribbon/index.ts +99 -0
  30. package/src/ribbon/items/RibbonGallery.vue +78 -0
  31. package/src/ribbon/items/RibbonGroupButton.vue +85 -0
  32. package/src/ribbon/items/RibbonTemplateItem.vue +38 -0
  33. package/src/ribbon/modules/RibbonBackstage.vue +69 -0
  34. package/src/ribbon/modules/RibbonContextualTabs.vue +65 -0
  35. package/src/ribbon/modules/RibbonFileMenu.vue +88 -0
  36. package/src/ribbon/modules/RibbonKeyTips.vue +114 -0
  37. package/src/ribbon/styles/ribbon.css +925 -0
  38. package/src/ribbon/types.ts +162 -0
  39. package/src/style.css +328 -0
  40. package/src/tests/ribbon.spec.ts +830 -0
  41. package/src/tests/setup.ts +4 -0
  42. package/tools/release.mjs +107 -0
  43. package/tsconfig.app.json +14 -0
  44. package/tsconfig.json +7 -0
  45. package/tsconfig.node.json +24 -0
  46. package/vite.config.ts +38 -0
package/src/App.vue ADDED
@@ -0,0 +1,418 @@
1
+ <script setup lang="ts">
2
+ import { ref, watch } from 'vue'
3
+ import { ElRadioButton, ElRadioGroup } from 'element-plus'
4
+ import { ElMessage } from 'element-plus'
5
+ import {
6
+ Aim,
7
+ Brush,
8
+ CirclePlus,
9
+ Connection,
10
+ CopyDocument,
11
+ Crop,
12
+ DataLine,
13
+ EditPen,
14
+ Files,
15
+ FullScreen,
16
+ MagicStick,
17
+ Minus,
18
+ Operation,
19
+ Pointer,
20
+ Position,
21
+ Scissor,
22
+ Search,
23
+ } from '@element-plus/icons-vue'
24
+ import { MlRibbon } from './ribbon'
25
+ import type { RibbonComponentSize, RibbonLayout, RibbonTabModel } from './ribbon'
26
+
27
+ /**
28
+ * @component App
29
+ * @description
30
+ * Interactive playground for `MlRibbon` showcasing layout switching, sizing,
31
+ * contextual tabs, overflow behavior, file menu, backstage, and localization texts.
32
+ *
33
+ * @usage
34
+ * Use this demo as a reference integration:
35
+ * 1. Build a `RibbonTabModel[]` with groups/collections/items.
36
+ * 2. Bind ribbon state through `v-model:active-tab`, `v-model:layout`, and `v-model:minimized`.
37
+ * 3. Provide optional text overrides and file/backstage command sources.
38
+ *
39
+ * @example
40
+ * ```vue
41
+ * <MlRibbon
42
+ * v-model:active-tab="activeTab"
43
+ * v-model:layout="layout"
44
+ * v-model:minimized="minimized"
45
+ * :tabs="tabs"
46
+ * :texts="ribbonTexts"
47
+ * :file-menu-items="fileMenuItems"
48
+ * :backstage-items="backstageItems"
49
+ * />
50
+ * ```
51
+ */
52
+ const layout = ref<RibbonLayout>('classic')
53
+ const minimized = ref(false)
54
+ const activeTab = ref('home')
55
+ // Demo-only size switch; mirrors external consumer-controlled ribbon sizing.
56
+ const ribbonSize = ref<RibbonComponentSize>('default')
57
+ // Global page theme used by demo toolbar.
58
+ const theme = ref<'light' | 'dark'>('light')
59
+ const lastCommand = ref('None')
60
+
61
+ // Sample ribbon schema that demonstrates common item types, priorities and overflow rules.
62
+ const tabs = ref<RibbonTabModel[]>([
63
+ {
64
+ id: 'home',
65
+ title: 'Home',
66
+ groups: [
67
+ {
68
+ id: 'draw',
69
+ title: 'Draw',
70
+ orientation: 'row',
71
+ autoWidth: true,
72
+ enableGroupOverflow: false,
73
+ priority: 1,
74
+ footerMenuItems: [
75
+ { id: 'draw-spline', type: 'button', hideLabel: true, size: 'small', props: { icon: DataLine } },
76
+ { id: 'draw-xline', type: 'button', hideLabel: true, size: 'small', props: { icon: Operation } },
77
+ { id: 'draw-ray', type: 'button', hideLabel: true, size: 'small', props: { icon: Position } },
78
+ ],
79
+ collections: [
80
+ {
81
+ id: 'draw-primary',
82
+ layout: 'row',
83
+ items: [
84
+ { id: 'draw-line', type: 'button', label: 'Line', size: 'large', props: { icon: Minus } },
85
+ { id: 'draw-polyline', type: 'button', label: 'Polyline', size: 'large', props: { icon: Connection } },
86
+ {
87
+ id: 'draw-circle',
88
+ type: 'dropdown',
89
+ label: 'Circle',
90
+ size: 'large',
91
+ props: {
92
+ icon: CirclePlus,
93
+ options: [
94
+ { label: 'Center, Radius', value: 'circle-center-radius', icon: CirclePlus },
95
+ { label: 'Center, Diameter', value: 'circle-center-diameter', icon: Aim },
96
+ { label: '2-Point', value: 'circle-two-point', icon: Connection },
97
+ { label: '3-Point', value: 'circle-three-point', icon: DataLine },
98
+ { label: 'Tangent, Tangent, Radius', value: 'circle-tan-tan-radius', icon: Operation },
99
+ { label: 'Tangent, Tangent, Tangent', value: 'circle-tan-tan-tan', icon: MagicStick },
100
+ ],
101
+ },
102
+ },
103
+ ],
104
+ },
105
+ {
106
+ id: 'draw-secondary',
107
+ layout: 'column',
108
+ rows: 3,
109
+ items: [
110
+ {
111
+ id: 'draw-rectangle',
112
+ type: 'dropdown',
113
+ hideLabel: true,
114
+ size: 'small',
115
+ props: {
116
+ icon: FullScreen,
117
+ options: [
118
+ { label: 'Rectangle', value: 'rectangle', icon: FullScreen },
119
+ { label: '2-Point Rectangle', value: 'rectangle-two-point', icon: Crop },
120
+ { label: 'Polygon', value: 'polygon', icon: EditPen },
121
+ ],
122
+ },
123
+ },
124
+ { id: 'draw-ellipse', type: 'button', hideLabel: true, size: 'small', props: { icon: Aim } },
125
+ { id: 'draw-hatch', type: 'button', hideLabel: true, size: 'small', props: { icon: MagicStick } },
126
+ ],
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ id: 'clipboard',
132
+ title: 'Clipboard',
133
+ orientation: 'column',
134
+ enableGroupOverflow: true,
135
+ priority: 10,
136
+ launcher: true,
137
+ showLauncherIcon: true,
138
+ collections: [
139
+ {
140
+ id: 'clipboard-left',
141
+ layout: 'row',
142
+ items: [
143
+ { id: 'paste', type: 'button', label: 'Paste', size: 'large', keyTip: 'V', props: { icon: Files } },
144
+ ],
145
+ },
146
+ {
147
+ id: 'clipboard-right',
148
+ layout: 'column',
149
+ rows: 3,
150
+ items: [
151
+ { id: 'cut', type: 'button', label: 'Cut', size: 'small', keyTip: 'X', props: { icon: Scissor } },
152
+ { id: 'copy', type: 'button', label: 'Copy', size: 'small', keyTip: 'C', props: { icon: CopyDocument } },
153
+ {
154
+ id: 'format-painter',
155
+ type: 'button',
156
+ label: 'Format Painter',
157
+ size: 'small',
158
+ keyTip: 'FP',
159
+ props: { icon: Brush },
160
+ },
161
+ ],
162
+ },
163
+ ],
164
+ },
165
+ {
166
+ id: 'font',
167
+ title: 'Font',
168
+ orientation: 'row',
169
+ priority: 20,
170
+ collections: [
171
+ {
172
+ id: 'font-main',
173
+ layout: 'column',
174
+ items: [
175
+ {
176
+ id: 'font-family',
177
+ type: 'comboBox',
178
+ label: 'Font Family',
179
+ keyTip: 'FF',
180
+ props: {
181
+ options: [
182
+ { label: 'Cambria', value: 'cambria' },
183
+ { label: 'Calibri', value: 'calibri' },
184
+ { label: 'Arial', value: 'arial' },
185
+ ],
186
+ },
187
+ },
188
+ {
189
+ id: 'font-size',
190
+ type: 'comboBox',
191
+ label: 'Font Size',
192
+ keyTip: 'FS',
193
+ props: {
194
+ options: [
195
+ { label: '11', value: 11 },
196
+ { label: '12', value: 12 },
197
+ { label: '14', value: 14 },
198
+ ],
199
+ },
200
+ },
201
+ { id: 'font-color', type: 'colorPicker', label: 'Font Color', keyTip: 'FC' },
202
+ ],
203
+ },
204
+ ],
205
+ },
206
+ {
207
+ id: 'editing',
208
+ title: 'Editing',
209
+ orientation: 'row',
210
+ enableGroupOverflow: true,
211
+ priority: 80,
212
+ collections: [
213
+ {
214
+ id: 'editing-actions',
215
+ layout: 'column',
216
+ rows: 2,
217
+ items: [
218
+ {
219
+ id: 'find-replace',
220
+ type: 'groupButton',
221
+ keyTip: 'FD',
222
+ props: {
223
+ options: [
224
+ { label: 'Find', value: 'find', icon: Search },
225
+ { label: 'Replace', value: 'replace', icon: EditPen },
226
+ ],
227
+ },
228
+ },
229
+ {
230
+ id: 'select',
231
+ type: 'dropdown',
232
+ label: 'Select',
233
+ props: {
234
+ icon: Pointer,
235
+ options: [
236
+ { label: 'Select All', value: 'all' },
237
+ { label: 'Select Objects', value: 'objects' },
238
+ ],
239
+ },
240
+ },
241
+ ],
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ id: 'editor',
247
+ title: 'Editor',
248
+ enableGroupOverflow: true,
249
+ priority: 90,
250
+ collections: [
251
+ {
252
+ id: 'editor-main',
253
+ items: [
254
+ {
255
+ id: 'editor-launch',
256
+ type: 'button',
257
+ label: 'Editor',
258
+ props: { icon: Crop },
259
+ },
260
+ ],
261
+ },
262
+ ],
263
+ },
264
+ ],
265
+ },
266
+ {
267
+ id: 'insert',
268
+ title: 'Insert',
269
+ groups: [
270
+ {
271
+ id: 'illustrations',
272
+ title: 'Illustrations',
273
+ priority: 20,
274
+ collections: [
275
+ {
276
+ id: 'ill-1',
277
+ items: [
278
+ {
279
+ id: 'shape',
280
+ type: 'dropdown',
281
+ label: 'Shapes',
282
+ props: {
283
+ options: [
284
+ { label: 'Rectangle', value: 'rect' },
285
+ { label: 'Circle', value: 'circle' },
286
+ ],
287
+ },
288
+ },
289
+ ],
290
+ },
291
+ ],
292
+ },
293
+ ],
294
+ },
295
+ {
296
+ id: 'chart-tools',
297
+ title: 'Chart Design',
298
+ contextual: true,
299
+ contextualTitle: 'Chart Tools',
300
+ contextualColor: '#eebe77',
301
+ groups: [
302
+ {
303
+ id: 'chart-style',
304
+ title: 'Chart Style',
305
+ collections: [{ id: 'chart-c1', items: [{ id: 'color-scheme', type: 'colorPicker', label: 'Colors' }] }],
306
+ },
307
+ ],
308
+ },
309
+ ])
310
+
311
+ // Top-left file menu entries for demoing file/backstage integration.
312
+ const fileMenuItems = [
313
+ { id: 'new', label: 'New' },
314
+ { id: 'open', label: 'Open' },
315
+ { id: 'save', label: 'Save' },
316
+ ]
317
+
318
+ // Backstage navigation/content data used by the demo page.
319
+ const backstageItems = [
320
+ { id: 'info', label: 'Info', description: 'Document info' },
321
+ { id: 'print', label: 'Print', description: 'Print settings' },
322
+ { id: 'share', label: 'Share', description: 'Sharing options' },
323
+ ]
324
+
325
+ watch(
326
+ theme,
327
+ // Keep root html classes in sync so css variables can switch themes immediately.
328
+ (value) => {
329
+ document.documentElement.classList.toggle('dark', value === 'dark')
330
+ document.documentElement.classList.toggle('ml-theme-dark', value === 'dark')
331
+ document.documentElement.classList.toggle('ml-theme-light', value === 'light')
332
+ },
333
+ { immediate: true },
334
+ )
335
+
336
+ /**
337
+ * Displays the last executed ribbon command in the demo.
338
+ * @param payload Ribbon click payload.
339
+ */
340
+ function onRibbonItemClick(payload: { tabId: string; groupId: string; itemId: string }) {
341
+ lastCommand.value = `${payload.tabId}/${payload.groupId}/${payload.itemId}`
342
+ ElMessage({
343
+ type: 'success',
344
+ message: `Command: ${lastCommand.value}`,
345
+ duration: 1500,
346
+ showClose: true,
347
+ })
348
+ }
349
+ </script>
350
+
351
+ <template>
352
+ <div class="demo">
353
+ <div class="ml-demo-toolbar">
354
+ <span class="ml-demo-toolbar__label">Theme</span>
355
+ <ElRadioGroup v-model="theme" size="small">
356
+ <ElRadioButton value="light">Light</ElRadioButton>
357
+ <ElRadioButton value="dark">Dark</ElRadioButton>
358
+ </ElRadioGroup>
359
+
360
+ <span class="ml-demo-toolbar__label">Ribbon Size</span>
361
+ <ElRadioGroup v-model="ribbonSize" size="small">
362
+ <ElRadioButton value="large">Large</ElRadioButton>
363
+ <ElRadioButton value="default">Default</ElRadioButton>
364
+ <ElRadioButton value="small">Small</ElRadioButton>
365
+ </ElRadioGroup>
366
+ </div>
367
+ <div class="ml-demo-status">
368
+ <span class="ml-demo-status__hint">Press Alt to show Key Tips.</span>
369
+ <span class="ml-demo-status__hint">Try V / X / C / F then P on Home tab.</span>
370
+ <span class="ml-demo-status__value">Last command: {{ lastCommand }}</span>
371
+ </div>
372
+ <MlRibbon
373
+ :active-layout="layout"
374
+ :size="ribbonSize"
375
+ v-model:layout="layout"
376
+ v-model:minimized="minimized"
377
+ v-model:active-tab="activeTab"
378
+ :tabs="tabs"
379
+ :file-menu-items="fileMenuItems"
380
+ :backstage-items="backstageItems"
381
+ @item-click="onRibbonItemClick"
382
+ />
383
+ </div>
384
+ </template>
385
+
386
+ <style scoped>
387
+ .demo {
388
+ padding: 0;
389
+ }
390
+
391
+ .ml-demo-toolbar {
392
+ display: flex;
393
+ align-items: center;
394
+ gap: 8px;
395
+ padding: 8px 0;
396
+ }
397
+
398
+ .ml-demo-toolbar__label {
399
+ font-size: 12px;
400
+ color: var(--el-text-color-secondary);
401
+ }
402
+
403
+ .ml-demo-status {
404
+ display: flex;
405
+ align-items: center;
406
+ gap: 12px;
407
+ margin-bottom: 6px;
408
+ font-size: 12px;
409
+ }
410
+
411
+ .ml-demo-status__hint {
412
+ color: var(--el-text-color-secondary);
413
+ }
414
+
415
+ .ml-demo-status__value {
416
+ color: var(--el-text-color-primary);
417
+ }
418
+ </style>
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -0,0 +1,106 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import viteLogo from '../assets/vite.svg'
4
+ import heroImg from '../assets/hero.png'
5
+ import vueLogo from '../assets/vue.svg'
6
+
7
+ /**
8
+ * @component HelloWorld
9
+ * @description
10
+ * Default Vite/Vue onboarding component kept for local sandboxing and starter UX checks.
11
+ *
12
+ * @usage
13
+ * Render this component in any view to verify asset loading and reactive updates.
14
+ *
15
+ * @example
16
+ * ```vue
17
+ * <HelloWorld />
18
+ * ```
19
+ */
20
+ const count = ref(0)
21
+ </script>
22
+
23
+ <template>
24
+ <section id="center">
25
+ <div class="hero">
26
+ <img :src="heroImg" class="base" width="170" height="179" alt="" />
27
+ <img :src="vueLogo" class="framework" alt="Vue logo" />
28
+ <img :src="viteLogo" class="vite" alt="Vite logo" />
29
+ </div>
30
+ <div>
31
+ <h1>Get started</h1>
32
+ <p>Edit <code>src/App.vue</code> and save to test <code>HMR</code></p>
33
+ </div>
34
+ <button class="counter" @click="count++">Count is {{ count }}</button>
35
+ </section>
36
+
37
+ <div class="ticks"></div>
38
+
39
+ <section id="next-steps">
40
+ <div id="docs">
41
+ <svg class="icon" role="presentation" aria-hidden="true">
42
+ <use href="/icons.svg#documentation-icon"></use>
43
+ </svg>
44
+ <h2>Documentation</h2>
45
+ <p>Your questions, answered</p>
46
+ <ul>
47
+ <li>
48
+ <a href="https://vite.dev/" target="_blank">
49
+ <img class="logo" :src="viteLogo" alt="" />
50
+ Explore Vite
51
+ </a>
52
+ </li>
53
+ <li>
54
+ <a href="https://vuejs.org/" target="_blank">
55
+ <img class="button-icon" :src="vueLogo" alt="" />
56
+ Learn more
57
+ </a>
58
+ </li>
59
+ </ul>
60
+ </div>
61
+ <div id="social">
62
+ <svg class="icon" role="presentation" aria-hidden="true">
63
+ <use href="/icons.svg#social-icon"></use>
64
+ </svg>
65
+ <h2>Connect with us</h2>
66
+ <p>Join the Vite community</p>
67
+ <ul>
68
+ <li>
69
+ <a href="https://github.com/vitejs/vite" target="_blank">
70
+ <svg class="button-icon" role="presentation" aria-hidden="true">
71
+ <use href="/icons.svg#github-icon"></use>
72
+ </svg>
73
+ GitHub
74
+ </a>
75
+ </li>
76
+ <li>
77
+ <a href="https://chat.vite.dev/" target="_blank">
78
+ <svg class="button-icon" role="presentation" aria-hidden="true">
79
+ <use href="/icons.svg#discord-icon"></use>
80
+ </svg>
81
+ Discord
82
+ </a>
83
+ </li>
84
+ <li>
85
+ <a href="https://x.com/vite_js" target="_blank">
86
+ <svg class="button-icon" role="presentation" aria-hidden="true">
87
+ <use href="/icons.svg#x-icon"></use>
88
+ </svg>
89
+ X.com
90
+ </a>
91
+ </li>
92
+ <li>
93
+ <a href="https://bsky.app/profile/vite.dev" target="_blank">
94
+ <svg class="button-icon" role="presentation" aria-hidden="true">
95
+ <use href="/icons.svg#bluesky-icon"></use>
96
+ </svg>
97
+ Bluesky
98
+ </a>
99
+ </li>
100
+ </ul>
101
+ </div>
102
+ </section>
103
+
104
+ <div class="ticks"></div>
105
+ <section id="spacer"></section>
106
+ </template>
package/src/main.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { createApp } from 'vue'
2
+ import ElementPlus from 'element-plus'
3
+ import 'element-plus/dist/index.css'
4
+ import 'element-plus/theme-chalk/dark/css-vars.css'
5
+ import './style.css'
6
+ import './ribbon/styles/ribbon.css'
7
+ import App from './App.vue'
8
+
9
+ createApp(App).use(ElementPlus).mount('#app')