@litfamily/litgrok 1.0.26 → 1.0.28
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/.grok/hooks/lit-mark.mjs +42 -0
- package/.grok/hooks/lit-status-line.mjs +174 -21
- package/.grok/hooks/plan-gate.mjs +13 -3
- package/.grok/hooks/record-passive-event.mjs +40 -6
- package/.grok/hooks/session-end.json +15 -0
- package/.grok/hooks/session-end.mjs +6 -0
- package/.grok/hooks/session-liveness.mjs +102 -0
- package/.grok/hooks/session-rows.mjs +57 -0
- package/.grok/hooks/session-start.mjs +17 -0
- package/.grok/hooks/workflow-stage.mjs +5 -2
- package/.grok/rules/00-litgrok.md +14 -0
- package/.grok/skills/frontend-ui-ux/ATTRIBUTION.md +23 -0
- package/.grok/skills/frontend-ui-ux/SKILL.md +4 -1
- package/.grok/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
- package/.grok/skills/frontend-ui-ux/kit/components.css +414 -0
- package/.grok/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/.grok/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/.grok/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/.grok/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/.grok/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/.grok/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/.grok/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/.grok/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/.grok/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/.grok/skills/frontend-ui-ux/kit/ui.js +226 -0
- package/.grok/skills/frontend-ui-ux/references/adaptive-layout.md +10 -4
- package/.grok/skills/frontend-ui-ux/references/brand-and-imagery.md +11 -7
- package/.grok/skills/frontend-ui-ux/references/complete-contract.md +21 -0
- package/.grok/skills/frontend-ui-ux/references/composition.md +10 -6
- package/.grok/skills/frontend-ui-ux/references/craft-floor.md +256 -93
- package/.grok/skills/frontend-ui-ux/references/creative-directions.md +9 -6
- package/.grok/skills/frontend-ui-ux/references/default-editorial-pixel.json +28 -0
- package/.grok/skills/frontend-ui-ux/references/house-styles.md +234 -0
- package/.grok/skills/frontend-ui-ux/references/implementation-platforms.md +10 -6
- package/.grok/skills/frontend-ui-ux/references/inclusive-interface.md +11 -5
- package/.grok/skills/frontend-ui-ux/references/interaction-motion.md +34 -78
- package/.grok/skills/frontend-ui-ux/references/motion-guide.md +10 -7
- package/.grok/skills/frontend-ui-ux/references/performance-delivery.md +11 -8
- package/.grok/skills/frontend-ui-ux/references/probe-loop.md +1 -1
- package/.grok/skills/frontend-ui-ux/references/product-direction.md +9 -4
- package/.grok/skills/frontend-ui-ux/references/production-interview.md +17 -0
- package/.grok/skills/frontend-ui-ux/references/redesign-playbook.md +10 -6
- package/.grok/skills/frontend-ui-ux/references/slop-register.md +148 -73
- package/.grok/skills/frontend-ui-ux/references/system-foundations.md +10 -4
- package/.grok/skills/frontend-ui-ux/references/visual-language.md +10 -4
- package/.grok/skills/frontend-ui-ux/references/visual-reconstruction.md +39 -72
- package/.grok/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-driver.mjs +33 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1555 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +153 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +139 -0
- package/.grok/skills/frontend-ui-ux/scripts/interface-probe.mjs +363 -0
- package/.grok/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/.grok/skills/lit-adhd/SKILL.md +155 -0
- package/.grok/skills/lit-adhd/references/card-examples.md +131 -0
- package/.grok/skills/lit-adhd/references/status-taxonomy.md +50 -0
- package/.grok/skills/lit-adhd/scripts/lib/brief.mjs +421 -0
- package/.grok/skills/lit-adhd/scripts/lib/collect.mjs +395 -0
- package/.grok/skills/lit-adhd/scripts/lib/gauge.mjs +87 -0
- package/.grok/skills/lit-adhd/scripts/lib/next-step.mjs +22 -0
- package/.grok/skills/lit-adhd/scripts/lib/plan-task-rows.mjs +32 -0
- package/.grok/skills/lit-adhd/scripts/lib/project-state-root.mjs +55 -0
- package/.grok/skills/lit-adhd/scripts/lib/redact.mjs +64 -0
- package/.grok/skills/lit-adhd/scripts/lib/suggest.mjs +140 -0
- package/.grok/skills/lit-adhd/scripts/lib/transcripts.mjs +232 -0
- package/.grok/skills/lit-adhd/scripts/rewind.mjs +6 -0
- package/.grok/skills/lit-diagram-drawer/SKILL.md +17 -5
- package/.grok/skills/lit-diagram-drawer/references/output-spec.md +2 -2
- package/.grok/skills/lit-diagram-drawer/references/style-guide.md +20 -11
- package/.grok/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/.grok/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/.grok/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/.grok/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/.grok/skills/lit-diagram-drawer/references/verifier-guide.md +4 -0
- package/.grok/skills/lit-diagram-drawer/scripts/visual-quality.mjs +2 -2
- package/.grok/skills/lit-handoff/SKILL.md +2 -0
- package/.grok/skills/lit-hijack/SKILL.md +459 -0
- package/.grok/skills/lit-hijack/references/capture-and-provenance.md +124 -0
- package/.grok/skills/lit-hijack/references/clean-room-build.md +130 -0
- package/.grok/skills/lit-hijack/references/distil-and-licence.md +128 -0
- package/.grok/skills/lit-hijack/references/gap-and-port-design.md +150 -0
- package/.grok/skills/lit-hijack/references/parity-and-report.md +130 -0
- package/.grok/skills/lit-hijack/scripts/hijack.mjs +890 -0
- package/.grok/skills/lit-hijack/scripts/lib/safe-fetch.mjs +213 -0
- package/.grok/skills/lit-plan/SKILL.md +3 -1
- package/.grok/skills/lit-plan/references/plan-schema.md +4 -0
- package/.grok/skills/lit-plan/scripts/scaffold-plan.mjs +9 -2
- package/.grok/skills/lit-plan/scripts/scope-roots.mjs +83 -0
- package/.grok/skills/lit-pptx/SKILL.md +10 -5
- package/.grok/skills/lit-pptx/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
- package/.grok/skills/lit-pptx/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
- package/.grok/skills/lit-pptx/examples/15-design-lecture-bauhaus-ko.md +139 -0
- package/.grok/skills/lit-pptx/examples/16-community-programme-riso-ko.md +158 -0
- package/.grok/skills/lit-pptx/examples/17-public-data-briefing-newsroom-ko.md +179 -0
- package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/.grok/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/.grok/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/.grok/skills/lit-pptx/fonts/jetbrains-mono/provenance.json +1 -0
- package/.grok/skills/lit-pptx/references/direction-step.md +34 -8
- package/.grok/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
- package/.grok/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
- package/.grok/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
- package/.grok/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
- package/.grok/skills/lit-pptx/references/tonalities/riso.md +137 -0
- package/.grok/skills/lit-pptx/scripts/compile-deck.js +1 -1
- package/.grok/skills/lit-pptx/scripts/craft_extras.py +61 -3
- package/.grok/skills/lit-pptx/scripts/deck_output.py +76 -62
- package/.grok/skills/lit-pptx/scripts/embed_fonts.py +14 -1
- package/.grok/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/.grok/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/.grok/skills/lit-pptx/scripts/lib/render-pack.js +389 -582
- package/.grok/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/.grok/skills/lit-pptx/scripts/lib/template-registry.js +60 -8
- package/.grok/skills/lit-pptx/scripts/qa_deck.py +4 -4
- package/.grok/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/.grok/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
- package/.grok/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/.grok/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/.grok/skills/lit-pptx/templates/tonalities/night/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/paper/pack.yaml +2 -0
- package/.grok/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/.grok/skills/lit-pptx/templates/tonalities/signal/pack.yaml +3 -0
- package/.grok/skills/lit-pptx/templates/tonalities/studio/pack.yaml +2 -0
- package/.grok/skills/lit-recap/SKILL.md +1 -1
- package/.grok/skills/lit-schematic/SKILL.md +140 -0
- package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/.grok/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/.grok/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/.grok/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/.grok/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/.grok/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/.grok/skills/lit-schematic/references/journal-figures.md +72 -0
- package/.grok/skills/lit-schematic/references/kit-api.md +134 -0
- package/.grok/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/.grok/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/.grok/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/.grok/skills/lit-schematic/references/verification.md +100 -0
- package/.grok/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/.grok/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/.grok/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
- package/.grok/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/.grok/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/.grok/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/.grok/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/.grok/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/.grok/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/.grok/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/.grok/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/.grok/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/.grok/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/.grok/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/.grok/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/.grok/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/.grok/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/.grok/skills/lit-schematic/scripts/render.mjs +233 -0
- package/.grok/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/.grok/skills/lit-scientific-visualization/SKILL.md +36 -12
- package/.grok/skills/lit-typographic-motion/SKILL.md +7 -4
- package/.grok/skills/lit-typographic-motion/THIRD_PARTY_NOTICES +11 -0
- package/.grok/skills/lit-typographic-motion/recipes/hero-3d/expected.json +62 -0
- package/.grok/skills/lit-typographic-motion/recipes/hero-3d/index.html +82 -0
- package/.grok/skills/lit-typographic-motion/references/choice-first.md +30 -0
- package/.grok/skills/lit-typographic-motion/references/cover.md +10 -1
- package/.grok/skills/lit-typographic-motion/references/depth.md +119 -0
- package/.grok/skills/lit-typographic-motion/references/treatment.md +9 -1
- package/.grok/skills/lit-typographic-motion/scripts/blender/runner.py +218 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/assets.mjs +230 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/blender.mjs +136 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/board.mjs +153 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/chrome.mjs +61 -32
- package/.grok/skills/lit-typographic-motion/scripts/lib/constants.mjs +4 -2
- package/.grok/skills/lit-typographic-motion/scripts/lib/cover-capture.mjs +20 -11
- package/.grok/skills/lit-typographic-motion/scripts/lib/cover-treatment.mjs +26 -2
- package/.grok/skills/lit-typographic-motion/scripts/lib/cover.mjs +12 -5
- package/.grok/skills/lit-typographic-motion/scripts/lib/frame-pool.mjs +78 -1
- package/.grok/skills/lit-typographic-motion/scripts/lib/gallery.mjs +160 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/house.mjs +43 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/look.mjs +39 -1
- package/.grok/skills/lit-typographic-motion/scripts/lib/scaffold.mjs +174 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/score.mjs +640 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/sound.mjs +143 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/soundtrack.mjs +12 -3
- package/.grok/skills/lit-typographic-motion/scripts/lib/stage-gate.mjs +44 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/stage-qa.mjs +132 -3
- package/.grok/skills/lit-typographic-motion/scripts/lib/stage-session.mjs +51 -3
- package/.grok/skills/lit-typographic-motion/scripts/lib/stage.mjs +74 -9
- package/.grok/skills/lit-typographic-motion/scripts/lib/styles.mjs +224 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/treatment.mjs +198 -4
- package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/LICENSE +21 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/.grok/skills/lit-typographic-motion/scripts/lib/vendor/three/three.module.js +54571 -0
- package/.grok/skills/lit-typographic-motion/scripts/motion.mjs +56 -6
- package/.grok/skills/lit-typographic-motion/scripts/stage/cover-init.js +20 -8
- package/.grok/skills/lit-typographic-motion/scripts/stage/loop-kit.js +2 -2
- package/.grok/skills/lit-typographic-motion/scripts/stage/stage-kit.js +25 -0
- package/.grok/skills/lit-typographic-motion/styles/paper.json +1 -0
- package/.grok/skills/lit-typographic-motion/styles/swiss-signal.json +1 -0
- package/.grok/skills/lit-typographic-motion/styles/terminalcore.json +1 -0
- package/.grok/skills/lit-typographic-motion/styles/tidal.json +1 -0
- package/.grok/skills/litgrok/SKILL.md +1 -1
- package/.grok/skills/litresearch/SKILL.md +2 -0
- package/.grok/skills/readme-studio/SKILL.md +14 -12
- package/.grok/skills/readme-studio/references/choice-first.md +24 -0
- package/.grok/skills/start-work/SKILL.md +8 -1
- package/.grok-plugin/plugin.json +4 -1
- package/CHANGELOG.md +18 -0
- package/README.md +11 -11
- package/README_ko-KR.md +11 -11
- package/TRADEMARK.md +12 -0
- package/bin/litgrok.mjs +2 -0
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/assets/showcase/brief.webp +0 -0
- package/docs/assets/showcase/deck.webp +0 -0
- package/docs/assets/showcase/page.webp +0 -0
- package/docs/assets/showcase/pid.webp +0 -0
- package/docs/assets/skills/lit-adhd.webp +0 -0
- package/docs/assets/skills/lit-hijack.webp +0 -0
- package/docs/assets/skills/lit-schematic.webp +0 -0
- package/docs/reference.md +11 -7
- package/docs/reference_ko-KR.md +11 -7
- package/hooks/hooks.json +11 -0
- package/package.json +6 -1
- package/plugin.json +1 -1
- package/.grok/skills/frontend-ui-ux/scripts/page-probe.mjs +0 -105
- package/.grok/skills/frontend-ui-ux/scripts/probe.mjs +0 -91
- package/.grok/skills/frontend-ui-ux/scripts/rule-data.mjs +0 -56
- package/.grok/skills/frontend-ui-ux/scripts/static-probe.mjs +0 -27
- package/.grok/skills/frontend-ui-ux/scripts/static-server.mjs +0 -19
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Newsroom
|
|
2
|
+
|
|
3
|
+
Newsroom is the direction for a data story told to people who do not read tables: a public
|
|
4
|
+
briefing, an explainer, a newsletter's deck, a talk that walks a general audience through a few
|
|
5
|
+
numbers. It looks like a newspaper's graphics desk: a black masthead band behind the title of a
|
|
6
|
+
data page and the cover, a heavy black rule under the other titles, grey charts with one orange series, labels on the lines, and a source and period under every figure.
|
|
7
|
+
The title names the topic and its period; the finding leads the body, in the first line under the
|
|
8
|
+
chart.
|
|
9
|
+
|
|
10
|
+
## When to use it
|
|
11
|
+
|
|
12
|
+
Reach for Newsroom when the deck is a handful of charts with one point each, written for readers
|
|
13
|
+
outside the field: a city or school data briefing to residents, a survey result for members, a
|
|
14
|
+
newsletter's "what the numbers say", a research explainer for the press, a public talk on prices,
|
|
15
|
+
housing, climate or health figures. The content signals that point here are one or two charts per
|
|
16
|
+
idea, a finding per chart, sources and periods on every figure and
|
|
17
|
+
words such as 브리핑, 설명, 주민, 시민, 독자, 뉴스레터, 데이터로 본, explainer, briefing or "what the
|
|
18
|
+
data says". It is the first candidate for a data story for the public, ahead of Gazette and
|
|
19
|
+
Ledger.
|
|
20
|
+
|
|
21
|
+
## When it is the wrong choice
|
|
22
|
+
|
|
23
|
+
It fails for an internal, dense review where people read tables line by line (Ledger), for a pitch
|
|
24
|
+
(Signal or Neo-Brutalism), for a lecture that builds an argument step by step (Chalk) and for a
|
|
25
|
+
written report that happens to be a deck (Paper or Gazette). It is wrong when there are no figures:
|
|
26
|
+
the grey-and-orange charts are the voice.
|
|
27
|
+
|
|
28
|
+
## Tokens
|
|
29
|
+
|
|
30
|
+
The values below come from the pack file and are what the engine draws.
|
|
31
|
+
|
|
32
|
+
| Token | Value |
|
|
33
|
+
|---|---|
|
|
34
|
+
| ground / surface | #FBFAF7 / #EEEDEA |
|
|
35
|
+
| ink / ink-muted / line | #111111 / #55534D / #CCCAC5 |
|
|
36
|
+
| accent / accent-deep / accent-tint | #C2410C / #7C2A08 / #FBE3D3 |
|
|
37
|
+
| field / on-field | #111111 / #FFFFFF |
|
|
38
|
+
| positive / negative | #1F6B3A / #111111 |
|
|
39
|
+
| series | #C2410C, #77746C, #2F5D8A, #111111 |
|
|
40
|
+
| faces | Pretendard Bold for display, title, labels and numerals, Pretendard Regular for body; `faces: a2z` swaps to A2Z Bold display, titles and numerals |
|
|
41
|
+
| ramp / hero | compact (body 13 pt, labels 11, sources 9) / hero step (60 pt) on cover and statement titles that fit, off with `hero: false`; figures at most title size |
|
|
42
|
+
| density / variance | 10 / 6 |
|
|
43
|
+
| radius / edge | 0 / fill |
|
|
44
|
+
| decoration | hairline rules, column hairlines, kicker numerals; the masthead band is the `band` title |
|
|
45
|
+
| table | open, no header fill, a rule under the header, bold totals |
|
|
46
|
+
| chart | horizontal gridlines, direct labels, the accent on the story's series over greys |
|
|
47
|
+
|
|
48
|
+
The orange holds 5.2:1 on the paper, so it can set a kicker word or a figure. The second series is a
|
|
49
|
+
warm grey, the third a quiet blue for the one line a story compares against. Rules and surfaces are
|
|
50
|
+
neutral greys: a warm-tinted rule reads as a second hue family beside the orange. A loss uses ink
|
|
51
|
+
with a ▼ sign.
|
|
52
|
+
|
|
53
|
+
## QA allowances
|
|
54
|
+
|
|
55
|
+
None beyond the default craft floor. The source line under every figure is the house rule here,
|
|
56
|
+
and the gate's source checks already ask for it.
|
|
57
|
+
|
|
58
|
+
## Treatments by slide role
|
|
59
|
+
|
|
60
|
+
Data slides take `band` (the title in white on the black masthead band across the top);
|
|
61
|
+
data-with-takeaway and image slides take `bottom-anchor` (the title over a heavy black rule); content, reference and definition slides take `top-rule`; sequences
|
|
62
|
+
`kicker-numeral`; statements `statement`. Every treatment draws in the slide grid's one title zone,
|
|
63
|
+
so a band, a bottom-anchor and a top-rule title sit at the same place and only their surface or
|
|
64
|
+
rule differs.
|
|
65
|
+
Force one with `title: <id>` on the line after `layout:`.
|
|
66
|
+
|
|
67
|
+
## Families and variants
|
|
68
|
+
|
|
69
|
+
- `full-chart` gives one chart the whole body; `chart-insight` sets it beside two or three lines.
|
|
70
|
+
- `kpi-over-chart` puts the headline figures over the chart they come from.
|
|
71
|
+
- `big-number` and `kpi-row` carry a single figure or three.
|
|
72
|
+
- `figure-pair` sets two charts side by side for a before and after.
|
|
73
|
+
- `table-insight`, `comparison` and `timeline` hold the few tables and dates a story needs.
|
|
74
|
+
- `image-split`, `text-two-column` and `sidebar-note` explain a method or a term.
|
|
75
|
+
- `references-appendix` lists the sources at the end; `quote` and `statement` hold a resident's
|
|
76
|
+
sentence or the story's one finding.
|
|
77
|
+
|
|
78
|
+
Covers are `cover-typographic`, `cover-figures` and `cover-index`; sections are `section-rule` and
|
|
79
|
+
`section-numeral`; closings are `closing-summary-list`, `closing-statement` and `closing-ask`.
|
|
80
|
+
|
|
81
|
+
Display slides. The typographic cover sets the deck title in white on the black masthead band,
|
|
82
|
+
with the meta line on the band and the deck's parts on the paper under it. A statement stands between two rules. A big number sits on the orange tint. A closing's next
|
|
83
|
+
step stands under a rule. A deck index runs along the top of the display slides.
|
|
84
|
+
|
|
85
|
+
## Do
|
|
86
|
+
|
|
87
|
+
- Name the topic and its period in the title; put the finding (what changed, by how much, since
|
|
88
|
+
when) in the first line of the body, where the gate expects a claim.
|
|
89
|
+
- Colour one series orange and leave the rest grey.
|
|
90
|
+
- Put the source and the period under every chart and table.
|
|
91
|
+
- Label lines and bars directly; a legend is for a chart that cannot take labels.
|
|
92
|
+
|
|
93
|
+
## Avoid
|
|
94
|
+
|
|
95
|
+
- More than one highlighted series on a chart.
|
|
96
|
+
- A chart without its source and period.
|
|
97
|
+
- 3D, gradients or pictograms standing in for numbers.
|
|
98
|
+
- This direction for a pitch, a lecture or an internal dense review.
|
|
99
|
+
|
|
100
|
+
## Two worked slides
|
|
101
|
+
|
|
102
|
+
A full chart names its topic in the title, keeps one orange line and states the finding under it.
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
---
|
|
106
|
+
layout: full-chart
|
|
107
|
+
|
|
108
|
+
## 매매가 대비 전셋값 비율, 2023-2026년
|
|
109
|
+
|
|
110
|
+
::: chart type=line unit="%"
|
|
111
|
+
| 연도 | 우리 구 (%) | 시 평균 (%) |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| 2023년 | 55.2 | 56.0 |
|
|
114
|
+
| 2024년 | 57.1 | 56.8 |
|
|
115
|
+
| 2025년 | 59.4 | 57.9 |
|
|
116
|
+
| 2026년 | 61.3 | 58.6 |
|
|
117
|
+
> 매매가 대비 전셋값 비율, 해마다 6월 (예시 자료)
|
|
118
|
+
:::
|
|
119
|
+
|
|
120
|
+
- 우리 구의 전셋값이 처음으로 매매가의 60%를 넘었다
|
|
121
|
+
- 출처: 예시 구청 주택 통계, 2026년 (예시)
|
|
122
|
+
---
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
A KPI row carries three figures over what each means.
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
---
|
|
129
|
+
layout: kpi-row
|
|
130
|
+
|
|
131
|
+
## 주민 설문 결과, 2026년 9월
|
|
132
|
+
|
|
133
|
+
| 응답자 | 이사 계획 | 첫째 이유 |
|
|
134
|
+
|---|---|---|
|
|
135
|
+
| 1,204명 | 31% | 주거비 |
|
|
136
|
+
| 9월 1-20일, 온라인·방문 | 2년 안에 이사할 생각 | 이사 계획자의 47% |
|
|
137
|
+
|
|
138
|
+
- 출처: 예시 구 주거 실태 설문, 2026년 (예시)
|
|
139
|
+
---
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Examples
|
|
143
|
+
|
|
144
|
+
`17-public-data-briefing-newsroom-ko.md`
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Riso
|
|
2
|
+
|
|
3
|
+
Riso is the direction for a community, culture or education programme: a workshop, a festival, a
|
|
4
|
+
library or museum programme, a student club, a nonprofit's year in review. It prints in two spot
|
|
5
|
+
inks on warm paper, the look of a risograph poster. Teal fills the cover, the section openers and
|
|
6
|
+
the statements edge to edge and runs as a band behind the title of a data page; pink marks the one
|
|
7
|
+
word or figure that matters on a content page. Everything else is dark-blue type, grey cards and
|
|
8
|
+
grey rules, so the two inks are the only colours on the paper.
|
|
9
|
+
|
|
10
|
+
## When to use it
|
|
11
|
+
|
|
12
|
+
Reach for Riso when the audience is the public or a community rather than a board: a workshop or
|
|
13
|
+
class opener, a festival or exhibition programme, a library, museum or youth-centre season, a
|
|
14
|
+
volunteer briefing, a club's recruiting talk, a nonprofit's annual gathering. The content signals
|
|
15
|
+
that point here are a programme with dates and places, a few counts (participants, sessions,
|
|
16
|
+
volunteers), steps for taking part and words such as 워크숍, 프로그램, 축제, 동아리, 도서관, 주민,
|
|
17
|
+
참여, 자원봉사, community, programme or zine. It is the first candidate for a community, culture or
|
|
18
|
+
education programme, ahead of Studio and Bauhaus.
|
|
19
|
+
|
|
20
|
+
## When it is the wrong choice
|
|
21
|
+
|
|
22
|
+
It fails for a board, finance or public-sector report, where two bright inks read as unserious, and
|
|
23
|
+
for a dense data review (Ledger) or a data story for the general public that lives on its charts
|
|
24
|
+
(Newsroom). It is wrong for grief, safety or financial-loss topics. For a design-history lecture,
|
|
25
|
+
Bauhaus; for a pitch, Signal or Neo-Brutalism.
|
|
26
|
+
|
|
27
|
+
## Tokens
|
|
28
|
+
|
|
29
|
+
The values below come from the pack file and are what the engine draws.
|
|
30
|
+
|
|
31
|
+
| Token | Value |
|
|
32
|
+
|---|---|
|
|
33
|
+
| ground / surface | #F5F0E6 / #E4E2DE |
|
|
34
|
+
| ink / ink-muted / line | #1C2433 / #4E5361 / #C4C1BB |
|
|
35
|
+
| accent / accent-deep / accent-tint | #D1206B / #8A1043 / #F8D5E3 |
|
|
36
|
+
| field / on-field | #00727A / #FFFFFF |
|
|
37
|
+
| positive / negative | #1D6B45 / #1C2433 |
|
|
38
|
+
| series | #D1206B, #00727A, #1C2433, #8A6A00 |
|
|
39
|
+
| faces | Pretendard Bold for display, title, labels and numerals, Pretendard Regular for body; `faces: a2z` swaps to A2Z Bold display, titles and numerals |
|
|
40
|
+
| ramp / hero | compact (body 13 pt, labels 11, sources 9) / hero step (60 pt) on cover and statement titles that fit, off with `hero: false`; figures at most title size |
|
|
41
|
+
| density / variance | 10 / 7 |
|
|
42
|
+
| radius / edge | 6 / fill |
|
|
43
|
+
| decoration | a pink underline under top titles, teal colour fields, kicker numerals |
|
|
44
|
+
| table | a pink-tint header, a rule under it, grey banding, bold totals |
|
|
45
|
+
| chart | no gridlines, direct labels, the accent on the highlighted series over muted ones |
|
|
46
|
+
|
|
47
|
+
The pink is the fluorescent ink darkened until it holds 4.5:1 on the paper, so it can set a word;
|
|
48
|
+
the teal holds white type at 5.6:1. A loss uses ink with a ▼ sign, since pink is the accent. The
|
|
49
|
+
fourth series colour is an ochre that holds 3:1 on the paper.
|
|
50
|
+
|
|
51
|
+
## QA allowances
|
|
52
|
+
|
|
53
|
+
Teal and pink share a content slide inside the default OF-101 limit, since a band title in teal over
|
|
54
|
+
a pink figure is the two-ink print this pack imitates; the two inks are the register, not a gate limit. The surface and
|
|
55
|
+
the rules are grey on purpose: a warm beige card would read as a third hue family and fail.
|
|
56
|
+
|
|
57
|
+
## Treatments by slide role
|
|
58
|
+
|
|
59
|
+
Content, image and data-with-takeaway slides take `top-plain-large` (a large title over a pink
|
|
60
|
+
underline); data and reference slides take `band` (the title in white on a teal band across the top);
|
|
61
|
+
sequences `kicker-numeral`; definitions `side-rail`; statements `statement`. Every treatment draws
|
|
62
|
+
in the slide grid's one title zone, so a band and a plain title sit at the same place and only
|
|
63
|
+
their surface differs. Force one with `title: <id>` on the line after `layout:`.
|
|
64
|
+
|
|
65
|
+
## Families and variants
|
|
66
|
+
|
|
67
|
+
- `agenda` opens a programme with its sessions; `timeline` sets the season by date.
|
|
68
|
+
- `process` and `step-diagram` show how to take part, in three to five steps.
|
|
69
|
+
- `kpi-row` and `big-number` carry the few counts such a deck has (people, sessions, books).
|
|
70
|
+
- `summary-box-list`, `sidebar-note` and `text-two-column` explain what each session gives.
|
|
71
|
+
- `comparison` reads two tracks or two age groups side by side.
|
|
72
|
+
- `image-split` and `photo-grid` show last year's sessions; `chart-insight` and `table-insight` hold
|
|
73
|
+
a small result.
|
|
74
|
+
- `quote` sets a participant's sentence; `statement` holds the programme's one idea.
|
|
75
|
+
|
|
76
|
+
Covers are `cover-typographic`, `cover-numeral` and `cover-split-field`; sections are
|
|
77
|
+
`section-field` and `section-numeral`; closings are `closing-ask`, `closing-summary-list` and
|
|
78
|
+
`closing-statement`.
|
|
79
|
+
|
|
80
|
+
Display slides. The typographic cover drenches the page in teal and sets the title in white on the
|
|
81
|
+
cover's title zone, with the meta line above and the parts across the strip. A statement and a
|
|
82
|
+
section opener take the same teal drench. A big number sits on a teal panel. A closing's next step
|
|
83
|
+
stands on a teal band across the body floor.
|
|
84
|
+
|
|
85
|
+
## Do
|
|
86
|
+
|
|
87
|
+
- Keep full teal fields on display slides; on a content page teal is the title band and nothing more.
|
|
88
|
+
- Let pink mark one word or one figure on a content slide.
|
|
89
|
+
- Give every session a date, a place and who it is for.
|
|
90
|
+
- Write the way the organisers talk to participants: short, plain and inviting.
|
|
91
|
+
|
|
92
|
+
## Avoid
|
|
93
|
+
|
|
94
|
+
- A third ink beside pink and teal (black is the type, not an ink).
|
|
95
|
+
- The fluorescent pink as text; the darkened accent is the type colour.
|
|
96
|
+
- Gradients, grain or halftone painted to fake the print.
|
|
97
|
+
- This direction for a board, finance, public-sector or sensitive topic.
|
|
98
|
+
|
|
99
|
+
## Two worked slides
|
|
100
|
+
|
|
101
|
+
A process slide shows how to take part, one step per row.
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
---
|
|
105
|
+
layout: process
|
|
106
|
+
|
|
107
|
+
## 참여는 이렇게: 신청부터 첫 모임까지
|
|
108
|
+
|
|
109
|
+
- **1. 신청** 10월 31일까지 도서관 누리집에서 한 사람씩 신청한다
|
|
110
|
+
- **2. 안내 문자** 모임 사흘 전 장소와 준비물을 문자로 받는다
|
|
111
|
+
- **3. 첫 모임** 11월 7일 저녁 7시, 3층 다목적실에서 만난다
|
|
112
|
+
- **4. 소모임 배정** 첫 모임에서 관심사별로 다섯 명씩 나눈다
|
|
113
|
+
- 출처: 예시 도서관 운영 계획, 2026년 (예시)
|
|
114
|
+
---
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
A KPI row carries last season's counts, with what they mean under each.
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
---
|
|
121
|
+
layout: kpi-row
|
|
122
|
+
|
|
123
|
+
## 지난 시즌, 숫자로 본 우리 모임
|
|
124
|
+
|
|
125
|
+
| 참가자 | 모임 | 만든 책자 |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| 148명 | 24회 | 6권 |
|
|
128
|
+
| 2025년 가을·겨울 | 주 1회, 12주씩 두 번 | 소모임별 1권 |
|
|
129
|
+
|
|
130
|
+
- 참가자의 절반이 처음 온 주민이었다
|
|
131
|
+
- 출처: 예시 도서관 운영 보고, 2026년 (예시)
|
|
132
|
+
---
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Examples
|
|
136
|
+
|
|
137
|
+
`16-community-programme-riso-ko.md`
|
|
@@ -149,7 +149,7 @@ async function resolveAndRender(ast, templateName, outputs, options = {}) {
|
|
|
149
149
|
const meta = (ast.deck && ast.deck.metadata) || {};
|
|
150
150
|
const tonality = options.tonality || meta.tonality || null;
|
|
151
151
|
const templateObj = tonality
|
|
152
|
-
? templateRegistry.loadTonality(tonality, { density: meta.density, variance: meta.variance, canvas: meta.canvas, faces: options.faces || meta.faces })
|
|
152
|
+
? templateRegistry.loadTonality(tonality, { density: meta.density, variance: meta.variance, canvas: meta.canvas, faces: options.faces || meta.faces, hero: meta.hero, decoration: meta.decoration })
|
|
153
153
|
: templateRegistry.loadTemplate(templateName);
|
|
154
154
|
if (tonality) {
|
|
155
155
|
const d = templateObj.pack.dials;
|
|
@@ -5,8 +5,11 @@ import colorsys
|
|
|
5
5
|
import math
|
|
6
6
|
import re
|
|
7
7
|
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
8
10
|
from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE, MSO_SHAPE_TYPE
|
|
9
11
|
from pptx.enum.text import PP_ALIGN
|
|
12
|
+
from pptx.oxml.ns import qn
|
|
10
13
|
|
|
11
14
|
EMU = 914400
|
|
12
15
|
LIMITS = {
|
|
@@ -15,7 +18,38 @@ LIMITS = {
|
|
|
15
18
|
"cjk_chars": 38, "narrow_chars": 10, "group_ratio": 2,
|
|
16
19
|
"symmetric_inset": .06, "radius_tolerance": .02,
|
|
17
20
|
"empty_high": .35, "empty_medium": .25, "rule": .03,
|
|
21
|
+
# OF-101 default: five accent hue families pass on every slide, six fail.
|
|
22
|
+
"accent_high": 5, "accent_medium": 5,
|
|
18
23
|
}
|
|
24
|
+
STAMP = re.compile(r"tonality=(\S+) density=(\d+) grid=(\w+) variance=(\d+)")
|
|
25
|
+
QA_KEY = re.compile(r"^ ([a-z-]+):\s*(\S+)\s*$")
|
|
26
|
+
PACK_ROOT = Path(__file__).resolve().parent.parent / "templates" / "tonalities"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def pack_allowances(prs):
|
|
30
|
+
"""The stamped tonality pack's `qa:` block as {key: int or bool}; empty without a stamp or a block."""
|
|
31
|
+
try:
|
|
32
|
+
subject = prs.core_properties.subject or ""
|
|
33
|
+
except (AttributeError, ValueError):
|
|
34
|
+
return {}
|
|
35
|
+
stamp = STAMP.search(subject)
|
|
36
|
+
if not stamp or not re.fullmatch(r"[a-z][a-z0-9-]*", stamp.group(1)):
|
|
37
|
+
return {}
|
|
38
|
+
path = PACK_ROOT / stamp.group(1) / "pack.yaml"
|
|
39
|
+
if not path.is_file():
|
|
40
|
+
return {}
|
|
41
|
+
allowed, inside = {}, False
|
|
42
|
+
for line in path.read_text(encoding="utf-8").splitlines():
|
|
43
|
+
if not line.strip() or line.lstrip().startswith("#"):
|
|
44
|
+
continue
|
|
45
|
+
if not line.startswith(" "):
|
|
46
|
+
inside = line.rstrip() == "qa:"
|
|
47
|
+
continue
|
|
48
|
+
match = QA_KEY.match(line) if inside else None
|
|
49
|
+
if match:
|
|
50
|
+
value = match.group(2)
|
|
51
|
+
allowed[match.group(1)] = value == "true" if value in ("true", "false") else int(value) if value.isdigit() else value
|
|
52
|
+
return allowed
|
|
19
53
|
|
|
20
54
|
|
|
21
55
|
# Advance widths of the bundled Pretendard faces in em (the wider of Regular and Bold per class),
|
|
@@ -97,6 +131,23 @@ def _round_radius(shape):
|
|
|
97
131
|
return adj * min(_box(shape)[2:])
|
|
98
132
|
|
|
99
133
|
|
|
134
|
+
def check_shadows(number, slide, allowed):
|
|
135
|
+
"""OF-120: a hard offset shadow (no blur) is a pack's look or nothing; a pack that has it keeps every shadow hard."""
|
|
136
|
+
found = []
|
|
137
|
+
for shape in slide.shapes:
|
|
138
|
+
if not hasattr(shape, "_element"):
|
|
139
|
+
continue
|
|
140
|
+
for shadow in shape._element.iter(qn("a:outerShdw")):
|
|
141
|
+
hard = int(shadow.get("blurRad") or 0) == 0
|
|
142
|
+
if hard and not allowed.get("offset-shadow"):
|
|
143
|
+
found.append(("OF-120", "HIGH", number, shape.name,
|
|
144
|
+
"hard offset shadow in a pack that does not draw one"))
|
|
145
|
+
elif not hard and allowed.get("offset-shadow"):
|
|
146
|
+
found.append(("OF-120", "HIGH", number, shape.name,
|
|
147
|
+
"soft shadow beside the pack's hard offset shadows"))
|
|
148
|
+
return found
|
|
149
|
+
|
|
150
|
+
|
|
100
151
|
def assess(prs):
|
|
101
152
|
findings = []
|
|
102
153
|
|
|
@@ -104,6 +155,7 @@ def assess(prs):
|
|
|
104
155
|
findings.append({"rule": rule, "severity": severity, "slide": slide,
|
|
105
156
|
"tier": tier, "value": value, "threshold": threshold, "note": note})
|
|
106
157
|
|
|
158
|
+
allowed = pack_allowances(prs)
|
|
107
159
|
W, H = prs.slide_width / EMU, prs.slide_height / EMU
|
|
108
160
|
for number, slide in enumerate(prs.slides, 1):
|
|
109
161
|
shapes = list(slide.shapes)
|
|
@@ -113,16 +165,22 @@ def assess(prs):
|
|
|
113
165
|
box = _box(shape)
|
|
114
166
|
if box[2] * box[3] >= LIMITS["full_bleed"] * W * H:
|
|
115
167
|
continue
|
|
116
|
-
if shape.name.startswith("lit-notice") or min(box[2], box[3]) < LIMITS["rule"]:
|
|
168
|
+
if shape.name.startswith(("lit-notice", "grid-mark")) or min(box[2], box[3]) < LIMITS["rule"]:
|
|
117
169
|
continue
|
|
118
170
|
hue = _hue(shape)
|
|
119
171
|
if hue is not None and not any(min(abs(hue - old), 360 - abs(hue - old)) <= LIMITS["hue_band"] for old in hue_families):
|
|
120
172
|
hue_families.append(hue)
|
|
121
173
|
count = len(hue_families)
|
|
122
|
-
|
|
123
|
-
|
|
174
|
+
# Five accent hue families pass on every slide; a pack's own limit only widens the default.
|
|
175
|
+
key = "display-accent-families" if display else "accent-families"
|
|
176
|
+
widened = allowed.get(key)
|
|
177
|
+
high = medium = max(LIMITS["accent_high"], widened + 1) if isinstance(widened, int) and not isinstance(widened, bool) else LIMITS["accent_high"]
|
|
124
178
|
if count >= medium:
|
|
125
179
|
add("OF-101", "HIGH" if count >= high else "MEDIUM", number, count, {"medium": medium, "high": high})
|
|
180
|
+
if count >= high:
|
|
181
|
+
findings[-1]["note"] = f"hold a slide to {high - 1} accent hue families; fold the extra fills into a family the slide already uses"
|
|
182
|
+
for rule, severity, slide_no, value, note in check_shadows(number, slide, allowed):
|
|
183
|
+
add(rule, severity, slide_no, value, None, note=note)
|
|
126
184
|
|
|
127
185
|
text_shapes = [s for s in shapes if getattr(s, "has_text_frame", False) and s.text.strip()]
|
|
128
186
|
title = named_title(slide) or (min(text_shapes, key=lambda s: _box(s)[1]) if text_shapes else None)
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
OF-110 a deck of 8+ slides shows at least three title treatments, each drawn as it is named
|
|
5
5
|
OF-111 content slides do not repeat one composition (title zone x body partition x dominant content)
|
|
6
6
|
OF-112 the median empty band under the body stays at or under 0.20
|
|
7
|
-
OF-113 every
|
|
7
|
+
OF-113 every content title sits on the shared title frame, every display title on the display frame
|
|
8
8
|
OF-114 titles and the cover subtitle are topic labels, never sentences
|
|
9
|
-
OF-115 no region stands empty beside a full one:
|
|
10
|
-
|
|
11
|
-
OF-116 (qa_deck.py --sibling) another tonality of the same source
|
|
9
|
+
OF-115 no region stands empty beside a full one: a takeaway column as long as the visual beside it
|
|
10
|
+
(its values table included), a title panel as tall as its text and no plate under an empty page
|
|
11
|
+
OF-116 (qa_deck.py --sibling) another tonality of the same source sets titles and bodies in the same places
|
|
12
12
|
OF-117 no mostly-white figure picture on a dark slide ground
|
|
13
13
|
OF-118 a bold run-in label is followed by its separator ("요약: …", "Summary: …")
|
|
14
14
|
OF-119 an agenda's title carries no count numeral beside it (its rows carry the numbers)
|
|
@@ -39,8 +39,10 @@ FLOOR, FOOTER = 486.0, 492.0
|
|
|
39
39
|
LIMIT = {"slides": 8, "treatments": 3, "share": 0.40, "cap": 5, "band": 0.20, "anchor": 1.0}
|
|
40
40
|
# Per-slide band caps by density: (highest density in the step, cap).
|
|
41
41
|
BAND_CAPS = ((2, .28), (4, .24), (6, .20), (8, .16), (10, .12))
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
TREATMENTS = ("top-rule", "top-plain-large", "side-rail", "band", "statement", "overlay", "kicker-numeral", "bottom-anchor")
|
|
43
|
+
# Every content treatment styles the one shared title frame, so a slide's title "zone" in the
|
|
44
|
+
# composition signature is its treatment: the look varies, the place does not.
|
|
45
|
+
ZONES = {t: t for t in TREATMENTS}
|
|
44
46
|
# The widest four-column title and the earliest column-5 start over all density grids.
|
|
45
47
|
RAIL = {960: (288.0, 336.0), 720: (216.0, 252.0)}
|
|
46
48
|
MARGINS = {960: {"airy": 60, "standard": 48, "dense": 36, "compact": 24}, 720: {"airy": 54, "standard": 42, "dense": 30, "compact": 24}}
|
|
@@ -80,7 +82,8 @@ def _inside(e, box, tol=1.0):
|
|
|
80
82
|
|
|
81
83
|
def elements(slide, W, H):
|
|
82
84
|
"""Drawn shapes in points, each with a role: content, card (a fill that holds text) or decoration."""
|
|
83
|
-
|
|
85
|
+
# The notice tag and a pack's grid marks in the top margin are page chrome, not composition.
|
|
86
|
+
out = [e for e in map(_shape, slide.shapes) if e and e["w"] + e["h"] > 0 and not e["name"].startswith(("lit-notice", "grid-mark"))]
|
|
84
87
|
for e in out:
|
|
85
88
|
if e["kind"] != "shape":
|
|
86
89
|
e["role"] = "content"
|
|
@@ -113,21 +116,21 @@ def treatment(title, els, W, H):
|
|
|
113
116
|
and not any(e["kind"] in ("table", "chart", "picture") or e["role"] == "card" for e in body)
|
|
114
117
|
and sum(e["kind"] == "text" for e in body) <= 1):
|
|
115
118
|
return "statement"
|
|
116
|
-
|
|
119
|
+
# A heavy rule across the columns closing the title frame.
|
|
120
|
+
content_w = W - 2 * title["x"]
|
|
121
|
+
shapes = [e for e in others if e["kind"] == "shape" and e["filled"]]
|
|
122
|
+
if any(2 - SIZE_TOL <= e["h"] <= 4 + SIZE_TOL and e["w"] >= 0.9 * content_w and bottom - TOL <= e["y"] <= bottom + 8 for e in shapes):
|
|
117
123
|
return "bottom-anchor"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# block that runs from the rail on into the body makes the title something else.
|
|
122
|
-
if (title["w"] <= rail + TOL and beside and min(e["x"] for e in beside) >= column5 - TOL
|
|
123
|
-
and not any(e["x"] < column5 - TOL and e["y"] > bottom and e["x"] + e["w"] > column5 + TOL for e in body)):
|
|
124
|
+
# A bar in the left margin, at least as tall as the title frame.
|
|
125
|
+
if any(e["x"] <= 1 and e["w"] <= 14 and e["h"] >= title["h"] - TOL and e["y"] <= title["y"] + TOL and e["y"] + e["h"] >= bottom - TOL
|
|
126
|
+
for e in shapes):
|
|
124
127
|
return "side-rail"
|
|
125
128
|
if any(e["kind"] == "text" and e["sizes"] and NUMERAL.fullmatch(e["text"]) and max(e["sizes"]) >= 44 - SIZE_TOL
|
|
126
129
|
and e["x"] + e["w"] <= title["x"] + TOL and e["y"] >= 30 - TOL and e["y"] + e["h"] <= 114 + TOL for e in others):
|
|
127
130
|
return "kicker-numeral"
|
|
128
131
|
if title["y"] <= 48 + TOL:
|
|
129
|
-
# A rule is a line
|
|
130
|
-
rule = any(e["kind"] == "shape" and e["h"] <= 8 and e["w"] >= max(16, 4 * e["h"]) and
|
|
132
|
+
# A rule is a line (wider than 16 pt and four times its height), never a list-marker dot.
|
|
133
|
+
rule = any(e["kind"] == "shape" and e["h"] <= 8 and e["w"] >= max(16, 4 * e["h"]) and title["y"] < e["y"] <= bottom + 24
|
|
131
134
|
and e["x"] < title["x"] + title["w"] and e["x"] + e["w"] > title["x"] for e in others)
|
|
132
135
|
if size >= 36 - SIZE_TOL and not rule:
|
|
133
136
|
return "top-plain-large"
|
|
@@ -289,10 +292,9 @@ def _short_column(content, title, kind, body_floor, column5, fields, family=None
|
|
|
289
292
|
the body's top down to where the neighbour ends, is over 40 % of the body. A source or note strip that closes
|
|
290
293
|
the column does not hide the band above it. Beside the figures of a kpi-row or big-number slide the column is
|
|
291
294
|
measured to the body floor (spec-v2 Amendments 9)."""
|
|
292
|
-
|
|
293
|
-
top_of_title = title["y"] + title["h"] if kind not in ("bottom-anchor", "side-rail") else 0.0
|
|
295
|
+
top_of_title = title["y"] + title["h"]
|
|
294
296
|
body = [e for e in content if e["y"] >= top_of_title - TOL and e["y"] < body_floor and e["w"] > 0 and e["h"] > 0
|
|
295
|
-
and not
|
|
297
|
+
and not any(_inside(e, f) for f in fields)]
|
|
296
298
|
if len(body) < 2:
|
|
297
299
|
return None
|
|
298
300
|
left_edge, right_edge = min(e["x"] for e in body), max(e["x"] + e["w"] for e in body)
|
|
@@ -343,22 +345,9 @@ def empty_regions(slides, W, H):
|
|
|
343
345
|
continue
|
|
344
346
|
content = [e for e in s["els"] if e is not title and e["role"] != "decoration" and e["y"] < FOOTER and not full(e)]
|
|
345
347
|
if s["role"] in ("content", "closing"):
|
|
346
|
-
if kind == "bottom-anchor":
|
|
347
|
-
size = max(title["sizes"])
|
|
348
|
-
gap = FLOOR - (title["y"] + _title_lines(title) * size * 1.15)
|
|
349
|
-
if gap > REGION["floor_gap"]:
|
|
350
|
-
found.append(_finding("OF-115", s["n"], round(gap, 1), REGION["floor_gap"],
|
|
351
|
-
"the bottom title ends above the body floor: stand its last line on the floor"))
|
|
352
|
-
if kind == "side-rail" and s["family"] not in ("quote", "statement"):
|
|
353
|
-
top = title["y"] + title["h"] # the frame keeps a spare line for a title that wraps once more
|
|
354
|
-
rail = [e for e in content if e["x"] + e["w"] <= column5 + TOL and e["y"] + e["h"] > top]
|
|
355
|
-
share = _largest_gap(top, FLOOR, [(e["y"], e["y"] + e["h"]) for e in rail]) / max(1.0, FLOOR - top)
|
|
356
|
-
if share > REGION["share"]:
|
|
357
|
-
found.append(_finding("OF-115", s["n"], round(share, 3), REGION["share"],
|
|
358
|
-
"the side rail under the title stands empty: give it the criteria, takeaways or source, or take another title"))
|
|
359
348
|
# A takeaway column beside a chart, table or picture that runs on below it. Text on a colour field
|
|
360
349
|
# (a closing's ask) stands on its own ground, not in a column.
|
|
361
|
-
body_floor =
|
|
350
|
+
body_floor = FLOOR
|
|
362
351
|
fields = [e for e in s["els"] if e["kind"] == "shape" and e["filled"] and e["w"] * e["h"] >= .1 * W * H]
|
|
363
352
|
short = _short_column(content, title, kind, body_floor, column5, fields, s["family"])
|
|
364
353
|
if short:
|
|
@@ -379,14 +368,16 @@ def empty_regions(slides, W, H):
|
|
|
379
368
|
f"the column beside the {v['kind']} stops short of it: close it with the source and note, the values or the takeaways"))
|
|
380
369
|
break
|
|
381
370
|
if s["role"] in ("cover", "section") or kind in ("statement", "overlay"):
|
|
371
|
+
if title is None:
|
|
372
|
+
continue
|
|
382
373
|
# A title panel over a picture, and a plate under a statement or quote. A typographic cover's plate
|
|
383
374
|
# is the cover's own device, not a region its text must fill.
|
|
384
375
|
pictured = any(full(e) for e in s["els"])
|
|
385
376
|
for p in [e for e in s["els"] if e["kind"] == "shape" and e["filled"] and _inside(title, e) and e["w"] * e["h"] < .9 * W * H]:
|
|
386
377
|
inside = [e for e in content + [title] if e is not p and _inside(e, p)]
|
|
387
378
|
if p["y"] > TOL and pictured:
|
|
388
|
-
|
|
389
|
-
share = _largest_gap(p["y"],
|
|
379
|
+
region_floor = min(p["y"] + p["h"], FLOOR)
|
|
380
|
+
share = _largest_gap(p["y"], region_floor, [(e["y"], e["y"] + e["h"]) for e in inside]) / max(1.0, region_floor - p["y"])
|
|
390
381
|
if share > REGION["share"]:
|
|
391
382
|
found.append(_finding("OF-115", s["n"], round(share, 3), REGION["share"],
|
|
392
383
|
"the panel that carries the title stands partly empty: make it as tall as its text, on the page foot"))
|
|
@@ -396,23 +387,42 @@ def empty_regions(slides, W, H):
|
|
|
396
387
|
return found
|
|
397
388
|
|
|
398
389
|
|
|
399
|
-
# OF-116
|
|
400
|
-
#
|
|
401
|
-
|
|
402
|
-
|
|
390
|
+
# OF-116: another tonality of the same source sets everything in the same places.
|
|
391
|
+
#
|
|
392
|
+
# Titles, headers and the body sit on the shared slide grid, so two tonalities of one source
|
|
393
|
+
# may differ in every look but never in where a slide's title frame and its body's top-left stand.
|
|
394
|
+
# Slides are compared in order; a slide the other deck lacks is not compared.
|
|
395
|
+
def placement(prs):
|
|
396
|
+
"""Per slide: the title frame and the top-left corner of what stands under it, in points."""
|
|
397
|
+
out = []
|
|
398
|
+
for s in _read(prs):
|
|
399
|
+
t = s["title"]
|
|
400
|
+
if t is None:
|
|
401
|
+
out.append(None)
|
|
402
|
+
continue
|
|
403
|
+
# The corner is read off text, tables, charts and pictures: a pack may fill a surface one tonality
|
|
404
|
+
# leaves an outline, and that look must never move where the body stands.
|
|
405
|
+
under = [e for e in s["els"] if e is not t and e["role"] != "decoration" and e["kind"] != "shape" and e["y"] < FOOTER
|
|
406
|
+
and e["y"] >= t["y"] + t["h"] - TOL
|
|
407
|
+
and not e["name"].startswith(("header@", "numeral@", "subtitle@"))]
|
|
408
|
+
corner = (min(e["x"] for e in under), min(e["y"] for e in under)) if under and s["role"] == "content" else None
|
|
409
|
+
out.append({"n": s["n"], "title": (t["x"], t["y"], t["w"], t["h"]), "body": corner})
|
|
410
|
+
return out
|
|
403
411
|
|
|
404
412
|
|
|
405
|
-
def
|
|
406
|
-
a, b =
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
+
def compare_placement(prs, sibling, name="the sibling deck"):
|
|
414
|
+
a, b = placement(prs), placement(sibling)
|
|
415
|
+
moved = []
|
|
416
|
+
for x, y in zip(a, b):
|
|
417
|
+
if x is None or y is None:
|
|
418
|
+
continue
|
|
419
|
+
if any(abs(p - q) > TOL for p, q in zip(x["title"], y["title"])):
|
|
420
|
+
moved.append(f"slide {x['n']} title at {[round(v) for v in x['title']]} vs {[round(v) for v in y['title']]}")
|
|
421
|
+
elif x["body"] and y["body"] and any(abs(p - q) > TOL for p, q in zip(x["body"], y["body"])):
|
|
422
|
+
moved.append(f"slide {x['n']} body from {tuple(round(v) for v in x['body'])} vs {tuple(round(v) for v in y['body'])}")
|
|
423
|
+
if not moved:
|
|
413
424
|
return []
|
|
414
|
-
return [_finding("OF-116", None,
|
|
415
|
-
f"(needs {need}): give the tonality its own structure on more slides")]
|
|
425
|
+
return [_finding("OF-116", None, None, None, f"{len(moved)} slide(s) placed differently from {name}: {'; '.join(moved[:4])}")]
|
|
416
426
|
|
|
417
427
|
|
|
418
428
|
# OF-117. A chart or diagram exported on white stands on a dark ground as a white card with small grey labels.
|
|
@@ -562,20 +572,24 @@ def assess(prs):
|
|
|
562
572
|
if bands and statistics.median(bands) > LIMIT["band"]:
|
|
563
573
|
add("OF-112", "MEDIUM" if legacy else "HIGH", None, round(statistics.median(bands), 3), LIMIT["band"], "deck median")
|
|
564
574
|
|
|
565
|
-
# OF-113:
|
|
566
|
-
#
|
|
567
|
-
|
|
575
|
+
# OF-113: every content title on one frame and every display title (a statement, a quote, a closing
|
|
576
|
+
# statement) on another, whatever its treatment: a treatment changes the look, never the place. A title
|
|
577
|
+
# over a full-bleed picture (overlay) keeps its own panel. Slides are grouped by the treatment they name,
|
|
578
|
+
# so a title moved so far that it no longer reads as any treatment is still measured.
|
|
579
|
+
groups = {}
|
|
568
580
|
for s in slides:
|
|
569
|
-
if s["kind"] and s["
|
|
570
|
-
|
|
571
|
-
for
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
if
|
|
578
|
-
|
|
581
|
+
if s["kind"] and s["named"] in TREATMENTS and s["named"] != "overlay" and s["role"] not in ("cover", "section"):
|
|
582
|
+
groups.setdefault("display" if s["named"] == "statement" else "content", []).append(s)
|
|
583
|
+
for frame, group in groups.items():
|
|
584
|
+
modes = {}
|
|
585
|
+
for k in ("x", "y", "w", "h"):
|
|
586
|
+
values = [round(s["title"][k]) for s in group]
|
|
587
|
+
modes[k] = max(set(values), key=values.count)
|
|
588
|
+
for s in group:
|
|
589
|
+
off = [f"{k} {s['title'][k]:.0f} vs {modes[k]}" for k in modes if abs(s["title"][k] - modes[k]) > LIMIT["anchor"]]
|
|
590
|
+
if off:
|
|
591
|
+
add("OF-113", "HIGH", s["n"], round(max(abs(s["title"][k] - modes[k]) for k in modes), 1), LIMIT["anchor"],
|
|
592
|
+
f"{s['kind']} title off the shared {frame} title frame: {', '.join(off)}")
|
|
579
593
|
|
|
580
594
|
findings.extend(empty_regions(slides, W, H))
|
|
581
595
|
findings.extend(light_figures(prs, W, H))
|