@mlightcad/ribbon 0.0.1 → 0.0.3

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 (66) hide show
  1. package/README.md +41 -3
  2. package/dist/components/Ribbon.vue.d.ts +102 -0
  3. package/dist/components/RibbonCollection.vue.d.ts +41 -0
  4. package/dist/components/RibbonGroup.vue.d.ts +77 -0
  5. package/dist/components/RibbonGroupContent.vue.d.ts +39 -0
  6. package/dist/components/RibbonItemHost.vue.d.ts +52 -0
  7. package/dist/components/RibbonTab.vue.d.ts +47 -0
  8. package/dist/components/RibbonTabs.vue.d.ts +34 -0
  9. package/dist/composables/useRibbonState.d.ts +17 -0
  10. package/dist/context.d.ts +3 -0
  11. package/{src/ribbon/index.ts → dist/index.d.ts} +15 -43
  12. package/dist/items/RibbonGallery.vue.d.ts +48 -0
  13. package/dist/items/RibbonGroupButton.vue.d.ts +49 -0
  14. package/dist/items/RibbonTemplateItem.vue.d.ts +40 -0
  15. package/dist/ml-ribbon.css +2 -0
  16. package/dist/ml-ribbon.es.js +1490 -0
  17. package/dist/ml-ribbon.umd.js +1 -0
  18. package/dist/modules/RibbonBackstage.vue.d.ts +61 -0
  19. package/dist/modules/RibbonContextualTabs.vue.d.ts +41 -0
  20. package/dist/modules/RibbonFileMenu.vue.d.ts +44 -0
  21. package/dist/modules/RibbonKeyTips.vue.d.ts +39 -0
  22. package/dist/types.d.ts +130 -0
  23. package/package.json +26 -2
  24. package/.github/workflows/ci.yml +0 -110
  25. package/.vscode/extensions.json +0 -3
  26. package/AGENTS.md +0 -42
  27. package/docs/requirements.md +0 -96
  28. package/eslint.config.js +0 -41
  29. package/images/ribbon.jpg +0 -0
  30. package/index.html +0 -13
  31. package/playwright/ribbon.spec.ts +0 -6
  32. package/playwright.config.ts +0 -10
  33. package/public/favicon.svg +0 -1
  34. package/public/icons.svg +0 -24
  35. package/src/App.vue +0 -418
  36. package/src/assets/hero.png +0 -0
  37. package/src/assets/vite.svg +0 -1
  38. package/src/assets/vue.svg +0 -1
  39. package/src/components/HelloWorld.vue +0 -106
  40. package/src/main.ts +0 -9
  41. package/src/ribbon/components/Ribbon.vue +0 -844
  42. package/src/ribbon/components/RibbonCollection.vue +0 -51
  43. package/src/ribbon/components/RibbonGroup.vue +0 -327
  44. package/src/ribbon/components/RibbonGroupContent.vue +0 -61
  45. package/src/ribbon/components/RibbonItemHost.vue +0 -221
  46. package/src/ribbon/components/RibbonTab.vue +0 -44
  47. package/src/ribbon/components/RibbonTabs.vue +0 -49
  48. package/src/ribbon/composables/useRibbonState.ts +0 -272
  49. package/src/ribbon/context.ts +0 -4
  50. package/src/ribbon/items/RibbonGallery.vue +0 -78
  51. package/src/ribbon/items/RibbonGroupButton.vue +0 -85
  52. package/src/ribbon/items/RibbonTemplateItem.vue +0 -38
  53. package/src/ribbon/modules/RibbonBackstage.vue +0 -69
  54. package/src/ribbon/modules/RibbonContextualTabs.vue +0 -65
  55. package/src/ribbon/modules/RibbonFileMenu.vue +0 -88
  56. package/src/ribbon/modules/RibbonKeyTips.vue +0 -114
  57. package/src/ribbon/styles/ribbon.css +0 -925
  58. package/src/ribbon/types.ts +0 -162
  59. package/src/style.css +0 -328
  60. package/src/tests/ribbon.spec.ts +0 -830
  61. package/src/tests/setup.ts +0 -4
  62. package/tools/release.mjs +0 -107
  63. package/tsconfig.app.json +0 -14
  64. package/tsconfig.json +0 -7
  65. package/tsconfig.node.json +0 -24
  66. package/vite.config.ts +0 -38
