@baravak/risloo-profile-cli 4.84.0 → 4.86.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.
@@ -0,0 +1,110 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ {{! Component bar: grows left → right, so the gradient runs from the 0 guide (light)
5
+ to the tip (dark) in each bar's own bounding box. One hue for all seven — a
6
+ per-component colour would read as a class the scoring does not define. }}
7
+ <linearGradient id="psqiBar" x1="0" y1="0" x2="1" y2="0">
8
+ <stop stop-color="#A5B4FC"/>
9
+ <stop offset="1" stop-color="#4338CA"/>
10
+ </linearGradient>
11
+
12
+ {{! Total track, fully rounded; the fill is clipped to it so any width keeps the ends. }}
13
+ <clipPath id="psqiTotalTrack">
14
+ <rect x="713" y="260" width="130" height="10" rx="5"/>
15
+ </clipPath>
16
+ </defs>
17
+
18
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
19
+
20
+ {{#if valid}}
21
+
22
+ {{! ===================== Components: heading (over the chart, right-aligned to it) ===================== }}
23
+ <text x="660" y="24" text-anchor="start" font-size="16" font-weight="600" fill="#1E293B">مولفه‌های کیفیت خواب</text>
24
+ <text x="660" y="46" text-anchor="start" font-size="12" fill="#64748B">نمره هر مولفه از 0 تا 3؛ نمره بالاتر یعنی مشکل بیشتر</text>
25
+
26
+ {{! Axis values over the 0–3 guides, and the raw-score column header }}
27
+ {{#each ticks as |tick|}}
28
+ <text x="{{tick.x}}" y="72" text-anchor="middle" font-size="12" fill="#94A3B8">{{tick.v}}</text>
29
+ {{/each}}
30
+ <text x="644" y="72" text-anchor="middle" font-size="12" fill="#94A3B8">نمره</text>
31
+
32
+ {{! ===================== Gridlines (1, 2, 3) ===================== }}
33
+ <line x1="312.5" y1="78" x2="312.5" y2="366" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
34
+ <line x1="462.5" y1="78" x2="462.5" y2="366" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
35
+ <line x1="612.5" y1="78" x2="612.5" y2="366" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
36
+
37
+ {{! ===================== Tracks ===================== }}
38
+ {{#each items as |item|}}
39
+ <g transform="translate(162, {{item.top}})">
40
+ {{bar 450 18 (object tl=0 bl=0 tr=3 br=3) (toRad 0) fill="black" fill-opacity="0.04"}}
41
+ </g>
42
+ {{/each}}
43
+
44
+ {{! ===================== Bars ===================== }}
45
+ {{#each items as |item|}}
46
+ {{#if item.width}}
47
+ <g transform="translate({{item.x}}, {{item.top}})">
48
+ {{bar item.width 18 (object tl=0 bl=0 tr=3 br=3) (toRad 0) fill="url(#psqiBar)"}}
49
+ </g>
50
+ {{/if}}
51
+ {{/each}}
52
+
53
+ {{! 0 guide }}
54
+ <line x1="161.5" y1="78" x2="161.5" y2="366" stroke="#CBD5E1" stroke-linecap="round"/>
55
+
56
+ {{! ===================== Component names (left of the 0 guide) and raw scores (after 3) ===================== }}
57
+ {{#each items as |item|}}
58
+ <text x="150" y="{{item.baseline}}" text-anchor="start" font-size="14" fill="#334155">{{item.title}}</text>
59
+ <rect x="628.5" y="{{math item.top '+' 0.5}}" width="31" height="17" rx="4" fill="white" stroke="#6366F1"/>
60
+ <text x="644" y="{{item.baseline}}" text-anchor="middle" font-size="13" font-weight="600" fill="#3730A3">{{item.mark}}</text>
61
+ {{/each}}
62
+
63
+ {{! ===================== Total card (right of the chart) ===================== }}
64
+ <rect x="693.5" y="78.5" width="169" height="287" rx="8" fill="#F8FAFC" stroke="#E2E8F0"/>
65
+ <text x="778" y="136" text-anchor="middle" font-size="14" font-weight="600" fill="#475569">نمره کل</text>
66
+ <text x="778" y="206" text-anchor="middle" font-size="48" font-weight="700" fill="#1E293B">{{total.mark}}</text>
67
+ <text x="778" y="232" text-anchor="middle" font-size="13" fill="#64748B">از {{total.max}}</text>
68
+
69
+ {{! Neutral 0–21 bar, filling left → right; deliberately no cut mark or colour change }}
70
+ <rect x="713" y="260" width="130" height="10" rx="5" fill="#E2E8F0"/>
71
+ {{#if total.width}}
72
+ <rect x="{{total.x}}" y="260" width="{{total.width}}" height="10" fill="#475569" clip-path="url(#psqiTotalTrack)"/>
73
+ {{/if}}
74
+ <text x="713" y="288" text-anchor="middle" font-size="11" fill="#94A3B8">0</text>
75
+ <text x="843" y="288" text-anchor="middle" font-size="11" fill="#94A3B8">21</text>
76
+ <text x="778" y="322" text-anchor="middle" font-size="12" fill="#94A3B8">جمع هفت مولفه</text>
77
+
78
+ {{! ===================== Interpretation panel ===================== }}
79
+ {{! Every sentence here is approved fixed text; the screening result appears nowhere else. }}
80
+ <rect x="0.5" y="410.5" width="862" height="263" rx="8" fill="#F8FAFC" stroke="#E2E8F0"/>
81
+ <text x="843" y="452" text-anchor="start" font-size="15" font-weight="600" fill="#1E293B">تفسیر نتیجه</text>
82
+
83
+ <text x="843" y="{{lines.direction}}" text-anchor="start" font-size="13.5" fill="#334155"><tspan font-weight="600">جهت نمره</tspan>: نمره بالاتر نشان‌دهنده مشکلات بیشتر در ابعاد سنجیده‌شده است.</text>
84
+
85
+ <text x="843" y="{{lines.screen}}" text-anchor="start" font-size="13.5" fill="#334155"><tspan font-weight="600">نتیجه غربال (غربال، نه تشخیص)</tspan>: نمره کل {{total.mark}} از {{total.max}} — <tspan font-weight="600">{{screen.text}}</tspan>.</text>
86
+
87
+ <text x="843" y="{{lines.cutoff}}" text-anchor="start" font-size="13.5" fill="#334155"><tspan font-weight="600">برش غربال</tspan>: نمره کل 6 یا بیشتر؛ برش فقط بر نمره کل اعمال می‌شود و مولفه‌ها طبقه‌بندی نمی‌شوند.</text>
88
+
89
+ {{#if screen.positive}}
90
+ <text x="843" y="{{lines.falsePositive}}" text-anchor="start" font-size="13.5" fill="#334155"><tspan font-weight="600">مثبت کاذب</tspan>: ویژگی این برش 72.2 درصد است؛ بخشی از افراد بالای برش در واقع مشکل ندارند و نمره زیر برش اطلاع‌بخش‌تر است.</text>
91
+ {{/if}}
92
+
93
+ <text x="843" y="{{lines.limits1}}" text-anchor="start" font-size="13.5" fill="#334155"><tspan font-weight="600">محدودیت</tspan>: این نتیجه بر پایه گزارش خود فرد درباره ماه گذشته است و تشخیص نیست؛ ابزار تصمیم‌یار است</text>
94
+ <text x="843" y="{{lines.limits2}}" text-anchor="start" font-size="13.5" fill="#334155">و جای مصاحبه بالینی و اندازه‌گیری عینی خواب را نمی‌گیرد.</text>
95
+
96
+ {{else}}
97
+
98
+ {{! ===================== No result (all-or-nothing) ===================== }}
99
+ <rect x="181.5" y="237.5" width="500" height="199" rx="12" fill="#F8FAFC" stroke="#E2E8F0"/>
100
+ <circle cx="431.5" cy="288" r="17" fill="none" stroke="#64748B" stroke-width="2"/>
101
+ <line x1="431.5" y1="279" x2="431.5" y2="291" stroke="#64748B" stroke-width="2.5" stroke-linecap="round"/>
102
+ <circle cx="431.5" cy="297.5" r="1.6" fill="#64748B"/>
103
+ <text x="431.5" y="344" text-anchor="middle" font-size="17" font-weight="600" fill="#1E293B">نتیجه تولید نشد؛ پاسخ ناقص یا نامعتبر است</text>
104
+ <text x="431.5" y="376" text-anchor="middle" font-size="13" fill="#64748B">برای این پاسخ‌نامه هیچ نمره‌ای، حتی نمره جزئی، گزارش نمی‌شود.</text>
105
+
106
+ {{/if}}
107
+
108
+ </g>
109
+
110
+ {{/layout}}