@baravak/risloo-profile-cli 4.82.0 → 4.84.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/AGENTS.md +21 -0
- package/package.json +1 -1
- package/src/publish/json/profiles/JSS93.json +684 -0
- package/src/publish/json/profiles/SII93.json +4858 -0
- package/src/samples/JSS93.js +132 -0
- package/src/samples/SII93.js +490 -0
- package/views/profiles/SII93_bipolar_rows.hbs +100 -0
- package/views/profiles/SII93_summary_card.hbs +46 -0
- package/views/profiles/samples/JSS93.hbs +131 -0
- package/views/profiles/samples/SII93_1.hbs +88 -0
- package/views/profiles/samples/SII93_2.hbs +64 -0
- package/views/profiles/samples/SII93_3.hbs +45 -0
- package/views/profiles/samples/SII93_4.hbs +74 -0
package/AGENTS.md
CHANGED
|
@@ -183,6 +183,27 @@ get dimensions() {
|
|
|
183
183
|
|
|
184
184
|
Padding is layout metadata. Do not apply the same padding again inside the HBS when the layout already owns it.
|
|
185
185
|
|
|
186
|
+
#### Subtract the 20 px the layout already owns — every page must resolve to 903 × 714
|
|
187
|
+
|
|
188
|
+
The designs are drawn on a **943 × 754** page, but `layout.hbs` insets the profile `<svg>` by `canvas.profile.padding` (**20 px**) on every side, so the real with-sidebar drawing area is **903 × 714**. Padding is therefore the Chart's inset inside the design page **minus that 20 px**:
|
|
189
|
+
|
|
190
|
+
```js
|
|
191
|
+
padding: {
|
|
192
|
+
x: (943 - CHART_WIDTH) / 2 - 20,
|
|
193
|
+
y: (754 - CHART_HEIGHT) / 2 - 20,
|
|
194
|
+
},
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
so `dimensions` comes out at exactly `903 × 714`. Use the Chart's *measured* inset instead of `/2` whenever the Chart is not centred on the design page — the `− 20` still applies.
|
|
198
|
+
|
|
199
|
+
This is not cosmetic. The inner `<svg>` uses the default `preserveAspectRatio="xMidYMid meet"`, so a `943 × 754` viewBox is **shrunk to fit at 0.9469** — the whole page, text and geometry included — while `903 × 714` renders at **scale 1**. Check it after every render:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
grep -A4 '<svg x=' temp/<NAME>.svg # width/height must equal the viewBox in the with-sidebar variant
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The raw variant is a different box and legitimately renders at ~1.056; only the with-sidebar variant is the scale-1 target.
|
|
206
|
+
|
|
186
207
|
Never introduce a conventional `translate(20,20)`, arbitrary centering transform, or scale. Add an inner translation only when that offset visibly belongs to the Chart layer and is measured from an authorized source.
|
|
187
208
|
|
|
188
209
|
Fix geometry at the layer that owns the error:
|
package/package.json
CHANGED