prompt-profile 0.1.3 → 0.1.4
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 +22 -5
- package/dist/bin.js +76 -89
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,11 +21,28 @@ The author's own report, from about 1,700 real prompts over six months, publishe
|
|
|
21
21
|
The share card is the same for both: it never contains quotes or project names. The full report
|
|
22
22
|
in every look (`--look`; render only, no new analysis):
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
<table>
|
|
25
|
+
<tr>
|
|
26
|
+
<td width="50%" align="center">
|
|
27
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html"><img src="docs/demo/card.png" width="420" alt="Classic card"></a><br>
|
|
28
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html">Classic</a> (default)
|
|
29
|
+
</td>
|
|
30
|
+
<td width="50%" align="center">
|
|
31
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html"><img src="docs/demo/signal/card.png" width="420" alt="Signal card"></a><br>
|
|
32
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html">Signal</a>
|
|
33
|
+
</td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td width="50%" align="center">
|
|
37
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html"><img src="docs/demo/afterhours/card.png" width="420" alt="Afterhours card"></a><br>
|
|
38
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html">Afterhours</a>
|
|
39
|
+
</td>
|
|
40
|
+
<td width="50%" align="center">
|
|
41
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html"><img src="docs/demo/studio/card.png" width="420" alt="Studio card"></a><br>
|
|
42
|
+
<a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html">Studio</a>
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
</table>
|
|
29
46
|
|
|
30
47
|
## Quick start
|
|
31
48
|
|
package/dist/bin.js
CHANGED
|
@@ -1302,7 +1302,7 @@ const fileCacheLayer = (dir) => Layer.effect(AnalysisCache, Effect.gen(function*
|
|
|
1302
1302
|
* Package version. Injected by tsdown at build time; during development and tests
|
|
1303
1303
|
* (tsx / vitest) it falls back to reading package.json.
|
|
1304
1304
|
*/
|
|
1305
|
-
const VERSION = "0.1.
|
|
1305
|
+
const VERSION = "0.1.4";
|
|
1306
1306
|
// src/cli/errors.ts
|
|
1307
1307
|
/** No prompts found at all, or none in the selected range. */
|
|
1308
1308
|
var NoData = class extends Data.TaggedError("NoData") {};
|
|
@@ -3246,8 +3246,8 @@ const cardMetrics = (profile, lang, n) => {
|
|
|
3246
3246
|
/** Clock size on the classic card; the report's 260 × 260 drawing is scaled to it. */
|
|
3247
3247
|
const CARD_CLOCK = 300;
|
|
3248
3248
|
/**
|
|
3249
|
-
* The classic card: the classic report's hero
|
|
3250
|
-
* hour clock. The hour labels are text nodes over the drawing (SVG images get no fonts).
|
|
3249
|
+
* The classic card: the classic report's hero edge to edge, like the looks, in its dark colors,
|
|
3250
|
+
* with the same hour clock. The hour labels are text nodes over the drawing (SVG images get no fonts).
|
|
3251
3251
|
*/
|
|
3252
3252
|
const classicTree = (profile, hide, lang) => {
|
|
3253
3253
|
const t = MESSAGES[lang];
|
|
@@ -3256,7 +3256,7 @@ const classicTree = (profile, hide, lang) => {
|
|
|
3256
3256
|
const name = clip(c.archetype.name, 56);
|
|
3257
3257
|
const showGraphic = !hide.includes("graphic");
|
|
3258
3258
|
const clock = clockSvg(profile.stats.hourHistogram, k.accent);
|
|
3259
|
-
const left =
|
|
3259
|
+
const left = 840;
|
|
3260
3260
|
const top = 165;
|
|
3261
3261
|
const scale = CARD_CLOCK / clock.width;
|
|
3262
3262
|
const ticks = [
|
|
@@ -3283,104 +3283,91 @@ const classicTree = (profile, hide, lang) => {
|
|
|
3283
3283
|
boxSizing: "border-box",
|
|
3284
3284
|
display: "flex",
|
|
3285
3285
|
position: "relative",
|
|
3286
|
-
backgroundColor: k.
|
|
3286
|
+
backgroundColor: k.card,
|
|
3287
3287
|
color: k.fg,
|
|
3288
3288
|
fontFamily: "Inter"
|
|
3289
|
+
}, [...showGraphic ? [{
|
|
3290
|
+
type: "img",
|
|
3291
|
+
props: {
|
|
3292
|
+
src: svgDataUrl(clock.svg),
|
|
3293
|
+
width: CARD_CLOCK,
|
|
3294
|
+
height: CARD_CLOCK,
|
|
3295
|
+
style: {
|
|
3296
|
+
position: "absolute",
|
|
3297
|
+
left,
|
|
3298
|
+
top
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
}, ...ticks] : [], h("div", {
|
|
3302
|
+
display: "flex",
|
|
3303
|
+
flexDirection: "column",
|
|
3304
|
+
justifyContent: "space-between",
|
|
3305
|
+
position: "absolute",
|
|
3306
|
+
left: 0,
|
|
3307
|
+
top: 0,
|
|
3308
|
+
width: CARD_WIDTH,
|
|
3309
|
+
height: 630,
|
|
3310
|
+
padding: "52px 60px",
|
|
3311
|
+
boxSizing: "border-box"
|
|
3289
3312
|
}, [
|
|
3290
3313
|
h("div", {
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
width: 1128,
|
|
3295
|
-
height: 558,
|
|
3296
|
-
backgroundColor: k.card,
|
|
3297
|
-
border: `1.5px solid ${k.border}`,
|
|
3298
|
-
borderRadius: 32
|
|
3299
|
-
}),
|
|
3300
|
-
...showGraphic ? [{
|
|
3301
|
-
type: "img",
|
|
3302
|
-
props: {
|
|
3303
|
-
src: svgDataUrl(clock.svg),
|
|
3304
|
-
width: CARD_CLOCK,
|
|
3305
|
-
height: CARD_CLOCK,
|
|
3306
|
-
style: {
|
|
3307
|
-
position: "absolute",
|
|
3308
|
-
left,
|
|
3309
|
-
top
|
|
3310
|
-
}
|
|
3311
|
-
}
|
|
3312
|
-
}, ...ticks] : [],
|
|
3314
|
+
fontSize: 20,
|
|
3315
|
+
fontWeight: 700
|
|
3316
|
+
}, t.project),
|
|
3313
3317
|
h("div", {
|
|
3314
3318
|
display: "flex",
|
|
3315
3319
|
flexDirection: "column",
|
|
3316
|
-
|
|
3317
|
-
position: "absolute",
|
|
3318
|
-
left: 36,
|
|
3319
|
-
top: 36,
|
|
3320
|
-
width: 1128,
|
|
3321
|
-
height: 558,
|
|
3322
|
-
padding: "40px 56px",
|
|
3323
|
-
boxSizing: "border-box"
|
|
3320
|
+
maxWidth: showGraphic ? 700 : 1e3
|
|
3324
3321
|
}, [
|
|
3325
3322
|
h("div", {
|
|
3326
|
-
fontSize: 20,
|
|
3327
|
-
fontWeight: 700
|
|
3328
|
-
}, t.project),
|
|
3329
|
-
h("div", {
|
|
3330
|
-
display: "flex",
|
|
3331
|
-
flexDirection: "column",
|
|
3332
|
-
maxWidth: showGraphic ? 700 : 1e3
|
|
3333
|
-
}, [
|
|
3334
|
-
h("div", {
|
|
3335
|
-
fontFamily: DISPLAY_FONT,
|
|
3336
|
-
fontWeight: 800,
|
|
3337
|
-
fontSize: titleSize(name),
|
|
3338
|
-
lineHeight: .98,
|
|
3339
|
-
letterSpacing: -2
|
|
3340
|
-
}, name),
|
|
3341
|
-
h("div", {
|
|
3342
|
-
fontSize: 24,
|
|
3343
|
-
lineHeight: 1.4,
|
|
3344
|
-
marginTop: 18,
|
|
3345
|
-
color: k.muted
|
|
3346
|
-
}, clip(c.headline, 120)),
|
|
3347
|
-
hide.includes("traits") ? null : h("div", {
|
|
3348
|
-
display: "flex",
|
|
3349
|
-
gap: 10,
|
|
3350
|
-
flexWrap: "wrap",
|
|
3351
|
-
marginTop: 20
|
|
3352
|
-
}, profile.traits.slice(0, 3).map((_tr, i) => h("div", {
|
|
3353
|
-
display: "flex",
|
|
3354
|
-
fontSize: 18,
|
|
3355
|
-
padding: "6px 16px",
|
|
3356
|
-
borderRadius: 999,
|
|
3357
|
-
color: k.accent,
|
|
3358
|
-
backgroundColor: k.accentSoft
|
|
3359
|
-
}, clip(c.trait(i).name, 32))))
|
|
3360
|
-
]),
|
|
3361
|
-
h("div", {
|
|
3362
|
-
display: "flex",
|
|
3363
|
-
justifyContent: "space-between",
|
|
3364
|
-
alignItems: "flex-end"
|
|
3365
|
-
}, [h("div", {
|
|
3366
|
-
display: "flex",
|
|
3367
|
-
gap: 44
|
|
3368
|
-
}, (hide.includes("stats") ? [] : cardMetrics(profile, lang, 3)).map(([label, value]) => h("div", {
|
|
3369
|
-
display: "flex",
|
|
3370
|
-
flexDirection: "column"
|
|
3371
|
-
}, [h("div", {
|
|
3372
3323
|
fontFamily: DISPLAY_FONT,
|
|
3373
3324
|
fontWeight: 800,
|
|
3374
|
-
fontSize:
|
|
3375
|
-
|
|
3376
|
-
|
|
3325
|
+
fontSize: titleSize(name),
|
|
3326
|
+
lineHeight: .98,
|
|
3327
|
+
letterSpacing: -2
|
|
3328
|
+
}, name),
|
|
3329
|
+
h("div", {
|
|
3330
|
+
fontSize: 24,
|
|
3331
|
+
lineHeight: 1.4,
|
|
3332
|
+
marginTop: 18,
|
|
3377
3333
|
color: k.muted
|
|
3378
|
-
},
|
|
3334
|
+
}, clip(c.headline, 120)),
|
|
3335
|
+
hide.includes("traits") ? null : h("div", {
|
|
3336
|
+
display: "flex",
|
|
3337
|
+
gap: 10,
|
|
3338
|
+
flexWrap: "wrap",
|
|
3339
|
+
marginTop: 20
|
|
3340
|
+
}, profile.traits.slice(0, 3).map((_tr, i) => h("div", {
|
|
3341
|
+
display: "flex",
|
|
3379
3342
|
fontSize: 18,
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3343
|
+
padding: "6px 16px",
|
|
3344
|
+
borderRadius: 999,
|
|
3345
|
+
color: k.accent,
|
|
3346
|
+
backgroundColor: k.accentSoft
|
|
3347
|
+
}, clip(c.trait(i).name, 32))))
|
|
3348
|
+
]),
|
|
3349
|
+
h("div", {
|
|
3350
|
+
display: "flex",
|
|
3351
|
+
justifyContent: "space-between",
|
|
3352
|
+
alignItems: "flex-end"
|
|
3353
|
+
}, [h("div", {
|
|
3354
|
+
display: "flex",
|
|
3355
|
+
gap: 44
|
|
3356
|
+
}, (hide.includes("stats") ? [] : cardMetrics(profile, lang, 3)).map(([label, value]) => h("div", {
|
|
3357
|
+
display: "flex",
|
|
3358
|
+
flexDirection: "column"
|
|
3359
|
+
}, [h("div", {
|
|
3360
|
+
fontFamily: DISPLAY_FONT,
|
|
3361
|
+
fontWeight: 800,
|
|
3362
|
+
fontSize: 36
|
|
3363
|
+
}, value), h("div", {
|
|
3364
|
+
fontSize: 16,
|
|
3365
|
+
color: k.muted
|
|
3366
|
+
}, label)]))), h("div", {
|
|
3367
|
+
fontSize: 18,
|
|
3368
|
+
color: k.muted
|
|
3369
|
+
}, "npx prompt-profile")])
|
|
3370
|
+
])]);
|
|
3384
3371
|
};
|
|
3385
3372
|
/** Archetype size steps: long names get smaller type instead of overflowing. */
|
|
3386
3373
|
const titleSize = (name) => name.length > 44 ? 58 : name.length > 26 ? 72 : 96;
|