@homepages/template-kit 0.0.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/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @homepages/template-kit
2
+
3
+ The authoring surface for HomePages marketing-section templates: schema system,
4
+ contract primitives, theme tokens, and the `template-kit` CLI.
5
+
6
+ **Status: 0.0.x — package skeleton.** The authoring surface is still being
7
+ extracted, and the CLI commands are not implemented yet. What exists today is
8
+ the published package boundary and its hygiene gates.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @homepages/template-kit react react-dom
14
+ ```
15
+
16
+ React 19 is a **peer dependency** — the kit never bundles its own copy.
17
+
18
+ ## Exports
19
+
20
+ | Entry | Use |
21
+ |---|---|
22
+ | `@homepages/template-kit` | Authoring API (schema, primitives) |
23
+ | `@homepages/template-kit/styles.css` | Tailwind v4 theme tokens + kit source registration |
24
+ | `@homepages/template-kit/eslint` | ESLint flat-config preset |
25
+ | `@homepages/template-kit/tsconfig` | tsconfig preset (`"extends"`) |
26
+
27
+ The CSS entry does **not** import Tailwind. Import it *after* Tailwind in your entry:
28
+
29
+ ```css
30
+ @import "tailwindcss";
31
+ @import "@homepages/template-kit/styles.css";
32
+ ```
33
+
34
+ Two `@import "tailwindcss"` in one graph double-emits preflight.
35
+
36
+ ## Development
37
+
38
+ ```bash
39
+ npm install
40
+ npm run check # typecheck + lint + test + build + publint + attw + consumer gate
41
+ ```
42
+
43
+ `npm run verify:consumer` is the boundary gate: it packs the kit, installs the
44
+ tarball into a scratch project, and asserts that types resolve, that Tailwind's
45
+ cross-package `@source` scan reaches the shipped `dist`, and that only one React
46
+ ends up in the tree. Run it before every release.
47
+
48
+ ## Releasing
49
+
50
+ Versioning and changelogs go through [changesets](https://github.com/changesets/changesets).
51
+ Publishing runs from CI via npm **trusted publishing (OIDC)** — there is no npm
52
+ token anywhere, and adding one would silently disable OIDC.
53
+
54
+ 1. **Describe your change** on the feature branch:
55
+ ```bash
56
+ npm run changeset
57
+ ```
58
+ Pick the bump (patch / minor / major) and write a human-readable summary —
59
+ it becomes the changelog entry that template authors read. Commit the
60
+ generated file in `.changeset/`.
61
+
62
+ 2. **Merge to `main`.** The release workflow opens (or updates) a
63
+ **"Version Packages"** PR that consumes the changeset files, bumps
64
+ `package.json`, and writes `CHANGELOG.md`.
65
+
66
+ 3. **Merge the Version Packages PR.** That merge publishes to npm.
67
+
68
+ Semver contract: the platform vocabulary (slot types, sources, transforms,
69
+ tokens) is closed and versioned. A breaking change to it is a **major**; a new
70
+ optional capability is a **minor**.
71
+
72
+ ### Bumping the version by hand
73
+
74
+ Don't. `KIT_VERSION` in `src/index.ts` is asserted against `package.json` by the
75
+ test suite, and changesets owns `package.json`'s version — so a hand-bump fails
76
+ CI. Update `KIT_VERSION` only in the Version Packages PR, alongside the bump.
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.js ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ import { t as KIT_VERSION } from "./src-CrdHXijV.js";
3
+
4
+ //#region src/cli/index.ts
5
+ /**
6
+ * Commands the CLI will grow, declared now so they exit 1 with a real message
7
+ * instead of "unknown command". Deliberately carries no issue IDs: this text is
8
+ * printed to template authors outside HomePages. The command → issue map is in
9
+ * CLAUDE.md, which does not ship in the tarball.
10
+ */
11
+ const NOT_IMPLEMENTED = /* @__PURE__ */ new Set([
12
+ "dev",
13
+ "check",
14
+ "pack",
15
+ "link",
16
+ "unlink",
17
+ "status"
18
+ ]);
19
+ const USAGE = `template-kit ${KIT_VERSION}
20
+
21
+ Usage: template-kit <command>
22
+
23
+ Commands:
24
+ dev Local preview server (not implemented yet)
25
+ check Typecheck, lint, and validate (not implemented yet)
26
+ pack Build the submission artifact (not implemented yet)
27
+ link Overlay a local kit build (not implemented yet)
28
+ unlink Remove the overlay (not implemented yet)
29
+ status Show overlay state (not implemented yet)
30
+
31
+ Options:
32
+ -v, --version Print the kit version
33
+ -h, --help Print this message
34
+ `;
35
+ function main(argv) {
36
+ const cmd = argv[0];
37
+ if (cmd === "--version" || cmd === "-v") {
38
+ process.stdout.write(`${KIT_VERSION}\n`);
39
+ return 0;
40
+ }
41
+ if (cmd === void 0 || cmd === "--help" || cmd === "-h") {
42
+ process.stdout.write(USAGE);
43
+ return 0;
44
+ }
45
+ if (NOT_IMPLEMENTED.has(cmd)) {
46
+ process.stderr.write(`template-kit ${cmd}: not implemented yet.\nThis 0.0.x release ships the package skeleton only.\n`);
47
+ return 1;
48
+ }
49
+ process.stderr.write(`template-kit: unknown command '${cmd}'\n\n${USAGE}`);
50
+ return 1;
51
+ }
52
+ process.exit(main(process.argv.slice(2)));
53
+
54
+ //#endregion
@@ -0,0 +1,10 @@
1
+ import { Linter } from "eslint";
2
+ //#region src/eslint.d.ts
3
+ /**
4
+ * The HomePages template-authoring ESLint preset.
5
+ * Rules arrive with the surface they govern (schema, primitives, determinism bans).
6
+ * Shipped now, empty, so a workspace's flat config can reference it from 0.0.x.
7
+ */
8
+ declare const templateKitConfig: Linter.Config[];
9
+ //#endregion
10
+ export { templateKitConfig as default, templateKitConfig };
package/dist/eslint.js ADDED
@@ -0,0 +1,13 @@
1
+ //#region src/eslint.ts
2
+ /**
3
+ * The HomePages template-authoring ESLint preset.
4
+ * Rules arrive with the surface they govern (schema, primitives, determinism bans).
5
+ * Shipped now, empty, so a workspace's flat config can reference it from 0.0.x.
6
+ */
7
+ const templateKitConfig = [{
8
+ name: "@homepages/template-kit/base",
9
+ rules: {}
10
+ }];
11
+
12
+ //#endregion
13
+ export { templateKitConfig as default, templateKitConfig };
@@ -0,0 +1,16 @@
1
+ //#region src/kit-smoke.d.ts
2
+ /**
3
+ * Boundary probe, not authoring surface. Its only job is to make the package
4
+ * boundary testable: React stays a peer, types resolve, and Tailwind's
5
+ * cross-package @source scan reaches this file's compiled output.
6
+ * Removed when the real contract primitives land.
7
+ */
8
+ declare function KitSmoke({ label }: {
9
+ label: string;
10
+ }): import("react").JSX.Element;
11
+ //#endregion
12
+ //#region src/index.d.ts
13
+ /** The published version of this kit. Kept in sync with package.json by src/index.test.tsx. */
14
+ declare const KIT_VERSION = "0.0.0";
15
+ //#endregion
16
+ export { KIT_VERSION, KitSmoke };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { n as KitSmoke, t as KIT_VERSION } from "./src-CrdHXijV.js";
2
+
3
+ export { KIT_VERSION, KitSmoke };
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+
3
+ //#region src/kit-smoke.tsx
4
+ /**
5
+ * Boundary probe, not authoring surface. Its only job is to make the package
6
+ * boundary testable: React stays a peer, types resolve, and Tailwind's
7
+ * cross-package @source scan reaches this file's compiled output.
8
+ * Removed when the real contract primitives land.
9
+ */
10
+ function KitSmoke({ label }) {
11
+ return /* @__PURE__ */ jsx("span", {
12
+ className: "bg-kit-smoke uppercase tracking-[0.4275em]",
13
+ children: label
14
+ });
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/index.ts
19
+ /** The published version of this kit. Kept in sync with package.json by src/index.test.tsx. */
20
+ const KIT_VERSION = "0.0.0";
21
+
22
+ //#endregion
23
+ export { KitSmoke as n, KIT_VERSION as t };
@@ -0,0 +1,16 @@
1
+ /*
2
+ * @homepages/template-kit — theme tokens + kit source registration.
3
+ *
4
+ * Consumers import this AFTER `@import "tailwindcss";` in their own entry.
5
+ * This file must NOT import Tailwind itself: two imports in one graph
6
+ * double-emit preflight.
7
+ *
8
+ * The @source below is resolved relative to THIS FILE'S SHIPPED LOCATION
9
+ * (dist/styles.css), registering the kit's compiled JS for class scanning.
10
+ * It also overrides Tailwind's default node_modules exclusion.
11
+ */
12
+ @source "./**/*.js";
13
+
14
+ @theme {
15
+ --color-kit-smoke: oklch(0.55 0.2 275);
16
+ }
package/docs/INDEX.md ADDED
@@ -0,0 +1,19 @@
1
+ ---
2
+ purpose: Router for the docs corpus that ships inside the @homepages/template-kit npm package.
3
+ status: living
4
+ related: []
5
+ updated: 2026-07-13
6
+ ---
7
+ # template-kit docs — router
8
+
9
+ This tree **ships in the npm tarball** (`docs/` is listed in `package.json`'s
10
+ `files`), so it is written for an outside audience: template authors and their
11
+ LLM agents, reading it from inside `node_modules`. Keep it free of internal-only
12
+ detail.
13
+
14
+ Cross-service contracts, product, and data model live in `../../docs/` (umbrella)
15
+ and are not shipped.
16
+
17
+ | Doc | What it covers | Read when you're touching... |
18
+ |---|---|---|
19
+ | `llms.txt` | Machine-readable index of this corpus for an agent working inside an installed kit | orienting an agent in a consuming workspace |
package/docs/llms.txt ADDED
@@ -0,0 +1,13 @@
1
+ # @homepages/template-kit
2
+
3
+ > The authoring kit for HomePages marketing-section templates. This corpus ships
4
+ > inside the npm package so an agent can read it locally, versioned in lockstep
5
+ > with the code it describes.
6
+
7
+ Status: 0.0.x package skeleton. The authoring corpus (task recipes, rule-id
8
+ reference, vocabulary) arrives with the surface it documents: the schema system,
9
+ the contract primitives and theme tokens, and the `check` command's rule-ids.
10
+
11
+ ## Docs
12
+
13
+ - [README](../README.md): install, exports, and the release flow.
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@homepages/template-kit",
3
+ "version": "0.0.0",
4
+ "description": "Authoring kit for HomePages marketing-section templates: schema system, contract primitives, theme tokens, and the template-kit CLI.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20.0.0"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/falktravis/template-kit.git"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "docs",
20
+ "tsconfig.json"
21
+ ],
22
+ "bin": {
23
+ "template-kit": "dist/cli.js"
24
+ },
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./eslint": {
31
+ "types": "./dist/eslint.d.ts",
32
+ "default": "./dist/eslint.js"
33
+ },
34
+ "./styles.css": "./dist/styles.css",
35
+ "./tsconfig": "./tsconfig.json",
36
+ "./package.json": "./package.json"
37
+ },
38
+ "sideEffects": [
39
+ "*.css"
40
+ ],
41
+ "scripts": {
42
+ "build": "tsdown",
43
+ "typecheck": "tsc --noEmit",
44
+ "lint": "eslint .",
45
+ "test": "node --import tsx --test src/*.test.tsx src/cli/*.test.ts",
46
+ "lint:pkg": "publint --strict && attw --pack . --profile esm-only --exclude-entrypoints styles.css",
47
+ "verify:consumer": "node scripts/verify-consumer.mjs",
48
+ "check": "npm run typecheck && npm run lint && npm run build && npm run test && npm run lint:pkg && npm run verify:consumer",
49
+ "changeset": "changeset",
50
+ "release": "changeset publish"
51
+ },
52
+ "peerDependencies": {
53
+ "eslint": "^9.0.0",
54
+ "react": "^19.0.0",
55
+ "react-dom": "^19.0.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "eslint": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "devDependencies": {
63
+ "@arethetypeswrong/cli": "^0.18.5",
64
+ "@changesets/cli": "^2.29.8",
65
+ "@eslint/js": "^9.39.4",
66
+ "@tailwindcss/cli": "^4.3.0",
67
+ "@types/node": "^20.17.10",
68
+ "@types/react": "^19.0.0",
69
+ "@types/react-dom": "^19.0.0",
70
+ "eslint": "^9.39.4",
71
+ "publint": "^0.3.21",
72
+ "react": "^19.0.0",
73
+ "react-dom": "^19.0.0",
74
+ "tailwindcss": "^4.3.0",
75
+ "tsdown": "0.22.7",
76
+ "tsx": "^4.19.2",
77
+ "typescript": "^5.7.2",
78
+ "typescript-eslint": "^8.60.1"
79
+ }
80
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "lib": ["ES2022", "DOM"],
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "noUncheckedIndexedAccess": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "isolatedModules": true,
13
+ "resolveJsonModule": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noEmit": true
16
+ },
17
+ "exclude": ["node_modules", "dist"]
18
+ }