@litfamily/litgravity 0.1.1 → 0.1.3

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.
Files changed (251) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +19 -3
  3. package/README_ko-KR.md +19 -3
  4. package/TRADEMARK.md +12 -0
  5. package/package.json +3 -2
  6. package/plugin/hooks/lib/lanes.mjs +65 -0
  7. package/plugin/hooks/lib/liveness.mjs +81 -0
  8. package/plugin/hooks/lib/motion.mjs +34 -5
  9. package/plugin/hooks/lib/reentry.mjs +7 -0
  10. package/plugin/hooks/lib/rewind/brief.mjs +364 -0
  11. package/plugin/hooks/lib/rewind/collect.mjs +359 -0
  12. package/plugin/hooks/lib/rewind/gauge.mjs +55 -0
  13. package/plugin/hooks/lib/rewind/next-step.mjs +77 -0
  14. package/plugin/hooks/lib/rewind/redact.mjs +60 -0
  15. package/plugin/hooks/lib/rewind/transcripts.mjs +214 -0
  16. package/plugin/hooks/lib/routes.mjs +79 -5
  17. package/plugin/hooks/lib/workflow-stack.mjs +213 -0
  18. package/plugin/hooks/post-tool-use.mjs +39 -1
  19. package/plugin/hooks/pre-invocation.mjs +93 -2
  20. package/plugin/hooks/session-start.mjs +26 -3
  21. package/plugin/hooks/stop.mjs +55 -6
  22. package/plugin/hud/looks.mjs +29 -0
  23. package/plugin/hud/render.mjs +277 -12
  24. package/plugin/plugin.json +1 -1
  25. package/plugin/skills/frontend-ui-ux/SKILL.md +12 -1
  26. package/plugin/skills/frontend-ui-ux/kit/components.css +417 -0
  27. package/plugin/skills/frontend-ui-ux/kit/fonts.json +22 -0
  28. package/plugin/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
  29. package/plugin/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
  30. package/plugin/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
  31. package/plugin/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
  32. package/plugin/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
  33. package/plugin/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
  34. package/plugin/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
  35. package/plugin/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
  36. package/plugin/skills/frontend-ui-ux/kit/ui.js +226 -0
  37. package/plugin/skills/frontend-ui-ux/references/house-styles.md +234 -0
  38. package/plugin/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
  39. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-lock.mjs +196 -0
  40. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +30 -9
  41. package/plugin/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +20 -8
  42. package/plugin/skills/frontend-ui-ux/scripts/interface-probe.mjs +42 -9
  43. package/plugin/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
  44. package/plugin/skills/lit-adhd/SKILL.md +160 -0
  45. package/plugin/skills/lit-adhd/references/card-examples.md +107 -0
  46. package/plugin/skills/lit-adhd/references/status-taxonomy.md +34 -0
  47. package/plugin/skills/lit-adhd/scripts/rewind.mjs +5 -0
  48. package/plugin/skills/lit-diagram-drawer/SKILL.md +5 -3
  49. package/plugin/skills/lit-diagram-drawer/references/drawing-rules.md +1 -1
  50. package/plugin/skills/lit-diagram-drawer/references/style-guide.md +21 -12
  51. package/plugin/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
  52. package/plugin/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
  53. package/plugin/skills/lit-diagram-drawer/references/type-tree.md +3 -3
  54. package/plugin/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
  55. package/plugin/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
  56. package/plugin/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
  57. package/plugin/skills/lit-docx/SKILL.md +3 -3
  58. package/plugin/skills/lit-handoff/SKILL.md +1 -0
  59. package/plugin/skills/lit-hijack/SKILL.md +263 -0
  60. package/plugin/skills/lit-hijack/references/capture-and-provenance.md +100 -0
  61. package/plugin/skills/lit-hijack/references/clean-room-build.md +75 -0
  62. package/plugin/skills/lit-hijack/references/distil-and-licence.md +67 -0
  63. package/plugin/skills/lit-hijack/references/gap-and-port-design.md +100 -0
  64. package/plugin/skills/lit-hijack/references/parity-and-report.md +85 -0
  65. package/plugin/skills/lit-hijack/scripts/hijack.mjs +953 -0
  66. package/plugin/skills/lit-plan/SKILL.md +3 -2
  67. package/plugin/skills/lit-plan/references/plan-contract.md +12 -1
  68. package/plugin/skills/lit-plan/scripts/check-plan.mjs +39 -3
  69. package/plugin/skills/lit-plan/templates/plan.md +3 -0
  70. package/plugin/skills/lit-pptx/SKILL.md +8 -8
  71. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
  72. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
  73. package/plugin/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
  74. package/plugin/skills/lit-pptx/fonts/provenance.json +32 -1
  75. package/plugin/skills/lit-pptx/references/agents/analyst.md +34 -56
  76. package/plugin/skills/lit-pptx/references/agents/antithesis.md +49 -67
  77. package/plugin/skills/lit-pptx/references/agents/architect.md +38 -51
  78. package/plugin/skills/lit-pptx/references/agents/critic.md +25 -41
  79. package/plugin/skills/lit-pptx/references/agents/synthesizer.md +37 -46
  80. package/plugin/skills/lit-pptx/references/agents/thesis.md +29 -49
  81. package/plugin/skills/lit-pptx/references/anti-slop-checklist.md +119 -145
  82. package/plugin/skills/lit-pptx/references/authoring-guide.md +187 -278
  83. package/plugin/skills/lit-pptx/references/consensus-protocol.md +99 -97
  84. package/plugin/skills/lit-pptx/references/data-display-cookbook.md +36 -137
  85. package/plugin/skills/lit-pptx/references/density-and-fill.md +147 -216
  86. package/plugin/skills/lit-pptx/references/design-system-azure.md +56 -85
  87. package/plugin/skills/lit-pptx/references/direction-step.md +134 -176
  88. package/plugin/skills/lit-pptx/references/examples/01-pitch-signal-ko.md +114 -115
  89. package/plugin/skills/lit-pptx/references/examples/02-pitch-studio-ko.md +66 -66
  90. package/plugin/skills/lit-pptx/references/examples/03-business-review-ledger-ko.md +63 -63
  91. package/plugin/skills/lit-pptx/references/examples/04-business-review-night-en.md +96 -96
  92. package/plugin/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +81 -81
  93. package/plugin/skills/lit-pptx/references/examples/06-lecture-chalk-ko.md +103 -103
  94. package/plugin/skills/lit-pptx/references/examples/07-data-review-night-en.md +100 -98
  95. package/plugin/skills/lit-pptx/references/examples/08-image-led-atlas-ko.md +76 -76
  96. package/plugin/skills/lit-pptx/references/examples/09-briefing-gazette-ko.md +96 -96
  97. package/plugin/skills/lit-pptx/references/examples/10-status-update-ledger-ko.md +80 -80
  98. package/plugin/skills/lit-pptx/references/examples/11-portfolio-studio-en.md +72 -72
  99. package/plugin/skills/lit-pptx/references/examples/12-research-tutorial-chalk-en.md +95 -95
  100. package/plugin/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
  101. package/plugin/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
  102. package/plugin/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
  103. package/plugin/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
  104. package/plugin/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
  105. package/plugin/skills/lit-pptx/references/interview-protocol.md +83 -102
  106. package/plugin/skills/lit-pptx/references/layout-families.md +161 -265
  107. package/plugin/skills/lit-pptx/references/stages/autopilot.md +30 -70
  108. package/plugin/skills/lit-pptx/references/stages/interview.md +36 -68
  109. package/plugin/skills/lit-pptx/references/stages/plan.md +26 -67
  110. package/plugin/skills/lit-pptx/references/title-treatments.md +93 -145
  111. package/plugin/skills/lit-pptx/references/tonalities/atlas.md +95 -108
  112. package/plugin/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
  113. package/plugin/skills/lit-pptx/references/tonalities/chalk.md +107 -122
  114. package/plugin/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
  115. package/plugin/skills/lit-pptx/references/tonalities/gazette.md +87 -111
  116. package/plugin/skills/lit-pptx/references/tonalities/ledger.md +96 -125
  117. package/plugin/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
  118. package/plugin/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
  119. package/plugin/skills/lit-pptx/references/tonalities/night.md +104 -131
  120. package/plugin/skills/lit-pptx/references/tonalities/paper.md +114 -130
  121. package/plugin/skills/lit-pptx/references/tonalities/riso.md +137 -0
  122. package/plugin/skills/lit-pptx/references/tonalities/signal.md +96 -103
  123. package/plugin/skills/lit-pptx/references/tonalities/studio.md +81 -112
  124. package/plugin/skills/lit-pptx/scripts/compile-deck.js +4 -6
  125. package/plugin/skills/lit-pptx/scripts/craft_extras.py +135 -91
  126. package/plugin/skills/lit-pptx/scripts/deck_craft.py +1 -1
  127. package/plugin/skills/lit-pptx/scripts/embed_fonts.py +13 -1
  128. package/plugin/skills/lit-pptx/scripts/layout_inventory.py +1 -1
  129. package/plugin/skills/lit-pptx/scripts/learn_template.py +1 -1
  130. package/plugin/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
  131. package/plugin/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
  132. package/plugin/skills/lit-pptx/scripts/lib/render-pack.js +370 -563
  133. package/plugin/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
  134. package/plugin/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
  135. package/plugin/skills/lit-pptx/scripts/qa_deck.py +6 -6
  136. package/plugin/skills/lit-pptx/scripts/render_pages.py +31 -0
  137. package/plugin/skills/lit-pptx/scripts/validate_pptx.py +1 -1
  138. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v1.md +167 -191
  139. package/plugin/skills/lit-pptx/specs/markdown-slide-spec-v2.md +117 -166
  140. package/plugin/skills/lit-pptx/specs/template-enrollment-contract.md +307 -330
  141. package/plugin/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
  142. package/plugin/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
  143. package/plugin/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
  144. package/plugin/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
  145. package/plugin/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
  146. package/plugin/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
  147. package/plugin/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
  148. package/plugin/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
  149. package/plugin/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
  150. package/plugin/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
  151. package/plugin/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
  152. package/plugin/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
  153. package/plugin/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
  154. package/plugin/skills/lit-schematic/SKILL.md +114 -0
  155. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
  156. package/plugin/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
  157. package/plugin/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
  158. package/plugin/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
  159. package/plugin/skills/lit-schematic/references/cutaway-outputs.md +70 -0
  160. package/plugin/skills/lit-schematic/references/isometric-craft.md +101 -0
  161. package/plugin/skills/lit-schematic/references/journal-figures.md +72 -0
  162. package/plugin/skills/lit-schematic/references/kit-api.md +134 -0
  163. package/plugin/skills/lit-schematic/references/pfd-and-layout.md +53 -0
  164. package/plugin/skills/lit-schematic/references/pid-drafting.md +103 -0
  165. package/plugin/skills/lit-schematic/references/pid-symbols.md +163 -0
  166. package/plugin/skills/lit-schematic/references/verification.md +100 -0
  167. package/plugin/skills/lit-schematic/scripts/doctor.mjs +57 -0
  168. package/plugin/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
  169. package/plugin/skills/lit-schematic/scripts/lib/fonts.mjs +27 -0
  170. package/plugin/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
  171. package/plugin/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
  172. package/plugin/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
  173. package/plugin/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
  174. package/plugin/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
  175. package/plugin/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
  176. package/plugin/skills/lit-schematic/scripts/lib/png.mjs +132 -0
  177. package/plugin/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
  178. package/plugin/skills/lit-schematic/scripts/lib/route.mjs +218 -0
  179. package/plugin/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
  180. package/plugin/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
  181. package/plugin/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
  182. package/plugin/skills/lit-schematic/scripts/motion.mjs +129 -0
  183. package/plugin/skills/lit-schematic/scripts/qa.mjs +92 -0
  184. package/plugin/skills/lit-schematic/scripts/render.mjs +233 -0
  185. package/plugin/skills/lit-schematic/scripts/scaffold.mjs +60 -0
  186. package/plugin/skills/lit-scientific-visualization/SKILL.md +17 -6
  187. package/plugin/skills/lit-typographic-motion/SKILL.md +58 -48
  188. package/plugin/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +13 -2
  189. package/plugin/skills/lit-typographic-motion/engine/blender/runner.py +218 -0
  190. package/plugin/skills/lit-typographic-motion/engine/core/presets.mjs +1 -1
  191. package/plugin/skills/lit-typographic-motion/engine/node/analysis.mjs +65 -1
  192. package/plugin/skills/lit-typographic-motion/engine/node/assets.mjs +298 -0
  193. package/plugin/skills/lit-typographic-motion/engine/node/blender.mjs +143 -0
  194. package/plugin/skills/lit-typographic-motion/engine/node/board.mjs +136 -0
  195. package/plugin/skills/lit-typographic-motion/engine/node/brief.mjs +7 -1
  196. package/plugin/skills/lit-typographic-motion/engine/node/chrome.mjs +9 -12
  197. package/plugin/skills/lit-typographic-motion/engine/node/cover-assets.mjs +5 -3
  198. package/plugin/skills/lit-typographic-motion/engine/node/cover-capture.mjs +7 -6
  199. package/plugin/skills/lit-typographic-motion/engine/node/cover-treatment.mjs +37 -4
  200. package/plugin/skills/lit-typographic-motion/engine/node/cover.mjs +19 -8
  201. package/plugin/skills/lit-typographic-motion/engine/node/done.mjs +45 -6
  202. package/plugin/skills/lit-typographic-motion/engine/node/frame-worker.mjs +7 -5
  203. package/plugin/skills/lit-typographic-motion/engine/node/gallery.mjs +121 -0
  204. package/plugin/skills/lit-typographic-motion/engine/node/host.mjs +34 -0
  205. package/plugin/skills/lit-typographic-motion/engine/node/house.mjs +44 -0
  206. package/plugin/skills/lit-typographic-motion/engine/node/look.mjs +34 -20
  207. package/plugin/skills/lit-typographic-motion/engine/node/pipeline.mjs +19 -9
  208. package/plugin/skills/lit-typographic-motion/engine/node/scaffold.mjs +210 -0
  209. package/plugin/skills/lit-typographic-motion/engine/node/score.mjs +639 -0
  210. package/plugin/skills/lit-typographic-motion/engine/node/sound-cli.mjs +21 -4
  211. package/plugin/skills/lit-typographic-motion/engine/node/sound.mjs +127 -29
  212. package/plugin/skills/lit-typographic-motion/engine/node/stage-capture.mjs +7 -6
  213. package/plugin/skills/lit-typographic-motion/engine/node/stage-gate.mjs +59 -5
  214. package/plugin/skills/lit-typographic-motion/engine/node/stage-qa.mjs +141 -9
  215. package/plugin/skills/lit-typographic-motion/engine/node/stage-serve.mjs +28 -5
  216. package/plugin/skills/lit-typographic-motion/engine/node/stage.mjs +82 -14
  217. package/plugin/skills/lit-typographic-motion/engine/node/styles.mjs +213 -0
  218. package/plugin/skills/lit-typographic-motion/engine/node/treatment.mjs +311 -10
  219. package/plugin/skills/lit-typographic-motion/engine/stage/cover-init.js +14 -2
  220. package/plugin/skills/lit-typographic-motion/engine/stage/init.js +11 -1
  221. package/plugin/skills/lit-typographic-motion/engine/stage/qa.js +6 -1
  222. package/plugin/skills/lit-typographic-motion/engine/stage/stage-kit.js +83 -0
  223. package/plugin/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
  224. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
  225. package/plugin/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
  226. package/plugin/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
  227. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/expected.json +69 -0
  228. package/plugin/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
  229. package/plugin/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +6 -4
  230. package/plugin/skills/lit-typographic-motion/recipes/painted-light/expected.json +4 -2
  231. package/plugin/skills/lit-typographic-motion/recipes/weight-tide/expected.json +7 -5
  232. package/plugin/skills/lit-typographic-motion/references/cover.md +394 -443
  233. package/plugin/skills/lit-typographic-motion/references/craft-loop.md +57 -87
  234. package/plugin/skills/lit-typographic-motion/references/depth.md +122 -0
  235. package/plugin/skills/lit-typographic-motion/references/look.md +94 -129
  236. package/plugin/skills/lit-typographic-motion/references/runtime.md +58 -91
  237. package/plugin/skills/lit-typographic-motion/references/sound.md +130 -99
  238. package/plugin/skills/lit-typographic-motion/references/stage.md +190 -215
  239. package/plugin/skills/lit-typographic-motion/references/studio.md +245 -0
  240. package/plugin/skills/lit-typographic-motion/references/style-bibles.md +108 -97
  241. package/plugin/skills/lit-typographic-motion/references/treatment.md +191 -143
  242. package/plugin/skills/lit-typographic-motion/scripts/motion-doctor.mjs +17 -5
  243. package/plugin/skills/lit-typographic-motion/scripts/motion.mjs +47 -7
  244. package/plugin/skills/lit-typographic-motion/styles/paper.json +41 -0
  245. package/plugin/skills/lit-typographic-motion/styles/swiss-signal.json +41 -0
  246. package/plugin/skills/lit-typographic-motion/styles/terminalcore.json +42 -0
  247. package/plugin/skills/lit-typographic-motion/styles/tidal.json +41 -0
  248. package/plugin/skills/litresearch/SKILL.md +1 -0
  249. package/plugin/skills/readme-studio/SKILL.md +2 -0
  250. package/plugin/skills/review-work/SKILL.md +1 -1
  251. package/plugin/skills/start-work/SKILL.md +2 -2
