trmnlp-test 0.1.4 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 919b1bf33568827657d00e7b935d0253bfb0e7a9384d9be057cb665c97fa5f96
4
- data.tar.gz: 92608945975bad2ed2748a732b24ad2bd2a1cc899c1ebb49fa1ca8329e07dad3
3
+ metadata.gz: b926087a3c37b52ba542f1a113ea8e6d697e365bca15cc6d93c726328d21add1
4
+ data.tar.gz: bc94fc2b7629eb445dc56ea6b7a45120805b51adc107a1606478447092aa5e16
5
5
  SHA512:
6
- metadata.gz: c60c6424e6d751d3634da01e3f88b26eeb5090f8c00af4d83014c19aa3f8c195589c070721c9ce9f3978b662f8f91fd10ec51aaee862a076337ac3d3f734bb80
7
- data.tar.gz: c02bcabd8a0e2541168db2b4793cab321ab91f3b94b49433e3ebb3f87381578304ebba11125b08cc9fa2d4a7a9b920d59fc58d0d855462c4e46b0b00dd03c73f
6
+ metadata.gz: 9b1010584fa48dbaa652a28d2d5ec434a4c7071d3b62832b739dbad9584b09c680275859943d0ee64e7ed0943e97b3efb001c46e21c5da3307f2095ea497adcf
7
+ data.tar.gz: a144a37ba123e5bb7fb2aad230c8aebf17ba01bc5f2a79d454f670050fb359544f7339da7dce01fc8713df50ee637866feac39362c28cd24a81baf2338c8957c
data/README.md CHANGED
@@ -55,7 +55,8 @@ test('menu', async ({ trmnl }) => {
55
55
  const screen = await trmnl.render({
56
56
  device: 'og_plus', view: 'full', // any model, orientation: 'portrait', palette, theme, scale, textScale, fonts, framework
57
57
  darkMode: true, // as the server does it: everything inverted except images ('framework': the v3 class only)
58
- server: true, // TRMNL's quirks: { qr: 'server' | 'fixed', crlf: true }
58
+ qr: 'server', // qr_code as TRMNL's server returns it (default); 'trmnlp', 'fixed'
59
+ crlf: true, // the template with CR LF newlines, as TRMNL's web editor preview had it
59
60
  fields: { data_source: 'webhook' }, // custom field values (defaults + .trmnlp.yml + these)
60
61
  webhook: { merge_variables: {...} }, // or data: {...} to render given data as is
61
62
  mocks: { 'https://api.example.com/*': { temp: 21 } },
@@ -92,7 +93,11 @@ for (const s of matrix({ device: DEVICES.representative, view: VIEWS, darkMode:
92
93
  }
93
94
  ```
94
95
 
95
- **Where the server differs from trmnlp.** trmnlp-test renders with trmnlp's code, so it shares trmnlp's differences from TRMNL's server. The ones seen on trmnl.com are built in: `server: { qr: 'server' }` (the `qr_code` filter ignores "responsive" and returns the viewBox plus its natural width/height and `style="max-width:100%;height:auto"`) and `{ crlf: true }` (the web editor's preview made the template's newlines CR LF, so a newline typed in the template no longer matches `\n` in data). `{ qr: 'fixed' }` (a size and no viewBox) has not been seen and is there for robustness. `server: true` applies the seen ones. `matrix({ server: SERVER.variants })` renders each on its own. Dark mode follows what the server shows (inverted, images kept) rather than the v3 class, which leaves inline SVG and hard-coded colours as they are; `darkMode: 'framework'` renders the class only.
96
+ **Where TRMNL differs from trmnlp.** trmnlp-test renders with trmnlp's code, except where TRMNL is known to differ (observed on trmnl.com, 2026-10-02):
97
+
98
+ - `qr_code`: the server ignores the view argument and returns the viewBox plus the code's natural width/height and `style="max-width:100%;height:auto"`, so a code only shrinks, never grows (a 25-module code stays 275 px in a bigger box), and a second width added by the template makes the SVG invalid XML inside an `<img>`. This is the default; `qr: 'trmnlp'` renders trmnlp's scalable SVG, `qr: 'fixed'` one without a viewBox (not observed, for robustness). `matrix({ qr: QR_MODES })` covers all three.
99
+ - Dark mode: `darkMode: true` inverts the whole screen except images, as TRMNL describes it and the server preview showed for an inline SVG on framework 3.4. Not yet confirmed on a device for v3. `darkMode: 'framework'` renders the v3 class only, which leaves inline SVG and hard-coded colours as they are.
100
+ - `crlf: true` (not the server: TRMNL's web editor preview) turns the template's newlines into CR LF, so a newline typed in the template no longer matches `\n` in data.
96
101
 
97
102
  Other helpers: `trmnl.plugin('other/dir')`, `trmnl.lint()` with `toPassLint({ allow })`, `FRAMEWORK.majors()`, `FRAMEWORK.latestOf('2')`.
98
103
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TrmnlpTest
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  IMAGE = 'ghcr.io/excusemi/trmnlp-test'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnlp-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ExcuseMi