@mlightcad/ribbon 0.0.1 → 0.0.2
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 +40 -3
- package/dist/components/Ribbon.vue.d.ts +102 -0
- package/dist/components/RibbonCollection.vue.d.ts +41 -0
- package/dist/components/RibbonGroup.vue.d.ts +77 -0
- package/dist/components/RibbonGroupContent.vue.d.ts +39 -0
- package/dist/components/RibbonItemHost.vue.d.ts +52 -0
- package/dist/components/RibbonTab.vue.d.ts +47 -0
- package/dist/components/RibbonTabs.vue.d.ts +34 -0
- package/dist/composables/useRibbonState.d.ts +17 -0
- package/dist/context.d.ts +3 -0
- package/{src/ribbon/index.ts → dist/index.d.ts} +15 -43
- package/dist/items/RibbonGallery.vue.d.ts +48 -0
- package/dist/items/RibbonGroupButton.vue.d.ts +49 -0
- package/dist/items/RibbonTemplateItem.vue.d.ts +40 -0
- package/dist/ml-ribbon.css +2 -0
- package/dist/ml-ribbon.es.js +1431 -0
- package/dist/ml-ribbon.umd.js +1 -0
- package/dist/modules/RibbonBackstage.vue.d.ts +61 -0
- package/dist/modules/RibbonContextualTabs.vue.d.ts +41 -0
- package/dist/modules/RibbonFileMenu.vue.d.ts +44 -0
- package/dist/modules/RibbonKeyTips.vue.d.ts +39 -0
- package/dist/types.d.ts +130 -0
- package/package.json +25 -2
- package/.github/workflows/ci.yml +0 -110
- package/.vscode/extensions.json +0 -3
- package/AGENTS.md +0 -42
- package/docs/requirements.md +0 -96
- package/eslint.config.js +0 -41
- package/images/ribbon.jpg +0 -0
- package/index.html +0 -13
- package/playwright/ribbon.spec.ts +0 -6
- package/playwright.config.ts +0 -10
- package/public/favicon.svg +0 -1
- package/public/icons.svg +0 -24
- package/src/App.vue +0 -418
- package/src/assets/hero.png +0 -0
- package/src/assets/vite.svg +0 -1
- package/src/assets/vue.svg +0 -1
- package/src/components/HelloWorld.vue +0 -106
- package/src/main.ts +0 -9
- package/src/ribbon/components/Ribbon.vue +0 -844
- package/src/ribbon/components/RibbonCollection.vue +0 -51
- package/src/ribbon/components/RibbonGroup.vue +0 -327
- package/src/ribbon/components/RibbonGroupContent.vue +0 -61
- package/src/ribbon/components/RibbonItemHost.vue +0 -221
- package/src/ribbon/components/RibbonTab.vue +0 -44
- package/src/ribbon/components/RibbonTabs.vue +0 -49
- package/src/ribbon/composables/useRibbonState.ts +0 -272
- package/src/ribbon/context.ts +0 -4
- package/src/ribbon/items/RibbonGallery.vue +0 -78
- package/src/ribbon/items/RibbonGroupButton.vue +0 -85
- package/src/ribbon/items/RibbonTemplateItem.vue +0 -38
- package/src/ribbon/modules/RibbonBackstage.vue +0 -69
- package/src/ribbon/modules/RibbonContextualTabs.vue +0 -65
- package/src/ribbon/modules/RibbonFileMenu.vue +0 -88
- package/src/ribbon/modules/RibbonKeyTips.vue +0 -114
- package/src/ribbon/styles/ribbon.css +0 -925
- package/src/ribbon/types.ts +0 -162
- package/src/style.css +0 -328
- package/src/tests/ribbon.spec.ts +0 -830
- package/src/tests/setup.ts +0 -4
- package/tools/release.mjs +0 -107
- package/tsconfig.app.json +0 -14
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -24
- package/vite.config.ts +0 -38
package/src/tests/setup.ts
DELETED
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
package/tsconfig.node.json
DELETED
|
@@ -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
|
-
})
|