@@ -0,0 +1,222 @@
1
+ {
2
+ "schema_id": "litfamily.frontend-style/v1",
3
+ "id": "neo-brutalism",
4
+ "name": "Neo-brutalism",
5
+ "summary": "A loud, friendly register: flat saturated colour blocks on a lavender canvas, 3 px ink outlines on every surface, hard zero-blur offset shadows in ink, sunflower-yellow panel heads and accent with ink text, chunky 900-weight display type and buttons that press down into their shadow. Playful, legible, never soft.",
6
+ "use_when": [
7
+ "opt-in only: the brief names neo-brutalism, neo-brutalist, neubrutalism or the Korean 네오브루탈리즘",
8
+ "consumer, creator, community or education products that want energy and personality",
9
+ "launch pages, pricing pages and onboarding that should feel bold and hand-made rather than corporate"
10
+ ],
11
+ "avoid_when": [
12
+ "regulated, clinical, financial or enterprise tones",
13
+ "very dense data screens where outlines on every cell would turn into noise (keep tables quiet inside one outlined wrap)",
14
+ "the brief asks for brutalism without neo (that is computational-brutalism)"
15
+ ],
16
+ "keywords": [
17
+ "neo-brutalism",
18
+ "neo-brutalist",
19
+ "neobrutalism",
20
+ "neobrutalist",
21
+ "neo brutalism",
22
+ "neo brutalist",
23
+ "neubrutalism",
24
+ "neu-brutalism",
25
+ "neo-brutal",
26
+ "네오브루탈리즘",
27
+ "네오 브루탈리즘",
28
+ "네오브루탈",
29
+ "네오 브루탈",
30
+ "뉴브루탈리즘",
31
+ "네오브루탈리스트"
32
+ ],
33
+ "signature": [
34
+ "thick ink outlines: 3 px on surfaces, 2 px on controls, the same ink in light and dark",
35
+ "hard offset shadows with zero blur (6 px on surfaces, 3 px on controls) in ink; this is the recorded neo-brutalist register CF-403 accepts",
36
+ "buttons press into their shadow on :active (translate 3 px, shadow to 0)",
37
+ "flat saturated fills: panel heads are solid yellow bars with ink text; ui-panel--accent, ui-panel--accent-2 (electric blue) and ui-panel--support colour the featured blocks",
38
+ "chunky type: 900-weight display with tight leading, 800-weight headings and figures, sentence case",
39
+ "tilted ui-sticker labels as the accent art, never over body text",
40
+ "bouncy but short motion (overshoot ease, 100–280 ms)"
41
+ ],
42
+ "forbid": [
43
+ "blurred, soft or coloured drop shadows (DS-007: the lock declares offset elevation)",
44
+ "gradients, glass, glow and translucency",
45
+ "thin grey borders on surfaces (outlines are ink)",
46
+ "more than four accent hue families in one view",
47
+ "rotated body text, or a sticker covering text",
48
+ "outlines and shadows on every table cell or list row"
49
+ ],
50
+ "fonts": {
51
+ "text": "Pretendard",
52
+ "display": "Pretendard",
53
+ "mono": "JetBrains Mono"
54
+ },
55
+ "type": {
56
+ "scale_px": {
57
+ "xs": 12,
58
+ "sm": 13,
59
+ "md": 14,
60
+ "base": 16,
61
+ "lg": 18,
62
+ "xl": 20,
63
+ "2xl": 24,
64
+ "3xl": 30,
65
+ "4xl": 38,
66
+ "5xl": 48
67
+ },
68
+ "display_px": {
69
+ "min": 40,
70
+ "max": 88
71
+ },
72
+ "moment_px": {
73
+ "max": 152
74
+ },
75
+ "weights": {
76
+ "text": 400,
77
+ "medium": 600,
78
+ "strong": 800,
79
+ "display": 900
80
+ },
81
+ "tracking_em": {
82
+ "display": -0.03,
83
+ "label": 0
84
+ },
85
+ "leading": {
86
+ "body": 1.55,
87
+ "tight": 1.25,
88
+ "display_latin": 1,
89
+ "display_korean": 1.15
90
+ }
91
+ },
92
+ "space_px": [
93
+ 4,
94
+ 8,
95
+ 12,
96
+ 16,
97
+ 20,
98
+ 24,
99
+ 32,
100
+ 40,
101
+ 48,
102
+ 64,
103
+ 80,
104
+ 96,
105
+ 128
106
+ ],
107
+ "radius_px": {
108
+ "xs": 4,
109
+ "sm": 8,
110
+ "md": 12,
111
+ "lg": 16,
112
+ "pill": 999
113
+ },
114
+ "shadow": {
115
+ "raised": "6px 6px 0 0 var(--c-ink)",
116
+ "overlay": "8px 8px 0 0 var(--c-ink)"
117
+ },
118
+ "motion": {
119
+ "fast_ms": 100,
120
+ "ui_ms": 160,
121
+ "enter_ms": 280,
122
+ "exit_ms": 120,
123
+ "ease": "cubic-bezier(0.3, 1.4, 0.5, 1)"
124
+ },
125
+ "shape": {
126
+ "border_px": {
127
+ "rule": 3,
128
+ "surface": 3,
129
+ "control": 2
130
+ },
131
+ "surface_line": "ink",
132
+ "control_edge": "ink",
133
+ "elevation": "offset",
134
+ "offset_px": {
135
+ "surface": 6,
136
+ "control": 3
137
+ },
138
+ "press": "shift",
139
+ "meta_font": "text",
140
+ "meta_case": "none",
141
+ "display_case": "none",
142
+ "canvas_pattern": "none",
143
+ "heading_font": "display",
144
+ "panel_head": "accent",
145
+ "section_marks": "none"
146
+ },
147
+ "color": {
148
+ "light": {
149
+ "canvas": "#efecff",
150
+ "surface": "#ffffff",
151
+ "sunken": "#e2ddff",
152
+ "ink": "#111111",
153
+ "ink-2": "#2b2b33",
154
+ "ink-3": "#4a4a57",
155
+ "line": "#c9c3ec",
156
+ "line-strong": "#111111",
157
+ "control": "#5c5a70",
158
+ "accent": "#ffd23f",
159
+ "accent-hover": "#ffc400",
160
+ "on-accent": "#111111",
161
+ "accent-wash": "#fff1b8",
162
+ "accent-ink": "#5a32d6",
163
+ "accent-2": "#1f6feb",
164
+ "accent-2-ink": "#1a56b8",
165
+ "accent-2-wash": "#dce8fd",
166
+ "on-accent-2": "#ffffff",
167
+ "support": "#ffb3d1",
168
+ "support-ink": "#111111",
169
+ "focus": "#5a32d6",
170
+ "positive": "#12733a",
171
+ "positive-wash": "#c9f2d6",
172
+ "warning": "#7a4f00",
173
+ "warning-wash": "#ffe7a8",
174
+ "negative": "#c2121c",
175
+ "negative-wash": "#ffd3d3",
176
+ "info": "#1d4fd6",
177
+ "info-wash": "#d6e2ff",
178
+ "chart-1": "#5a32d6",
179
+ "chart-2": "#ffd23f",
180
+ "chart-3": "#ff6b9d",
181
+ "chart-4": "#111111",
182
+ "chart-5": "#2bb673"
183
+ },
184
+ "dark": {
185
+ "canvas": "#17161f",
186
+ "surface": "#211f2b",
187
+ "sunken": "#100f16",
188
+ "ink": "#f7f5ff",
189
+ "ink-2": "#d2cfe3",
190
+ "ink-3": "#a9a5c0",
191
+ "line": "#3a3750",
192
+ "line-strong": "#f7f5ff",
193
+ "control": "#8a86a6",
194
+ "accent": "#ffd23f",
195
+ "accent-hover": "#ffdf6b",
196
+ "on-accent": "#111111",
197
+ "accent-wash": "#3a3110",
198
+ "accent-ink": "#b9a3ff",
199
+ "accent-2": "#5b9bff",
200
+ "accent-2-ink": "#82b3ff",
201
+ "accent-2-wash": "#132544",
202
+ "on-accent-2": "#07142a",
203
+ "support": "#5c2a44",
204
+ "support-ink": "#ffd6e7",
205
+ "focus": "#ffd23f",
206
+ "positive": "#5fe08f",
207
+ "positive-wash": "#11301d",
208
+ "warning": "#ffcf5a",
209
+ "warning-wash": "#33270a",
210
+ "negative": "#ff8080",
211
+ "negative-wash": "#3a1414",
212
+ "info": "#8fb0ff",
213
+ "info-wash": "#15213d",
214
+ "chart-1": "#b9a3ff",
215
+ "chart-2": "#ffd23f",
216
+ "chart-3": "#ff8fbd",
217
+ "chart-4": "#f7f5ff",
218
+ "chart-5": "#5fe08f"
219
+ }
220
+ },
221
+ "accent_art": "sticker"
222
+ }
@@ -0,0 +1,226 @@
1
+ // frontend-ui-ux kit: behaviour that every build otherwise re-invents. No dependencies, no
2
+ // network. Colours come from the locked tokens (CSS custom properties), never from literals.
3
+ // UI.bars(el, { labels, series: [{ name, values, role }], marker, unit, caption })
4
+ // UI.lines(el, { labels, series: [{ name, values, role }], marker, unit, caption })
5
+ // <table data-ui-sortable> header <button class="ui-sort"> cells sort by data-value or text
6
+ // <div role="tablist" data-ui-tabs> arrow keys, Home and End move between tabs
7
+ (function () {
8
+ "use strict";
9
+ const NS = "http://www.w3.org/2000/svg";
10
+ const svg = (tag, attrs = {}) => {
11
+ const node = document.createElementNS(NS, tag);
12
+ for (const [key, value] of Object.entries(attrs)) node.setAttribute(key, String(value));
13
+ return node;
14
+ };
15
+ const roleColor = (role, index) => `var(--c-${role || `chart-${(index % 5) + 1}`})`;
16
+ const niceMax = (value) => {
17
+ if (value <= 0) return 1;
18
+ const power = 10 ** Math.floor(Math.log10(value));
19
+ const step = [1, 2, 2.5, 5, 10].find((n) => n * power >= value / 4) * power;
20
+ return Math.ceil(value / step) * step;
21
+ };
22
+ const fmt = (value, unit) => `${Number(value).toLocaleString()}${unit ?? ""}`;
23
+
24
+ function frame(el, opts, maxValue) {
25
+ el.classList.add("ui-chart");
26
+ el.replaceChildren();
27
+ const width = Math.max(280, Math.round(el.getBoundingClientRect().width) || 640);
28
+ const height = opts.height ?? (width < 480 ? 200 : 240);
29
+ const pad = { top: 16, right: 8, bottom: 28, left: 36 };
30
+ const plotW = width - pad.left - pad.right;
31
+ const plotH = height - pad.top - pad.bottom;
32
+ const root = svg("svg", { viewBox: `0 0 ${width} ${height}`, width, height, role: "img", "aria-label": opts.caption ?? "Chart" });
33
+ // Whole-number data keeps whole-number ticks: round the top up to a multiple of the four steps.
34
+ const top = opts.integer ? Math.max(4, Math.ceil(niceMax(maxValue) / 4) * 4) : niceMax(maxValue);
35
+ const axis = svg("g", { class: "ui-axis" });
36
+ for (let i = 0; i <= 4; i += 1) {
37
+ const y = pad.top + plotH - (plotH * i) / 4;
38
+ root.append(svg("line", { class: i === 0 ? "ui-baseline" : "ui-grid-line", x1: pad.left, x2: width - pad.right, y1: y, y2: y }));
39
+ const label = svg("text", { x: pad.left - 8, y: y + 4, "text-anchor": "end" });
40
+ label.textContent = fmt((top * i) / 4, "");
41
+ axis.append(label);
42
+ }
43
+ root.append(axis);
44
+ return { root, axis, width, height, pad, plotW, plotH, top };
45
+ }
46
+
47
+ function legendAndTable(el, opts) {
48
+ if (opts.series.length > 1) {
49
+ const legend = document.createElement("div");
50
+ legend.className = "ui-legend";
51
+ opts.series.forEach((series, index) => {
52
+ const item = document.createElement("span");
53
+ const swatch = document.createElement("i");
54
+ swatch.style.setProperty("--swatch", roleColor(series.role, index));
55
+ item.append(swatch, document.createTextNode(series.name));
56
+ legend.append(item);
57
+ });
58
+ el.prepend(legend);
59
+ }
60
+ const details = document.createElement("details");
61
+ const summary = document.createElement("summary");
62
+ summary.className = "ui-meta";
63
+ summary.textContent = opts.tableLabel ?? "Show as table";
64
+ const table = document.createElement("table");
65
+ table.className = "ui-table ui-table--compact";
66
+ const head = document.createElement("tr");
67
+ for (const text of [opts.indexLabel ?? "", ...opts.series.map((s) => s.name)]) {
68
+ const th = document.createElement("th");
69
+ th.textContent = text;
70
+ head.append(th);
71
+ }
72
+ const thead = document.createElement("thead");
73
+ thead.append(head);
74
+ const tbody = document.createElement("tbody");
75
+ opts.labels.forEach((label, row) => {
76
+ const tr = document.createElement("tr");
77
+ const th = document.createElement("th");
78
+ th.scope = "row";
79
+ th.textContent = label;
80
+ tr.append(th);
81
+ for (const series of opts.series) {
82
+ const td = document.createElement("td");
83
+ td.className = "is-num";
84
+ td.textContent = fmt(series.values[row], opts.unit);
85
+ tr.append(td);
86
+ }
87
+ tbody.append(tr);
88
+ });
89
+ table.append(thead, tbody);
90
+ details.append(summary, table);
91
+ el.append(details);
92
+ }
93
+
94
+ function xLabels(f, labels, step) {
95
+ const every = Math.max(1, Math.ceil(labels.length / (f.plotW / 44)));
96
+ labels.forEach((label, index) => {
97
+ if (index % every) return;
98
+ const text = svg("text", { x: f.pad.left + step * index + (step / 2) * (f.bandCenter ? 1 : 0), y: f.height - 8, "text-anchor": "middle" });
99
+ text.textContent = label;
100
+ f.axis.append(text);
101
+ });
102
+ }
103
+
104
+ function marker(f, opts, x) {
105
+ if (!opts.marker) return;
106
+ f.root.append(svg("line", { class: "ui-marker", x1: x, x2: x, y1: f.pad.top - 4, y2: f.pad.top + f.plotH }));
107
+ const text = svg("text", { class: "ui-marker-label", x: x + 4, y: f.pad.top + 6 });
108
+ text.textContent = opts.marker.label;
109
+ f.root.append(text);
110
+ }
111
+
112
+ const drawn = new Map();
113
+ let resizeTimer = 0;
114
+ addEventListener("resize", () => {
115
+ clearTimeout(resizeTimer);
116
+ resizeTimer = setTimeout(() => { for (const [el, draw] of drawn) draw(); }, 150);
117
+ });
118
+ const remember = (el, draw) => { drawn.set(el, draw); draw(); };
119
+
120
+ function bars(el, opts) { remember(el, () => drawBars(el, opts)); }
121
+ function lines(el, opts) { remember(el, () => drawLines(el, opts)); }
122
+
123
+ function drawBars(el, opts) {
124
+ const stacked = Boolean(opts.stacked);
125
+ const totals = opts.labels.map((_, i) => opts.series.reduce((sum, s) => sum + (stacked ? s.values[i] : 0), 0));
126
+ const max = stacked ? Math.max(...totals) : Math.max(...opts.series.flatMap((s) => s.values));
127
+ const f = frame(el, { ...opts, integer: opts.series.every((s) => s.values.every(Number.isInteger)) }, max);
128
+ f.bandCenter = true;
129
+ const step = f.plotW / opts.labels.length;
130
+ const groupW = step * 0.64;
131
+ const barW = stacked ? groupW : groupW / opts.series.length;
132
+ opts.labels.forEach((label, i) => {
133
+ let base = 0;
134
+ opts.series.forEach((series, s) => {
135
+ const value = series.values[i];
136
+ const h = (value / f.top) * f.plotH;
137
+ const x = f.pad.left + step * i + (step - groupW) / 2 + (stacked ? 0 : barW * s);
138
+ const y = f.pad.top + f.plotH - h - (stacked ? (base / f.top) * f.plotH : 0);
139
+ const rect = svg("rect", { x, y, width: Math.max(1, barW - (stacked ? 0 : 2)), height: Math.max(0, h), rx: 2, style: `fill: ${roleColor(series.role, s)}` });
140
+ const title = svg("title");
141
+ title.textContent = `${label}: ${series.name} ${fmt(value, opts.unit)}`;
142
+ rect.append(title);
143
+ f.root.append(rect);
144
+ base += stacked ? value : 0;
145
+ });
146
+ });
147
+ xLabels(f, opts.labels, step);
148
+ if (opts.marker) marker(f, opts, f.pad.left + step * opts.marker.index + step / 2);
149
+ el.append(f.root);
150
+ legendAndTable(el, opts);
151
+ }
152
+
153
+ function drawLines(el, opts) {
154
+ const max = Math.max(...opts.series.flatMap((s) => s.values));
155
+ const f = frame(el, { ...opts, integer: opts.series.every((s) => s.values.every(Number.isInteger)) }, max);
156
+ const step = f.plotW / Math.max(1, opts.labels.length - 1);
157
+ opts.series.forEach((series, s) => {
158
+ const points = series.values.map((value, i) => `${f.pad.left + step * i},${f.pad.top + f.plotH - (value / f.top) * f.plotH}`);
159
+ f.root.append(svg("polyline", { points: points.join(" "), style: `fill: none; stroke: ${roleColor(series.role, s)}`, "stroke-width": 2, "stroke-linejoin": "round", "stroke-linecap": "round" }));
160
+ });
161
+ f.bandCenter = false;
162
+ xLabels(f, opts.labels, step);
163
+ if (opts.marker) marker(f, opts, f.pad.left + step * opts.marker.index);
164
+ el.append(f.root);
165
+ legendAndTable(el, opts);
166
+ }
167
+
168
+ function sortable(table) {
169
+ const tbody = table.tBodies[0];
170
+ table.querySelectorAll("thead th .ui-sort").forEach((button) => {
171
+ button.type = "button";
172
+ button.addEventListener("click", () => {
173
+ const th = button.closest("th");
174
+ const index = [...th.parentElement.children].indexOf(th);
175
+ const next = th.getAttribute("aria-sort") === "ascending" ? "descending" : "ascending";
176
+ table.querySelectorAll("thead th[aria-sort]").forEach((cell) => cell.removeAttribute("aria-sort"));
177
+ th.setAttribute("aria-sort", next);
178
+ const key = (row) => {
179
+ const cell = row.children[index];
180
+ const raw = cell?.dataset.value ?? cell?.textContent.trim() ?? "";
181
+ const number = Number(raw);
182
+ return raw !== "" && !Number.isNaN(number) ? number : raw.toLocaleLowerCase();
183
+ };
184
+ const rows = [...tbody.rows].sort((a, b) => {
185
+ const x = key(a);
186
+ const y = key(b);
187
+ const order = typeof x === "number" && typeof y === "number" ? x - y : String(x).localeCompare(String(y));
188
+ return next === "ascending" ? order : -order;
189
+ });
190
+ tbody.append(...rows);
191
+ table.dispatchEvent(new CustomEvent("ui:sorted", { detail: { index, order: next } }));
192
+ });
193
+ });
194
+ }
195
+
196
+ function tabs(list) {
197
+ const items = [...list.querySelectorAll('[role="tab"]')];
198
+ const select = (tab) => {
199
+ for (const item of items) {
200
+ const on = item === tab;
201
+ item.setAttribute("aria-selected", String(on));
202
+ item.tabIndex = on ? 0 : -1;
203
+ const panel = document.getElementById(item.getAttribute("aria-controls"));
204
+ if (panel) panel.hidden = !on;
205
+ }
206
+ };
207
+ items.forEach((tab, index) => {
208
+ tab.addEventListener("click", () => select(tab));
209
+ tab.addEventListener("keydown", (event) => {
210
+ const move = { ArrowRight: 1, ArrowLeft: -1, Home: -index, End: items.length - 1 - index }[event.key];
211
+ if (move === undefined) return;
212
+ event.preventDefault();
213
+ const next = items[(index + move + items.length) % items.length];
214
+ next.focus();
215
+ select(next);
216
+ });
217
+ });
218
+ select(items.find((tab) => tab.getAttribute("aria-selected") === "true") ?? items[0]);
219
+ }
220
+
221
+ document.addEventListener("DOMContentLoaded", () => {
222
+ document.querySelectorAll("table[data-ui-sortable]").forEach(sortable);
223
+ document.querySelectorAll("[data-ui-tabs]").forEach(tabs);
224
+ });
225
+ window.UI = { bars, lines, sortable, tabs };
226
+ })();