@forwardimpact/pathway 0.8.0 → 0.8.1
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/package.json
CHANGED
package/src/commands/site.js
CHANGED
|
@@ -15,6 +15,22 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
15
15
|
const __dirname = dirname(__filename);
|
|
16
16
|
const appDir = join(__dirname, "..");
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Resolve package directory using Node's module resolution.
|
|
20
|
+
* Works in both monorepo (development) and installed (production) contexts.
|
|
21
|
+
* @param {string} packageName - Package specifier (e.g., '@forwardimpact/schema')
|
|
22
|
+
* @returns {string} Absolute path to package lib directory
|
|
23
|
+
*/
|
|
24
|
+
function resolvePackageLib(packageName) {
|
|
25
|
+
// import.meta.resolve returns file:// URL to package's main entry (lib/index.js)
|
|
26
|
+
const mainUrl = import.meta.resolve(packageName);
|
|
27
|
+
// Convert to path and get lib directory
|
|
28
|
+
return dirname(fileURLToPath(mainUrl));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const schemaLibDir = resolvePackageLib("@forwardimpact/schema");
|
|
32
|
+
const modelLibDir = resolvePackageLib("@forwardimpact/model");
|
|
33
|
+
|
|
18
34
|
/**
|
|
19
35
|
* Files and directories to copy from app/
|
|
20
36
|
*/
|
|
@@ -31,7 +47,6 @@ const PUBLIC_ASSETS = [
|
|
|
31
47
|
// Directories
|
|
32
48
|
"css",
|
|
33
49
|
"lib",
|
|
34
|
-
"model",
|
|
35
50
|
"pages",
|
|
36
51
|
"slides",
|
|
37
52
|
"components",
|
|
@@ -113,6 +128,14 @@ ${framework.emojiIcon} Generating ${framework.title} static site...
|
|
|
113
128
|
}
|
|
114
129
|
}
|
|
115
130
|
|
|
131
|
+
// Copy @forwardimpact/schema and @forwardimpact/model packages
|
|
132
|
+
// These are needed by the browser's import map
|
|
133
|
+
console.log("📚 Copying package dependencies...");
|
|
134
|
+
await cp(schemaLibDir, join(outputDir, "schema/lib"), { recursive: true });
|
|
135
|
+
console.log(` ✓ schema/lib`);
|
|
136
|
+
await cp(modelLibDir, join(outputDir, "model/lib"), { recursive: true });
|
|
137
|
+
console.log(` ✓ model/lib`);
|
|
138
|
+
|
|
116
139
|
// Copy data directory (dereference symlinks to copy actual content)
|
|
117
140
|
console.log("📁 Copying data files...");
|
|
118
141
|
const dataOutputDir = join(outputDir, "data");
|
package/src/components/card.js
CHANGED
package/src/components/detail.js
CHANGED
|
@@ -188,7 +188,7 @@ export function createTagsList(tags, emptyMessage = "None") {
|
|
|
188
188
|
return p({ className: "text-muted" }, emptyMessage);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
return div({ className: "tags" }, ...tags.map((tag) => createTag(tag)));
|
|
191
|
+
return div({ className: "info-tags" }, ...tags.map((tag) => createTag(tag)));
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
/**
|
|
@@ -176,14 +176,14 @@
|
|
|
176
176
|
border: 1px solid var(--color-border);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
/*
|
|
180
|
-
.tags {
|
|
179
|
+
/* Info tags */
|
|
180
|
+
.info-tags {
|
|
181
181
|
display: flex;
|
|
182
182
|
gap: var(--space-sm);
|
|
183
183
|
flex-wrap: wrap;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
.tag {
|
|
186
|
+
.info-tag {
|
|
187
187
|
display: inline-block;
|
|
188
188
|
padding: var(--space-xs) var(--space-sm);
|
|
189
189
|
background: var(--color-bg);
|
package/src/css/views/print.css
CHANGED
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
/* Preserve badge colors */
|
|
195
195
|
.slide-view .badge,
|
|
196
196
|
.slide-view .level-badge,
|
|
197
|
-
.slide-view .tag,
|
|
197
|
+
.slide-view .info-tag,
|
|
198
198
|
.badge,
|
|
199
199
|
.level-badge,
|
|
200
|
-
.tag {
|
|
200
|
+
.info-tag {
|
|
201
201
|
-webkit-print-color-adjust: exact;
|
|
202
202
|
print-color-adjust: exact;
|
|
203
203
|
background-color: inherit !important;
|