addon-ui 0.4.0 → 0.4.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/dist-types/components/Avatar/Avatar.d.ts +14 -0
- package/dist-types/components/Avatar/index.d.ts +3 -0
- package/dist-types/components/Avatar/types.d.ts +11 -0
- package/dist-types/components/BaseButton/BaseButton.d.ts +11 -0
- package/dist-types/components/BaseButton/index.d.ts +2 -0
- package/dist-types/components/Button/Button.d.ts +12 -0
- package/dist-types/components/Button/index.d.ts +3 -0
- package/dist-types/components/Button/types.d.ts +22 -0
- package/dist-types/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist-types/components/Checkbox/index.d.ts +3 -0
- package/dist-types/components/Checkbox/types.d.ts +14 -0
- package/dist-types/components/Dialog/Dialog.d.ts +14 -0
- package/dist-types/components/Dialog/index.d.ts +2 -0
- package/dist-types/components/Drawer/Drawer.d.ts +10 -0
- package/dist-types/components/Drawer/index.d.ts +3 -0
- package/dist-types/components/Drawer/types.d.ts +7 -0
- package/dist-types/components/Footer/Footer.d.ts +13 -0
- package/dist-types/components/Footer/index.d.ts +2 -0
- package/dist-types/components/Header/Header.d.ts +17 -0
- package/dist-types/components/Header/index.d.ts +2 -0
- package/dist-types/components/Highlight/Highlight.d.ts +9 -0
- package/dist-types/components/Highlight/index.d.ts +3 -0
- package/dist-types/components/Highlight/types.d.ts +6 -0
- package/dist-types/components/Icon/Icon.d.ts +8 -0
- package/dist-types/components/Icon/index.d.ts +2 -0
- package/dist-types/components/IconButton/IconButton.d.ts +13 -0
- package/dist-types/components/IconButton/index.d.ts +3 -0
- package/dist-types/components/IconButton/types.d.ts +16 -0
- package/dist-types/components/List/List.d.ts +8 -0
- package/dist-types/components/List/index.d.ts +2 -0
- package/dist-types/components/ListItem/ListItem.d.ts +21 -0
- package/dist-types/components/ListItem/index.d.ts +2 -0
- package/dist-types/components/Modal/Modal.d.ts +14 -0
- package/dist-types/components/Modal/index.d.ts +3 -0
- package/dist-types/components/Modal/types.d.ts +11 -0
- package/dist-types/components/Odometer/Odometer.d.ts +9 -0
- package/dist-types/components/Odometer/hooks/useOdometer.d.ts +10 -0
- package/dist-types/components/Odometer/index.d.ts +3 -0
- package/dist-types/components/ScrollArea/ScrollArea.d.ts +14 -0
- package/dist-types/components/ScrollArea/index.d.ts +2 -0
- package/dist-types/components/SvgSprite/SvgSprite.d.ts +7 -0
- package/dist-types/components/SvgSprite/index.d.ts +2 -0
- package/dist-types/components/Switch/Switch.d.ts +8 -0
- package/dist-types/components/Switch/index.d.ts +2 -0
- package/dist-types/components/Tag/Tag.d.ts +12 -0
- package/dist-types/components/Tag/index.d.ts +3 -0
- package/dist-types/components/Tag/types.d.ts +21 -0
- package/dist-types/components/TextArea/TextArea.d.ts +18 -0
- package/dist-types/components/TextArea/index.d.ts +3 -0
- package/dist-types/components/TextArea/types.d.ts +17 -0
- package/dist-types/components/TextField/TextField.d.ts +26 -0
- package/dist-types/components/TextField/index.d.ts +3 -0
- package/dist-types/components/TextField/types.d.ts +22 -0
- package/dist-types/components/Toast/Toast.d.ts +24 -0
- package/dist-types/components/Toast/index.d.ts +3 -0
- package/dist-types/components/Toast/types.d.ts +19 -0
- package/dist-types/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist-types/components/Tooltip/index.d.ts +2 -0
- package/dist-types/components/View/View.d.ts +12 -0
- package/dist-types/components/View/index.d.ts +2 -0
- package/dist-types/components/ViewDrawer/ViewDrawer.d.ts +7 -0
- package/dist-types/components/ViewDrawer/index.d.ts +2 -0
- package/dist-types/components/ViewModal/ViewModal.d.ts +7 -0
- package/dist-types/components/ViewModal/index.d.ts +2 -0
- package/dist-types/components/Viewport/Provider.d.ts +8 -0
- package/dist-types/components/Viewport/context.d.ts +19 -0
- package/dist-types/components/Viewport/index.d.ts +3 -0
- package/dist-types/components/index.d.ts +28 -0
- package/dist-types/components/types.d.ts +28 -0
- package/dist-types/config/default.d.ts +4 -0
- package/dist-types/config/index.d.ts +4 -0
- package/dist-types/index.d.ts +4 -0
- package/dist-types/plugin/builder/ConfigBuilder.d.ts +9 -0
- package/dist-types/plugin/builder/StyleBuilder.d.ts +8 -0
- package/dist-types/plugin/builder/virtual.config.d.ts +3 -0
- package/dist-types/plugin/finder/ConfigFinder.d.ts +9 -0
- package/dist-types/plugin/finder/Finder.d.ts +22 -0
- package/dist-types/plugin/finder/StyleFinder.d.ts +9 -0
- package/dist-types/plugin/index.d.ts +10 -0
- package/dist-types/plugin/types.d.ts +8 -0
- package/dist-types/providers/extra/ExtraProvider.d.ts +5 -0
- package/dist-types/providers/extra/context.d.ts +7 -0
- package/dist-types/providers/extra/index.d.ts +3 -0
- package/dist-types/providers/icons/IconsProvider.d.ts +5 -0
- package/dist-types/providers/icons/context.d.ts +9 -0
- package/dist-types/providers/icons/index.d.ts +3 -0
- package/dist-types/providers/index.d.ts +5 -0
- package/dist-types/providers/theme/ThemeProvider.d.ts +9 -0
- package/dist-types/providers/theme/ThemeStorage.d.ts +13 -0
- package/dist-types/providers/theme/context.d.ts +12 -0
- package/dist-types/providers/theme/index.d.ts +4 -0
- package/dist-types/providers/ui/UIProvider.d.ts +12 -0
- package/dist-types/providers/ui/index.d.ts +2 -0
- package/dist-types/types/config.d.ts +12 -0
- package/dist-types/types/theme.d.ts +11 -0
- package/dist-types/utils/index.d.ts +3 -0
- package/dist-types/utils/react.d.ts +5 -0
- package/dist-types/utils/utils.d.ts +8 -0
- package/package.json +34 -22
- package/src/types/shims/addon-ui-config.d.ts +5 -0
- package/src/types/vendors/odometer.d.ts +17 -0
- package/.commitlintrc.json +0 -5
- package/.gitattributes +0 -6
- package/.husky/commit-msg +0 -5
- package/.husky/pre-commit +0 -6
- package/.husky/pre-push +0 -8
- package/.mailmap +0 -2
- package/.release-it.cjs +0 -256
package/.release-it.cjs
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
const {execSync} = require("node:child_process");
|
|
2
|
-
const pkg = require("./package.json");
|
|
3
|
-
|
|
4
|
-
function deriveGithubFromEmail(email) {
|
|
5
|
-
if (!email) {
|
|
6
|
-
return {};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const m = email.match(/^([^@]+)@users\.noreply\.github\.com$/i);
|
|
10
|
-
|
|
11
|
-
if (!m) {
|
|
12
|
-
return {};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const local = m[1];
|
|
16
|
-
const login = local.includes("+") ? local.split("+").pop() : local;
|
|
17
|
-
|
|
18
|
-
if (!login) {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return {login, url: `https://github.com/${login}`};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function getContributors() {
|
|
26
|
-
try {
|
|
27
|
-
let fromTag;
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
const tag = execSync("git describe --tags --abbrev=0", {encoding: "utf8"}).trim();
|
|
31
|
-
fromTag = tag || null;
|
|
32
|
-
} catch {
|
|
33
|
-
fromTag = null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const range = fromTag ? `${fromTag}..HEAD` : "";
|
|
37
|
-
const cmd = `git shortlog -sne ${range}`.trim();
|
|
38
|
-
const out = execSync(cmd, {encoding: "utf8"}).trim();
|
|
39
|
-
|
|
40
|
-
if (!out) {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const lines = out.split("\n").filter(Boolean);
|
|
45
|
-
|
|
46
|
-
const map = new Map();
|
|
47
|
-
|
|
48
|
-
for (const line of lines) {
|
|
49
|
-
const m = line.match(/^\s*(\d+)\s+(.*?)(?:\s+<([^>]+)>)?\s*$/);
|
|
50
|
-
|
|
51
|
-
const count = Number(m?.[1] || 0);
|
|
52
|
-
|
|
53
|
-
const displayName = (m?.[2] || "").trim() || undefined;
|
|
54
|
-
const displayEmail = (m?.[3] || "").trim() || undefined;
|
|
55
|
-
|
|
56
|
-
const lcName = (displayName || "").toLowerCase();
|
|
57
|
-
const lcEmail = (displayEmail || "").toLowerCase();
|
|
58
|
-
|
|
59
|
-
// Filter bots using lowercase keys only
|
|
60
|
-
if (lcName.includes("bot") || lcEmail.includes("bot")) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const gh = deriveGithubFromEmail(displayEmail);
|
|
65
|
-
const loginKey = gh.login ? gh.login.toLowerCase() : null;
|
|
66
|
-
|
|
67
|
-
const key = loginKey ? `gh:${loginKey}` : lcEmail ? `em:${lcEmail}` : `nm:${lcName}`;
|
|
68
|
-
|
|
69
|
-
const existing = map.get(key);
|
|
70
|
-
|
|
71
|
-
if (existing) {
|
|
72
|
-
existing.count += count;
|
|
73
|
-
if (!existing.login && gh.login) {
|
|
74
|
-
existing.login = gh.login;
|
|
75
|
-
existing.url = gh.url;
|
|
76
|
-
}
|
|
77
|
-
if (!existing.name && displayName) {
|
|
78
|
-
existing.name = displayName;
|
|
79
|
-
}
|
|
80
|
-
if (!existing.email && displayEmail) {
|
|
81
|
-
existing.email = displayEmail;
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
map.set(key, {count, name: displayName, email: displayEmail, ...gh});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return Array.from(map.values());
|
|
89
|
-
} catch {
|
|
90
|
-
return [];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const types = new Map([
|
|
95
|
-
["feat", "✨ Features"],
|
|
96
|
-
["fix", "🐛 Bug Fixed"],
|
|
97
|
-
["perf", "⚡️ Performance Improvements"],
|
|
98
|
-
["refactor", "🛠️ Refactoring"],
|
|
99
|
-
["docs", "📝 Documentation"],
|
|
100
|
-
["test", "🧪 Tests"],
|
|
101
|
-
["build", "🏗️ Build System"],
|
|
102
|
-
["ci", "🤖 CI"],
|
|
103
|
-
["chore", "🧹 Chores"],
|
|
104
|
-
["revert", "⏪ Reverts"],
|
|
105
|
-
]);
|
|
106
|
-
|
|
107
|
-
const normalizeRepoUrl = url => url.replace(/^git\+/, "").replace(/\.git$/, "");
|
|
108
|
-
const repoUrl = pkg?.repository?.url ? normalizeRepoUrl(pkg.repository.url) : null;
|
|
109
|
-
|
|
110
|
-
module.exports = () => {
|
|
111
|
-
const contributors = getContributors();
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
ci: true,
|
|
115
|
-
|
|
116
|
-
git: {
|
|
117
|
-
requireCleanWorkingDir: true,
|
|
118
|
-
requireUpstream: false,
|
|
119
|
-
requireBranch: false,
|
|
120
|
-
commit: true,
|
|
121
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: release-it placeholder
|
|
122
|
-
commitMessage: "chore(release): v${version}",
|
|
123
|
-
tag: true,
|
|
124
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: release-it placeholder
|
|
125
|
-
tagName: "v${version}",
|
|
126
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: release-it placeholder
|
|
127
|
-
tagAnnotation: "v${version}",
|
|
128
|
-
push: true,
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
github: {
|
|
132
|
-
release: true,
|
|
133
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: release-it placeholder
|
|
134
|
-
releaseName: "v${version}",
|
|
135
|
-
autoGenerate: false,
|
|
136
|
-
// Ensure GitHub receives exactly the generated changelog body
|
|
137
|
-
releaseNotes: ({changelog}) => changelog,
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
npm: {
|
|
141
|
-
publish: true,
|
|
142
|
-
versionArgs: ["--no-git-tag-version"],
|
|
143
|
-
publishArgs: ["--provenance", "--access", "public"],
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
plugins: {
|
|
147
|
-
"@release-it/conventional-changelog": {
|
|
148
|
-
infile: "CHANGELOG.md",
|
|
149
|
-
preset: "conventionalcommits",
|
|
150
|
-
|
|
151
|
-
parserOpts: {
|
|
152
|
-
headerPattern: /^(\w+)(?:\(([^)]+)\))?(!)?:\s(.+?)(?:\s\(#\d+\))?$/,
|
|
153
|
-
headerCorrespondence: ["type", "scope", "breaking", "subject"],
|
|
154
|
-
noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
presetConfig: {
|
|
158
|
-
types: [...types.entries()].map(([type, section]) => ({type, section, hidden: false})),
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
context: {
|
|
162
|
-
name: pkg.name,
|
|
163
|
-
pkg: {name: pkg.name},
|
|
164
|
-
repoUrl,
|
|
165
|
-
contributors,
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
recommendedBumpOpts: {
|
|
169
|
-
preset: "conventionalcommits",
|
|
170
|
-
whatBump: commits => {
|
|
171
|
-
let isMajor = false;
|
|
172
|
-
let isMinor = false;
|
|
173
|
-
let isPatch = false;
|
|
174
|
-
|
|
175
|
-
for (const commit of commits) {
|
|
176
|
-
if (commit.notes?.some(n => /BREAKING CHANGE/i.test(n.title || n.text || ""))) {
|
|
177
|
-
isMajor = true;
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const type = (commit.type || "").toLowerCase();
|
|
182
|
-
|
|
183
|
-
if (type === "feat") {
|
|
184
|
-
isMinor = true;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (["fix", "perf", "refactor", "ci"].includes(type)) {
|
|
188
|
-
isPatch = true;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (isMajor) return {level: 0};
|
|
193
|
-
if (isMinor) return {level: 1};
|
|
194
|
-
if (isPatch) return {level: 2};
|
|
195
|
-
|
|
196
|
-
return null;
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
writerOpts: {
|
|
200
|
-
headerPartial:
|
|
201
|
-
"## 🚀 Release {{#if name}}`{{name}}` {{else}}{{#if @root.pkg}}`{{@root.pkg.name}}` {{/if}}{{/if}}v{{version}} ({{date}})\n\n",
|
|
202
|
-
footerPartial: `{{#if @root.contributors.length}}\n### 🙌 Contributors\n\n{{#each @root.contributors}}- {{#if url}}{{#if name}}[{{name}}]({{url}}){{#if login}} (@{{login}}){{/if}}{{else}}[@{{login}}]({{url}}){{/if}}{{else}}{{#if email}}{{#if name}}[{{name}}](mailto:{{email}}){{else}}{{email}}{{/if}}{{else}}{{name}}{{/if}}{{/if}} — commits: {{count}}\n{{/each}}{{/if}}`,
|
|
203
|
-
mainTemplate:
|
|
204
|
-
"{{> header}}\n" +
|
|
205
|
-
"{{#if noteGroups}}\n### 💥 Breaking Changes\n\n{{#each noteGroups}}{{#each notes}}* {{{text}}}\n\n{{/each}}{{/each}}{{/if}}" +
|
|
206
|
-
"{{#each commitGroups}}\n### {{title}}\n\n{{#each commits}}{{> commit root=@root}}\n{{/each}}\n\n{{/each}}" +
|
|
207
|
-
"{{#unless commitGroups}}\n{{#each commits}}{{> commit root=@root}}\n{{/each}}{{/unless}}\n\n" +
|
|
208
|
-
"{{> footer}}",
|
|
209
|
-
commitPartial:
|
|
210
|
-
"{{#if type}}* {{#if scope}}**{{scope}}:** {{/if}}{{#if subject}}{{subject}}{{else}}{{header}}{{/if}}{{#if href}} ([{{shorthash}}]({{href}})){{/if}}\n\n{{#if body}}{{{body}}}\n{{/if}}{{/if}}",
|
|
211
|
-
groupBy: "type",
|
|
212
|
-
commitGroupsSort: "title",
|
|
213
|
-
commitsSort: ["scope", "subject"],
|
|
214
|
-
transform: commit => {
|
|
215
|
-
const nextCommit = {...commit};
|
|
216
|
-
|
|
217
|
-
// If header had a '!' (captured into `breaking` by parser), ensure we surface a BREAKING note
|
|
218
|
-
if (nextCommit.breaking && (!nextCommit.notes || nextCommit.notes.length === 0)) {
|
|
219
|
-
const text = nextCommit.subject || nextCommit.header;
|
|
220
|
-
nextCommit.notes = [{title: "BREAKING CHANGE", text}];
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// Normalize type: lowercase and drop trailing '!' so 'feat!' maps to 'feat'
|
|
224
|
-
const type = (nextCommit.type || "").toLowerCase().replace(/!+$/, "");
|
|
225
|
-
const section = types.get(type);
|
|
226
|
-
|
|
227
|
-
if (section) {
|
|
228
|
-
nextCommit.type = section;
|
|
229
|
-
} else {
|
|
230
|
-
nextCommit.type = "🧩 Other";
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (nextCommit.body) {
|
|
234
|
-
const body = nextCommit.body.replace(/\r\n/g, "\n").trim();
|
|
235
|
-
|
|
236
|
-
nextCommit.body = body
|
|
237
|
-
.split("\n")
|
|
238
|
-
.map(line => (line ? ` ${line}` : ""))
|
|
239
|
-
.join("\n");
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (!nextCommit.href && nextCommit.hash && repoUrl) {
|
|
243
|
-
nextCommit.href = `${repoUrl}/commit/${nextCommit.hash}`;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (!nextCommit.shorthash && nextCommit.hash) {
|
|
247
|
-
nextCommit.shorthash = nextCommit.hash.slice(0, 7);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
return nextCommit;
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
};
|