@struq/skill 0.3.0 → 0.4.1

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 (129) hide show
  1. package/README.md +22 -36
  2. package/package.json +4 -2
  3. package/skills/struq/SKILL.md +139 -307
  4. package/skills/struq/blocks/CATALOG.md +426 -0
  5. package/skills/struq/blocks/backgrounds/background-aurora.tsx +818 -0
  6. package/skills/struq/blocks/backgrounds/background-facets.tsx +1283 -0
  7. package/skills/struq/blocks/backgrounds/background-silk.tsx +906 -0
  8. package/skills/struq/blocks/catalog.json +1302 -0
  9. package/skills/struq/blocks/footers/footer-contact.tsx +789 -0
  10. package/skills/struq/blocks/footers/footer-reveal.tsx +313 -0
  11. package/skills/struq/blocks/headers/header-bar.tsx +652 -0
  12. package/skills/struq/blocks/headers/menu-curtain.tsx +790 -0
  13. package/skills/struq/blocks/heroes/hero-framed.tsx +627 -0
  14. package/skills/struq/blocks/heroes/hero-index.tsx +855 -0
  15. package/skills/struq/blocks/heroes/hero-poster.tsx +1086 -0
  16. package/skills/struq/blocks/heroes/hero-split.tsx +685 -0
  17. package/skills/struq/blocks/heroes/hero-still.tsx +862 -0
  18. package/skills/struq/{recipes/components/struq → blocks/kit}/Cursor.tsx +1 -1
  19. package/skills/struq/{recipes/components/struq → blocks/kit}/HeroCanvas.tsx +4 -4
  20. package/skills/struq/{recipes/components/struq → blocks/kit}/HorizontalGallery.tsx +2 -2
  21. package/skills/struq/{recipes/components/struq → blocks/kit}/MagneticButton.tsx +1 -1
  22. package/skills/struq/{recipes/components/struq → blocks/kit}/MediaFrame.tsx +2 -2
  23. package/skills/struq/{recipes/components/struq → blocks/kit}/PinnedZoom.tsx +14 -4
  24. package/skills/struq/{recipes/components/struq → blocks/kit}/Reveal.tsx +1 -1
  25. package/skills/struq/{recipes/components/struq → blocks/kit}/SmoothScroll.tsx +1 -1
  26. package/skills/struq/{recipes/components/struq → blocks/kit}/SplitHeadline.tsx +1 -1
  27. package/skills/struq/blocks/kit/blocks.css +2102 -0
  28. package/skills/struq/blocks/kit/images.ts +17 -0
  29. package/skills/struq/blocks/kit/photo-read.ts +102 -0
  30. package/skills/struq/blocks/page-transitions/page-transition-gate.tsx +706 -0
  31. package/skills/struq/blocks/page-transitions/page-transition-slices.tsx +469 -0
  32. package/skills/struq/blocks/page-transitions/page-transition-stack.tsx +583 -0
  33. package/skills/struq/blocks/preloaders/preloader-gate.tsx +358 -0
  34. package/skills/struq/blocks/preloaders/preloader-slices-uncovered.ts +50 -0
  35. package/skills/struq/blocks/preloaders/preloader-slices.tsx +289 -0
  36. package/skills/struq/blocks/preloaders/preloader-stack.tsx +367 -0
  37. package/skills/struq/blocks/preloaders/preloader-wordmark.tsx +568 -0
  38. package/skills/struq/blocks/sections/about-studio.tsx +436 -0
  39. package/skills/struq/blocks/sections/approach.tsx +661 -0
  40. package/skills/struq/blocks/sections/contact-form.tsx +664 -0
  41. package/skills/struq/blocks/sections/cta-closing.tsx +763 -0
  42. package/skills/struq/blocks/sections/fanned-cards.tsx +547 -0
  43. package/skills/struq/blocks/sections/film-strip.tsx +385 -0
  44. package/skills/struq/blocks/sections/grid-assembly.tsx +616 -0
  45. package/skills/struq/blocks/sections/hover-list.tsx +467 -0
  46. package/skills/struq/blocks/sections/image-trail.tsx +432 -0
  47. package/skills/struq/blocks/sections/manifesto.tsx +691 -0
  48. package/skills/struq/blocks/sections/panel-accordion.tsx +380 -0
  49. package/skills/struq/blocks/sections/reveals.tsx +416 -0
  50. package/skills/struq/blocks/sections/split-pair.tsx +670 -0
  51. package/skills/struq/blocks/sections/sticky-chapters.tsx +256 -0
  52. package/skills/struq/blocks/sections/velocity-type.tsx +269 -0
  53. package/skills/struq/{cinematic/showpieces/toonstuk-fill-rows.tsx → blocks/showpieces/fill-rows.tsx} +1 -1
  54. package/skills/struq/{cinematic/showpieces/toonstuk-hero-opener.tsx → blocks/showpieces/hero-opener.tsx} +5 -5
  55. package/skills/struq/{cinematic/showpieces/toonstuk-image-to-fullbleed.tsx → blocks/showpieces/image-to-fullbleed.tsx} +16 -5
  56. package/skills/struq/blocks/showpieces/manifesto-scrub.tsx +48 -0
  57. package/skills/struq/{cinematic/showpieces/toonstuk-panel-wipe.tsx → blocks/showpieces/panel-wipe.tsx} +2 -2
  58. package/skills/struq/{cinematic/showpieces/toonstuk-pixel-resolve.tsx → blocks/showpieces/pixel-resolve.tsx} +1 -1
  59. package/skills/struq/{cinematic/showpieces/toonstuk-project-stack.tsx → blocks/showpieces/project-stack.tsx} +2 -2
  60. package/skills/struq/blocks/showpieces/scrub-connector.tsx +307 -0
  61. package/skills/struq/{cinematic/showpieces/toonstuk-wordmark-finale.tsx → blocks/showpieces/wordmark-finale.tsx} +1 -1
  62. package/skills/struq/blocks/transitions/zoom-through.tsx +613 -0
  63. package/skills/struq/canon/canon.json +627 -0
  64. package/skills/struq/cinematic/README.md +7 -18
  65. package/skills/struq/cinematic/examples/code/nextjs/app/components/LenisRoot.tsx +1 -1
  66. package/skills/struq/cinematic/examples/code/shared/styles.css +1 -1
  67. package/skills/struq/cinematic/examples/code/vite/src/LenisRoot.tsx +1 -1
  68. package/skills/struq/cinematic/references/01-core-mental-model.md +1 -1
  69. package/skills/struq/cinematic/references/02-vocabulary.md +1 -1
  70. package/skills/struq/cinematic/references/07-stack-integration.md +2 -2
  71. package/skills/struq/recipes/app/fonts.ts +12 -22
  72. package/skills/struq/recipes/app/globals.css +34 -177
  73. package/skills/struq/recipes/app/layout.tsx +13 -11
  74. package/skills/struq/references/craft.md +77 -0
  75. package/skills/struq/references/iconography.md +28 -230
  76. package/skills/struq/references/stack-targets.md +23 -74
  77. package/skills/struq/references/tells.md +52 -0
  78. package/skills/struq/references/triage.md +6 -7
  79. package/skills/struq/scripts/blocks.mjs +156 -0
  80. package/skills/struq/scripts/canon.mjs +106 -281
  81. package/skills/struq/scripts/check.mjs +92 -126
  82. package/skills/struq/scripts/images.mjs +2 -2
  83. package/skills/struq/scripts/log.mjs +6 -23
  84. package/skills/struq/scripts/tokens.mjs +222 -0
  85. package/skills/struq/cinematic/showpieces/README.md +0 -18
  86. package/skills/struq/cinematic/showpieces/toonstuk-manifesto-scrub.tsx +0 -81
  87. package/skills/struq/cinematic/showpieces/toonstuk-scrub-connector.tsx +0 -78
  88. package/skills/struq/references/anti-patterns.md +0 -330
  89. package/skills/struq/references/baseline-prompt.md +0 -122
  90. package/skills/struq/references/brand.md +0 -143
  91. package/skills/struq/references/brief-router.md +0 -218
  92. package/skills/struq/references/composition.md +0 -190
  93. package/skills/struq/references/depth-parallax.md +0 -235
  94. package/skills/struq/references/direction.md +0 -188
  95. package/skills/struq/references/feel-layer.md +0 -107
  96. package/skills/struq/references/gsap-api.md +0 -293
  97. package/skills/struq/references/hero-scenes.md +0 -107
  98. package/skills/struq/references/imagery.md +0 -125
  99. package/skills/struq/references/loaders.md +0 -287
  100. package/skills/struq/references/micro-interactions.md +0 -270
  101. package/skills/struq/references/mobile-composition.md +0 -70
  102. package/skills/struq/references/nav-header.md +0 -296
  103. package/skills/struq/references/niche-packets.md +0 -338
  104. package/skills/struq/references/page-architecture.md +0 -134
  105. package/skills/struq/references/page-entrances.md +0 -198
  106. package/skills/struq/references/performance.md +0 -235
  107. package/skills/struq/references/pinning-scrub.md +0 -340
  108. package/skills/struq/references/pitfalls.md +0 -290
  109. package/skills/struq/references/route-transitions.md +0 -281
  110. package/skills/struq/references/scaling.md +0 -151
  111. package/skills/struq/references/scroll-reveals.md +0 -279
  112. package/skills/struq/references/sections.md +0 -141
  113. package/skills/struq/references/seo.md +0 -219
  114. package/skills/struq/references/setup.md +0 -397
  115. package/skills/struq/references/showcase.md +0 -87
  116. package/skills/struq/references/struq-imagery.md +0 -107
  117. package/skills/struq/references/svg-motion.md +0 -390
  118. package/skills/struq/references/transitions.md +0 -160
  119. package/skills/struq/references/typography.md +0 -720
  120. package/skills/struq/references/vibe-presets.md +0 -287
  121. package/skills/struq/references/webgl-r3f.md +0 -274
  122. package/skills/struq/references/webgl-scenes.md +0 -593
  123. package/skills/struq/scripts/font-names.mjs +0 -40
  124. package/skills/struq/scripts/recipes.mjs +0 -135
  125. /package/skills/struq/{recipes/lib → blocks/kit}/gsap.ts +0 -0
  126. /package/skills/struq/{recipes/components/struq → blocks/kit}/scenes/contours.ts +0 -0
  127. /package/skills/struq/{recipes/components/struq → blocks/kit}/scenes/dots.ts +0 -0
  128. /package/skills/struq/{recipes/components/struq → blocks/kit}/scenes/ripple.ts +0 -0
  129. /package/skills/struq/{recipes/components/struq → blocks/kit}/scenes/types.ts +0 -0
