@se-studio/skills 1.7.10 → 1.7.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.7.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 1e65f12: Generated theme lookups return `undefined` (and warn when `LOG_CMS=1`) instead of throwing on unknown CMS names. `lookupTextStyleClassName` is now `string | undefined` — treat the result as optional, do not concatenate it. Tailwind `@source` should scan core-ui `src/**/*.tsx` plus `dist/**/*.js`, not the whole `dist` tree.
8
+
3
9
  ## 1.7.10
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,7 +55,9 @@ Route files are thin wrappers. Data-fetching and rendering logic lives in `src/a
55
55
  Each route page extracts params and delegates to the appropriate appShared function:
56
56
 
57
57
  ```typescript
58
+ import { joinCmsPathSegments } from '@se-studio/core-ui';
58
59
  import type { ResolvingMetadata } from 'next';
60
+ import { notFound } from 'next/navigation';
59
61
  import { generatePage, generatePageMetadata } from '@/appShared/pageShared';
60
62
 
61
63
  export function generateStaticParams() {
@@ -64,8 +66,11 @@ export function generateStaticParams() {
64
66
 
65
67
  async function extractDetails(props: PageProps<'/[level1]'>) {
66
68
  const params = await props.params;
67
- const { level1 } = params;
68
- return { slug: level1, path: `/${level1}/` };
69
+ const slug = joinCmsPathSegments(params.level1);
70
+ if (!slug) {
71
+ notFound();
72
+ }
73
+ return { slug, path: `/${slug}/` };
69
74
  }
70
75
 
71
76
  export async function generateMetadata(props: PageProps<'/[level1]'>, parent: ResolvingMetadata) {
@@ -134,6 +139,7 @@ Direct visits to a variant's own CMS URL (normal `[...slugs]` route) continue to
134
139
 
135
140
  ```typescript
136
141
  import { findCanonicalPath } from '@se-studio/ab-testing';
142
+ import { joinCmsPathSegments } from '@se-studio/core-ui';
137
143
  import type { ResolvingMetadata } from 'next';
138
144
  import { notFound } from 'next/navigation';
139
145
  import { testsByPath } from '@/generated/abTests';
@@ -155,7 +161,10 @@ export function generateStaticParams() {
155
161
 
156
162
  async function extractDetails(props: PageProps<'/page-test/[...slugs]'>) {
157
163
  const params = await props.params;
158
- const slug = params.slugs.join('/');
164
+ const slug = joinCmsPathSegments(params.slugs);
165
+ if (!slug) {
166
+ notFound();
167
+ }
159
168
  return { slug, path: `/page-test/${slug}/` };
160
169
  }
161
170
 
@@ -17,6 +17,19 @@ The `tailwind.config.json` file in your app's root directory defines the followi
17
17
 
18
18
  These configurations are processed by the build system to generate utility classes and TypeScript helpers.
19
19
 
20
+ ## Tailwind `@source` (core-ui)
21
+
22
+ In `src/app/globals.css`:
23
+
24
+ ```css
25
+ @source "../../node_modules/@se-studio/core-ui/src/**/*.tsx";
26
+ @source "../../node_modules/@se-studio/core-ui/dist/**/*.js";
27
+ ```
28
+
29
+ Do **not** `@source` the whole `dist` tree — that includes `*.map` source maps and makes `next dest` heavier. Scan `src/**/*.tsx` so monorepo workspace links pick up showcase/media-library classes without a core-ui rebuild; on npm that glob is a no-op (`src` is not published). Scan `dist/**/*.js` for the compiled package.
30
+
31
+ Unknown CMS colour / text-style names must not throw; generated lookups return `undefined`. Set `LOG_CMS=1` to log misspelled names.
32
+
20
33
  ## Typography
21
34
 
22
35
  Typography utility classes (e.g., `h1`, `h2`, `p1`, `p2`) are automatically generated from the `fontTable` in `tailwind.config.json`.
@@ -66,6 +79,7 @@ Colors are defined in `colorOptions` within `tailwind.config.json`. The build sy
66
79
  // Returns "bg-primary-blue text-white" (if White is opposite of Primary Blue)
67
80
  lookupColourClassNames('Primary Blue')
68
81
  ```
82
+ Unknown CMS names return `undefined` (no page crash). Set `LOG_CMS=1` to warn.
69
83
 
70
84
  ## Grid System
71
85