@brightsideoy/kama 0.1.0-alpha.116 → 0.1.0-alpha.118

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 (40) hide show
  1. package/content/definitions/blocks/button.yaml +12 -2
  2. package/content/definitions/blocks/html.yaml +13 -0
  3. package/content/definitions/blocks/text.yaml +2 -2
  4. package/content/definitions/channels/ecommerce.yaml +9 -3
  5. package/content/definitions/channels/website.yaml +10 -24
  6. package/content/definitions/field-sets/channel-base.yaml +19 -0
  7. package/content/definitions/field-sets/{page-meta.yaml → channel-seo.yaml} +3 -8
  8. package/content/definitions/field-sets/page-seo.yaml +34 -0
  9. package/content/definitions/field-sets/schema-type.yaml +43 -0
  10. package/content/definitions/node-layouts/landing-page.yml +6 -3
  11. package/content/definitions/node-layouts/single-column.yml +6 -0
  12. package/content/definitions/node-layouts/two-column.yml +9 -0
  13. package/content/definitions/nodes/page.yaml +37 -48
  14. package/content/definitions/trees/navigation.yaml +2 -12
  15. package/dist/assets/index-RJKUlAE_.css +1 -0
  16. package/dist/assets/index-rKs4n94k.js +162 -0
  17. package/dist/index.html +2 -2
  18. package/dist/index.js +3655 -3347
  19. package/package.json +2 -2
  20. package/schema.sql +1 -10
  21. package/templates/astro-starter/astro.config.mjs +2 -2
  22. package/templates/astro-starter/middleware/api-purge.ts +130 -0
  23. package/templates/astro-starter/middleware/index.ts +10 -0
  24. package/templates/astro-starter/middleware/kv-cache.ts +76 -0
  25. package/templates/astro-starter/middleware/response-headers.ts +43 -0
  26. package/templates/astro-starter/public/robots.txt +1 -0
  27. package/templates/astro-starter/src/components/seo/SeoHead.astro +150 -0
  28. package/templates/astro-starter/src/components/ui/KamaImage.astro +2 -1
  29. package/templates/astro-starter/src/layouts/Layout.astro +17 -146
  30. package/templates/astro-starter/src/lib/media/media-proxy.ts +127 -0
  31. package/templates/astro-starter/src/pages/[...slug].astro +12 -1
  32. package/templates/astro-starter/src/pages/llms.txt.ts +97 -0
  33. package/templates/astro-starter/src/pages/media/[...path].ts +3 -109
  34. package/content/definitions/node-layouts/three-column.yml +0 -41
  35. package/content/definitions/trees/social-links.yaml +0 -12
  36. package/dist/assets/index-BN9yFvBt.js +0 -162
  37. package/dist/assets/index-CSj1Dbsz.css +0 -1
  38. package/templates/astro-starter/src/middleware.ts +0 -306
  39. /package/templates/astro-starter/src/{kama-image-service.ts → lib/media/kama-image-service.ts} +0 -0
  40. /package/templates/astro-starter/src/lib/{media-url.ts → media/media-url.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  id: button
2
2
  label: Button
3
3
  group: Content
4
- description: Button text
4
+ description: A customizable button link.
5
5
 
6
6
  fields:
7
7
  text:
@@ -9,6 +9,16 @@ fields:
9
9
  type: richtext
10
10
  editor: button
11
11
  public: true
12
-
12
+ link:
13
+ label: Link
14
+ type: link
15
+ position: sidebar
16
+ allowedLinkTypes:
17
+ - tree
18
+ - node
19
+ - url
20
+ - file
21
+ - email
22
+ - telephone
13
23
  tabs:
14
24
  access: !include ../field-sets/access.yaml
@@ -0,0 +1,13 @@
1
+ id: html
2
+ label: HTML
3
+ group: Content
4
+
5
+ fields:
6
+ body:
7
+ label: HTML
8
+ type: textarea
9
+ editor: default
10
+ public: true
11
+
12
+ tabs:
13
+ access: !include ../field-sets/access.yaml
@@ -9,7 +9,7 @@ fields:
9
9
  label: Text
10
10
  type: richtext
11
11
  editor: default
12
+ allowSplit: true
12
13
  public: true
13
14
 
14
- tabs:
15
- access: !include ../field-sets/access.yaml
15
+ access: !include ../field-sets/access.yaml
@@ -5,7 +5,7 @@ tabs:
5
5
  settings:
6
6
  label: "Channel"
7
7
  fields:
8
- <<: !include ../field-sets/channel-base.yaml
8
+ fieldSet: channel-base
9
9
  currency:
10
10
  label: Default Currency
11
11
  type: select
@@ -18,5 +18,11 @@ tabs:
18
18
  label: Checkout Endpoint URL
19
19
  type: text
20
20
  public: true
21
-
22
- access: !include ../field-sets/access.yaml
21
+ meta:
22
+ label: "SEO"
23
+ fields:
24
+ fieldSet: channel-seo
25
+ access:
26
+ label: "Access"
27
+ fields:
28
+ fieldSet: access
@@ -1,31 +1,17 @@
1
1
  id: website
2
2
  label: "Website"
3
3
 
4
+ # 🎯 2. Mounts the access tab automatically (engine natively resolves fieldSets into tabs if configured in the field set)
5
+ fieldSets:
6
+ - access
7
+
4
8
  tabs:
5
9
  settings:
6
10
  label: "Channel"
7
11
  fields:
8
- # 🎯 1. Merge the channel-base fields directly into this dictionary
9
- <<: !include ../field-sets/channel-base.yaml
10
-
11
- domain:
12
- label: Hostname
13
- type: text
14
- dbType: text
15
- index: true
16
- public: true
17
-
18
- baseUrl:
19
- label: Base URL
20
- type: text
21
- dbType: text
22
- public: true
23
-
24
- defaultLanguage:
25
- label: Channel Language / Locale
26
- type: language-select
27
- dbType: text
28
- public: true
29
-
30
- # 🎯 2. Mount the entire access tab from the include
31
- access: !include ../field-sets/access.yaml
12
+ # 🎯 1. Natively merges channel-base fields into this tab
13
+ fieldSet: channel-base
14
+ meta:
15
+ label: "SEO"
16
+ fields:
17
+ fieldSet: channel-seo
@@ -29,3 +29,22 @@ fields:
29
29
  unique: true
30
30
  pattern: "^[a-z0-9-_]+$"
31
31
  customMessage: "API key must be unique and contain only lowercase letters, numbers, hyphens, or underscores."
32
+
33
+ baseUrl:
34
+ label: Base URL
35
+ type: text
36
+ dbType: text
37
+ public: true
38
+
39
+ defaultLanguage:
40
+ label: Default Language
41
+ type: language-select
42
+ dbType: text
43
+ public: true
44
+
45
+ supportedLanguages:
46
+ label: Supported Languages
47
+ type: language-select
48
+ multiple: true
49
+ dbType: json
50
+ public: true
@@ -1,26 +1,21 @@
1
- label: "Meta"
2
1
  fields:
3
2
  metaDescription:
4
3
  label: Meta Description
5
4
  type: textarea
6
- public: true
7
-
8
- metaKeywords:
9
- label: Meta Keywords
10
- type: textarea
5
+ dbType: text
11
6
  required: false
12
7
  public: true
13
8
 
14
9
  titlePrefix:
15
10
  label: Title Prefix
16
11
  type: text
12
+ dbType: text
17
13
  required: false
18
14
  public: true
19
- inherits: titlePrefix
20
15
 
21
16
  titleSuffix:
22
17
  label: Title Suffix
23
18
  type: text
19
+ dbType: text
24
20
  required: false
25
21
  public: true
26
- inherits: titleSuffix
@@ -0,0 +1,34 @@
1
+ label: "SEO"
2
+ fields:
3
+ # 🎯 1. Include the single field definition file
4
+ - schemaType: !include ./schema-type.yaml
5
+
6
+ # 🎯 2. Override the default for this specific section
7
+ - schemaType:
8
+ default: "WebPage"
9
+
10
+ # 🎯 3. Standard inline fields as sequence array items
11
+ - metaDescription:
12
+ label: Meta Description
13
+ type: textarea
14
+ public: true
15
+
16
+ - metaKeywords:
17
+ label: Meta Keywords
18
+ type: textarea
19
+ required: false
20
+ public: true
21
+
22
+ - titlePrefix:
23
+ label: Title Prefix
24
+ type: text
25
+ required: false
26
+ public: true
27
+ inherits: titlePrefix
28
+
29
+ - titleSuffix:
30
+ label: Title Suffix
31
+ type: text
32
+ required: false
33
+ public: true
34
+ inherits: titleSuffix
@@ -0,0 +1,43 @@
1
+ type: select
2
+ label: "Schema.org Entity Type"
3
+ default: "WebPage"
4
+ public: true
5
+ options:
6
+ - label: "Standard Pages"
7
+ choices:
8
+ - label: "Standard Web Page"
9
+ value: "WebPage"
10
+ - label: "About Page"
11
+ value: "AboutPage"
12
+ - label: "Contact Page"
13
+ value: "ContactPage"
14
+ - label: "FAQ / Help Page"
15
+ value: "FAQPage"
16
+ - label: "Directory / Collection Page"
17
+ value: "CollectionPage"
18
+
19
+ - label: "Editorial & Articles"
20
+ choices:
21
+ - label: "General Article"
22
+ value: "Article"
23
+ - label: "Blog Post"
24
+ value: "BlogPosting"
25
+ - label: "Technical Docs / Guide"
26
+ value: "TechArticle"
27
+ - label: "News / Press Release"
28
+ value: "NewsArticle"
29
+ - label: "Whitepaper / Report"
30
+ value: "Report"
31
+
32
+ - label: "Commercial & Intent"
33
+ choices:
34
+ - label: "Service / Capability"
35
+ value: "Service"
36
+ - label: "Product / E-commerce Item"
37
+ value: "Product"
38
+ - label: "Educational Course"
39
+ value: "Course"
40
+ - label: "Event / Webinar"
41
+ value: "Event"
42
+ - label: "Job Career Listing"
43
+ value: "JobPosting"
@@ -5,7 +5,6 @@ layout:
5
5
  columns: "1fr"
6
6
  areas:
7
7
  - ["header"]
8
- - ["hero"]
9
8
  - ["content"]
10
9
  - ["footer"]
11
10
 
@@ -13,10 +12,14 @@ regions:
13
12
  header:
14
13
  label: Header
15
14
  inherit: parent
16
- hero:
17
- label: Hero / Top Banner
15
+ allowedBlocks: "*"
18
16
  content:
19
17
  label: Content
18
+ allowedBlocks: "*"
20
19
  footer:
21
20
  label: Footer
22
21
  inherit: parent
22
+ disallowedBlocks:
23
+ - hero
24
+ - image_card
25
+ - header_image
@@ -33,6 +33,12 @@ regions:
33
33
 
34
34
  content:
35
35
  label: Content
36
+ allowedBlocks: "*"
37
+
36
38
  footer:
37
39
  label: Footer
38
40
  inherit: parent
41
+ disallowedBlocks:
42
+ - hero
43
+ - image_card
44
+ - header_image
@@ -33,8 +33,17 @@ regions:
33
33
  public: true
34
34
  content: # 👈 Changed 'main' to 'content'
35
35
  label: Content
36
+ allowedBlocks: "*"
36
37
  sidebar:
37
38
  label: Sidebar
39
+ disallowedBlocks:
40
+ - hero
41
+ - image_card
42
+ - header_image
38
43
  footer:
39
44
  label: Footer
40
45
  inherit: parent
46
+ disallowedBlocks:
47
+ - hero
48
+ - image_card
49
+ - header_image
@@ -5,64 +5,53 @@ inVault: true
5
5
  hasCanvas: true
6
6
  directLinking: true
7
7
 
8
- # 👈 Keep this as the absolute last-resort fallback for the Public API
9
8
  defaultLayout: "single-column"
10
9
 
11
- # 👈 Cleaned up naming!
12
- allowedBlocks:
13
- - header
14
- - hero
15
- - text
16
- - image_card
17
- - header_image
18
- - two-column
19
- - three-column
20
- - single_image
10
+ allowedBlocks: "*"
21
11
 
22
12
  tabs:
23
13
  settings:
24
14
  label: "Page"
25
15
  fields:
26
- # 🎯 1. Merge ONLY page-base fields into the settings tab
27
- <<: !include ../field-sets/page-base.yaml
16
+ # 🎯 1. Include FieldSet Bundle
17
+ - fieldSet: page-base
28
18
 
29
- # 👉 THE CURRENT PAGE'S LAYOUT
30
- layoutId:
31
- label: Page Layout
32
- type: layout-select
33
- dbType: text
34
- default: "inherit"
35
- inheritsFromParent: true # 👈 Tells the UI to bind to the parent!
36
- allowedLayouts:
37
- - two-column
38
- - single-column
39
- - three-column
40
- - landing-page
41
- options:
42
- - { label: "Inherit Layout", value: "inherit" }
19
+ # 🎯 3. Inline Fields
20
+ - layoutId:
21
+ label: Page Layout
22
+ type: layout-select
23
+ dbType: text
24
+ default: "inherit"
25
+ inheritsFromParent: true
26
+ allowedLayouts:
27
+ - two-column
28
+ - single-column
29
+ - three-column
30
+ - landing-page
31
+ options:
32
+ - { label: "Inherit Layout", value: "inherit" }
43
33
 
44
- # 👉 THE BEHAVIOR FOR ALL CHILDREN
45
- subpageLayoutId:
46
- label: Subpages Layout Rule
47
- type: layout-select
48
- dbType: text
49
- default: "inherit"
50
- inheritsFromParent: true # 👈 A child's subpage rules can ALSO inherit!
51
- allowedLayouts:
52
- - two-column
53
- - three-column
54
- - single-column
55
- - landing-page
56
- options:
57
- - { label: "Inherit Layout", value: "inherit" }
34
+ - subpageLayoutId:
35
+ label: Subpages Layout Rule
36
+ type: layout-select
37
+ dbType: text
38
+ default: "inherit"
39
+ inheritsFromParent: true
40
+ allowedLayouts:
41
+ - two-column
42
+ - three-column
43
+ - single-column
44
+ - landing-page
45
+ options:
46
+ - { label: "Inherit Layout", value: "inherit" }
58
47
 
59
- menuTitle:
60
- label: Menu Title
61
- type: text
62
- dbType: text
63
- public: true
48
+ - menuTitle:
49
+ label: Menu Title
50
+ type: text
51
+ dbType: text
52
+ public: true
64
53
 
65
- # 🎯 2. Mount Meta, Social, and Access as their own dedicated tabs
66
- meta: !include ../field-sets/page-meta.yaml
54
+ # Dedicated Tab Inclusions
55
+ meta: !include ../field-sets/page-seo.yaml
67
56
  social: !include ../field-sets/page-social.yaml
68
57
  access: !include ../field-sets/access.yaml
@@ -6,7 +6,7 @@ tabs:
6
6
  label: "Tree"
7
7
  fields:
8
8
  # 🎯 1. Merge the tree-base fields directly into this dictionary
9
- <<: !include ../field-sets/tree-base.yaml
9
+ fieldSet: tree-base
10
10
 
11
11
  baseUrl:
12
12
  label: Base URL
@@ -15,20 +15,10 @@ tabs:
15
15
  public: true
16
16
 
17
17
  defaultLanguage:
18
- label: Channel Language / Locale
18
+ label: Language / Locale
19
19
  type: language-select
20
20
  dbType: text
21
21
  public: true
22
22
 
23
- maxDepth:
24
- type: select
25
- label: "Maximum Menu Depth"
26
- default: "3"
27
- options:
28
- - "1"
29
- - "2"
30
- - "3"
31
- - "4"
32
-
33
23
  # 🎯 2. Mount the access file as an entirely separate tab
34
24
  access: !include ../field-sets/access.yaml