uniweb 0.2.53 → 0.3.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 CHANGED
@@ -171,8 +171,10 @@ The parser extracts semantic elements from markdown—`title` from the first hea
171
171
 
172
172
  - [Content Structure](./docs/content-structure.md) — How content is parsed and structured
173
173
  - [Component Metadata](./docs/component-metadata.md) — Full meta.js schema reference
174
+ - [Site Theming](./docs/site-theming.md) — Colors, typography, and dark mode
174
175
  - [Data Fetching](./docs/data-fetching.md) — Load external data from files or APIs
175
176
  - [Dynamic Routes](./docs/dynamic-routes.md) — Generate pages from data (blogs, catalogs)
177
+ - [Content Collections](./docs/content-collections.md) — Manage articles, team members, and more
176
178
 
177
179
  ## Foundations Are Portable
178
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.53",
3
+ "version": "0.3.0",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,9 +37,9 @@
37
37
  "js-yaml": "^4.1.0",
38
38
  "prompts": "^2.4.2",
39
39
  "tar": "^7.0.0",
40
- "@uniweb/build": "0.1.31",
41
- "@uniweb/runtime": "0.2.18",
42
- "@uniweb/core": "0.1.14",
43
- "@uniweb/kit": "0.1.9"
40
+ "@uniweb/build": "0.2.0",
41
+ "@uniweb/kit": "0.2.0",
42
+ "@uniweb/core": "0.2.0",
43
+ "@uniweb/runtime": "0.3.0"
44
44
  }
45
45
  }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "default",
3
3
  "version": "0.1.0",
4
+ "description": "{{projectName}} default foundation - Uniweb component library",
4
5
  "type": "module",
5
6
  "main": "./src/_entry.generated.js",
