mosaic-headless 1.11.0 → 1.11.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mosaic-headless",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
4
4
  "description": "AI-agent skill: build Mosaic Pro (Nextend) WordPress sites by writing the underlying data model directly - 23 custom tables, no visual editor, no DOM. Every node type, style property and node property swept against a live install and asserted on the delivered HTML and compiled CSS. Installs into Claude Code, Cursor, Codex CLI, Gemini CLI, Copilot, Continue, Windsurf and Claude.ai.",
5
5
  "keywords": [
6
6
  "wordpress",
package/sites/_moksa.py CHANGED
@@ -340,17 +340,40 @@ RULER_TICKS = 13
340
340
 
341
341
  # The hero's code layer. Third table up here for the same reason as the others:
342
342
  # motion_css() builds a rule per line and runs long before the section that uses it.
343
+ # Four columns, four languages, all of them real work from this studio's own stack:
344
+ # a FastAPI handler, a Tailwind component, a Vite config, and the Node path that
345
+ # ties them together. Lines are kept short deliberately - the layer is full bleed,
346
+ # and a long line would have to be clipped mid-word, which reads as a mistake rather
347
+ # than as a background.
343
348
  HERO_CODE = [
344
- "const order = await prisma.order.findUnique({",
345
- " where: { id }, include: { items: true },",
346
- "})",
347
- "",
348
- "await n8n.trigger('order.paid', {",
349
- " invoice: await ecpay.issue(order),",
350
- " notify: await line.push(order.customerId, flex(order)),",
351
- "})",
352
- "",
353
- "return reply.code(200).send({ ok: true })",
349
+ ("PY", [
350
+ '@app.post("/orders/{id}/paid")',
351
+ "async def paid(id: str):",
352
+ " o = await repo.get(id)",
353
+ ' await tasks("invoice", o)',
354
+ ' return {"ok": True}',
355
+ ]),
356
+ ("TSX", [
357
+ "<section",
358
+ ' className="grid gap-6',
359
+ ' md:grid-cols-3">',
360
+ " <Card {...order} />",
361
+ "</section>",
362
+ ]),
363
+ ("VITE", [
364
+ "export default defineConfig({",
365
+ " plugins: [react()],",
366
+ " build: { target: 'es2022' },",
367
+ " server: { port: 5173 },",
368
+ "})",
369
+ ]),
370
+ ("JS", [
371
+ "const o = await prisma.order",
372
+ " .findUnique({ where: { id } })",
373
+ "await n8n.trigger('order.paid')",
374
+ "await line.push(o.customerId)",
375
+ "await ecpay.issue(o)",
376
+ ]),
354
377
  ]
355
378
 
356
379
 
@@ -447,15 +470,33 @@ def motion_css():
447
470
  # the snippet is drawn by pseudo-elements: no text nodes, so it stays out of
448
471
  # the accessibility tree where decorative type belongs
449
472
  code_lines = "\n".join(
450
- "#mk-code-%d::after{content:%s;display:block;min-height:1.75em}"
451
- % (i, json.dumps(line or " "))
452
- for i, line in enumerate(HERO_CODE))
473
+ "#mk-code-c%d-l%d::after{content:%s;display:block;min-height:1.78em}"
474
+ % (c, i, json.dumps(line or " "))
475
+ for c, (_l, lines) in enumerate(HERO_CODE)
476
+ for i, line in enumerate(lines))
477
+ code_heads = "\n".join(
478
+ "#mk-code-c%d-h::after{content:%s;display:block;font-size:9px;"
479
+ "letter-spacing:.2em;color:rgba(255,90,54,.9);margin-bottom:9px}"
480
+ % (c, json.dumps(label))
481
+ for c, (label, _lines) in enumerate(HERO_CODE))
482
+ code_cursors = "\n".join(
483
+ "#mk-code-c%d-cur{width:6px;height:11px;margin-top:4px;"
484
+ "background:rgba(255,90,54,.7)}" % c
485
+ for c in range(len(HERO_CODE)))
453
486
  # one period for the block; each line waits its turn, and the steps() count is
454
487
  # the line's own length so the caret lands on characters rather than sliding
488
+ # Each column shares the period but starts a beat later, so the four are
489
+ # never writing the same line at the same moment; within a column the
490
+ # steps() count is the line's own length, which is what lands the caret on
491
+ # characters instead of sliding it between them.
455
492
  code_typing = "\n".join(
456
- " #mk-code-%d{animation:mk-typeline 15s steps(%d,end) %dms infinite}"
457
- % (i, max(len(line), 1), 300 + i * 340)
458
- for i, line in enumerate(HERO_CODE))
493
+ " #mk-code-c%d-l%d{animation:mk-typeline 15s steps(%d,end) %dms infinite}"
494
+ % (c, i, max(len(line), 1), 240 + c * 430 + i * 300)
495
+ for c, (_l, lines) in enumerate(HERO_CODE)
496
+ for i, line in enumerate(lines))
497
+ code_cur_anim = "\n".join(
498
+ " #mk-code-c%d-cur{animation:mk-boot-caret .62s steps(1,end) %dms "
499
+ "infinite}" % (c, c * 150) for c in range(len(HERO_CODE)))
459
500
  # the diagram's arrows, and the delay that makes the pulse travel down it
