create-pmos 0.447.0 → 0.449.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/package.json +25 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/adler-seasons-art-test.js +9 -2
  7. package/workspace/adler-seasons-test.js +1 -1
  8. package/workspace/changelog.json +24 -0
  9. package/workspace/guide/adler.md +15 -15
  10. package/workspace/guide/forecast.md +1 -1
  11. package/workspace/lib/page-build.js +8 -0
  12. package/workspace/package-lock.json +2 -2
  13. package/workspace/package.json +1 -1
  14. package/workspace/public/pm/adler/01_expressions/celebrating.png +0 -0
  15. package/workspace/public/pm/adler/01_expressions/handled.png +0 -0
  16. package/workspace/public/pm/adler/01_expressions/honest.png +0 -0
  17. package/workspace/public/pm/adler/01_expressions/needs_you.png +0 -0
  18. package/workspace/public/pm/adler/01_expressions/resting.png +0 -0
  19. package/workspace/public/pm/adler/01_expressions/thinking.png +0 -0
  20. package/workspace/public/pm/adler/02_moments/headphones_honest.png +0 -0
  21. package/workspace/public/pm/adler/02_moments/headphones_listening.png +0 -0
  22. package/workspace/public/pm/adler/02_moments/headphones_resting.png +0 -0
  23. package/workspace/public/pm/adler/02_moments/hello_wave.png +0 -0
  24. package/workspace/public/pm/adler/02_moments/honest_full_figure.png +0 -0
  25. package/workspace/public/pm/adler/02_moments/leaf_tips_peeking.png +0 -0
  26. package/workspace/public/pm/adler/02_moments/morning_stretch.png +0 -0
  27. package/workspace/public/pm/adler/02_moments/peeking_up.png +0 -0
  28. package/workspace/public/pm/adler/02_moments/tea_mug.png +0 -0
  29. package/workspace/public/pm/adler/03_growth_activity/clipboard.png +0 -0
  30. package/workspace/public/pm/adler/03_growth_activity/laptop_alert.png +0 -0
  31. package/workspace/public/pm/adler/03_growth_activity/laptop_resting.png +0 -0
  32. package/workspace/public/pm/adler/03_growth_activity/sprout_large.png +0 -0
  33. package/workspace/public/pm/adler/03_growth_activity/sprout_medium.png +0 -0
  34. package/workspace/public/pm/adler/03_growth_activity/sprout_none.png +0 -0
  35. package/workspace/public/pm/adler/03_growth_activity/sprout_small.png +0 -0
  36. package/workspace/public/pm/adler/03_growth_activity/telescope.png +0 -0
  37. package/workspace/public/pm/adler/04_weather_leaves/cloud_large.png +0 -0
  38. package/workspace/public/pm/adler/04_weather_leaves/cloud_medium.png +0 -0
  39. package/workspace/public/pm/adler/04_weather_leaves/cloud_small.png +0 -0
  40. package/workspace/public/pm/adler/04_weather_leaves/crescent_stars.png +0 -0
  41. package/workspace/public/pm/adler/04_weather_leaves/leaf_green.png +0 -0
  42. package/workspace/public/pm/adler/04_weather_leaves/leaf_orange.png +0 -0
  43. package/workspace/public/pm/adler/04_weather_leaves/leaf_pink.png +0 -0
  44. package/workspace/public/pm/adler/04_weather_leaves/rain_cloud.png +0 -0
  45. package/workspace/public/pm/adler/04_weather_leaves/sun.png +0 -0
  46. package/workspace/public/pm/adler/05_space/lunar_ground.png +0 -0
  47. package/workspace/public/pm/adler/05_space/planet_cloud.png +0 -0
  48. package/workspace/public/pm/adler/05_space/planet_crater.png +0 -0
  49. package/workspace/public/pm/adler/05_space/planet_glass.png +0 -0
  50. package/workspace/public/pm/adler/05_space/planet_smooth.png +0 -0
  51. package/workspace/public/pm/adler/05_space/rocket_flying.png +0 -0
  52. package/workspace/public/pm/adler/05_space/rocket_idle.png +0 -0
  53. package/workspace/public/pm/adler/05_space/rocket_liftoff.png +0 -0
  54. package/workspace/public/pm/adler/05_space/satellite.png +0 -0
  55. package/workspace/public/pm/adler/05_space/satellite_dish.png +0 -0
  56. package/workspace/public/pm/adler/06_landscapes/beach.png +0 -0
  57. package/workspace/public/pm/adler/06_landscapes/deciduous_forest.png +0 -0
  58. package/workspace/public/pm/adler/06_landscapes/desert_large.png +0 -0
  59. package/workspace/public/pm/adler/06_landscapes/desert_small.png +0 -0
  60. package/workspace/public/pm/adler/06_landscapes/floating_island_large.png +0 -0
  61. package/workspace/public/pm/adler/06_landscapes/floating_island_small.png +0 -0
  62. package/workspace/public/pm/adler/06_landscapes/lake.png +0 -0
  63. package/workspace/public/pm/adler/06_landscapes/pine_forest.png +0 -0
  64. package/workspace/public/pm/adler/06_landscapes/snow_forest.png +0 -0
  65. package/workspace/public/pm/adler/06_landscapes/snow_mountains.png +0 -0
  66. package/workspace/public/pm/adler/07_wearables/astronaut_helmet.png +0 -0
  67. package/workspace/public/pm/adler/07_wearables/beanie_blue.png +0 -0
  68. package/workspace/public/pm/adler/07_wearables/beanie_red.png +0 -0
  69. package/workspace/public/pm/adler/07_wearables/hard_hat.png +0 -0
  70. package/workspace/public/pm/adler/07_wearables/headband.png +0 -0
  71. package/workspace/public/pm/adler/07_wearables/party_hat_blue.png +0 -0
  72. package/workspace/public/pm/adler/07_wearables/party_hat_multicolor.png +0 -0
  73. package/workspace/public/pm/adler/07_wearables/pencil.png +0 -0
  74. package/workspace/public/pm/adler/07_wearables/scarf_black_white.png +0 -0
  75. package/workspace/public/pm/adler/07_wearables/scarf_blue.png +0 -0
  76. package/workspace/public/pm/adler/07_wearables/scarf_blue_white.png +0 -0
  77. package/workspace/public/pm/adler/07_wearables/scarf_green_red.png +0 -0
  78. package/workspace/public/pm/adler/07_wearables/scarf_green_white.png +0 -0
  79. package/workspace/public/pm/adler/07_wearables/scarf_red_white.png +0 -0
  80. package/workspace/public/pm/adler/07_wearables/scarf_yellow.png +0 -0
  81. package/workspace/public/pm/adler/07_wearables/straw_hat.png +0 -0
  82. package/workspace/public/pm/adler/07_wearables/yellow_flowers.png +0 -0
  83. package/workspace/public/pm/adler/08_food_festival/apple.png +0 -0
  84. package/workspace/public/pm/adler/08_food_festival/cooking_pot.png +0 -0
  85. package/workspace/public/pm/adler/08_food_festival/cupcake.png +0 -0
  86. package/workspace/public/pm/adler/08_food_festival/diya.png +0 -0
  87. package/workspace/public/pm/adler/08_food_festival/egg.png +0 -0
  88. package/workspace/public/pm/adler/08_food_festival/heart_mug.png +0 -0
  89. package/workspace/public/pm/adler/08_food_festival/ketupat.png +0 -0
  90. package/workspace/public/pm/adler/08_food_festival/lotus.png +0 -0
  91. package/workspace/public/pm/adler/08_food_festival/mandarins.png +0 -0
  92. package/workspace/public/pm/adler/08_food_festival/mooncake.png +0 -0
  93. package/workspace/public/pm/adler/08_food_festival/pie.png +0 -0
  94. package/workspace/public/pm/adler/08_food_festival/pinwheel.png +0 -0
  95. package/workspace/public/pm/adler/08_food_festival/popcorn.png +0 -0
  96. package/workspace/public/pm/adler/08_food_festival/red_lantern.png +0 -0
  97. package/workspace/public/pm/adler/08_food_festival/tangyuan.png +0 -0
  98. package/workspace/public/pm/adler/08_food_festival/watering_can.png +0 -0
  99. package/workspace/public/pm/adler/08_food_festival/zongzi.png +0 -0
  100. package/workspace/public/pm/adler/09_celebration/bunting.png +0 -0
  101. package/workspace/public/pm/adler/09_celebration/clapperboard.png +0 -0
  102. package/workspace/public/pm/adler/09_celebration/fireworks.png +0 -0
  103. package/workspace/public/pm/adler/09_celebration/flower_garland.png +0 -0
  104. package/workspace/public/pm/adler/09_celebration/gift.png +0 -0
  105. package/workspace/public/pm/adler/09_celebration/lantern_pair.png +0 -0
  106. package/workspace/public/pm/adler/09_celebration/moon_cloud.png +0 -0
  107. package/workspace/public/pm/adler/09_celebration/pumpkin.png +0 -0
  108. package/workspace/public/pm/adler/09_celebration/soccer_ball.png +0 -0
  109. package/workspace/public/pm/adler/09_celebration/string_lights.png +0 -0
  110. package/workspace/public/pm/adler/09_celebration/umbrella.png +0 -0
  111. package/workspace/public/pm/adler/10_marks/attention_marks.png +0 -0
  112. package/workspace/public/pm/adler/10_marks/gold_heart.png +0 -0
  113. package/workspace/public/pm/adler/10_marks/gold_sparkles.png +0 -0
  114. package/workspace/public/pm/adler/10_marks/gold_star.png +0 -0
  115. package/workspace/public/pm/adler/10_marks/question_mark.png +0 -0
  116. package/workspace/public/pm/adler/10_marks/sleep_curls.png +0 -0
  117. package/workspace/public/pm/adler/manifest.json +2668 -0
  118. package/workspace/public/pm/cozy-adler.css +5 -5
  119. package/workspace/public/pm/cozy-adler.js +194 -414
  120. package/workspace/public/pm/cozy-insights.css +4 -0
  121. package/workspace/public/pm/cozy-settings.js +2 -2
  122. package/workspace/public/pm/premium-insights.js +28 -1
  123. package/workspace/server.js +4 -2
  124. package/workspace/test-lists/adler-png-art.json +10 -0