6
7
  "exports": {
@@ -1,66 +1,61 @@
1
+ /**
2
+ * Section Component Metadata (v2)
3
+ *
4
+ * A versatile content section for headings, text, and links.
5
+ */
1
6
  export default {
2
7
  title: 'Section',
3
8
  description: 'A versatile content section for headings, text, and links',
4
- category: 'Content',
9
+ category: 'content',
10
+ purpose: 'Inform',
5
11
 
6
- elements: {
7
- pretitle: {
8
- label: 'Eyebrow',
9
- description: 'Small text above the title (H3 before H1)',
10
- },
11
- title: {
12
- label: 'Title',
13
- description: 'Main heading (H1)',
14
- },
15
- subtitle: {
16
- label: 'Subtitle',
17
- description: 'Secondary heading (H2 after H1)',
18
- },
19
- paragraphs: {
20
- label: 'Content',
21
- description: 'Body text paragraphs',
22
- },
23
- links: {
24
- label: 'Links',
25
- description: 'Call-to-action buttons',
26
- },
27
- imgs: {
28
- label: 'Images',
29
- description: 'Section images',
30
- },
12
+ content: {
13
+ pretitle: 'Eyebrow text',
14
+ title: 'Main heading',
15
+ subtitle: 'Secondary heading',
16
+ paragraphs: 'Body text',
17
+ links: 'Call-to-action buttons',
18
+ imgs: 'Section images',
31
19
  },
32
20
 
33
- properties: {
21
+ params: {
34
22
  theme: {
35
23
  type: 'select',
36
24
  label: 'Theme',
37
- options: [
38
- { value: 'light', label: 'Light' },
39
- { value: 'dark', label: 'Dark' },
40
- { value: 'primary', label: 'Primary' },
41
- ],
25
+ options: ['light', 'dark', 'primary'],
42
26
  default: 'light',
43
27
  },
44
28
  align: {
45
29
  type: 'select',
46
30
  label: 'Alignment',
47
- options: [
48
- { value: 'left', label: 'Left' },
49
- { value: 'center', label: 'Center' },
50
- { value: 'right', label: 'Right' },
51
- ],
31
+ options: ['left', 'center', 'right'],
52
32
  default: 'center',
53
33
  },
54
34
  width: {
55
35
  type: 'select',
56
36
  label: 'Width',
57
37
  options: [
58
- { value: 'narrow', label: 'Narrow' },
59
- { value: 'default', label: 'Default' },
60
- { value: 'wide', label: 'Wide' },
38
+ 'narrow',
39
+ 'default',
40
+ 'wide',
61
41
  { value: 'full', label: 'Full Width' },
62
42
  ],
63
43
  default: 'default',
64
44
  },
65
45
  },
46
+
47
+ presets: {
48
+ default: {
49
+ label: 'Centered',
50
+ params: { theme: 'light', align: 'center' },
51
+ },
52
+ dark: {
53
+ label: 'Dark Theme',
54
+ params: { theme: 'dark', align: 'center' },
55
+ },
56
+ left: {
57
+ label: 'Left Aligned',
58
+ params: { theme: 'light', align: 'left' },
59
+ },
60
+ },
66
61
  }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * {{projectName}} Default Foundation Configuration
3
+ *
4
+ * This file defines foundation-level configuration:
5
+ * - vars: CSS custom properties that sites can override in theme.yml
6
+ * - Layout: Custom page layout component (optional)
7
+ * - props: Foundation-wide props accessible via website.foundationProps
8
+ *
9
+ * Identity (name, version, description) comes from package.json.
10
+ */
11
+
12
+ // import Layout from './components/Layout'
13
+
14
+ /**
15
+ * CSS custom properties that sites can override in theme.yml
16
+ */
17
+ export const vars = {
18
+ 'header-height': {
19
+ default: '4rem',
20
+ description: 'Fixed header height',
21
+ },
22
+ 'max-content-width': {
23
+ default: '80rem',
24
+ description: 'Maximum content width (1280px)',
25
+ },
26
+ 'section-padding-y': {
27
+ default: '5rem',
28
+ description: 'Vertical padding for sections',
29
+ },
30
+ }
31
+
32
+ /**
33
+ * Runtime exports (Layout and props)
34
+ */
35
+ export default {
36
+ // Uncomment to use a custom page layout:
37
+ // Layout,
38
+
39
+ // Foundation-wide props (accessible via website.foundationProps):
40
+ props: {},
41
+ }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "foundation",
3
3
  "version": "0.1.0",
4
+ "description": "{{projectName}} foundation - Uniweb component library",
4
5
  "type": "module",
5
6
  "main": "./src/_entry.generated.js",
6
7
  "exports": {
@@ -1,66 +1,61 @@
1
+ /**
2
+ * Section Component Metadata (v2)
3
+ *
4
+ * A versatile content section for headings, text, and links.
5
+ */
1
6
  export default {
2
7
  title: 'Section',
3
8
  description: 'A versatile content section for headings, text, and links',
4
- category: 'Content',
9
+ category: 'content',
10
+ purpose: 'Inform',
5
11
 
6
- elements: {
7
- pretitle: {
8
- label: 'Eyebrow',
9
- description: 'Small text above the title (H3 before H1)',
10
- },
11
- title: {
12
- label: 'Title',
13
- description: 'Main heading (H1)',
14
- },
15
- subtitle: {
16
- label: 'Subtitle',
17
- description: 'Secondary heading (H2 after H1)',
18
- },
19
- paragraphs: {
20
- label: 'Content',
21
- description: 'Body text paragraphs',
22
- },
23
- links: {
24
- label: 'Links',
25
- description: 'Call-to-action buttons',
26
- },
27
- imgs: {
28
- label: 'Images',
29
- description: 'Section images',
30
- },
12
+ content: {
13
+ pretitle: 'Eyebrow text',
14
+ title: 'Main heading',
15
+ subtitle: 'Secondary heading',
16
+ paragraphs: 'Body text',
17
+ links: 'Call-to-action buttons',
18
+ imgs: 'Section images',
31
19
  },
32
20
 
33
- properties: {
21
+ params: {
34
22
  theme: {
35
23
  type: 'select',
36
24
  label: 'Theme',
37
- options: [
38
- { value: 'light', label: 'Light' },
39
- { value: 'dark', label: 'Dark' },
40
- { value: 'primary', label: 'Primary' },
41
- ],
25
+ options: ['light', 'dark', 'primary'],
42
26
  default: 'light',
43
27
  },
44
28
  align: {
45
29
  type: 'select',
46
30
  label: 'Alignment',
47
- options: [
48
- { value: 'left', label: 'Left' },
49
- { value: 'center', label: 'Center' },
50
- { value: 'right', label: 'Right' },
51
- ],
31
+ options: ['left', 'center', 'right'],
52
32
  default: 'center',
53
33
  },
54
34
  width: {
55
35
  type: 'select',
56
36
  label: 'Width',
57
37
  options: [
58
- { value: 'narrow', label: 'Narrow' },
59
- { value: 'default', label: 'Default' },
60
- { value: 'wide', label: 'Wide' },
38
+ 'narrow',
39
+ 'default',
40
+ 'wide',
61
41
  { value: 'full', label: 'Full Width' },
62
42
  ],
63
43
  default: 'default',
64
44
  },
65
45
  },
46
+
47
+ presets: {
48
+ default: {
49
+ label: 'Centered',
50
+ params: { theme: 'light', align: 'center' },
51
+ },
52
+ dark: {
53
+ label: 'Dark Theme',
54
+ params: { theme: 'dark', align: 'center' },
55
+ },
56
+ left: {
57
+ label: 'Left Aligned',
58
+ params: { theme: 'light', align: 'left' },
59
+ },
60
+ },
66
61
  }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * {{projectName}} Foundation Configuration
3
+ *
4
+ * This file defines foundation-level configuration:
5
+ * - vars: CSS custom properties that sites can override in theme.yml
6
+ * - Layout: Custom page layout component (optional)
7
+ * - props: Foundation-wide props accessible via website.foundationProps
8
+ *
9
+ * Identity (name, version, description) comes from package.json.
10
+ */
11
+
12
+ // import Layout from './components/Layout'
13
+
14
+ /**
15
+ * CSS custom properties that sites can override in theme.yml
16
+ */
17
+ export const vars = {
18
+ 'header-height': {
19
+ default: '4rem',
20
+ description: 'Fixed header height',
21
+ },
22
+ 'max-content-width': {
23
+ default: '80rem',
24
+ description: 'Maximum content width (1280px)',
25
+ },
26
+ 'section-padding-y': {
27
+ default: '5rem',
28
+ description: 'Vertical padding for sections',
29
+ },
30
+ }
31
+
32
+ /**
33
+ * Runtime exports (Layout and props)
34
+ *
35
+ * The Layout component receives pre-rendered page areas as props:
36
+ * - page, website: Runtime context
37
+ * - header, body, footer: Core page regions (pre-rendered React elements)
38
+ * - left/leftPanel, right/rightPanel: Sidebar panels
39
+ *
40
+ * If no Layout is provided, the runtime uses a default layout.
41
+ */
42
+ export default {
43
+ // Uncomment to use a custom page layout:
44
+ // Layout,
45
+
46
+ // Foundation-wide props (accessible via website.foundationProps):
47
+ props: {},
48
+ }
@@ -1,14 +0,0 @@
1
- /**
2
- * Foundation Exports
3
- *
4
- * Optional file to export foundation-level capabilities to the runtime:
5
- * - Layout: Custom page layout component (receives header, body, footer, sidebars)
6
- * - props: Foundation-wide props accessible via website.foundationProps
7
- *
8
- * The Layout component receives pre-rendered page areas as props:
9
- * - page, website: Runtime context
10
- * - header, body, footer: Core page regions (pre-rendered React elements)
11
- * - left/leftPanel, right/rightPanel: Sidebar panels
12
- *
13
- * If this file is not provided, the runtime uses a default layout (header -> body -> footer).
14
- */
@@ -1,11 +0,0 @@
1
- {{> exports-js}}
2
-
3
- // import Layout from './components/Layout'
4
-
5
- export default {
6
- // Uncomment to use a custom page layout:
7
- // Layout,
8
-
9
- // Foundation-wide props (accessible via website.foundationProps):
10
- props: {},
11
- }
@@ -1,6 +0,0 @@
1
- export default {
2
- name: 'default',
3
- version: '0.1.0',
4
- title: 'Default Foundation',
5
- description: 'Default foundation for {{projectName}}',
6
- }
@@ -1,11 +0,0 @@
1
- {{> exports-js}}
2
-
3
- // import Layout from './components/Layout'
4
-
5
- export default {
6
- // Uncomment to use a custom page layout:
7
- // Layout,
8
-
9
- // Foundation-wide props (accessible via website.foundationProps):
10
- props: {},
11
- }
@@ -1,6 +0,0 @@
1
- export default {
2
- name: 'foundation',
3
- version: '0.1.0',
4
- title: '{{projectName}}',
5
- description: 'Foundation for {{projectName}}',
6
- }