460
501
  flow_arrows = ",".join("#mk-ar-%s-%d>*" % (c, i)
461
502
  for i in range(len(FLOW)) for c in ("a", "b"))
@@ -602,19 +643,47 @@ def motion_css():
602
643
  # statistics band, and code running across a number reads as a bug rather
603
644
  # than as a background. `max-height` is what guarantees it can never grow
604
645
  # back into them.
605
- "#mk-code{position:absolute;top:86px;right:0;z-index:0;"
606
- "pointer-events:none;width:max-content;max-height:292px;overflow:hidden;"
607
- "display:grid;align-content:start;justify-items:start;row-gap:1px;"
608
- "font-family:" + MONO + ";font-size:12px;line-height:1.72;"
609
- "letter-spacing:0.01em;color:rgba(22,24,28,.10);"
610
- "white-space:pre;text-align:left}",
646
+ # Full bleed. The opacity here has been wrong in both directions: a single
647
+ # column at 10% ran through the statistics and read as a bug, and four
648
+ # columns at 5.5% behind a 30% mask floor were so faint they may as well
649
+ # not have been there. 18% with the mask floor at 55% puts the layer at
650
+ # roughly 1.6:1 under the headline and 2.4:1 out to the right - legible as
651
+ # code if you look at it, and still an order of magnitude below the
652
+ # statistics, which sit at 17:1. The mask stays asymmetric on purpose:
653
+ # lightest where the headline is, fullest where nothing else is.
654
+ "#mk-code{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0;"
655
+ "pointer-events:none;overflow:hidden;display:grid;"
656
+ "grid-template-columns:repeat(4,minmax(0,1fr));column-gap:26px;"
657
+ "align-content:center;padding:70px 0;"
658
+ "font-family:" + MONO + ";font-size:11.5px;line-height:1.78;"
659
+ "letter-spacing:0.01em;color:rgba(22,24,28,.18);"
660
+ "white-space:pre;text-align:left;"
661
+ "-webkit-mask-image:linear-gradient(96deg,rgba(0,0,0,.55) 0%,"
662
+ "rgba(0,0,0,.55) 26%,rgba(0,0,0,1) 58%,rgba(0,0,0,1) 100%);"
663
+ "mask-image:linear-gradient(96deg,rgba(0,0,0,.55) 0%,"
664
+ "rgba(0,0,0,.55) 26%,rgba(0,0,0,1) 58%,rgba(0,0,0,1) 100%)}",
665
+ "#mk-code>*{align-self:start;overflow:hidden}",
666
+ # The two blocks the code would otherwise run behind carry their own paper,
667
+ # so raising the layer's opacity cannot cost the page its readability. The
668
+ # texture still shows everywhere else in the hero - between the columns,
669
+ # above the lede, and all the way down the right - which is most of it.
670
+ # No border and no shadow: this is the page's own ground showing through,
671
+ # not a card laid on top of it.
672
+ "#mk-mast-lede{background:rgb(250,250,247);"
673
+ "padding:6px 18px 6px 0;margin-left:-2px}",
674
+ "#mk-mast-side{background:rgb(250,250,247);padding:0 0 0 14px;"
675
+ "margin-left:-14px}",
676
+ code_heads,
677
+ code_cursors,
611
678
  # everything else in the masthead sits above it
612
679
  "#mk-mast-in>*:not(#mk-code){position:relative;z-index:1}",
613
680
  code_lines,
614
681
  "#mk-code-cur{width:7px;height:13px;background:rgba(255,90,54,.30)}",
615
- # Below 1280 the spec column claims that corner, so the layer stands down
616
- # rather than fighting it for the space.
617
- "@media (max-width:1279px){#mk-code{display:none}}",
682
+ # Two columns where there is room for two, and none on a phone - a
683
+ # texture you have to scroll past is not a texture.
684
+ "@media (max-width:1279px){#mk-code{"
685
+ "grid-template-columns:repeat(2,minmax(0,1fr));font-size:10.5px}}",
686
+ "@media (max-width:767px){#mk-code{display:none}}",
618
687
 
619
688
  # ── the clock ────────────────────────────────────────────────────────
620
689
  # Two registered integers, stepped rather than eased, so each one lands on a
@@ -1149,9 +1218,13 @@ HERO_LINE = dict(color={"token": "--mk-ink"}, fontSize="62px", fontWeight="600",
1149
1218
  # anyway and report it as DECORATIVE_TEXT, because "invisible to my own checker" is
1150
1219
  # not the same as "fine".
1151
1220
 
1152
- CODE_LAYER = box("mk-code", {}, [box("mk-code-%d" % i, {}, [])
1153
- for i in range(len(HERO_CODE))]
1154
- + [box("mk-code-cur", {}, [])])
1221
+ CODE_LAYER = box("mk-code", {}, [
1222
+ box("mk-code-c%d" % c, {},
1223
+ [box("mk-code-c%d-h" % c, {}, [])]
1224
+ + [box("mk-code-c%d-l%d" % (c, i), {}, []) for i in range(len(lines))]
1225
+ + [box("mk-code-c%d-cur" % c, {}, [])])
1226
+ for c, (_label, lines) in enumerate(HERO_CODE)
1227
+ ])
1155
1228
 
1156
1229
  MASTHEAD = section("mk-mast", [wrap("mk-mast-in", [
1157
1230
  CODE_LAYER,