@openelement/create 1.0.0-alpha.13 → 1.0.0-alpha.15

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 (34) hide show
  1. package/README.md +49 -19
  2. package/package.json +1 -1
  3. package/src/cli.js +159 -76
  4. package/src/node-version.js +102 -0
  5. package/src/pm.js +143 -9
  6. package/src/template-builder.js +59 -6
  7. package/src/version.js +2 -10
  8. package/templates/.node-version +1 -0
  9. package/templates/AGENTS.md.tmpl +44 -0
  10. package/templates/README.tmpl +140 -74
  11. package/templates/app/components/page-404.css +5 -7
  12. package/templates/app/components/page-404.tsx.tmpl +16 -37
  13. package/templates/app/components/page-about.css +5 -15
  14. package/templates/app/components/page-about.tsx.tmpl +86 -82
  15. package/templates/app/components/page-home.css +5 -23
  16. package/templates/app/components/page-home.tsx.tmpl +137 -114
  17. package/templates/app/components/site-chrome.css +5 -15
  18. package/templates/app/head.tsx.tmpl +12 -23
  19. package/templates/app/islands/live-timer.css +5 -9
  20. package/templates/app/islands/live-timer.tsx.tmpl +31 -21
  21. package/templates/app/islands/my-counter.css +5 -11
  22. package/templates/app/islands/my-counter.tsx.tmpl +26 -13
  23. package/templates/app/layout.tsx.tmpl +68 -0
  24. package/templates/app/routes/404.tsx.tmpl +7 -10
  25. package/templates/app/routes/about.tsx.tmpl +4 -4
  26. package/templates/app/routes/api/ping.ts.tmpl +4 -5
  27. package/templates/app/routes/index.tsx.tmpl +4 -4
  28. package/templates/app/styles/theme.css +64 -79
  29. package/templates/openelement.config.ts.tmpl +21 -33
  30. package/templates/package.json.tmpl +14 -10
  31. package/templates/tsconfig.json.tmpl +1 -1
  32. package/templates/vite.config.ts.tmpl +9 -7
  33. package/templates/app/components/badges.css +0 -5
  34. package/templates/app/styles/recipes.css +0 -43
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "${name}",
3
- "private": true,
4
3
  "version": "0.0.0",
4
+ "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@12.8.1",
7
- "engines": {
8
- "node": ">=24.2"
9
- },
10
6
  "scripts": {
11
- "dev": "vite",
12
- "check": "tsc --noEmit",
7
+ "dev": "oe dev",
8
+ "build": "oe build",
9
+ "start": "oe start",
13
10
  "test": "node --test",
14
- "build": "openelement build",
15
- "start": "openelement start"
11
+ "fmt": "oxfmt",
12
+ "lint": "oxlint",
13
+ "typecheck": "tsc --noEmit"
16
14
  },
17
15
  "dependencies": {
18
16
  "@openelement/element": "^${v.element}",
@@ -21,9 +19,15 @@
21
19
  "devDependencies": {
22
20
  "@hono/vite-dev-server": "^0.25.3",
23
21
  "@tailwindcss/vite": "4.3.3",
22
+ "@types/node": "26.5.0",
24
23
  "hono": "^4.12",
24
+ "oxfmt": "0.70.0",
25
+ "oxlint": "1.85.0",
25
26
  "tailwindcss": "4.3.3",
26
27
  "typescript": "6.0.3",
27
- "vite": "${v.vite}"
28
+ "vite": "8.0.16"
29
+ },
30
+ "engines": {
31
+ "node": ">=24.2"
28
32
  }
29
33
  }
@@ -6,7 +6,7 @@
6
6
  "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
7
  "jsx": "react-jsx",
8
8
  "jsxImportSource": "@openelement/element",
9
- "types": ["@openelement/element/css-modules"],
9
+ "types": ["@openelement/element/css-modules", "node"],
10
10
  "strict": true,
11
11
  "skipLibCheck": true,
12
12
  "noEmit": true,
@@ -1,11 +1,13 @@
1
- import { openElement } from '@openelement/router/vite';
2
- import { defineConfig } from 'vite';
1
+ import { openElement } from "@openelement/router/vite";
2
+ import { defineConfig } from "vite";
3
3
 
4
- // Vite configuration only. Framework options live in openelement.config.ts —
5
- // the plugin reads that file itself, so the plugin call stays bare. The JSX
6
- // transform is owned by the plugin's compiler pass (TSX → Part Program);
7
- // nothing JSX-related needs configuring here.
4
+ // Vite configuration only: framework options live in openelement.config.ts,
5
+ // which the plugin reads itself, so the plugin call stays bare, and the JSX
6
+ // transform is owned by the plugin's compiler pass. `vite` is a direct
7
+ // devDependency pinned to the exact version @openelement/router resolves, so
8
+ // the tree carries one Vite copy; `oxfmt` / `oxlint` back the `fmt` / `lint`
9
+ // scripts and run with their defaults (markdown, JSON, YAML and CSS skipped).
8
10
  export default defineConfig({
9
- base: '/',
11
+ base: "/",
10
12
  plugins: [...openElement()],
11
13
  });
@@ -1,5 +0,0 @@
1
-
2
- .badge { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); }
3
- .badge-static { border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
4
- .badge-island { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); background: var(--brand-soft); }
5
-
@@ -1,43 +0,0 @@
1
- /* authored from HEAD extraction — replace with design pass */
2
- /* Plain HTML+CSS recipes for the four retired zero-interaction ui shapes
3
- * (open-badge, open-callout, open-card, open-tabs #1557): the class
4
- * structures their HEAD markup rendered, as copyable rules. Consumers delete
5
- * what they do not use. Structure only — replace with the design pass. */
6
-
7
- /* open-badge */
8
- .badge {
9
- display: inline-flex;
10
- align-items: center;
11
- }
12
-
13
- /* open-callout */
14
- .callout {
15
- display: block;
16
- }
17
-
18
- .callout-header {
19
- display: flex;
20
- align-items: center;
21
- }
22
-
23
- .callout-icon {
24
- display: inline-flex;
25
- }
26
-
27
- .callout-title {
28
- margin: 0;
29
- }
30
-
31
- /* open-card */
32
- .surface {
33
- display: block;
34
- }
35
-
36
- .card-body {
37
- display: block;
38
- }
39
-
40
- /* open-tabs */
41
- .tabs {
42
- display: flex;
43
- }