@birdapi/velinstyle 1.2.2 → 1.3.0
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.de.md +18 -4
- package/README.md +42 -7
- package/cli/cli-manifest.json +441 -174
- package/cli/docgen/extract-cli.js +2 -1
- package/cli/docs-generate.js +9 -0
- package/cli/experience.js +173 -0
- package/cli/index.js +1294 -417
- package/cli/motion.js +738 -0
- package/cli/production/extract.js +46 -6
- package/cli/production/report.js +104 -14
- package/cli/production/run.js +44 -1
- package/cli/security.js +190 -0
- package/cli/skills.js +53 -10
- package/cli/transparency.js +140 -41
- package/cli/workflow.js +32 -17
- package/components/velin-theme-toggle.js +15 -1
- package/core/a11y/component-contracts.json +391 -274
- package/core/attributes/registry.js +1 -1
- package/core/motion/analyze.js +38 -0
- package/core/motion/blueprint.js +51 -0
- package/core/motion/composer.js +114 -0
- package/core/motion/data/registry.json +352 -0
- package/core/motion/effects.js +17 -1
- package/core/motion/index.js +112 -9
- package/core/motion/optimize.js +44 -0
- package/core/motion/policy.js +77 -0
- package/core/motion/registry.js +131 -0
- package/core/motion/review.js +59 -0
- package/core/motion/scan.js +150 -0
- package/core/motion/timeline.js +68 -0
- package/core/motion/transitions.js +49 -0
- package/core/motion/triggers.js +168 -0
- package/core/security/checks/fs.js +92 -0
- package/core/security/detect.js +35 -0
- package/core/security/engine.js +116 -0
- package/core/security/index.js +18 -0
- package/core/security/registry.js +85 -0
- package/core/security/report/report.js +113 -0
- package/core/security/rules/ci/index.js +146 -0
- package/core/security/rules/consumer/index.js +174 -0
- package/core/security/rules/deps/index.js +182 -0
- package/core/security/rules/index.js +24 -0
- package/core/security/rules/publish/index.js +230 -0
- package/core/security/rules/repo/index.js +143 -0
- package/core/security/rules/secrets/index.js +133 -0
- package/core/security/score/dependency-health.js +53 -0
- package/core/security/score/release-health.js +66 -0
- package/core/security/score/score.js +102 -0
- package/core/security/timeline/timeline.js +76 -0
- package/dist/chunks/attributes-HK7VIOLA.js +1080 -0
- package/dist/chunks/attributes-VRHHVNDO.js +1080 -0
- package/dist/chunks/chunk-MYKUI364.js +116 -0
- package/dist/chunks/chunk-NEVBPD5T.js +116 -0
- package/dist/chunks/runtime-entry.js +1 -1
- package/dist/chunks/velin-theme-toggle-J2NHC7IM.js +304 -0
- package/dist/llms.txt +2 -2
- package/dist/search-index.json +166 -2
- package/dist/velin-agent.json +156 -32
- package/dist/velinstyle-components.iife.js +862 -17
- package/dist/velinstyle-components.js +862 -17
- package/dist/velinstyle-components.min.js +126 -126
- package/dist/velinstyle.css +42 -7
- package/dist/velinstyle.min.css +1 -1
- package/package.json +158 -143
- package/packages/velinstyle-cli-core/package.json +11 -0
- package/packages/velinstyle-cli-core/src/config.js +84 -0
- package/packages/velinstyle-cli-core/src/contract.js +56 -0
- package/packages/velinstyle-cli-core/src/event-bus.js +50 -0
- package/packages/velinstyle-cli-core/src/index.js +18 -0
- package/packages/velinstyle-cli-core/src/lifecycle.js +33 -0
- package/packages/velinstyle-cli-core/src/runner.js +129 -0
- package/packages/velinstyle-cli-registry/data/commands.json +1216 -0
- package/packages/velinstyle-cli-registry/data/layouts.json +33 -0
- package/packages/velinstyle-cli-registry/data/widgets.json +35 -0
- package/packages/velinstyle-cli-registry/package.json +13 -0
- package/packages/velinstyle-cli-registry/src/index.js +88 -0
- package/packages/velinstyle-cli-renderer/package.json +8 -0
- package/packages/velinstyle-cli-renderer/src/index.js +286 -0
- package/packages/velinstyle-cli-theme/package.json +8 -0
- package/packages/velinstyle-cli-theme/src/index.js +84 -0
- package/packages/velinstyle-cli-ui/package.json +8 -0
- package/packages/velinstyle-cli-ui/src/index.js +34 -0
- package/packages/velinstyle-motion/README.md +81 -0
- package/packages/velinstyle-motion/package.json +37 -0
- package/packages/velinstyle-motion/src/ai/mini-prompt.js +119 -0
- package/packages/velinstyle-motion/src/ai/provider.js +59 -0
- package/packages/velinstyle-motion/src/ai/providers/pixverse-setup.js +402 -0
- package/packages/velinstyle-motion/src/ai/providers/pixverse.js +245 -0
- package/packages/velinstyle-motion/src/config.js +257 -0
- package/packages/velinstyle-motion/src/export/html-clip.js +141 -0
- package/packages/velinstyle-motion/src/index.js +304 -0
- package/packages/velinstyle-motion/src/jobs/cache.js +30 -0
- package/packages/velinstyle-motion/src/jobs/queue.js +69 -0
- package/packages/velinstyle-motion/src/jobs/usage.js +53 -0
- package/packages/velinstyle-motion/src/local/effects.js +139 -0
- package/packages/velinstyle-motion/src/local/engine.js +96 -0
- package/packages/velinstyle-motion/src/providers-catalog.js +44 -0
- package/packages/velinstyle-motion/src/registry/presets.js +25 -0
- package/packages/velinstyle-motion/src/registry/presets.json +85 -0
- package/packages/velinstyle-motion/src/ux/cost-gate.js +37 -0
- package/packages/velinstyle-motion/src/ux/pixverse-gate.js +153 -0
- package/packages/velinstyle-motion/src/ux/wizard.js +171 -0
- package/packages/velinstyle-motion/src/validate-image.js +91 -0
- package/packages/velinstyle-skills/catalog.json +1 -1
- package/packages/velinstyle-skills/registry.json +1 -142
- package/packages/velinstyle-skills/skills/velin-motion-reduced-safe/SKILL.md +1 -1
- package/packages/velinstyle-skills/skills/velin-motion-reveal-feedback/SKILL.md +1 -1
- package/src/tokens/motion.css +7 -0
- package/src/utilities/scroll-animation.css +66 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Experience command runner — lifecycle + bus + contract collection.
|
|
3
|
+
*/
|
|
4
|
+
import { createEventBus } from './event-bus.js';
|
|
5
|
+
import { createEmptyContract, validateContract } from './contract.js';
|
|
6
|
+
import { createLifecycleTracker } from './lifecycle.js';
|
|
7
|
+
import { loadExperienceConfig, recordUsage, suggestFromAnalytics } from './config.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @param {object} opts
|
|
11
|
+
* @param {string} opts.commandId
|
|
12
|
+
* @param {object} [opts.configOverrides]
|
|
13
|
+
* @param {string} [opts.cwd]
|
|
14
|
+
* @param {(ctx: object) => Promise<object>|object} opts.run — returns contract partial or full contract
|
|
15
|
+
*/
|
|
16
|
+
export async function runExperienceCommand(opts) {
|
|
17
|
+
const {
|
|
18
|
+
commandId,
|
|
19
|
+
configOverrides = {},
|
|
20
|
+
cwd = process.cwd(),
|
|
21
|
+
run,
|
|
22
|
+
layout = 'standard',
|
|
23
|
+
meta = {},
|
|
24
|
+
} = opts;
|
|
25
|
+
|
|
26
|
+
const config = loadExperienceConfig(cwd, configOverrides);
|
|
27
|
+
const bus = createEventBus();
|
|
28
|
+
const lifecycle = createLifecycleTracker();
|
|
29
|
+
const startedAt = Date.now();
|
|
30
|
+
|
|
31
|
+
const events = [];
|
|
32
|
+
const recordEvent = (type, payload) => {
|
|
33
|
+
events.push({ type, payload, at: new Date().toISOString() });
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
for (const ev of ['onStart', 'onProgress', 'onWarning', 'onSuggestion', 'onResult', 'onFinish', 'onNotification']) {
|
|
37
|
+
bus.on(ev, (payload) => recordEvent(ev, payload));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
lifecycle.enter('init');
|
|
41
|
+
bus.emit('onStart', { commandId, config });
|
|
42
|
+
|
|
43
|
+
lifecycle.enter('loadConfig');
|
|
44
|
+
lifecycle.enter('environment');
|
|
45
|
+
|
|
46
|
+
if (config.analytics) {
|
|
47
|
+
try {
|
|
48
|
+
recordUsage(commandId, cwd);
|
|
49
|
+
} catch {
|
|
50
|
+
/* ignore analytics failures */
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let contract = createEmptyContract({
|
|
55
|
+
project: { cwd, commandId },
|
|
56
|
+
meta: { ...meta, layout, commandId, version: meta.version || null },
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
lifecycle.enter('input');
|
|
60
|
+
lifecycle.enter('analysis');
|
|
61
|
+
lifecycle.enter('processing');
|
|
62
|
+
|
|
63
|
+
const ctx = {
|
|
64
|
+
bus,
|
|
65
|
+
config,
|
|
66
|
+
cwd,
|
|
67
|
+
commandId,
|
|
68
|
+
lifecycle,
|
|
69
|
+
contract,
|
|
70
|
+
emitProgress: (label, percent) => bus.emit('onProgress', { label, percent }),
|
|
71
|
+
notify: (message, tone = 'info') => {
|
|
72
|
+
bus.emit('onNotification', { message, tone });
|
|
73
|
+
contract.notifications.push({ message, tone });
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const result = await run(ctx);
|
|
78
|
+
if (result && typeof result === 'object') {
|
|
79
|
+
contract = {
|
|
80
|
+
...contract,
|
|
81
|
+
...result,
|
|
82
|
+
widgets: result.widgets || contract.widgets,
|
|
83
|
+
suggestions: result.suggestions || contract.suggestions,
|
|
84
|
+
diagnostics: result.diagnostics || contract.diagnostics,
|
|
85
|
+
notifications: result.notifications || contract.notifications,
|
|
86
|
+
project: { ...contract.project, ...(result.project || {}) },
|
|
87
|
+
stats: { ...contract.stats, ...(result.stats || {}) },
|
|
88
|
+
result: result.result || contract.result,
|
|
89
|
+
meta: { ...contract.meta, ...(result.meta || {}) },
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
lifecycle.enter('validation');
|
|
94
|
+
const validation = validateContract(contract);
|
|
95
|
+
if (!validation.ok) {
|
|
96
|
+
contract.diagnostics.push({
|
|
97
|
+
severity: 'warning',
|
|
98
|
+
message: `Contract validation: ${validation.problems.join('; ')}`,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
lifecycle.enter('hints');
|
|
103
|
+
if (config.analytics) {
|
|
104
|
+
const tip = suggestFromAnalytics(cwd);
|
|
105
|
+
if (tip) {
|
|
106
|
+
contract.suggestions.push({ text: tip, source: 'analytics' });
|
|
107
|
+
bus.emit('onSuggestion', { text: tip });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
lifecycle.enter('result');
|
|
112
|
+
contract.lifecycle = lifecycle.snapshot();
|
|
113
|
+
bus.emit('onResult', { result: contract.result });
|
|
114
|
+
|
|
115
|
+
lifecycle.enter('summary');
|
|
116
|
+
contract.meta = {
|
|
117
|
+
...contract.meta,
|
|
118
|
+
durationMs: Date.now() - startedAt,
|
|
119
|
+
layout: contract.meta.layout || layout,
|
|
120
|
+
};
|
|
121
|
+
bus.emit('onFinish', { contract, durationMs: contract.meta.durationMs });
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
contract,
|
|
125
|
+
config,
|
|
126
|
+
events,
|
|
127
|
+
bus,
|
|
128
|
+
};
|
|
129
|
+
}
|