@@ -1,4 +0,0 @@
1
- import { config } from '@vue/test-utils'
2
- import ElementPlus from 'element-plus'
3
-
4
- config.global.plugins = [ElementPlus]
package/tools/release.mjs DELETED
@@ -1,107 +0,0 @@
1
- #!/usr/bin/env node
2
- import { execSync } from 'node:child_process';
3
-
4
- function run(cmd) {
5
- return execSync(cmd, {
6
- encoding: 'utf8',
7
- stdio: ['ignore', 'pipe', 'pipe'],
8
- }).trim();
9
- }
10
-
11
- function fail(msg) {
12
- console.error(`❌ ${msg}`);
13
- process.exit(1);
14
- }
15
-
16
- /**
17
- * Parse vX.Y.Z
18
- */
19
- function parseVersion(tag) {
20
- const m = tag.match(/^v(\d+)\.(\d+)\.(\d+)$/);
21
- if (!m) return null;
22
- return {
23
- major: Number(m[1]),
24
- minor: Number(m[2]),
25
- patch: Number(m[3]),
26
- };
27
- }
28
-
29
- /**
30
- * Find latest vX.Y.Z tag (sorted by semver, not by time)
31
- */
32
- function findLatestTag() {
33
- const output = run('git tag --list "v*.*.*"');
34
- if (!output) return null;
35
-
36
- const tags = output
37
- .split('\n')
38
- .map(t => ({ tag: t, v: parseVersion(t) }))
39
- .filter(t => t.v !== null);
40
-
41
- if (tags.length === 0) return null;
42
-
43
- tags.sort((a, b) => {
44
- if (a.v.major !== b.v.major) return b.v.major - a.v.major;
45
- if (a.v.minor !== b.v.minor) return b.v.minor - a.v.minor;
46
- return b.v.patch - a.v.patch;
47
- });
48
-
49
- return tags[0].tag;
50
- }
51
-
52
- /**
53
- * Main
54
- */
55
- let version = process.argv[2];
56
-
57
- if (!version) {
58
- const latestTag = findLatestTag();
59
- if (!latestTag) {
60
- fail('No existing vX.Y.Z tag found, please specify a version explicitly.');
61
- }
62
-
63
- const v = parseVersion(latestTag);
64
- version = `${v.major}.${v.minor}.${v.patch + 1}`;
65
-
66
- console.log(`ℹ️ No version provided, auto-incrementing patch: ${latestTag} → v${version}`);
67
- }
68
-
69
- if (!/^\d+\.\d+\.\d+$/.test(version)) {
70
- fail(`Invalid version "${version}". Expected format: X.Y.Z`);
71
- }
72
-
73
- const tag = `v${version}`;
74
-
75
- /**
76
- * Safety checks
77
- */
78
- try {
79
- run(`git rev-parse --verify refs/tags/${tag}`);
80
- fail(`Tag ${tag} already exists.`);
81
- } catch {
82
- // tag does not exist → OK
83
- }
84
-
85
- try {
86
- const branch = run('git branch --show-current');
87
- if (branch !== 'main') {
88
- fail(`Current branch is "${branch}". Please release from "main".`);
89
- }
90
- } catch {
91
- // non-fatal
92
- }
93
-
94
- const status = run('git status --porcelain');
95
- if (status) {
96
- fail('Working tree is not clean. Please commit or stash changes.');
97
- }
98
-
99
- /**
100
- * Create & push annotated tag
101
- */
102
- console.log(`🚀 Creating tag ${tag}`);
103
-
104
- run(`git tag -a ${tag} -m "release: release ${tag}"`);
105
- run(`git push origin ${tag}`);
106
-
107
- console.log(`✅ Release tag ${tag} pushed successfully`);
package/tsconfig.app.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "@vue/tsconfig/tsconfig.dom.json",
3
- "compilerOptions": {
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "types": ["vite/client"],
6
-
7
- /* Linting */
8
- "noUnusedLocals": true,
9
- "noUnusedParameters": true,
10
- "erasableSyntaxOnly": true,
11
- "noFallthroughCasesInSwitch": true
12
- },
13
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
14
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,24 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "es2023",
5
- "lib": ["ES2023"],
6
- "module": "esnext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "erasableSyntaxOnly": true,
21
- "noFallthroughCasesInSwitch": true
22
- },
23
- "include": ["vite.config.ts"]
24
- }
package/vite.config.ts DELETED
@@ -1,38 +0,0 @@
1
- import { resolve } from 'node:path'
2
- import { defineConfig } from 'vitest/config'
3
- import vue from '@vitejs/plugin-vue'
4
-
5
- export default defineConfig(({ mode }) => {
6
- const isLibBuild = mode === 'lib'
7
-
8
- return {
9
- plugins: [vue()],
10
- build: isLibBuild
11
- ? {
12
- lib: {
13
- entry: resolve(__dirname, 'src/ribbon/index.ts'),
14
- name: 'MlRibbon',
15
- formats: ['es', 'umd'],
16
- fileName: (format) => `ml-ribbon.${format}.js`,
17
- },
18
- rollupOptions: {
19
- external: [/^vue(\/.*)?$/, /^element-plus(\/.*)?$/, /^@element-plus\/icons-vue(\/.*)?$/],
20
- output: {
21
- globals: {
22
- vue: 'Vue',
23
- 'element-plus': 'ElementPlus',
24
- '@element-plus/icons-vue': 'ElementPlusIconsVue',
25
- },
26
- },
27
- },
28
- }
29
- : undefined,
30
- test: {
31
- environment: 'jsdom',
32
- globals: true,
33
- setupFiles: ['./src/tests/setup.ts'],
34
- include: ['src/tests/**/*.spec.ts'],
35
- exclude: ['playwright/**', 'node_modules/**'],
36
- },
37
- }
38
- })