@@ -11,7 +11,7 @@
11
11
  //
12
12
  // Leave it out for a genre where a custom cursor fights the job (a booking flow, a dense shop).
13
13
  import { useRef } from "react";
14
- import { gsap, useGSAP } from "@/lib/gsap";
14
+ import { gsap, useGSAP } from "./gsap";
15
15
 
16
16
  export function Cursor() {
17
17
  const root = useRef<HTMLDivElement>(null);
@@ -23,12 +23,12 @@
23
23
  // <div className="relative z-10"><h1 data-quiet>...</h1><p data-quiet>...</p></div>
24
24
  // </section>
25
25
  //
26
- // A scene from the Struq MCP (struq_achtergrond) or one of your own: write it as
27
- // components/struq/scenes/<name>.ts exporting createScene (see scenes/types.ts) and add it to SCENES.
26
+ // A scene of your own: write it as
27
+ // components/struq/kit/scenes/<name>.ts exporting createScene (see scenes/types.ts) and add it to SCENES.
28
28
  import Image from "next/image";
29
29
  import { useEffect, useRef } from "react";
30
- import { gsap } from "@/lib/gsap";
31
- import type { StruqImage } from "@/lib/struq-images";
30
+ import { gsap } from "./gsap";
31
+ import type { StruqImage } from "./images";
32
32
  import type { CreateScene, Palette } from "./scenes/types";
33
33
 
34
34
  const SCENES: Record<string, () => Promise<{ createScene: CreateScene }>> = {
@@ -11,8 +11,8 @@
11
11
  // />
12
12
  import Image from "next/image";
13
13
  import { useRef } from "react";
14
- import { gsap, useGSAP } from "@/lib/gsap";
15
- import type { StruqImage } from "@/lib/struq-images";
14
+ import { gsap, useGSAP } from "./gsap";
15
+ import type { StruqImage } from "./images";
16
16
 
17
17
  type Item = { image: StruqImage; title: string; text?: string };
18
18
 
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // <MagneticButton href="#reserveren">Reserveer een tafel</MagneticButton>
9
9
  import { useRef } from "react";
10
- import { gsap, useGSAP } from "@/lib/gsap";
10
+ import { gsap, useGSAP } from "./gsap";
11
11
 
12
12
  type Props = {
13
13
  children: React.ReactNode;
@@ -11,8 +11,8 @@
11
11
  // <MediaFrame image={images.card[2]} ratio="3/2" sizes="(min-width: 768px) 40vw, 100vw" />
12
12
  import Image from "next/image";
13
13
  import { useRef } from "react";
14
- import { gsap, useGSAP } from "@/lib/gsap";
15
- import type { StruqImage } from "@/lib/struq-images";
14
+ import { gsap, useGSAP } from "./gsap";
15
+ import type { StruqImage } from "./images";
16
16
 
17
17
  type Props = {
18
18
  image: StruqImage;
@@ -11,8 +11,8 @@
11
11
  // />
12
12
  import Image from "next/image";
13
13
  import { useRef } from "react";
14
- import { gsap, useGSAP } from "@/lib/gsap";
15
- import type { StruqImage } from "@/lib/struq-images";
14
+ import { gsap, useGSAP } from "./gsap";
15
+ import type { StruqImage } from "./images";
16
16
 
17
17
  type Props = {
18
18
  image: StruqImage;
@@ -31,16 +31,26 @@ export function PinnedZoom({ image, statement, closing, className = "" }: Props)
31
31
  const q = gsap.utils.selector(el);
32
32
  const mm = gsap.matchMedia();
33
33
  mm.add("(prefers-reduced-motion: no-preference)", () => {
34
- gsap.set(q("[data-zoom-frame]"), { clipPath: "inset(22% 30% 22% 30%)" });
34
+ // Two numbers drive the clip, never a tweened string: the browser shortens a symmetric inset to two
35
+ // values, GSAP pairs them with four end values, and two edges jump open in one frame.
36
+ const frame = q("[data-zoom-frame]")[0] as HTMLElement;
37
+ const clip = { y: 22, x: 30 };
38
+ const paint = () => {
39
+ frame.style.clipPath = `inset(${clip.y}% ${clip.x}% ${clip.y}% ${clip.x}%)`;
40
+ };
41
+ paint();
35
42
  gsap.set(q("[data-zoom-closing]"), { autoAlpha: 0, yPercent: 40 });
36
43
  const tl = gsap.timeline({
37
44
  defaults: { ease: "none" },
38
45
  scrollTrigger: { trigger: el, start: "top top", end: "+=160%", pin: true, scrub: 1 },
39
46
  });
40
- tl.to(q("[data-zoom-frame]"), { clipPath: "inset(0% 0% 0% 0%)", duration: 1 }, 0)
47
+ tl.to(clip, { y: 0, x: 0, duration: 1, onUpdate: paint }, 0)
41
48
  .fromTo(q("[data-zoom-photo]"), { scale: 1.35 }, { scale: 1, duration: 1 }, 0)
42
49
  .to(q("[data-zoom-statement]"), { yPercent: -60, autoAlpha: 0, duration: 0.45 }, 0)
43
50
  .to(q("[data-zoom-closing]"), { yPercent: 0, autoAlpha: 1, duration: 0.35 }, 0.62);
51
+ return () => {
52
+ frame.style.clipPath = "";
53
+ };
44
54
  });
45
55
  // Still version: the photo is full bleed from the start, so the statement turns light.
46
56
  mm.add("(prefers-reduced-motion: reduce)", () => {
@@ -11,7 +11,7 @@
11
11
  // Before hydration the children are hidden only when JavaScript runs (the `js` class from the
12
12
  // layout), and a CSS failsafe shows them after 3s if hydration never comes (globals.css).
13
13
  import { useRef } from "react";
14
- import { gsap, useGSAP } from "@/lib/gsap";
14
+ import { gsap, useGSAP } from "./gsap";
15
15
 
16
16
  type Props = {
17
17
  children: React.ReactNode;
@@ -12,7 +12,7 @@
12
12
  import Lenis from "lenis";
13
13
  import "lenis/dist/lenis.css";
14
14
  import { useEffect } from "react";
15
- import { gsap, ScrollTrigger } from "@/lib/gsap";
15
+ import { gsap, ScrollTrigger } from "./gsap";
16
16
 
17
17
  let current: Lenis | null = null;
18
18
 
@@ -9,7 +9,7 @@
9
9
  //
10
10
  // Pass plain text (or text with <em>): SplitText needs text nodes, not components.
11
11
  import { useRef } from "react";
12
- import { gsap, SplitText, useGSAP } from "@/lib/gsap";
12
+ import { gsap, SplitText, useGSAP } from "./gsap";
13
13
 
14
14
  type Props = {
15
15
  children: React.ReactNode;