@openelement/create 1.0.0-alpha.14 → 1.0.0-alpha.16

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 (38) hide show
  1. package/README.md +61 -51
  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 -14
  7. package/src/version.js +2 -10
  8. package/templates/.node-version +1 -0
  9. package/templates/AGENTS.md.tmpl +46 -0
  10. package/templates/README.tmpl +36 -145
  11. package/templates/app/head.tsx.tmpl +11 -26
  12. package/templates/app/islands/live-timer.css +2 -20
  13. package/templates/app/islands/live-timer.tsx.tmpl +49 -43
  14. package/templates/app/islands/my-counter.css +2 -29
  15. package/templates/app/islands/my-counter.tsx.tmpl +43 -34
  16. package/templates/app/layout.tsx.tmpl +79 -0
  17. package/templates/app/routes/404.tsx.tmpl +20 -8
  18. package/templates/app/routes/about.tsx.tmpl +34 -3
  19. package/templates/app/routes/api/ping.ts.tmpl +2 -3
  20. package/templates/app/routes/index.tsx.tmpl +32 -3
  21. package/templates/app/styles/theme.css +81 -77
  22. package/templates/gitignore.tmpl +2 -0
  23. package/templates/openelement.config.ts.tmpl +16 -28
  24. package/templates/package.json.tmpl +8 -6
  25. package/templates/tests/ping.test.ts.tmpl +15 -0
  26. package/templates/tsconfig.json.tmpl +2 -2
  27. package/templates/vite.config.ts.tmpl +7 -14
  28. package/templates/app/components/badges.css +0 -24
  29. package/templates/app/components/page-404.css +0 -21
  30. package/templates/app/components/page-404.tsx.tmpl +0 -28
  31. package/templates/app/components/page-about.css +0 -72
  32. package/templates/app/components/page-about.tsx.tmpl +0 -77
  33. package/templates/app/components/page-home.css +0 -135
  34. package/templates/app/components/page-home.tsx.tmpl +0 -116
  35. package/templates/app/components/site-chrome.css +0 -68
  36. package/templates/app/islands/app-shell.tsx.tmpl +0 -54
  37. package/templates/app/styles/recipes.css +0 -43
  38. package/templates/pnpm-workspace.yaml.tmpl +0 -29
@@ -1,68 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
- .site-head {
5
- border-bottom: 1px solid var(--line);
6
- background: var(--paper);
7
- }
8
- .site-head .bar {
9
- max-width: var(--content-width);
10
- margin: 0 auto;
11
- padding: 1rem 1.25rem;
12
- display: flex;
13
- justify-content: space-between;
14
- align-items: baseline;
15
- gap: 1rem;
16
- }
17
- .site-brand {
18
- font-weight: 700;
19
- font-size: 1.1rem;
20
- letter-spacing: -0.01em;
21
- color: var(--ink);
22
- text-decoration: none;
23
- }
24
- .site-brand:hover {
25
- color: var(--brand);
26
- text-decoration: none;
27
- }
28
- .site-head nav {
29
- display: flex;
30
- gap: 1.25rem;
31
- }
32
- .site-head nav a {
33
- color: var(--ink-soft);
34
- font-size: 0.95rem;
35
- font-weight: 500;
36
- text-decoration: none;
37
- }
38
- .site-head nav a:hover {
39
- color: var(--brand);
40
- text-decoration: none;
41
- }
42
- main {
43
- max-width: var(--content-width);
44
- margin: 0 auto;
45
- padding: 3rem 1.25rem 4rem;
46
- }
47
- .site-foot {
48
- border-top: 1px solid var(--line);
49
- color: var(--ink-soft);
50
- font-size: 0.85rem;
51
- }
52
- .site-foot .bar {
53
- max-width: var(--content-width);
54
- margin: 0 auto;
55
- padding: 1.25rem;
56
- display: flex;
57
- justify-content: space-between;
58
- gap: 1rem;
59
- flex-wrap: wrap;
60
- }
61
- .site-foot a {
62
- color: var(--ink-soft);
63
- text-decoration: none;
64
- }
65
- .site-foot a:hover {
66
- color: var(--brand);
67
- text-decoration: none;
68
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * app/islands/app-shell.tsx — the auto-registered application shell.
3
- *
4
- * The convention path is enough: the build finds this module, registers its
5
- * compiled class under the `app-shell` tag, and renders EVERY page inside
6
- * it, projecting the page's own render into the default <slot>. The header
7
- * and footer markup that used to be copied onto every page lives here
8
- * exactly once — a page module now carries only its own content.
9
- *
10
- * The shadow root (root: 'shadow-open') is what makes the projection work:
11
- * the chrome below renders in this element's shadow tree (styled by the
12
- * site-chrome sheet in `static styles`), while the slotted page content
13
- * stays in the page element's own light DOM with its own @scope styles.
14
- * Layout tokens from app/styles/theme.css inherit through the boundary.
15
- *
16
- * The shell is a convention, not a requirement: delete this file and every
17
- * page still renders (back to carrying its own chrome), or opt out
18
- * explicitly with `appShell: false` in openelement.config.ts.
19
- */
20
- import { element, OpenElement } from "@openelement/element";
21
- import siteChromeStyles from "../components/site-chrome.css";
22
-
23
- @element("app-shell", { root: "shadow-open" })
24
- export default class AppShell extends OpenElement {
25
- static override styles = [siteChromeStyles];
26
-
27
- render() {
28
- return (
29
- <div class="page-body">
30
- <header class="site-head">
31
- <div class="bar">
32
- <a class="site-brand" href="/">
33
- openElement
34
- </a>
35
- <nav>
36
- <a href="/">Home</a>
37
- <a href="/about">About</a>
38
- <a href="/api/ping">API</a>
39
- </nav>
40
- </div>
41
- </header>
42
- <main>
43
- <slot></slot>
44
- </main>
45
- <footer class="site-foot">
46
- <div class="bar">
47
- <span>Generated by @openelement/create.</span>
48
- <a href="https://openelement.org">openelement.org</a>
49
- </div>
50
- </footer>
51
- </div>
52
- );
53
- }
54
- }
@@ -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
- }
@@ -1,29 +0,0 @@
1
- # pnpm workspace bookkeeping for this project. pnpm rewrites this file (for
2
- # example when it records a new minimumReleaseAgeExclude entry you approve);
3
- # keep it and review the entries it lists.
4
- #
5
- # catalog: the Vite+ form. `vite` resolves to the Vite+ core build through
6
- # the catalog and the `vite@*` override below, so every peer that asks for
7
- # vite (the router's dev server, the Tailwind Vite plugin) gets the same
8
- # Vite+ tree; `vp dev` serves through it directly.
9
- #
10
- # minimumReleaseAgeExclude: pnpm's supply-chain cooldown withholds versions
11
- # published inside its maturity window. These entries are exempt: the
12
- # @openelement packages at the version this project was generated from (a
13
- # fresh scaffold installs on release day) and vite-plus itself.
14
- catalog:
15
- vite: npm:@voidzero-dev/vite-plus-core@1.1.0
16
- vite-plus: 1.1.0
17
- minimumReleaseAgeExclude:
18
- - "@openelement/compiler@${v.element}"
19
- - "@openelement/element@${v.element}"
20
- - "@openelement/protocol@${v.element}"
21
- - "@openelement/router@${v.router}"
22
- - "vite-plus@1.1.0"
23
- overrides:
24
- vite@*: "catalog:"
25
- peerDependencyRules:
26
- allowAny:
27
- - vite
28
- allowedVersions:
29
- vite: "*"