@se-studio/project-build 1.0.131 → 1.0.133

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 (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +13 -14
  3. package/package.json +2 -4
  4. package/dist/management/sync-skills.d.ts +0 -4
  5. package/dist/management/sync-skills.d.ts.map +0 -1
  6. package/dist/management/sync-skills.js +0 -97
  7. package/dist/management/sync-skills.js.map +0 -1
  8. package/dist/seskills.d.ts +0 -9
  9. package/dist/seskills.d.ts.map +0 -1
  10. package/dist/seskills.js +0 -32
  11. package/dist/seskills.js.map +0 -1
  12. package/skills/contentful-cms/alt-text-audit/SKILL.md +0 -60
  13. package/skills/contentful-cms/cms-guidelines/README.md +0 -166
  14. package/skills/contentful-cms/cms-guidelines/colour-hint-prompt.md +0 -77
  15. package/skills/contentful-cms/cms-guidelines/evaluation-prompt.md +0 -84
  16. package/skills/contentful-cms/cms-guidelines/generate-component-guidelines.md +0 -126
  17. package/skills/contentful-cms/cms-guidelines/generation-prompt.md +0 -231
  18. package/skills/contentful-cms/cms-guidelines/html-component-authoring.md +0 -401
  19. package/skills/contentful-cms/cms-guidelines/validation-prompt.md +0 -170
  20. package/skills/contentful-cms/cms-guidelines/variant-loop.md +0 -189
  21. package/skills/contentful-cms/cms-guidelines/variant-proposal-prompt.md +0 -131
  22. package/skills/contentful-cms/core/SKILL.md +0 -793
  23. package/skills/contentful-cms/generate-all-guidelines/SKILL.md +0 -313
  24. package/skills/contentful-cms/generate-cms-guidelines/SKILL.md +0 -313
  25. package/skills/contentful-cms/image-guide/SKILL.md +0 -240
  26. package/skills/contentful-cms/manifest.json +0 -11
  27. package/skills/contentful-cms/navigation/SKILL.md +0 -23
  28. package/skills/contentful-cms/rich-text/SKILL.md +0 -96
  29. package/skills/contentful-cms/schema-org/SKILL.md +0 -74
  30. package/skills/contentful-cms/screenshots/SKILL.md +0 -46
  31. package/skills/contentful-cms/seo-descriptions/SKILL.md +0 -54
  32. package/skills/contentful-cms/templates/SKILL.md +0 -21
  33. package/skills/contentful-cms/update-cms-guidelines/SKILL.md +0 -348
  34. package/skills/se-marketing-sites/cms-routes-and-appshared/SKILL.md +0 -99
  35. package/skills/se-marketing-sites/create-collection/SKILL.md +0 -295
  36. package/skills/se-marketing-sites/create-component/SKILL.md +0 -250
  37. package/skills/se-marketing-sites/create-page/SKILL.md +0 -129
  38. package/skills/se-marketing-sites/curate-showcase-mocks/SKILL.md +0 -343
  39. package/skills/se-marketing-sites/handling-media/SKILL.md +0 -195
  40. package/skills/se-marketing-sites/lib-cms-structure/SKILL.md +0 -83
  41. package/skills/se-marketing-sites/register-cms-features/SKILL.md +0 -95
  42. package/skills/se-marketing-sites/styling-system/SKILL.md +0 -122
@@ -1,95 +0,0 @@
1
- ---
2
- name: register-cms-features
3
- description: Guide for registering new components, collections, and external integrations in the CMS configuration (src/lib/registrations.ts).
4
- license: Private
5
- metadata:
6
- author: se-core-product
7
- version: "1.0.0"
8
- ---
9
-
10
- # Registering CMS Features
11
-
12
- The file `src/lib/registrations.ts` is where you add new components, collections, and external components. It exports three **arrays** (not Records): `componentRegistrationsList`, `collectionRegistrationsList`, `externalComponentRegistrationsList`. The **name is defined only in each registration** (in the `defineComponent` / `defineCollection` / `defineExternalComponent` call). The `cms.ts` module imports these arrays, uses `buildComponentRecord` / `buildCollectionRecord` / `buildExternalRecord` to build Records keyed by `name` (with exhaustiveness checks), then passes those Records to the core-ui build*Maps helpers. Add new registrations to the appropriate *List array in `registrations.ts`.
13
-
14
- ## How Registration Works
15
-
16
- The system uses registration objects created via `defineComponent`, `defineCollection`, or `defineExternalComponent` (from `@/lib/define-cms`). Each object contains:
17
- 1. **Name**: Matches the Contentful content type ID exactly. Defined **once** in the registration (not as a Record key).
18
- 2. **Renderer**: The React component to render.
19
- 3. **Used Fields**: Which fields from the content model are used.
20
- 4. **Mock Data**: Sample data for the styleguide/showcase.
21
-
22
- ## Registering a New Component
23
-
24
- 1. **Import the Registration**:
25
- At the top of `src/lib/registrations.ts`, import your component's registration export.
26
-
27
- ```typescript
28
- import { MyNewComponentRegistration } from '@/project/components/MyNewComponent';
29
- ```
30
-
31
- 2. **Add to `componentRegistrationsList`**:
32
- Find the `componentRegistrationsList` array in `registrations.ts` and add your component.
33
-
34
- ```typescript
35
- export const componentRegistrationsList = [
36
- HeroRegistration,
37
- // ...
38
- MyNewComponentRegistration, // Add this
39
- ] as const;
40
- ```
41
-
42
- *Order does not matter for functionality, but logical grouping is helpful. Missing a CMS type causes a type error in `cms.ts` when `buildComponentRecord(componentRegistrationsList)` is called.*
43
-
44
- ## Registering a New Collection
45
-
46
- 1. **Import the Registration** in `src/lib/registrations.ts`:
47
-
48
- ```typescript
49
- import { MyCollectionRegistration } from '@/project/collections/MyCollection';
50
- ```
51
-
52
- 2. **Add to `collectionRegistrationsList`** in `registrations.ts`:
53
-
54
- ```typescript
55
- export const collectionRegistrationsList = [
56
- CardGridRegistration,
57
- // ...
58
- MyCollectionRegistration, // Add this
59
- ] as const;
60
- ```
61
-
62
- ## Adding External Components
63
-
64
- External components (like 3rd party forms or iframes) use a separate list in `src/lib/registrations.ts`.
65
-
66
- 1. **Import**:
67
- ```typescript
68
- import { MyExternalWidgetRegistration } from '@/project/externalComponents/MyExternalWidget';
69
- ```
70
-
71
- 2. **Add to `externalComponentRegistrationsList`** in `registrations.ts`:
72
- ```typescript
73
- export const externalComponentRegistrationsList = [
74
- ExternalIFrameRegistration,
75
- MyExternalWidgetRegistration,
76
- ] as const;
77
- ```
78
-
79
- ## Extending Type Definitions
80
-
81
- If you introduce new Color names, Button variants, or other enumerations, update the type definitions in `src/lib/cms.ts` (types are defined there; registrations live in `registrations.ts`):
82
-
83
- ```typescript
84
- export type CmsColourName = NonNullable<TypeComponentFields['backgroundColour']>['values'];
85
- // Add or modify if types are not automatically generated from Contentful
86
- ```
87
-
88
- **Note**: Most types are generated automatically into `@/generated/types` by the `type-gen` script. You typically don't need to manually edit types unless you are defining project-specific overrides.
89
-
90
- ## The Showcase
91
-
92
- Registering a component automatically adds it to the CMS Showcase (usually available at `/cms/showcase` in development). This allows you to view the component in isolation using its mock data.
93
-
94
- * Ensure your `mock` object in the registration is complete and realistic.
95
- * The showcase helps verify that `usedFields` and `UnusedChecker` are working correctly.
@@ -1,122 +0,0 @@
1
- ---
2
- name: styling-system
3
- description: Reference guide for the marketing site styling system, including typography, colors, grids, and RTF classes.
4
- license: Private
5
- metadata:
6
- author: se-core-product
7
- version: "1.1.0"
8
- ---
9
-
10
- # Styling System
11
-
12
- This project uses a customized Tailwind CSS setup where the configuration is driven by `tailwind.config.json` in each app. This JSON file acts as the source of truth for design tokens, including colors, typography, spacing, and breakpoints.
13
-
14
- ## Configuration Source
15
-
16
- The `tailwind.config.json` file in your app's root directory defines the following:
17
-
18
- * **`colorOptions`**: Defines the project's color palette.
19
- * **`fontTable`**: Defines typography styles, responsive scaling, and font families.
20
- * **`sizes`**: Defines breakpoints, grid columns, gaps, and margins.
21
-
22
- These configurations are processed by the build system to generate utility classes and TypeScript helpers.
23
-
24
- ## Typography
25
-
26
- Typography utility classes (e.g., `h1`, `h2`, `p1`, `p2`) are automatically generated from the `fontTable` in `tailwind.config.json`.
27
-
28
- ### generated Utilities
29
-
30
- Classes are generated for each key in `fontTable.styles`. Common keys include:
31
-
32
- * **Headings**: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
33
- * **Body**: `p1`, `p2`, `p3`, `p4`
34
- * **Special**: `quote`, `button`, `nav`, etc. (varies by project)
35
-
36
- Styles are responsive and scale automatically based on the breakpoints defined in the config (e.g., `laptop`, `desktop`).
37
-
38
- ### Best Practice: Dynamic Sizing
39
-
40
- Use `getSizingInformation(index)` from `@/lib/SizingInformation` to get **Element** (or **ChildElement** for items inside a collection) and typography classes. Use **Element** for the single main heading of the block; apply a class from `sizingInformation` (e.g. `sizingInformation.h1`). **preHeading** and **postHeading** must be rendered as **&lt;p&gt;** with typography classes (e.g. `sizingInformation.p`), not as heading elements.
41
-
42
- ```typescript
43
- import { getSizingInformation } from '@/lib/SizingInformation';
44
-
45
- // Example usage in a component renderer
46
- const { Element, sizingInformation } = getSizingInformation(index);
47
- <Element className={sizingInformation.h1}>{title}</Element>
48
- ```
49
-
50
- For embedded content (e.g. inside rich text), pass `embedded: true` as the second argument.
51
-
52
- ## Colors
53
-
54
- Colors are defined in `colorOptions` within `tailwind.config.json`. The build system generates TypeScript helpers in `@/generated/colors` to access these colors safely.
55
-
56
- ### Helper Functions
57
-
58
- 1. **`lookupColourString(colorName, property)`**:
59
- Get a single class for a specific property.
60
- ```typescript
61
- // Returns "text-primary-blue" (if 'Primary Blue' exists in config)
62
- lookupColourString('Primary Blue', 'text')
63
- // Returns "bg-light-gray" (if 'Light Gray' exists in config)
64
- lookupColourString('Light Gray', 'bg')
65
- ```
66
-
67
- 2. **`lookupColourClassNames(bgColor, textColor)`**:
68
- Get background AND text classes, handling automatic contrast if text color is omitted (based on `colorOpposites` in config).
69
- ```typescript
70
- // Returns "bg-primary-blue text-white" (if White is opposite of Primary Blue)
71
- lookupColourClassNames('Primary Blue')
72
- ```
73
-
74
- ## Grid System
75
-
76
- The grid system is defined in the `sizes` object of `tailwind.config.json`. It specifies the number of columns, margins, and gaps for each breakpoint.
77
-
78
- ### Standard Breakpoints
79
-
80
- While configurable, most projects use:
81
- * `mobile`: Default (0px+)
82
- * `tablet`: ~768px+
83
- * `laptop`: ~1024px+
84
- * `desktop`: ~1440px+
85
-
86
- ### Layout Helpers
87
-
88
- Common layout patterns using Tailwind grid utilities:
89
-
90
- * **Full Width**: `col-span-full`
91
- * **Centered Content**: `col-span-full laptop:col-start-2 laptop:col-span-10` (assuming 12 columns on laptop)
92
- * **Split 50/50**:
93
- * Left: `col-span-full laptop:col-span-6`
94
- * Right: `col-span-full laptop:col-span-6`
95
-
96
- ## Rich Text (RTF) Classes
97
-
98
- Rich text styling is handled via custom utility classes defined in `src/app/globals.css`. These classes map raw HTML elements (from the CMS rich text field) to the project's typography utilities.
99
-
100
- Common conventions for RTF classes (check your specific `globals.css`):
101
-
102
- * **`.rtf-standard` / `.content-rich-text`**: Default styling for body content.
103
- * **`.rtf-legal`**: Styling for terms and conditions (often smaller text, decimal lists).
104
- * **`.rtf-article`**: Editorial styling (often larger text, specific spacing).
105
- * **`.rtf-core`**: Minimal styling reset.
106
-
107
- **Usage**:
108
- Wrap the `RtfOrString` component with the appropriate class:
109
- ```tsx
110
- <div className="rtf-standard">
111
- <RtfOrString data={richTextData} />
112
- </div>
113
- ```
114
-
115
- ## Global Styles
116
-
117
- Project-specific global styles, animations, and custom utility classes are located in `src/app/globals.css`. This file imports the generated Tailwind CSS and defines:
118
-
119
- * Root variables (if any)
120
- * Animation keyframes
121
- * Custom component classes (e.g., `.btn-primary`)
122
- * Rich Text Formatting classes