@openelement/create 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +32 -27
- package/package.json +1 -1
- package/src/cli.js +11 -2
- package/src/install-command.d.ts +18 -10
- package/src/install-command.js +19 -12
- package/src/version.js +1 -1
- package/templates/README.tmpl +25 -10
- package/templates/app/components/page-404.tsx.tmpl +3 -2
- package/templates/app/islands/live-timer.css +4 -1
- package/templates/app/routes/404.tsx.tmpl +6 -2
- package/templates/app/styles/theme.css +13 -4
- package/templates/openelement.config.ts.tmpl +10 -8
- package/templates/package.json.tmpl +6 -8
package/README.md
CHANGED
|
@@ -4,21 +4,22 @@ Project scaffolding CLI for openElement applications.
|
|
|
4
4
|
|
|
5
5
|
Docs and guides: <https://openelement.org>.
|
|
6
6
|
|
|
7
|
-
> 1.0
|
|
8
|
-
>
|
|
9
|
-
> `npm view @openelement/create dist-tags`); `latest`
|
|
10
|
-
>
|
|
7
|
+
> 1.0 line: the supported creation entry for Element and Router. The published
|
|
8
|
+
> npm versions and dist-tags are registry truth (query them with
|
|
9
|
+
> `npm view @openelement/create dist-tags`); `latest` rides the 1.0 line since
|
|
10
|
+
> the alpha.11 ruling, so a versionless install resolves the current 1.0
|
|
11
|
+
> prerelease.
|
|
11
12
|
|
|
12
13
|
`@openelement/create` generates a new openElement project from ONE template —
|
|
13
14
|
the showcase starter: a static-first landing page with two islands, a fully
|
|
14
|
-
static About page, an `/api/ping` server route, and a
|
|
15
|
-
sheet (
|
|
16
|
-
Node/pnpm project.
|
|
15
|
+
static About page, an `/api/ping` server route, and a Tailwind-ON design-token
|
|
16
|
+
sheet (the `@theme` role table; one template, no variants). The generated
|
|
17
|
+
project is a plain Node/pnpm project.
|
|
17
18
|
|
|
18
19
|
## Usage (1.0 Alpha)
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
|
-
npm create @openelement
|
|
22
|
+
npm create @openelement my-app
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
The CLI scaffolds, initializes git (when git is available), detects a package
|
|
@@ -37,24 +38,26 @@ accepts the default). Non-interactive runs (CI, packed consumers) skip the
|
|
|
37
38
|
prompt and take the defaults; pass `-t` to pin the template explicitly.
|
|
38
39
|
|
|
39
40
|
```bash
|
|
40
|
-
npx @openelement/create
|
|
41
|
+
npx @openelement/create my-app --no-install --no-git -t showcase
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
`npm create @openelement
|
|
44
|
-
resolves to `@scope/create` at the
|
|
45
|
-
the
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
`npm create @openelement` rides npm's initializer alias: a bare `@scope`
|
|
45
|
+
resolves to `@scope/create` at the scope's default dist-tag — with no tag in
|
|
46
|
+
the command, that is `latest`, which the 1.0 line rides — so the canonical
|
|
47
|
+
spelling names no tag, and npm runs this package's generator. The version a
|
|
48
|
+
versionless install resolves is registry truth: read it from the live registry
|
|
49
|
+
(`npm view @openelement/create dist-tags`), and from the framework's tracked
|
|
50
|
+
release-state manifest, which records the version each dist-tag was last
|
|
51
|
+
verified to serve. The 1.0 line is a new baseline — not a 0.x upgrade, with no
|
|
52
|
+
migration path from 0.x. Pin an exact version when reproducibility matters:
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
|
-
npm create @openelement
|
|
55
|
+
npm create @openelement@<version> my-app
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
The generated starter
|
|
57
|
-
from
|
|
58
|
+
The generated starter depends on `@openelement/*` through caret ranges over
|
|
59
|
+
the release it was generated from, so `pnpm update` picks up later `1.0.0`
|
|
60
|
+
prereleases without a manifest edit.
|
|
58
61
|
|
|
59
62
|
The canonical install command is exported from `@openelement/create/install-command` (one builder, every documented copy derives from it).
|
|
60
63
|
|
|
@@ -68,8 +71,8 @@ generated project. The packed package ships two equivalent npm bins
|
|
|
68
71
|
form must name one explicitly:
|
|
69
72
|
|
|
70
73
|
```bash
|
|
71
|
-
npx @openelement/create
|
|
72
|
-
pnpm dlx --package=@openelement/create
|
|
74
|
+
npx @openelement/create my-app
|
|
75
|
+
pnpm dlx --package=@openelement/create openelement-create my-app
|
|
73
76
|
```
|
|
74
77
|
|
|
75
78
|
The scaffolded project itself is Node-native: Node.js 24.2+ and
|
|
@@ -77,9 +80,9 @@ pnpm run its scripts.
|
|
|
77
80
|
|
|
78
81
|
## Stable 0.43 (maintenance line)
|
|
79
82
|
|
|
80
|
-
The stable 0.43 line is still published, but it is not the
|
|
81
|
-
A versionless install resolves the npm `latest` dist-tag to
|
|
82
|
-
explicitly instead:
|
|
83
|
+
The stable 0.43 line is still published, but it is not the 1.0 install path.
|
|
84
|
+
A versionless install resolves the npm `latest` dist-tag to the 1.0 line; pin
|
|
85
|
+
the maintenance line explicitly instead:
|
|
83
86
|
|
|
84
87
|
```bash
|
|
85
88
|
npm create @openelement@0.43 my-app
|
|
@@ -97,8 +100,10 @@ npm create @openelement@0.43 my-app
|
|
|
97
100
|
|
|
98
101
|
## What It Creates
|
|
99
102
|
|
|
100
|
-
- `package.json` - starter dependencies (
|
|
101
|
-
|
|
103
|
+
- `package.json` - starter dependencies (`@openelement/*` with caret ranges
|
|
104
|
+
over the generated-from release)
|
|
105
|
+
and the lifecycle scripts (`dev`/`check`/`test`/`build`/`start`; `build` and
|
|
106
|
+
`start` run the `openelement` bin from `@openelement/router`)
|
|
102
107
|
- `tsconfig.json` - the type-check surface for `pnpm check`: JSX authoring
|
|
103
108
|
through the element import source, whole-`app/` coverage
|
|
104
109
|
- `vite.config.ts` - Vite build configuration only; framework options still
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { CREATE_VERSION } from "./version.js";
|
|
2
3
|
import { buildTemplates, resolveVersions, validateProjectName } from "./template-builder.js";
|
|
3
4
|
import { createInstallCommand } from "./install-command.js";
|
|
4
5
|
import { detectPackageManager } from "./pm.js";
|
|
@@ -118,7 +119,7 @@ function parseArgs(argv) {
|
|
|
118
119
|
}
|
|
119
120
|
function printUsage() {
|
|
120
121
|
console.log(`Usage (Alpha): ${createInstallCommand()}`);
|
|
121
|
-
console.log("(a versionless install resolves the
|
|
122
|
+
console.log("(a versionless install resolves latest — the current 1.0 line)");
|
|
122
123
|
console.log(` -t, --template <name> scaffold template (default: ${TEMPLATE_NAME})`);
|
|
123
124
|
console.log(" --install / --no-install");
|
|
124
125
|
console.log(" install dependencies after scaffolding (default: install)");
|
|
@@ -173,11 +174,19 @@ function initGitRepository(targetDir, relativeTarget) {
|
|
|
173
174
|
}
|
|
174
175
|
console.info(" initialized git repository (with .gitignore)");
|
|
175
176
|
}
|
|
176
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* The boxed end-of-run handoff: where to go, what to run, where to read, and
|
|
179
|
+
* which generator version produced the scaffold. The version line is load
|
|
180
|
+
* bearing: a cached `npm exec` / `npx` run resolves whatever copy it first
|
|
181
|
+
* downloaded, so the box is the one place a stale generator announces itself
|
|
182
|
+
* (#1634). The framework's packed-starter qualification asserts the line on
|
|
183
|
+
* the packed artifact.
|
|
184
|
+
*/
|
|
177
185
|
function printHandoff(relativeTarget, pm, startRequested) {
|
|
178
186
|
const devCommand = pm ? `${pm} run dev` : "pnpm run dev";
|
|
179
187
|
const lines = [
|
|
180
188
|
"openElement project ready",
|
|
189
|
+
`(@openelement/create ${CREATE_VERSION})`,
|
|
181
190
|
"",
|
|
182
191
|
`cd ${relativeTarget}`,
|
|
183
192
|
`${devCommand} # start the dev server`,
|
package/src/install-command.d.ts
CHANGED
|
@@ -18,24 +18,32 @@ export declare const CREATE_PACKAGE_SPECIFIER = "@openelement/create";
|
|
|
18
18
|
/**
|
|
19
19
|
* The scope `npm create` resolves to {@linkcode CREATE_PACKAGE_SPECIFIER}:
|
|
20
20
|
* npm's initializer alias maps a bare `@scope` (optionally `@scope@<tag>`) to
|
|
21
|
-
* `@scope/create` at the same tag,
|
|
22
|
-
*
|
|
21
|
+
* `@scope/create` at the same tag — untagged, at the scope's default dist-tag
|
|
22
|
+
* — so the canonical spelling never repeats the `/create` suffix
|
|
23
|
+
* (owner-verified against npm's init alias rules).
|
|
23
24
|
*/
|
|
24
25
|
export declare const CREATE_NPM_CREATE_SCOPE = "@openelement";
|
|
25
|
-
/**
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The dist-tag a versionless documented install resolves: npm's scope alias
|
|
28
|
+
* defaults to `latest`, which the 1.0 line rides since the alpha.11 ruling.
|
|
29
|
+
* The exact version is registry truth; the canonical spelling names no tag.
|
|
30
|
+
*/
|
|
31
|
+
export declare const CREATE_INSTALL_TAG = "latest";
|
|
27
32
|
/** Placeholder the usage text and the docs use in place of a project name. */
|
|
28
33
|
export declare const CREATE_PROJECT_PLACEHOLDER = "<project-name>";
|
|
29
34
|
/**
|
|
30
35
|
* The documented install command shapes, all verified against the published
|
|
31
36
|
* two-bin artifact (bins `openelement-create` and `create-openelement`, both
|
|
32
37
|
* `src/cli.js`; npm 11 / pnpm 12):
|
|
33
|
-
* - canonical: `npm create @openelement
|
|
34
|
-
* initializer alias resolves it to `@openelement/create
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* - canonical: `npm create @openelement <name>` — versionless, so npm's
|
|
39
|
+
* `@scope` initializer alias resolves it to `@openelement/create` at the
|
|
40
|
+
* scope's default dist-tag `latest`, which the 1.0 line rides (the
|
|
41
|
+
* alpha.11 latest ruling). An explicit `@<tag>` remains a verified
|
|
42
|
+
* spelling for channel-specific copies (pins and other channels); the
|
|
43
|
+
* former canonical `npm exec <pkg>@<tag> -- <name>` remains a verified
|
|
44
|
+
* spelling through the same artifact (#1507 revision, 2026-10-05)
|
|
45
|
+
* - short form: `npx <pkg> <name>` (untagged resolves `latest`)
|
|
46
|
+
* - pnpm: `pnpm dlx --package=<pkg> openelement-create <name>` — the
|
|
39
47
|
* explicit `--package` plus bin is required because the packed package
|
|
40
48
|
* ships two bins, so a bare `pnpm dlx <pkg>` cannot resolve one (and no
|
|
41
49
|
* package named `create-openelement` exists on the registry).
|
package/src/install-command.js
CHANGED
|
@@ -18,24 +18,32 @@ const CREATE_PACKAGE_SPECIFIER = "@openelement/create";
|
|
|
18
18
|
/**
|
|
19
19
|
* The scope `npm create` resolves to {@linkcode CREATE_PACKAGE_SPECIFIER}:
|
|
20
20
|
* npm's initializer alias maps a bare `@scope` (optionally `@scope@<tag>`) to
|
|
21
|
-
* `@scope/create` at the same tag,
|
|
22
|
-
*
|
|
21
|
+
* `@scope/create` at the same tag — untagged, at the scope's default dist-tag
|
|
22
|
+
* — so the canonical spelling never repeats the `/create` suffix
|
|
23
|
+
* (owner-verified against npm's init alias rules).
|
|
23
24
|
*/
|
|
24
25
|
const CREATE_NPM_CREATE_SCOPE = "@openelement";
|
|
25
|
-
/**
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The dist-tag a versionless documented install resolves: npm's scope alias
|
|
28
|
+
* defaults to `latest`, which the 1.0 line rides since the alpha.11 ruling.
|
|
29
|
+
* The exact version is registry truth; the canonical spelling names no tag.
|
|
30
|
+
*/
|
|
31
|
+
const CREATE_INSTALL_TAG = "latest";
|
|
27
32
|
/** Placeholder the usage text and the docs use in place of a project name. */
|
|
28
33
|
const CREATE_PROJECT_PLACEHOLDER = "<project-name>";
|
|
29
34
|
/**
|
|
30
35
|
* The documented install command shapes, all verified against the published
|
|
31
36
|
* two-bin artifact (bins `openelement-create` and `create-openelement`, both
|
|
32
37
|
* `src/cli.js`; npm 11 / pnpm 12):
|
|
33
|
-
* - canonical: `npm create @openelement
|
|
34
|
-
* initializer alias resolves it to `@openelement/create
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* - canonical: `npm create @openelement <name>` — versionless, so npm's
|
|
39
|
+
* `@scope` initializer alias resolves it to `@openelement/create` at the
|
|
40
|
+
* scope's default dist-tag `latest`, which the 1.0 line rides (the
|
|
41
|
+
* alpha.11 latest ruling). An explicit `@<tag>` remains a verified
|
|
42
|
+
* spelling for channel-specific copies (pins and other channels); the
|
|
43
|
+
* former canonical `npm exec <pkg>@<tag> -- <name>` remains a verified
|
|
44
|
+
* spelling through the same artifact (#1507 revision, 2026-10-05)
|
|
45
|
+
* - short form: `npx <pkg> <name>` (untagged resolves `latest`)
|
|
46
|
+
* - pnpm: `pnpm dlx --package=<pkg> openelement-create <name>` — the
|
|
39
47
|
* explicit `--package` plus bin is required because the packed package
|
|
40
48
|
* ships two bins, so a bare `pnpm dlx <pkg>` cannot resolve one (and no
|
|
41
49
|
* package named `create-openelement` exists on the registry).
|
|
@@ -45,8 +53,7 @@ const CREATE_PROJECT_PLACEHOLDER = "<project-name>";
|
|
|
45
53
|
* invoked through plain Node tooling.
|
|
46
54
|
*/
|
|
47
55
|
function createInstallCommand(projectName = CREATE_PROJECT_PLACEHOLDER, options = {}) {
|
|
48
|
-
|
|
49
|
-
return `npm create ${CREATE_NPM_CREATE_SCOPE}@${tag} ${projectName}`;
|
|
56
|
+
return `npm create ${options.tag === void 0 ? CREATE_NPM_CREATE_SCOPE : `${CREATE_NPM_CREATE_SCOPE}@${options.tag}`} ${projectName}`;
|
|
50
57
|
}
|
|
51
58
|
//#endregion
|
|
52
59
|
export { CREATE_INSTALL_TAG, CREATE_NPM_CREATE_SCOPE, CREATE_PACKAGE_SPECIFIER, CREATE_PROJECT_PLACEHOLDER, createInstallCommand };
|
package/src/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/version.ts
|
|
2
2
|
/** The published CLI version, embedded so packed npm installs are self-contained. */
|
|
3
|
-
const CREATE_VERSION = "1.0.0-alpha.
|
|
3
|
+
const CREATE_VERSION = "1.0.0-alpha.13";
|
|
4
4
|
/**
|
|
5
5
|
* The Vite release pinned into the generated starter's package.json (the
|
|
6
6
|
* `${v.vite}` scaffold token in the npm/pnpm starter). Embedded for the same
|
package/templates/README.tmpl
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# openElement Showcase
|
|
2
2
|
|
|
3
3
|
Generated by [`@openelement/create`](https://www.npmjs.com/package/@openelement/create) —
|
|
4
|
-
scaffold it elsewhere with `npm create @openelement
|
|
4
|
+
scaffold it elsewhere with `npm create @openelement <project-name>` —
|
|
5
5
|
a static-first openElement app that shows its own costs. The landing page
|
|
6
6
|
carries two islands (`my-counter`, an interactive counter, and `live-timer`,
|
|
7
7
|
a client-only elapsed-time readout); every other page, including `/about`,
|
|
@@ -15,9 +15,10 @@ root holds the build's internal state (head-convention bookkeeping and build
|
|
|
15
15
|
plans). `pnpm dev` and `pnpm build` write it as needed; the `.gitignore`
|
|
16
16
|
excludes it and deleting it is safe — the next run recreates it.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
The `@openelement/element` and `@openelement/router` dependencies carry caret
|
|
19
|
+
ranges over the `1.0.0` release this starter was generated from, so
|
|
20
|
+
`pnpm update` picks up later `1.0.0` prereleases (and the final `1.0.0`)
|
|
21
|
+
without editing this file.
|
|
21
22
|
|
|
22
23
|
## The JS cost map
|
|
23
24
|
|
|
@@ -83,9 +84,14 @@ accepted-key list. `vite.config.ts` stays Vite-only: `plugins: [...openElement()
|
|
|
83
84
|
whole `app/` directory (`tsconfig.json`), so new files are picked up
|
|
84
85
|
automatically.
|
|
85
86
|
- `pnpm test` — run Node's built-in test runner (the starter ships none).
|
|
86
|
-
- `pnpm build` — production build
|
|
87
|
+
- `pnpm build` — production build into `dist/`: prerendered HTML for every
|
|
88
|
+
static route, plus the request-time server when the app has one.
|
|
87
89
|
- `pnpm start` — serve the production build.
|
|
88
|
-
|
|
90
|
+
|
|
91
|
+
`build` and `start` run the `openelement` bin from the `@openelement/router`
|
|
92
|
+
dependency (`openelement build` / `openelement start`); the router's CLI also
|
|
93
|
+
carries a static-only `openelement start --mode=preview`, which refuses a
|
|
94
|
+
build that has a request-time server.
|
|
89
95
|
|
|
90
96
|
## Styling ownership
|
|
91
97
|
|
|
@@ -105,13 +111,22 @@ unused.
|
|
|
105
111
|
|
|
106
112
|
## Dependency notes
|
|
107
113
|
|
|
108
|
-
`@
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
`@openelement/element` and `@openelement/router` are the runtime dependencies
|
|
115
|
+
your app imports. `@hono/vite-dev-server` and `hono` ride devDependencies:
|
|
116
|
+
the Vite dev server needs the former (and the latter as its own node-adapter
|
|
117
|
+
peer), it is loaded lazily, and `build`/`start` never resolve either — so
|
|
118
|
+
`npm install --omit=dev` in a production image installs only the runtime pair.
|
|
119
|
+
The generated server entry itself imports no
|
|
112
120
|
HTTP framework — it composes on the internal WinterCG layer (#1560); `hono`
|
|
113
121
|
is an optional peer of `@openelement/router`, and `@openelement/router/hono`
|
|
114
122
|
(`createHonoAdapter`) is the one opt-in if you ever want to mount the built
|
|
115
123
|
handler inside your own Hono app. For Nitro deployments, the built handler
|
|
116
124
|
bridges through the `@openelement/router/nitro-mount` subpath of the one
|
|
117
125
|
`@openelement/router` dependency. Do not remove them.
|
|
126
|
+
|
|
127
|
+
pnpm manages a `pnpm-workspace.yaml` for this project. That file is pnpm's own
|
|
128
|
+
bookkeeping, not starter output: it carries workspace membership and the
|
|
129
|
+
package-manager settings that apply here — including `minimumReleaseAge`, the
|
|
130
|
+
supply-chain window that withholds freshly published versions, and any
|
|
131
|
+
exemptions pnpm records when you approve a package inside that window. Keep
|
|
132
|
+
the file (pnpm rewrites it), and review the exemptions it lists.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Styled 404 page element (#923): the request-time server renders this page
|
|
3
|
-
* with a 404 status for unmatched paths;
|
|
4
|
-
*
|
|
3
|
+
* with a 404 status for unmatched paths; a build with no request-time route
|
|
4
|
+
* prerenders the route (see ./../routes/404.tsx) to dist/404.html instead.
|
|
5
|
+
* The path-derived tag is 'el-404'. Light root: the page owns its
|
|
5
6
|
* rules via `static styles` (the imported .css sheets), inlined into SSR as
|
|
6
7
|
* @scope(el-404). The site chrome sheet (./site-chrome.css) is shared
|
|
7
8
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
:host { display: inline-block; }
|
|
3
3
|
.timer-row { display: inline-flex; gap: 0.6rem; align-items: baseline; }
|
|
4
|
-
|
|
4
|
+
/* #1582: the selector names the id the class renders (#elapsed) — a
|
|
5
|
+
`.value` selector matched nothing, so the clock lost its brand color
|
|
6
|
+
and tabular figures. */
|
|
7
|
+
#elapsed { min-width: 6ch; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.4rem; color: var(--brand); }
|
|
5
8
|
.unit { color: var(--ink-soft); font-size: 0.85rem; }
|
|
6
9
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Styled 404 (#923):
|
|
3
|
-
*
|
|
2
|
+
* Styled 404 (#923). `renderIntent: { mode: 'dynamic' }` keeps this page on
|
|
3
|
+
* the request-time path, and it is the reason this starter's build emits
|
|
4
|
+
* `dist/server/`: the request-time server renders it with a 404 status for
|
|
5
|
+
* every unmatched path, so the build writes no static 404.html. Drop the
|
|
6
|
+
* renderIntent line and the route becomes prerenderable — a build with no
|
|
7
|
+
* other request-time route then writes the page to dist/404.html.
|
|
4
8
|
*/
|
|
5
9
|
import { definePage } from '@openelement/router';
|
|
6
10
|
import NotFoundPage from '../components/page-404.tsx';
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
component sheets use, each seated on a role so the dark and
|
|
11
11
|
forced-colors pairs below apply everywhere.
|
|
12
12
|
|
|
13
|
-
`pnpm dev`
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
`pnpm dev` and the build both compile this file through the router's
|
|
14
|
+
Tailwind preset: dev serves the compile from
|
|
15
|
+
/.openElement/tailwind-preset/entry.css and links it in the document head,
|
|
16
|
+
the build emits the same compile as the layer-ordered linked bundle.
|
|
16
17
|
═══════════════════════════════════════════════════════════════════════ */
|
|
17
18
|
|
|
18
19
|
@theme {
|
|
@@ -158,7 +159,11 @@ body {
|
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
/* Automatic dark for the starter palette (no runtime): the role sheet's
|
|
161
|
-
data-theme pairs above cover runtime-toggled themes.
|
|
162
|
+
data-theme pairs above cover runtime-toggled themes. The --brand pair joins
|
|
163
|
+
the dark side here (#1582): the light violet-700 reads ≈2.8:1 on zinc-950,
|
|
164
|
+
so the alias pair mirrors the data-theme dark roles (violet-400 on
|
|
165
|
+
violet-950 ink — 6.98:1 / 5.36:1), and the referenced soft/ok aliases take
|
|
166
|
+
the dark secondary surface instead of the light violet-100. */
|
|
162
167
|
@media (prefers-color-scheme: dark) {
|
|
163
168
|
:root {
|
|
164
169
|
--paper: var(--color-zinc-950);
|
|
@@ -166,5 +171,9 @@ body {
|
|
|
166
171
|
--ink: var(--color-zinc-50);
|
|
167
172
|
--ink-soft: var(--color-zinc-400);
|
|
168
173
|
--line: var(--color-zinc-800);
|
|
174
|
+
--brand: var(--color-violet-400);
|
|
175
|
+
--brand-ink: var(--color-violet-950);
|
|
176
|
+
--brand-soft: var(--color-zinc-800);
|
|
177
|
+
--ok: var(--color-zinc-800);
|
|
169
178
|
}
|
|
170
179
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Every option below is OPTIONAL. With an empty object, options come from the
|
|
4
4
|
// file conventions:
|
|
5
|
-
// - design tokens: app/styles/theme.css (the @theme role sheet; dev
|
|
6
|
-
// it
|
|
5
|
+
// - design tokens: app/styles/theme.css (the @theme role sheet; dev compiles
|
|
6
|
+
// it through the `tailwind` key below and serves the result as a linked
|
|
7
|
+
// sheet, the build emits the same compile as /assets/open-tailwind.css)
|
|
7
8
|
// - app shell: app/islands/app-shell.tsx (auto-registered; the file is
|
|
8
9
|
// deletable and pages still render)
|
|
9
10
|
// - document head: app/head.tsx (structural head content: meta tags, font
|
|
@@ -23,12 +24,13 @@ import { defineConfig } from '@openelement/router';
|
|
|
23
24
|
|
|
24
25
|
export default defineConfig({
|
|
25
26
|
// The Tailwind preset — the single-default scaffold form. The roles in
|
|
26
|
-
// app/styles/theme.css compile into the preset's
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// the
|
|
31
|
-
|
|
27
|
+
// app/styles/theme.css compile into the preset's deliverable both ways: dev
|
|
28
|
+
// serves the compile from /.openElement/tailwind-preset/entry.css and links
|
|
29
|
+
// it in the document head, the build emits the same compile as the
|
|
30
|
+
// layer-ordered /assets/open-tailwind.css after the SSG render. The path is
|
|
31
|
+
// app-relative (resolved against the app root); package CSS specifiers such
|
|
32
|
+
// as '@openelement/ui/theme.css' also work here.
|
|
33
|
+
tailwind: { theme: ['app/styles/theme.css'] },
|
|
32
34
|
head: {
|
|
33
35
|
// Titles default to the package.json "name"; this overrides the document
|
|
34
36
|
// title fallback while page routes keep their own `head: { title }`.
|
|
@@ -11,19 +11,17 @@
|
|
|
11
11
|
"dev": "vite",
|
|
12
12
|
"check": "tsc --noEmit",
|
|
13
13
|
"test": "node --test",
|
|
14
|
-
"build": "
|
|
15
|
-
"start": "
|
|
16
|
-
"preview": "node node_modules/@openelement/router/src/cli/start.js --mode=preview"
|
|
14
|
+
"build": "openelement build",
|
|
15
|
+
"start": "openelement start"
|
|
17
16
|
},
|
|
18
17
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@openelement/
|
|
21
|
-
"@openelement/router": "${v.router}",
|
|
22
|
-
"hono": "^4.12"
|
|
18
|
+
"@openelement/element": "^${v.element}",
|
|
19
|
+
"@openelement/router": "^${v.router}"
|
|
23
20
|
},
|
|
24
21
|
"devDependencies": {
|
|
25
|
-
"@
|
|
22
|
+
"@hono/vite-dev-server": "^0.25.3",
|
|
26
23
|
"@tailwindcss/vite": "4.3.3",
|
|
24
|
+
"hono": "^4.12",
|
|
27
25
|
"tailwindcss": "4.3.3",
|
|
28
26
|
"typescript": "6.0.3",
|
|
29
27
|
"vite": "${v.vite}"
|