@sarimarcus/content-sites-ui 0.1.0-rc.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ All packages in the platform release in lockstep; entries are per release version.
4
+
5
+ ## 0.1.0-rc.0 (2026-09-29)
6
+
7
+ First release candidate.
8
+
9
+ - Package scaffold: named subpath exports per folder and a `tailwind.css` entry that adds the package to Tailwind's sources (SLA-2734).
10
+ - `Container` (`./layout`), generated from the factory width contract (SLA-2421).
11
+ - `Icon` (`./primitives`): Lucide icons by kebab-case name, with `filled` and an optional `style` passthrough. `@lucide/astro` `^1.23.0` peer.
12
+ - `widths.css`: the named width tokens (`--container-shell`, `-content`, `-measure-wide`, `-measure`, `-deck`) as a Tailwind `@theme` block (SLA-2742).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Olivier Depiesse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # @sarimarcus/content-sites-ui
2
+
3
+ Universal Astro UI shared by every content site. Named entry points, one per folder: `primitives`,
4
+ `composed`, `editorial`, `affiliate`, `seo`, `layout`, `navigation` and `types`. For example,
5
+ `import { Container } from '@sarimarcus/content-sites-ui/layout'`. `src/internal` is never exported,
6
+ and `src/styles` holds the Tailwind entry.
7
+
8
+ Depends on `@sarimarcus/content-sites-core` (exact lockstep peer) and `@lucide/astro` (the `Icon` primitive). It carries no reader-visible copy:
9
+ text arrives through props and slots.
10
+
11
+ ## Tailwind
12
+
13
+ Tailwind v4 does not scan `node_modules`, so a site must import the package's source entry next to Tailwind:
14
+
15
+ ```css
16
+ @import "tailwindcss";
17
+ @import "@sarimarcus/content-sites-ui/tailwind.css";
18
+ ```
19
+
20
+ Without it, utility classes used only inside package components are silently missing from the site's CSS.
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@sarimarcus/content-sites-ui",
3
+ "version": "0.1.0-rc.0",
4
+ "description": "Universal Astro UI components, layout shell and design tokens shared by the content sites.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/Sarimarcus/content-sites-factory.git"
13
+ },
14
+ "engines": {
15
+ "node": ">=22.12.0"
16
+ },
17
+ "sideEffects": [
18
+ "**/*.css"
19
+ ],
20
+ "files": [
21
+ "src",
22
+ "dist",
23
+ "README.md",
24
+ "CHANGELOG.md",
25
+ "LICENSE"
26
+ ],
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ "./primitives": "./src/primitives/index.ts",
30
+ "./composed": "./src/composed/index.ts",
31
+ "./editorial": "./src/editorial/index.ts",
32
+ "./affiliate": "./src/affiliate/index.ts",
33
+ "./seo": "./src/seo/index.ts",
34
+ "./layout": "./src/layout/index.ts",
35
+ "./navigation": "./src/navigation/index.ts",
36
+ "./types": "./src/types/index.ts",
37
+ "./tailwind.css": "./src/styles/tailwind.css",
38
+ "./widths.css": "./src/styles/widths.css"
39
+ },
40
+ "peerDependencies": {
41
+ "@lucide/astro": "^1.23.0",
42
+ "astro": "^7.0.6",
43
+ "tailwindcss": "^4.1.18",
44
+ "@sarimarcus/content-sites-core": "0.1.0-rc.0"
45
+ }
46
+ }
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/affiliate. Components land here from SLA-2742 on.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/composed. Components land here from SLA-2742 on.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/editorial. Components land here from SLA-2742 on.
2
+ export {};
@@ -0,0 +1,30 @@
1
+ ---
2
+ // GENERATED by scripts/width-tokens/sync.mjs (factory root) — DO NOT EDIT.
3
+ //
4
+ // Canonical widths live in scripts/width-tokens/tokens.json (SLA-2421); the tokens themselves ship
5
+ // as @sarimarcus/content-sites-ui/widths.css. The sync --check gate rejects drift.
6
+ //
7
+ // `size` names a width token. Container is the sanctioned way to build a centred rail
8
+ // with the standard gutter. Two token names are deliberately NOT sizes here:
9
+ // • `shell` — chrome and full-bleed bands need a viewport-spanning outer element plus
10
+ // an inner rail, and Container emits one element that is both. Use max-w-shell on the
11
+ // inner rail instead. (The old `wide` variant had 0 uses in 1,126 call sites.)
12
+ // • `deck` — a standfirst owns no gutter and is usually left-aligned. Use max-w-deck.
13
+ interface Props {
14
+ class?: string;
15
+ as?: 'div' | 'section' | 'article' | 'main';
16
+ size?: 'content' | 'measure-wide' | 'measure';
17
+ }
18
+
19
+ const { class: className, as: Tag = 'div', size = 'content' } = Astro.props;
20
+
21
+ const sizeClasses: Record<NonNullable<Props['size']>, string> = {
22
+ content: 'max-w-content',
23
+ 'measure-wide': 'max-w-measure-wide',
24
+ measure: 'max-w-measure',
25
+ };
26
+ ---
27
+
28
+ <Tag class:list={['mx-auto w-full px-4 sm:px-6 lg:px-8', sizeClasses[size], className]}>
29
+ <slot />
30
+ </Tag>
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/layout.
2
+ export { default as Container } from './Container.astro';
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/navigation. Components land here from SLA-2742 on.
2
+ export {};
@@ -0,0 +1,47 @@
1
+ ---
2
+ /**
3
+ * Icon component — renders Lucide icons via @lucide/astro.
4
+ * All ~1500 Lucide icons available by kebab-case name. No manual registry needed.
5
+ *
6
+ * Props:
7
+ * name — kebab-case Lucide icon name (e.g. "map-pin", "arrow-right")
8
+ * class — Tailwind classes for sizing/color (default: "w-4 h-4")
9
+ * size — explicit px size (optional — prefer Tailwind sizing classes)
10
+ * filled — render as filled shape instead of outline (e.g. solid stars)
11
+ * style — inline style passthrough (e.g. a breadcrumb fading its separators by index)
12
+ */
13
+
14
+ import * as Icons from '@lucide/astro';
15
+
16
+ interface Props {
17
+ name: string;
18
+ class?: string;
19
+ size?: number;
20
+ filled?: boolean;
21
+ style?: string;
22
+ }
23
+
24
+ const { name, class: className = 'w-4 h-4', size, filled = false, style } = Astro.props;
25
+
26
+ // 'map-pin' → 'MapPin', 'arrow-right' → 'ArrowRight'
27
+ const pascalName = name
28
+ .split('-')
29
+ .map((s: string) => s.charAt(0).toUpperCase() + s.slice(1))
30
+ .join('');
31
+
32
+ type IconMap = typeof Icons;
33
+ const IconComponent = (Icons as IconMap)[pascalName as keyof IconMap] as any;
34
+
35
+ // filled=true: CSS overrides SVG presentation attributes (higher specificity than SVG attrs)
36
+ const resolvedClass = filled ? `${className} fill-current [stroke:none]` : className;
37
+ ---
38
+
39
+ {IconComponent && (
40
+ <IconComponent
41
+ class={resolvedClass}
42
+ {...(size !== undefined ? { size } : {})}
43
+ {...(style ? { style } : {})}
44
+ strokeWidth={2}
45
+ aria-hidden="true"
46
+ />
47
+ )}
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/primitives.
2
+ export { default as Icon } from './Icon.astro';
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/seo. Components land here from SLA-2742 on.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ /* Tailwind v4 skips node_modules during class detection. Consumers @import this file so the
2
+ package's own templates are scanned: @import "@sarimarcus/content-sites-ui/tailwind.css"; */
3
+ @source "..";
@@ -0,0 +1,9 @@
1
+ /* GENERATED by scripts/width-tokens/sync.mjs from scripts/width-tokens/tokens.json — DO NOT EDIT.
2
+ A site imports it where its width region used to be, so the theme variables keep their order. */
3
+ @theme {
4
+ --container-shell: 80rem; /* 1280 — was max-w-7xl */
5
+ --container-content: 72rem; /* 1152 — was max-w-6xl */
6
+ --container-measure-wide: 56rem; /* 896 — was max-w-4xl */
7
+ --container-measure: 48rem; /* 768 — was max-w-3xl */
8
+ --container-deck: 42rem; /* 672 — was max-w-2xl */
9
+ }
@@ -0,0 +1,2 @@
1
+ // Public surface of @sarimarcus/content-sites-ui/types. Components land here from SLA-2742 on.
2
+ export {};