@@ -104,6 +104,10 @@ body.cz { padding: 0; }
104
104
  .cz.dark .ins-bar1, html.dark .cz .ins-bar1 { background: var(--cz-well2); }
105
105
  .ins-bar1 i { display: block; height: 100%; border-radius: 3px; }
106
106
  .ins-bar1 .today { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--cz-ink); }
107
+ .ins-fc { margin: 4px 0 2px; }
108
+ .ins-fc i { position: absolute; top: 0; }
109
+ .ins-fc.held i { opacity: .45; }
110
+ .ins-fc .lk { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--cz-blue); border: 2px solid var(--cz-card); box-sizing: border-box; }
107
111
  .ins-spark { display: block; overflow: visible; width: 210px; height: 40px; }
108
112
  .ins-spark .ar, .ins-ch2 .ar, .ins-tsp .ar { fill: rgba(42,46,53,.05); }
109
113
  .ins-spark .tg, .ins-ch2 .tg { stroke: var(--cz-c-9da3ac); stroke-dasharray: 3 3; stroke-width: 1; }
@@ -105,7 +105,7 @@ const dmy = (ms) => new Date(ms).toLocaleDateString('en-GB', { day: 'numeric', m
105
105
  /** The Adler row's second line: what he wears now, or the next one, or why he does not dress. */
106
106
  function dressLine() {
107
107
  const P = dp();
108
- if (P['adler.dress.on'] === false) return 'Off. He wears his hoodie every day.';
108
+ if (P['adler.dress.on'] === false) return 'Off. He is plain every day.';
109
109
  if (P['adler.amount'] !== 'full') return 'He dresses only when How much Adler is Full.';
110
110
  const now = SE.charmToday(Date.now(), P), nx = now ? null : SE.nextCharm(Date.now(), P);
111
111
  return now ? `Today: ${now.name}, until ${dmy(now.until)}.` : nx ? `Next: ${nx.name}, from ${dmy(nx.from)}.` : 'For festivals and seasons where you live.';
@@ -115,7 +115,7 @@ function dressSec() {
115
115
  const P = dp(), place = SE.placeOf(P), on = P['adler.dress.on'] !== false, full = P['adler.amount'] === 'full';
116
116
  const now = on && full ? SE.charmToday(Date.now(), P) : null, nx = on && full && !now ? SE.nextCharm(Date.now(), P) : null, c = now || nx;
117
117
  const head = `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-dress="back" aria-label="Back to Adler" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">Dress for the day</h4>${dsw('adler.dress.on', on, 'Dress for the day')}</div>`;
118
- if (!on) return head + '<p class="ev-small ev-mut">Adler wears his hoodie every day.</p>';
118
+ if (!on) return head + '<p class="ev-small ev-mut">Adler is plain every day.</p>';
119
119
  const banner = !full ? '<p class="ev-small ev-mut">How much Adler is not Full, so he does not dress up.</p>'
120
120
  : c ? `<div class="ev-dr-now">${AD.adler('handled', 48, { charm: c.key, label: false })}<p><b>${esc(now ? 'Today: ' + now.name : 'Next: ' + nx.name)}</b><span class="ev-small ev-mut">${esc(now ? 'He wears it until ' + dmy(now.until) + '.' : 'He wears it from ' + dmy(nx.from) + '.')}</span></p></div>` : '';
121
121
  const hol = SE.DAYS.filter((e) => e.group === 'holidays' && (e.where === '*' || e.where.includes(place.country)));
@@ -866,6 +866,33 @@ function paceHtml(g) {
866
866
  if (GC.firstOf(g)) { const k = knownAt(g); return `<div class="pace" role="cell"><span>Known after 3 readings</span>${k ? `<div class="note">${esc(k)}</div>` : ''}</div>`; }
867
867
  return `<div class="pace" role="cell"><b style="color:${PACE_C[g.pace.tone]}">${esc(g.pace.head)}</b><div class="note">${esc(g.pace.sub)}</div></div>`;
868
868
  }
869
+ /** The forecast column (canvas FcIntel): a range bar from low to high with the target as a tick and a dot at likely, and one word for its state.
870
+ * g.forecast comes from lib/forecast.js through /api/insights-premium; without it the row keeps the pace above. Too early draws no bar (zero is
871
+ * silence); held dims the bar and never extends it. */
872
+ const FC_WORD = { 'on-track': ['ok', 'On track'], 'at-risk': ['risk', 'At risk'], 'will-miss': ['red', 'Will miss'], 'too-early': ['q', 'Too early'], held: ['q', 'Held'] };
873
+ const FC_C = { ok: 'var(--cz-ok)', risk: 'var(--cz-risk)', red: 'var(--cz-red)', q: 'var(--cz-ink3)' };
874
+ const fcV = (g, v) => unitV(g, Math.round(v * 10) / 10);
875
+ function forecastHtml(g) {
876
+ const F = g.forecast, w = F && FC_WORD[F.state];
877
+ if (!w) return paceHtml(g);
878
+ const fin = (v) => typeof v === 'number' && Number.isFinite(v);
879
+ const has = F.state !== 'too-early' && fin(F.low) && fin(F.high);
880
+ const tgt = fin(F.target) ? F.target : g.target;
881
+ let bar = '';
882
+ if (has) {
883
+ const vs = [F.low, F.high].concat(fin(tgt) ? [tgt] : []), a = Math.min(...vs), b = Math.max(...vs), pad = (b - a) * 0.15 || Math.abs(b) * 0.1 || 1;
884
+ const x = (v) => Math.max(0, Math.min(100, ((v - (a - pad)) / (b - a + 2 * pad)) * 100)).toFixed(1);
885
+ bar = `<div class="ins-bar1 ins-fc${F.state === 'held' ? ' held' : ''}" role="img" aria-label="${esc('Forecast ' + fcV(g, F.low) + ' to ' + fcV(g, F.high) + (fin(F.likely) ? ', likely ' + fcV(g, F.likely) : '') + (fin(tgt) ? ', goal ' + fcV(g, tgt) : ''))}">`
886
+ + `<i style="left:${x(F.low)}%;width:${(x(F.high) - x(F.low)).toFixed(1)}%;background:${TONE_BAR[w[0]] || TONE_BAR.q}"></i>`
887
+ + (fin(tgt) ? `<span class="today" title="goal" style="left:${x(tgt)}%"></span>` : '')
888
+ + (fin(F.likely) && F.state !== 'held' ? `<span class="lk" style="left:${x(F.likely)}%"></span>` : '') + '</div>';
889
+ }
890
+ const wk = fin(F.weeks) ? Math.floor(F.weeks) : 0, src = F.source && F.source !== 'readings' ? F.source + ' ' : '';
891
+ const note = F.state === 'too-early' ? 'Needs 3 weeks of readings' + (wk ? ', ' + wk + ' so far' : '')
892
+ : F.state === 'held' ? (F.asOf ? src + 'last read ' + md(Date.parse(F.asOf)) : 'Not read lately') + '. Range held'
893
+ : fcV(g, F.low) + ' to ' + fcV(g, F.high) + (F.driftFrom ? '. Was on track on ' + md(Date.parse(F.driftFrom)) : '');
894
+ return `<div class="pace" role="cell"><b style="color:${FC_C[w[0]]}">${esc(w[1])}</b>${bar}<div class="note">${esc(note)}</div></div>`;
895
+ }
869
896
  /** What happened to a goal's last reading, said once under its number: "not read Mon 16 Nov", "1 reading held". */
870
897
  const gcSay = (g) => (g.failed ? 'not read ' + GC.dayTxt(g.failed.at) : (g.held || []).length ? ((g.held.length === 1 ? '1 reading' : g.held.length + ' readings') + ' held') : '');
871
898
  function goalSub(g) {
@@ -886,7 +913,7 @@ function goalRow(g) {
886
913
  + `<div class="nm" role="cell">${crit ? OK.dotHtml('broken') : ''}<span><b>${markHtml(g.title)}</b><small><span class="cz-pill q ins-type">${esc(g.type)}</span><span class="ins-sub" title="${esc(goalSub(g))}">${esc(PF && g.prod ? [g.prod, goalSub(g)].filter(Boolean).join(' · ') : goalSub(g))}</span></small></span></div>`
887
914
  + `<div class="val" role="cell"><b>${esc(nowOf(g))}</b> <span class="note">${esc(g.targetTxt ? 'of ' + g.targetTxt : 'no target')}</span>${warn ? `<div class="note ins-warn">${esc(warn)}</div>` : GC.firstOf(g) ? '' : barHtml(g)}</div>`
888
915
  + `<div class="sofar" role="cell">${soFarHtml(g)}</div>`
889
- + paceHtml(g)
916
+ + forecastHtml(g)
890
917
  + `<div class="mv" role="cell">${g.moves.length ? g.moves.slice(0, 3).map((r) => initRow(r)).join('') + (g.moves.length > 3 ? `<span class="note">and ${g.moves.length - 3} more</span>` : '') : `<span class="note">${M.initiativesRead ? 'No initiative anchors to it' : 'The initiatives are not read yet'}</span>`}</div>`
891
918
  + '</div>' + draftsRow(g.id);
892
919
  }
@@ -6629,7 +6629,7 @@ function fsList(dir) {
6629
6629
  // ── HTTP: static assets + the file/gate APIs. Headers never logged (D08). ─────────────
6630
6630
  const TYPES = { '.html': 'text/html; charset=utf-8', '.js': 'text/javascript; charset=utf-8',
6631
6631
  '.css': 'text/css; charset=utf-8', '.json': 'application/json', '.map': 'application/json',
6632
- '.svg': 'image/svg+xml', '.woff2': 'font/woff2' };
6632
+ '.svg': 'image/svg+xml', '.png': 'image/png', '.woff2': 'font/woff2' };
6633
6633
  // Compression and validators (workspace-event-loop-lag). The app shell is 5.7 MB of script and style and a library answer
6634
6634
  // is about 1 MB of JSON, and none of it was compressed, so a phone or an Online-address visit paid for every byte on every
6635
6635
  // load. A response is gzipped only when the client asks for it and the body is text over the threshold. Gzip runs on the
@@ -6978,7 +6978,9 @@ async function handleRequest(req, res) {
6978
6978
  if (p.startsWith('/pm/')) {
6979
6979
  const rel = p.slice('/pm/'.length);
6980
6980
  const file = path.resolve(PM_DIR, rel);
6981
- if (!file.startsWith(PM_DIR + path.sep) || !['.js', '.css', '.json'].includes(path.extname(file))) {
6981
+ // The one other kind of file: Adler's pictures, in pm/adler/<category>/ (page-build.js counts them in the build, so they are kept like a module).
6982
+ const art = path.extname(file) === '.png' && file.startsWith(path.join(PM_DIR, 'adler') + path.sep);
6983
+ if (!file.startsWith(PM_DIR + path.sep) || !(art || ['.js', '.css', '.json'].includes(path.extname(file)))) {
6982
6984
  res.writeHead(404); return res.end('not found');
6983
6985
  }
6984
6986
  // Under the current build prefix, a file whose bytes are the ones the prefix names is kept for good (lib/page-build.js).
@@ -0,0 +1,10 @@
1
+ {
2
+ "_comment": "The blue Adler's PNG set (pm/adler/, manifest.json) behind pm/cozy-adler.js: the art table matches the manifest and its hashes, every drawing resolves to a file in the set, and each mood, prop and sprout stage has its own PNG. Pure; no browser.",
3
+ "modules": [
4
+ "adler-png-art.test.js"
5
+ ],
6
+ "panels": [],
7
+ "seconds": {
8
+ "adler-png-art.test.js": 2
9
+ }
10
+ }