uniweb 1.0.0 → 1.0.2

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 (129) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +532 -3
  3. package/package.json +60 -11
  4. package/partials/adding-pages.hbs +77 -0
  5. package/partials/agents.md +3000 -0
  6. package/partials/ai-assistance.hbs +28 -0
  7. package/partials/components-docs.hbs +13 -0
  8. package/partials/config-reference.hbs +66 -0
  9. package/partials/deployment.hbs +13 -0
  10. package/partials/learn-more.hbs +6 -0
  11. package/partials/quick-start.hbs +8 -0
  12. package/partials/search-docs.hbs +110 -0
  13. package/src/backend/asset-download.js +222 -0
  14. package/src/backend/client.js +986 -0
  15. package/src/backend/foundation-bring-along.js +692 -0
  16. package/src/backend/payment-handoff.js +362 -0
  17. package/src/backend/service-request.js +210 -0
  18. package/src/backend/site-media.js +255 -0
  19. package/src/backend/site-preview.js +77 -0
  20. package/src/backend/site-sync.js +2515 -0
  21. package/src/backend/workspace.js +234 -0
  22. package/src/commands/add.js +1900 -0
  23. package/src/commands/build.js +1214 -0
  24. package/src/commands/clone.js +466 -0
  25. package/src/commands/content.js +202 -0
  26. package/src/commands/deploy.js +537 -0
  27. package/src/commands/dev.js +202 -0
  28. package/src/commands/docs.js +530 -0
  29. package/src/commands/doctor.js +1982 -0
  30. package/src/commands/export.js +116 -0
  31. package/src/commands/families.js +82 -0
  32. package/src/commands/forget.js +197 -0
  33. package/src/commands/handoff.js +21 -0
  34. package/src/commands/i18n.js +1707 -0
  35. package/src/commands/inspect.js +375 -0
  36. package/src/commands/invite.js +24 -0
  37. package/src/commands/org.js +96 -0
  38. package/src/commands/publish.js +1087 -0
  39. package/src/commands/pull.js +1257 -0
  40. package/src/commands/push.js +663 -0
  41. package/src/commands/refresh.js +212 -0
  42. package/src/commands/register.js +1092 -0
  43. package/src/commands/rename.js +647 -0
  44. package/src/commands/site.js +358 -0
  45. package/src/commands/snapshot.js +461 -0
  46. package/src/commands/starter.js +206 -0
  47. package/src/commands/status.js +302 -0
  48. package/src/commands/sync.js +93 -0
  49. package/src/commands/template.js +107 -0
  50. package/src/commands/update.js +887 -0
  51. package/src/commands/validate.js +376 -0
  52. package/src/framework-index.json +248 -0
  53. package/src/index.js +2241 -0
  54. package/src/templates/fetchers/github.js +113 -0
  55. package/src/templates/fetchers/npm.js +85 -0
  56. package/src/templates/fetchers/release.js +92 -0
  57. package/src/templates/index.js +190 -0
  58. package/src/templates/processor.js +333 -0
  59. package/src/templates/resolver.js +232 -0
  60. package/src/templates/validator.js +155 -0
  61. package/src/utils/agents-stamp.js +110 -0
  62. package/src/utils/args.js +126 -0
  63. package/src/utils/asset-upload.js +270 -0
  64. package/src/utils/bytes.js +30 -0
  65. package/src/utils/code-upload.js +394 -0
  66. package/src/utils/config.js +417 -0
  67. package/src/utils/conformance.js +274 -0
  68. package/src/utils/dep-survey.js +176 -0
  69. package/src/utils/destination-prompt.js +146 -0
  70. package/src/utils/discover.js +75 -0
  71. package/src/utils/env.js +22 -0
  72. package/src/utils/exit.js +30 -0
  73. package/src/utils/fetch-retry.js +109 -0
  74. package/src/utils/flag-guard.js +246 -0
  75. package/src/utils/foundation-name.js +179 -0
  76. package/src/utils/git.js +342 -0
  77. package/src/utils/host-prompt.js +51 -0
  78. package/src/utils/install-integrity.js +210 -0
  79. package/src/utils/interactive.js +118 -0
  80. package/src/utils/json-file.js +72 -0
  81. package/src/utils/names.js +91 -0
  82. package/src/utils/placement.js +151 -0
  83. package/src/utils/pm.js +165 -0
  84. package/src/utils/preview.js +20 -0
  85. package/src/utils/pull-written.js +132 -0
  86. package/src/utils/records-guard.js +88 -0
  87. package/src/utils/registry-auth.js +994 -0
  88. package/src/utils/registry-orgs.js +290 -0
  89. package/src/utils/scaffold.js +483 -0
  90. package/src/utils/schemaless-report.js +30 -0
  91. package/src/utils/semver-precedence.js +80 -0
  92. package/src/utils/session-file.js +95 -0
  93. package/src/utils/site-content-refs.js +23 -0
  94. package/src/utils/site-copies.js +123 -0
  95. package/src/utils/site-data-upload.js +302 -0
  96. package/src/utils/site-identity.js +137 -0
  97. package/src/utils/snapshot-settings.js +112 -0
  98. package/src/utils/update-check.js +302 -0
  99. package/src/utils/uwx-read.js +157 -0
  100. package/src/utils/workspace.js +223 -0
  101. package/src/versions.js +467 -0
  102. package/starter/foundation/main.js +50 -0
  103. package/starter/foundation/sections/Section/index.jsx +95 -0
  104. package/starter/foundation/sections/Section/meta.js +44 -0
  105. package/starter/site/pages/about/1-about.md.hbs +13 -0
  106. package/starter/site/pages/about/page.yml +3 -0
  107. package/starter/site/pages/home/1-welcome.md.hbs +14 -0
  108. package/starter/site/pages/home/page.yml +3 -0
  109. package/templates/foundation/_gitignore +5 -0
  110. package/templates/foundation/components/.gitkeep +0 -0
  111. package/templates/foundation/main.js.hbs +33 -0
  112. package/templates/foundation/package.json.hbs +51 -0
  113. package/templates/foundation/sections/.gitkeep +0 -0
  114. package/templates/foundation/styles.css +6 -0
  115. package/templates/foundation/vite.config.js +3 -0
  116. package/templates/site/_gitignore +12 -0
  117. package/templates/site/entry.js +7 -0
  118. package/templates/site/index.html.hbs +13 -0
  119. package/templates/site/package.json.hbs +27 -0
  120. package/templates/site/public/favicon.svg +7 -0
  121. package/templates/site/site.yml.hbs +91 -0
  122. package/templates/site/theme.yml +99 -0
  123. package/templates/site/vite.config.js +7 -0
  124. package/templates/workspace/AGENTS.md.hbs +2 -0
  125. package/templates/workspace/README.md.hbs +87 -0
  126. package/templates/workspace/_gitignore +29 -0
  127. package/templates/workspace/_vscode/settings.json +6 -0
  128. package/templates/workspace/package.json.hbs +20 -0
  129. package/templates/workspace/pnpm-workspace.yaml.hbs +26 -0
