@tekyzinc/gsd-t 2.73.12 → 2.73.13
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [2.73.13] - 2026-04-08
|
|
6
|
+
|
|
7
|
+
### Fixed (review UI — test fixture props for component preview)
|
|
8
|
+
- **Preview now passes test fixture props** from design contracts to mounted components. Reads `## Test Fixture` JSON block from contract, strips metadata keys (`__` prefixed), and passes as component props. Components that require data (charts, tables, stat cards) now render with sample data instead of blank.
|
|
9
|
+
|
|
5
10
|
## [2.73.12] - 2026-04-08
|
|
6
11
|
|
|
7
12
|
### Added (review UI — isolated component preview + tier tabs)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "2.73.
|
|
3
|
+
"version": "2.73.13",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 56 slash commands with headless CI/CD mode, graph-powered code analysis, real-time agent dashboard, execution intelligence, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
|
|
5
5
|
"author": "Tekyz, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,8 +51,32 @@ function findGlobalStyles() {
|
|
|
51
51
|
const FRAMEWORK = detectFramework();
|
|
52
52
|
const GLOBAL_STYLES = findGlobalStyles();
|
|
53
53
|
|
|
54
|
+
function extractFixtureFromContract(componentPath) {
|
|
55
|
+
// Map source path → contract path: src/components/elements/ChartDonut.vue → .gsd-t/contracts/design/elements/chart-donut.contract.md
|
|
56
|
+
const match = componentPath.match(/src\/components\/(\w+)\/(\w+)\.vue$/);
|
|
57
|
+
if (!match) return null;
|
|
58
|
+
const [, tier, name] = match;
|
|
59
|
+
// PascalCase → kebab-case
|
|
60
|
+
const kebab = name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
61
|
+
const contractPath = path.join(PROJECT_DIR, ".gsd-t", "contracts", "design", tier, `${kebab}.contract.md`);
|
|
62
|
+
try {
|
|
63
|
+
const content = fs.readFileSync(contractPath, "utf8");
|
|
64
|
+
const fixtureMatch = content.match(/## Test Fixture[\s\S]*?```json\s*([\s\S]*?)```/);
|
|
65
|
+
if (!fixtureMatch) return null;
|
|
66
|
+
const fixture = JSON.parse(fixtureMatch[1]);
|
|
67
|
+
// Remove metadata keys (__ prefixed)
|
|
68
|
+
const props = {};
|
|
69
|
+
for (const [k, v] of Object.entries(fixture)) {
|
|
70
|
+
if (!k.startsWith("__")) props[k] = v;
|
|
71
|
+
}
|
|
72
|
+
return props;
|
|
73
|
+
} catch { return null; }
|
|
74
|
+
}
|
|
75
|
+
|
|
54
76
|
function generatePreviewHtml(componentPath) {
|
|
55
77
|
const linkTags = GLOBAL_STYLES.map(s => ` <link rel="stylesheet" href="/${s}">`).join("\n");
|
|
78
|
+
const fixture = extractFixtureFromContract(componentPath);
|
|
79
|
+
const propsJson = fixture ? JSON.stringify(fixture) : "{}";
|
|
56
80
|
|
|
57
81
|
let mountScript;
|
|
58
82
|
if (FRAMEWORK === "vue") {
|
|
@@ -60,7 +84,8 @@ function generatePreviewHtml(componentPath) {
|
|
|
60
84
|
<script type="module">
|
|
61
85
|
import { createApp } from 'vue'
|
|
62
86
|
import Component from '/${componentPath}'
|
|
63
|
-
const
|
|
87
|
+
const props = ${propsJson}
|
|
88
|
+
const app = createApp(Component, props)
|
|
64
89
|
app.mount('#app')
|
|
65
90
|
</script>`;
|
|
66
91
|
} else if (FRAMEWORK === "react") {
|
|
@@ -69,7 +94,8 @@ function generatePreviewHtml(componentPath) {
|
|
|
69
94
|
import React from 'react'
|
|
70
95
|
import { createRoot } from 'react-dom/client'
|
|
71
96
|
import Component from '/${componentPath}'
|
|
72
|
-
|
|
97
|
+
const props = ${propsJson}
|
|
98
|
+
createRoot(document.getElementById('app')).render(React.createElement(Component, props))
|
|
73
99
|
</script>`;
|
|
74
100
|
} else {
|
|
75
101
|
mountScript = `<script type="module">import '/${componentPath}'</script>`;
|