@@ -0,0 +1,87 @@
1
+ # {{projectName}}
2
+
3
+ A website built with [Uniweb](https://github.com/uniweb/cli) — a component web platform that separates content from code.
4
+
5
+ {{> quick-start}}
6
+
7
+ ## Project Structure
8
+
9
+ ```
10
+ {{projectName}}/
11
+ ├── src/ # Foundation package (the site's source code; pkg name: src)
12
+ │ ├── sections/ # Section types (selectable by content authors)
13
+ │ ├── styles.css # Tailwind CSS v4 theme
14
+ │ ├── main.js # Foundation declarations (name, vars, defaultLayout)
15
+ │ └── vite.config.js # defineFoundationConfig()
16
+ │
17
+ ├── site/ # Content (markdown)
18
+ │ ├── pages/ # Content pages
19
+ │ │ └── home/
20
+ │ │ ├── page.yml
21
+ │ │ └── 1-welcome.md
22
+ │ ├── site.yml # Site configuration (foundation: src)
23
+ │ └── vite.config.js # defineSiteConfig()
24
+ │
25
+ └── AGENTS.md # Developer guide (human + AI)
26
+ ```
27
+
28
+ A site is pure content. A foundation is the site's source code — that's why it lives in `src/`.
29
+
30
+ ## Content Authoring
31
+
32
+ Content lives in markdown files under `site/pages/`:
33
+
34
+ ```markdown
35
+ ---
36
+ type: Section
37
+ theme: light
38
+ ---
39
+
40
+ # Welcome
41
+
42
+ Your content here.
43
+
44
+ [Call to Action](#)
45
+ ```
46
+
47
+ {{> adding-pages}}
48
+
49
+ ## Component Development
50
+
51
+ Section types live in `src/sections/`. Each is a folder with an `index.jsx` and a `meta.js`:
52
+
53
+ ```jsx
54
+ // src/sections/Hero/index.jsx
55
+ import { H1, P } from '@uniweb/kit'
56
+
57
+ export default function Hero({ content }) {
58
+ const { title, paragraphs = [] } = content || {}
59
+
60
+ return (
61
+ <div className="max-w-4xl mx-auto px-6">
62
+ <H1 text={title} className="text-heading text-4xl font-bold" />
63
+ <P text={paragraphs} className="text-body mt-4" />
64
+ </div>
65
+ )
66
+ }
67
+ ```
68
+
69
+ Components receive parsed content from markdown. Classes like `text-heading` and `text-body` are semantic tokens — the site controls their actual colors through theming, so the same component adapts to any context automatically.
70
+
71
+ {{> components-docs}}
72
+
73
+ ## Building
74
+
75
+ ```bash
76
+ # Build foundation (generates dist/foundation.js)
77
+ cd foundation && pnpm build
78
+
79
+ # Build site for production
80
+ cd site && pnpm build
81
+ ```
82
+
83
+ Deploy `site/dist/` to any static host (Vercel, Netlify, Cloudflare Pages, etc.)
84
+
85
+ {{> ai-assistance}}
86
+
87
+ {{> learn-more}}
@@ -0,0 +1,29 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build outputs
5
+ dist/
6
+ .uniweb/
7
+
8
+ # Generated entry (regenerated by `uniweb build`; never committed)
9
+ _entry.generated.js
10
+
11
+ # Environment
12
+ .env
13
+ .env.local
14
+ .env.*.local
15
+
16
+ # IDE
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+
22
+ # OS
23
+ .DS_Store
24
+ Thumbs.db
25
+
26
+ # Logs
27
+ *.log
28
+ npm-debug.log*
29
+ pnpm-debug.log*
@@ -0,0 +1,6 @@
1
+ {
2
+ "yaml.schemas": {
3
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json": "site/site.yml",
4
+ "https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json": "**/page.yml"
5
+ }
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ {{#each scripts}}
8
+ "{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
9
+ {{/each}}
10
+ },
11
+ "workspaces": [{{#if workspaceGlobs.length}}
12
+ {{#each workspaceGlobs}}
13
+ "{{this}}"{{#unless @last}},{{/unless}}
14
+ {{/each}}
15
+ {{/if}}],
16
+ "devDependencies": {
17
+ "@types/node": "^22.0.0",
18
+ "uniweb": "{{version "uniweb"}}"
19
+ }
20
+ }
@@ -0,0 +1,26 @@
1
+ packages:
2
+ {{#each workspaceGlobs}}
3
+ - "{{this}}"
4
+ {{/each}}
5
+
6
+ # Permit install scripts for these native deps (esbuild compiles, sharp
7
+ # resolves its platform binary). Both spellings are listed on purpose:
8
+ #
9
+ # onlyBuiltDependencies — pnpm 10's name for this setting (a list)
10
+ # allowBuilds — pnpm 11 renamed it (a map)
11
+ #
12
+ # pnpm 11 ignores the old name entirely, so with only the list a fresh
13
+ # install fails with ERR_PNPM_IGNORED_BUILDS and exits 1 — before anything
14
+ # is built. pnpm 10 understands both, so keeping the pair means the project
15
+ # installs on either major. Drop `onlyBuiltDependencies` once pnpm 10 is no
16
+ # longer in use.
17
+ #
18
+ # Neither applies to npm or yarn, which run install scripts by default;
19
+ # they read `workspaces` in package.json and ignore this file.
20
+ onlyBuiltDependencies:
21
+ - esbuild
22
+ - sharp
23
+
24
+ allowBuilds:
25
+ esbuild: true
26
+ sharp: true