@brightsideoy/kama 0.1.0-alpha.14 → 0.1.0-alpha.141
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 +195 -0
- package/bin/cli.js +628 -180
- package/content/definitions/block-layouts/three-column.yaml +20 -0
- package/content/definitions/block-layouts/two-column.yaml +29 -0
- package/content/definitions/blocks/button.yaml +24 -0
- package/content/definitions/blocks/header.yaml +13 -0
- package/content/definitions/blocks/header_image.yaml +21 -0
- package/content/definitions/blocks/hero.yaml +28 -0
- package/content/definitions/blocks/html.yaml +12 -0
- package/content/definitions/blocks/image_card.yaml +56 -0
- package/content/definitions/blocks/single_image.yaml +27 -0
- package/content/definitions/blocks/text.yaml +15 -0
- package/content/definitions/channels/ecommerce.yaml +28 -0
- package/content/definitions/channels/website.yaml +41 -0
- package/content/definitions/field-sets/access.yaml +27 -0
- package/content/definitions/field-sets/channel-base.yaml +50 -0
- package/content/definitions/field-sets/channel-seo.yaml +21 -0
- package/content/definitions/field-sets/comments.yaml +11 -0
- package/content/definitions/field-sets/content-block.yaml +41 -0
- package/content/definitions/field-sets/page-base.yaml +44 -0
- package/content/definitions/field-sets/page-seo.yaml +34 -0
- package/content/definitions/field-sets/page-social.yaml +78 -0
- package/content/definitions/field-sets/schema-type.yaml +43 -0
- package/content/definitions/field-sets/tree-base.yaml +31 -0
- package/content/definitions/field-sets/visibility.yaml +8 -0
- package/content/definitions/node-layouts/content.yml +12 -0
- package/content/definitions/node-layouts/landing-page.yml +25 -0
- package/content/definitions/node-layouts/single-column.yml +41 -0
- package/content/definitions/node-layouts/two-column.yml +46 -0
- package/content/definitions/nodes/address.yaml +40 -0
- package/content/definitions/nodes/article.yaml +37 -0
- package/content/definitions/nodes/event.yaml +55 -0
- package/content/definitions/nodes/external-link.yaml +29 -0
- package/content/definitions/nodes/page-skeleton.yaml +48 -0
- package/content/definitions/nodes/page.yaml +70 -0
- package/content/definitions/nodes/person.yaml +41 -0
- package/content/definitions/nodes/product.yaml +89 -0
- package/content/definitions/trees/navigation.yaml +24 -0
- package/definitions/editor/button.ts +11 -0
- package/definitions/editor/default.ts +21 -0
- package/definitions/editor/header.ts +36 -0
- package/definitions/editor/minimal.ts +15 -0
- package/definitions/validators/iban.ts +12 -0
- package/definitions/validators/magic-word.ts +7 -0
- package/dist/assets/index-Bv7fPRX7.css +1 -0
- package/dist/assets/index-DttddV1f.js +162 -0
- package/dist/index.html +13 -0
- package/dist/index.js +12327 -2110
- package/documentation/SCHEMAS.md +182 -0
- package/package.json +12 -14
- package/schema.sql +204 -0
- package/templates/astro-starter/astro.config.mjs +40 -0
- package/templates/astro-starter/middleware/api-purge.ts +130 -0
- package/templates/astro-starter/middleware/index.ts +10 -0
- package/templates/astro-starter/middleware/kv-cache.ts +76 -0
- package/templates/astro-starter/middleware/response-headers.ts +43 -0
- package/templates/astro-starter/package.json.template +20 -0
- package/templates/astro-starter/public/css/standard-theme.css +157 -0
- package/templates/astro-starter/public/robots.txt +23 -0
- package/templates/astro-starter/src/components/blocks/BlockRenderer.astro +133 -0
- package/templates/astro-starter/src/components/blocks/ColumnLayout.astro +66 -0
- package/templates/astro-starter/src/components/blocks/HeaderImage.astro +131 -0
- package/templates/astro-starter/src/components/blocks/Hero.astro +218 -0
- package/templates/astro-starter/src/components/blocks/HtmlBlock.astro +24 -0
- package/templates/astro-starter/src/components/blocks/ImageBlock.astro +160 -0
- package/templates/astro-starter/src/components/blocks/TextBlock.astro +13 -0
- package/templates/astro-starter/src/components/global/Breadcrumb.astro +65 -0
- package/templates/astro-starter/src/components/global/Footer.astro +48 -0
- package/templates/astro-starter/src/components/global/Header.astro +101 -0
- package/templates/astro-starter/src/components/global/NavigationMenu.astro +466 -0
- package/templates/astro-starter/src/components/seo/SeoHead.astro +150 -0
- package/templates/astro-starter/src/components/ui/KamaImage.astro +149 -0
- package/templates/astro-starter/src/layouts/SkeletonLayout.astro +45 -0
- package/templates/astro-starter/src/layouts/StandardLayout.astro +52 -0
- package/templates/astro-starter/src/lib/cms.ts +149 -0
- package/templates/astro-starter/src/lib/media/kama-image-service.ts +41 -0
- package/templates/astro-starter/src/lib/media/media-proxy.ts +127 -0
- package/templates/astro-starter/src/lib/media/media-url.ts +34 -0
- package/templates/astro-starter/src/pages/404.astro +46 -0
- package/templates/astro-starter/src/pages/[...slug].astro +224 -0
- package/templates/astro-starter/src/pages/llms-full.txt.ts +171 -0
- package/templates/astro-starter/src/pages/llms.txt.ts +113 -0
- package/templates/astro-starter/src/pages/media/[...path].ts +7 -0
- package/templates/astro-starter/src/utils/tiptap.ts +113 -0
- package/templates/astro-starter/tsconfig.json +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
id: tree-base
|
|
2
|
+
label: Tree Base Properties
|
|
3
|
+
|
|
4
|
+
fields:
|
|
5
|
+
id:
|
|
6
|
+
label: Internal ID
|
|
7
|
+
type: hidden
|
|
8
|
+
dbType: integer
|
|
9
|
+
primaryKey: true
|
|
10
|
+
|
|
11
|
+
label:
|
|
12
|
+
label: "Label"
|
|
13
|
+
type: text
|
|
14
|
+
dbType: text
|
|
15
|
+
public: true
|
|
16
|
+
rules:
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
key:
|
|
20
|
+
label: "API Identifier"
|
|
21
|
+
type: slug
|
|
22
|
+
dbType: text
|
|
23
|
+
index: true
|
|
24
|
+
public: true
|
|
25
|
+
linkedTo: label
|
|
26
|
+
placeholder: "e.g. main-site, store-eu"
|
|
27
|
+
rules:
|
|
28
|
+
required: true
|
|
29
|
+
unique: true
|
|
30
|
+
pattern: "^[a-z0-9-_]+$"
|
|
31
|
+
customMessage: "API key must be unique and contain only lowercase letters, numbers, hyphens, or underscores."
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
id: landing-page
|
|
2
|
+
label: Landing Page
|
|
3
|
+
|
|
4
|
+
layout:
|
|
5
|
+
columns: "1fr"
|
|
6
|
+
areas:
|
|
7
|
+
- ["header"]
|
|
8
|
+
- ["content"]
|
|
9
|
+
- ["footer"]
|
|
10
|
+
|
|
11
|
+
regions:
|
|
12
|
+
header:
|
|
13
|
+
label: Header
|
|
14
|
+
inherit: parent
|
|
15
|
+
allowedBlocks: "*"
|
|
16
|
+
content:
|
|
17
|
+
label: Content
|
|
18
|
+
allowedBlocks: "*"
|
|
19
|
+
footer:
|
|
20
|
+
label: Footer
|
|
21
|
+
inherit: parent
|
|
22
|
+
disallowedBlocks:
|
|
23
|
+
- hero
|
|
24
|
+
- image_card
|
|
25
|
+
- header_image
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: single-column
|
|
2
|
+
label: Single Column
|
|
3
|
+
|
|
4
|
+
layout:
|
|
5
|
+
columns: "1fr"
|
|
6
|
+
areas:
|
|
7
|
+
- ["header"]
|
|
8
|
+
- ["content"]
|
|
9
|
+
- ["footer"]
|
|
10
|
+
|
|
11
|
+
regions:
|
|
12
|
+
header:
|
|
13
|
+
label: Header Image
|
|
14
|
+
showLabel: true
|
|
15
|
+
inherit: parent
|
|
16
|
+
allowOverride: true
|
|
17
|
+
dropType: image
|
|
18
|
+
maxPreviewWidth: 800px
|
|
19
|
+
multiple: false
|
|
20
|
+
maxSizeMB: 20
|
|
21
|
+
allowedTypes: ["image/*"]
|
|
22
|
+
crops:
|
|
23
|
+
standard:
|
|
24
|
+
label: "Desktop Header (3:1)"
|
|
25
|
+
aspectRatio: 3.0
|
|
26
|
+
tablet:
|
|
27
|
+
label: "Tablet Header (2:1)"
|
|
28
|
+
aspectRatio: 2.0
|
|
29
|
+
public: true
|
|
30
|
+
|
|
31
|
+
content:
|
|
32
|
+
label: Content
|
|
33
|
+
allowedBlocks: "*"
|
|
34
|
+
|
|
35
|
+
footer:
|
|
36
|
+
label: Footer
|
|
37
|
+
inherit: parent
|
|
38
|
+
disallowedBlocks:
|
|
39
|
+
- hero
|
|
40
|
+
- image_card
|
|
41
|
+
- header_image
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# content/definitions/layouts/two-column-split.yml
|
|
2
|
+
id: two-column
|
|
3
|
+
label: Two Column
|
|
4
|
+
|
|
5
|
+
layout:
|
|
6
|
+
columns: "10fr 4fr"
|
|
7
|
+
areas:
|
|
8
|
+
- ["header", "header"]
|
|
9
|
+
- ["content", "sidebar"] # 👈 Changed 'main' to 'content' to match old data!
|
|
10
|
+
- ["footer", "footer"]
|
|
11
|
+
|
|
12
|
+
regions:
|
|
13
|
+
header:
|
|
14
|
+
label: Header Image
|
|
15
|
+
showLabel: true
|
|
16
|
+
inherit: parent
|
|
17
|
+
allowOverride: true
|
|
18
|
+
dropType: image
|
|
19
|
+
maxPreviewWidth: 800px
|
|
20
|
+
multiple: false
|
|
21
|
+
maxSizeMB: 20
|
|
22
|
+
allowedTypes: ["image/*"]
|
|
23
|
+
crops:
|
|
24
|
+
standard:
|
|
25
|
+
label: "Desktop Header (3:1)"
|
|
26
|
+
aspectRatio: 3.0
|
|
27
|
+
tablet:
|
|
28
|
+
label: "Tablet Header (2:1)"
|
|
29
|
+
aspectRatio: 2.0
|
|
30
|
+
public: true
|
|
31
|
+
content: # 👈 Changed 'main' to 'content'
|
|
32
|
+
label: Content
|
|
33
|
+
allowedBlocks: "*"
|
|
34
|
+
sidebar:
|
|
35
|
+
label: Sidebar
|
|
36
|
+
disallowedBlocks:
|
|
37
|
+
- hero
|
|
38
|
+
- image_card
|
|
39
|
+
- header_image
|
|
40
|
+
footer:
|
|
41
|
+
label: Footer
|
|
42
|
+
inherit: parent
|
|
43
|
+
disallowedBlocks:
|
|
44
|
+
- hero
|
|
45
|
+
- image_card
|
|
46
|
+
- header_image
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
id: address
|
|
2
|
+
label: Address
|
|
3
|
+
inTree: false
|
|
4
|
+
|
|
5
|
+
tabs:
|
|
6
|
+
settings:
|
|
7
|
+
label: "Address"
|
|
8
|
+
fields:
|
|
9
|
+
title:
|
|
10
|
+
label: Address Title
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
street:
|
|
14
|
+
label: Street
|
|
15
|
+
|
|
16
|
+
city:
|
|
17
|
+
label: City
|
|
18
|
+
|
|
19
|
+
area:
|
|
20
|
+
label: County / Area
|
|
21
|
+
|
|
22
|
+
zip:
|
|
23
|
+
label: ZIP
|
|
24
|
+
|
|
25
|
+
country:
|
|
26
|
+
label: Country
|
|
27
|
+
|
|
28
|
+
geolocation:
|
|
29
|
+
label: "Geolocation"
|
|
30
|
+
fields:
|
|
31
|
+
lat:
|
|
32
|
+
label: Latitude
|
|
33
|
+
|
|
34
|
+
lng:
|
|
35
|
+
label: Longitude
|
|
36
|
+
|
|
37
|
+
timezone:
|
|
38
|
+
label: Timezone
|
|
39
|
+
|
|
40
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
id: article
|
|
2
|
+
label: Article
|
|
3
|
+
inTree: false
|
|
4
|
+
hasCanvas: true
|
|
5
|
+
directLinking: true
|
|
6
|
+
|
|
7
|
+
defaultLayout: "content"
|
|
8
|
+
allowedBlocks: "*"
|
|
9
|
+
|
|
10
|
+
tabs:
|
|
11
|
+
settings:
|
|
12
|
+
label: "Article"
|
|
13
|
+
fields:
|
|
14
|
+
<<: !include ../field-sets/page-base.yaml
|
|
15
|
+
|
|
16
|
+
title:
|
|
17
|
+
label: Article title
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
slug:
|
|
21
|
+
linkedTo: "title"
|
|
22
|
+
|
|
23
|
+
articleDate:
|
|
24
|
+
type: date
|
|
25
|
+
label: Article Date
|
|
26
|
+
public: true
|
|
27
|
+
default: now
|
|
28
|
+
index: true
|
|
29
|
+
|
|
30
|
+
abstract:
|
|
31
|
+
label: Abstract
|
|
32
|
+
type: textarea
|
|
33
|
+
public: true
|
|
34
|
+
|
|
35
|
+
meta: !include ../field-sets/page-meta.yaml
|
|
36
|
+
social: !include ../field-sets/page-social.yaml
|
|
37
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
id: event
|
|
2
|
+
label: Event
|
|
3
|
+
inTree: false
|
|
4
|
+
hasCanvas: true
|
|
5
|
+
directLinking: true
|
|
6
|
+
|
|
7
|
+
regions:
|
|
8
|
+
main:
|
|
9
|
+
label: Content
|
|
10
|
+
|
|
11
|
+
allowedBlocks:
|
|
12
|
+
- header
|
|
13
|
+
- hero
|
|
14
|
+
- text
|
|
15
|
+
- image_card
|
|
16
|
+
- header_image
|
|
17
|
+
- two-column
|
|
18
|
+
- three-column
|
|
19
|
+
- single_image
|
|
20
|
+
|
|
21
|
+
tabs:
|
|
22
|
+
settings:
|
|
23
|
+
label: "Event"
|
|
24
|
+
fields:
|
|
25
|
+
<<: !include ../field-sets/page-base.yaml
|
|
26
|
+
|
|
27
|
+
title:
|
|
28
|
+
label: Event Title
|
|
29
|
+
required: true
|
|
30
|
+
showAsEditorTitle: true
|
|
31
|
+
|
|
32
|
+
slug:
|
|
33
|
+
linkedTo: "title"
|
|
34
|
+
|
|
35
|
+
startTime:
|
|
36
|
+
type: datetime
|
|
37
|
+
label: Starts
|
|
38
|
+
public: true
|
|
39
|
+
index: true
|
|
40
|
+
showAsEditorTitle: true
|
|
41
|
+
|
|
42
|
+
endTime:
|
|
43
|
+
type: datetime
|
|
44
|
+
label: Finishes
|
|
45
|
+
public: true
|
|
46
|
+
index: true
|
|
47
|
+
|
|
48
|
+
abstract:
|
|
49
|
+
label: Abstract
|
|
50
|
+
type: textarea
|
|
51
|
+
public: true
|
|
52
|
+
|
|
53
|
+
meta: !include ../field-sets/page-meta.yaml
|
|
54
|
+
social: !include ../field-sets/page-social.yaml
|
|
55
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
id: external-link
|
|
2
|
+
label: External Link
|
|
3
|
+
inTree: true
|
|
4
|
+
|
|
5
|
+
tabs:
|
|
6
|
+
settings:
|
|
7
|
+
label: "Link"
|
|
8
|
+
fields:
|
|
9
|
+
<<: !include ../field-sets/page-base.yaml
|
|
10
|
+
|
|
11
|
+
title:
|
|
12
|
+
label: Link Text
|
|
13
|
+
|
|
14
|
+
iconName:
|
|
15
|
+
label: Icon
|
|
16
|
+
type: icon
|
|
17
|
+
dbType: text
|
|
18
|
+
packages: ["heroicons", "lucide", "mdi"]
|
|
19
|
+
|
|
20
|
+
slug:
|
|
21
|
+
label: Slug
|
|
22
|
+
linkedTo: "menuTitle, title"
|
|
23
|
+
|
|
24
|
+
url:
|
|
25
|
+
label: URL
|
|
26
|
+
type: text
|
|
27
|
+
public: true
|
|
28
|
+
|
|
29
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
id: page-skeleton
|
|
2
|
+
label: Page Skeleton
|
|
3
|
+
description: Clean slate for pages with custom CSS and HTML
|
|
4
|
+
inTree: true
|
|
5
|
+
inVault: true
|
|
6
|
+
hasCanvas: true
|
|
7
|
+
directLinking: true
|
|
8
|
+
|
|
9
|
+
defaultLayout: "content"
|
|
10
|
+
|
|
11
|
+
allowedBlocks: "html"
|
|
12
|
+
|
|
13
|
+
tabs:
|
|
14
|
+
settings:
|
|
15
|
+
label: "Page"
|
|
16
|
+
fields:
|
|
17
|
+
# 🎯 1. Include FieldSet Bundle
|
|
18
|
+
- fieldSet: page-base
|
|
19
|
+
|
|
20
|
+
- menuTitle:
|
|
21
|
+
label: Menu Title
|
|
22
|
+
type: text
|
|
23
|
+
dbType: text
|
|
24
|
+
public: true
|
|
25
|
+
css:
|
|
26
|
+
label: "CSS"
|
|
27
|
+
fields:
|
|
28
|
+
- css:
|
|
29
|
+
label: "CSS"
|
|
30
|
+
type: textarea
|
|
31
|
+
public: true
|
|
32
|
+
jsHeader:
|
|
33
|
+
label: "JavaScript"
|
|
34
|
+
fields:
|
|
35
|
+
- jsHeader:
|
|
36
|
+
label: "JS in Header"
|
|
37
|
+
type: textarea
|
|
38
|
+
public: true
|
|
39
|
+
|
|
40
|
+
- jsFooter:
|
|
41
|
+
label: "JS in Footer"
|
|
42
|
+
type: textarea
|
|
43
|
+
public: true
|
|
44
|
+
|
|
45
|
+
# Dedicated Tab Inclusions
|
|
46
|
+
meta: !include ../field-sets/page-seo.yaml
|
|
47
|
+
social: !include ../field-sets/page-social.yaml
|
|
48
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
id: page
|
|
2
|
+
label: Page
|
|
3
|
+
inTree: true
|
|
4
|
+
inVault: true
|
|
5
|
+
hasCanvas: true
|
|
6
|
+
directLinking: true
|
|
7
|
+
|
|
8
|
+
defaultLayout: "single-column"
|
|
9
|
+
|
|
10
|
+
allowedBlocks: "*"
|
|
11
|
+
|
|
12
|
+
tabs:
|
|
13
|
+
settings:
|
|
14
|
+
label: "Page"
|
|
15
|
+
fields:
|
|
16
|
+
# 🎯 1. Include FieldSet Bundle
|
|
17
|
+
- fieldSet: page-base
|
|
18
|
+
|
|
19
|
+
- logoText:
|
|
20
|
+
label: Logo Text
|
|
21
|
+
type: text
|
|
22
|
+
required: false
|
|
23
|
+
public: true
|
|
24
|
+
inherits: logoText
|
|
25
|
+
|
|
26
|
+
- logoImage:
|
|
27
|
+
label: "Logo Image"
|
|
28
|
+
type: image
|
|
29
|
+
maxPreviewWidth: 300px
|
|
30
|
+
multiple: false
|
|
31
|
+
allowedTypes: ["image/svg"]
|
|
32
|
+
public: true
|
|
33
|
+
inherits: logoImage
|
|
34
|
+
|
|
35
|
+
- layoutId:
|
|
36
|
+
label: Page Layout
|
|
37
|
+
type: layout-select
|
|
38
|
+
dbType: text
|
|
39
|
+
default: "inherit"
|
|
40
|
+
inheritsFromParent: true
|
|
41
|
+
allowedLayouts:
|
|
42
|
+
- two-column
|
|
43
|
+
- single-column
|
|
44
|
+
- landing-page
|
|
45
|
+
options:
|
|
46
|
+
- { label: "Inherit Layout", value: "inherit" }
|
|
47
|
+
|
|
48
|
+
- subpageLayoutId:
|
|
49
|
+
label: Subpages Layout Rule
|
|
50
|
+
type: layout-select
|
|
51
|
+
dbType: text
|
|
52
|
+
default: "inherit"
|
|
53
|
+
inheritsFromParent: true
|
|
54
|
+
allowedLayouts:
|
|
55
|
+
- two-column
|
|
56
|
+
- single-column
|
|
57
|
+
- landing-page
|
|
58
|
+
options:
|
|
59
|
+
- { label: "Inherit Layout", value: "inherit" }
|
|
60
|
+
|
|
61
|
+
- menuTitle:
|
|
62
|
+
label: Menu Title
|
|
63
|
+
type: text
|
|
64
|
+
dbType: text
|
|
65
|
+
public: true
|
|
66
|
+
|
|
67
|
+
# Dedicated Tab Inclusions
|
|
68
|
+
meta: !include ../field-sets/page-seo.yaml
|
|
69
|
+
social: !include ../field-sets/page-social.yaml
|
|
70
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: person
|
|
2
|
+
label: Person
|
|
3
|
+
inTree: false
|
|
4
|
+
inVault: true
|
|
5
|
+
hasCanvas: false
|
|
6
|
+
|
|
7
|
+
tabs:
|
|
8
|
+
settings:
|
|
9
|
+
label: "Person"
|
|
10
|
+
fields:
|
|
11
|
+
image:
|
|
12
|
+
label: Image
|
|
13
|
+
type: asset
|
|
14
|
+
multiple: false
|
|
15
|
+
maxSizeMB: 15
|
|
16
|
+
allowedTypes: ["image/*"]
|
|
17
|
+
maxPreviewWidth: 300
|
|
18
|
+
crops:
|
|
19
|
+
list_thumb:
|
|
20
|
+
label: "List View"
|
|
21
|
+
aspectRatio: 1
|
|
22
|
+
shape: "circle"
|
|
23
|
+
public: true
|
|
24
|
+
|
|
25
|
+
title:
|
|
26
|
+
label: Title
|
|
27
|
+
required: false
|
|
28
|
+
|
|
29
|
+
firstName:
|
|
30
|
+
label: First Name
|
|
31
|
+
showAsEditorTitle: true
|
|
32
|
+
|
|
33
|
+
lastName:
|
|
34
|
+
label: Last Name
|
|
35
|
+
showAsEditorTitle: true
|
|
36
|
+
|
|
37
|
+
position:
|
|
38
|
+
label: Position
|
|
39
|
+
required: false
|
|
40
|
+
|
|
41
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
id: product
|
|
2
|
+
label: Product
|
|
3
|
+
inTree: false
|
|
4
|
+
inVault: true
|
|
5
|
+
hasCanvas: false
|
|
6
|
+
directLinking: true
|
|
7
|
+
|
|
8
|
+
layout:
|
|
9
|
+
columns: "3fr 1fr"
|
|
10
|
+
areas:
|
|
11
|
+
- ["main", "sidebar"]
|
|
12
|
+
|
|
13
|
+
regions:
|
|
14
|
+
main:
|
|
15
|
+
label: Product Content
|
|
16
|
+
sidebar:
|
|
17
|
+
label: Sidebar
|
|
18
|
+
|
|
19
|
+
allowedBlocks:
|
|
20
|
+
- header
|
|
21
|
+
- hero
|
|
22
|
+
- text
|
|
23
|
+
- image_card
|
|
24
|
+
- header_image
|
|
25
|
+
- two-column
|
|
26
|
+
- three-column
|
|
27
|
+
- single_image
|
|
28
|
+
|
|
29
|
+
tabs:
|
|
30
|
+
settings:
|
|
31
|
+
label: "Product"
|
|
32
|
+
fields:
|
|
33
|
+
<<: !include ../field-sets/page-base.yaml
|
|
34
|
+
|
|
35
|
+
title:
|
|
36
|
+
label: Product Name
|
|
37
|
+
required: true
|
|
38
|
+
public: true
|
|
39
|
+
|
|
40
|
+
slug:
|
|
41
|
+
linkedTo: "title"
|
|
42
|
+
|
|
43
|
+
price:
|
|
44
|
+
label: Price (€)
|
|
45
|
+
type: number
|
|
46
|
+
public: true
|
|
47
|
+
|
|
48
|
+
description:
|
|
49
|
+
label: Short Abstract
|
|
50
|
+
type: textarea
|
|
51
|
+
public: true
|
|
52
|
+
|
|
53
|
+
media:
|
|
54
|
+
label: "Media"
|
|
55
|
+
fields:
|
|
56
|
+
featuredImage:
|
|
57
|
+
label: Main Product Image
|
|
58
|
+
description: "This is the primary image used in product grids, search results, and catalogs."
|
|
59
|
+
type: asset
|
|
60
|
+
multiple: false
|
|
61
|
+
maxSizeMB: 15
|
|
62
|
+
allowedTypes: ["image/jpeg", "image/png", "image/webp"]
|
|
63
|
+
crops:
|
|
64
|
+
list_thumb:
|
|
65
|
+
label: "List View (4:3)"
|
|
66
|
+
aspectRatio: 1.333
|
|
67
|
+
catalog_card:
|
|
68
|
+
label: "Portrait Card (3:4)"
|
|
69
|
+
aspectRatio: 0.75
|
|
70
|
+
public: true
|
|
71
|
+
|
|
72
|
+
gallery:
|
|
73
|
+
label: Product Gallery
|
|
74
|
+
description: "Drag up to 10 images here for the product detail carousel."
|
|
75
|
+
type: asset
|
|
76
|
+
multiple: true
|
|
77
|
+
maxItems: 10
|
|
78
|
+
allowedTypes: ["image/jpeg", "image/png", "image/webp"]
|
|
79
|
+
crops:
|
|
80
|
+
carousel:
|
|
81
|
+
label: "Carousel Hero (16:9)"
|
|
82
|
+
aspectRatio: 1.777
|
|
83
|
+
zoom:
|
|
84
|
+
label: "Detail Zoom (Square)"
|
|
85
|
+
aspectRatio: 1.0
|
|
86
|
+
public: true
|
|
87
|
+
|
|
88
|
+
meta: !include ../field-sets/page-meta.yaml
|
|
89
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
id: navigation
|
|
2
|
+
label: "Site Navigation"
|
|
3
|
+
|
|
4
|
+
tabs:
|
|
5
|
+
settings:
|
|
6
|
+
label: "Tree"
|
|
7
|
+
fields:
|
|
8
|
+
# 🎯 1. Merge the tree-base fields directly into this dictionary
|
|
9
|
+
fieldSet: tree-base
|
|
10
|
+
|
|
11
|
+
baseUrl:
|
|
12
|
+
label: Base URL
|
|
13
|
+
type: text
|
|
14
|
+
dbType: text
|
|
15
|
+
public: true
|
|
16
|
+
|
|
17
|
+
defaultLanguage:
|
|
18
|
+
label: Language / Locale
|
|
19
|
+
type: language-select
|
|
20
|
+
dbType: text
|
|
21
|
+
public: true
|
|
22
|
+
|
|
23
|
+
# 🎯 2. Mount the access file as an entirely separate tab
|
|
24
|
+
access: !include ../field-sets/access.yaml
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
2
|
+
import type { RteProfile } from "../../utils/rteProfiles";
|
|
3
|
+
import Link from "../../src/utils/CmsLink";
|
|
4
|
+
|
|
5
|
+
export const profile: RteProfile = {
|
|
6
|
+
extensions: [StarterKit, Link.configure({ openOnClick: false })],
|
|
7
|
+
toolbar: [
|
|
8
|
+
"heading-1",
|
|
9
|
+
"heading-2",
|
|
10
|
+
"heading-3",
|
|
11
|
+
"heading-4",
|
|
12
|
+
"bold",
|
|
13
|
+
"italic",
|
|
14
|
+
"bullet-list",
|
|
15
|
+
"ordered-list",
|
|
16
|
+
"blockquote",
|
|
17
|
+
"link",
|
|
18
|
+
"superscript",
|
|
19
|
+
"subscript",
|
|
20
|
+
],
|
|
21
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// definitions/editor/header.ts
|
|
2
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
3
|
+
import Document from "@tiptap/extension-document";
|
|
4
|
+
import Subscript from "@tiptap/extension-subscript";
|
|
5
|
+
import Superscript from "@tiptap/extension-superscript";
|
|
6
|
+
import type { RteProfile } from "../../src/utils/rteProfiles";
|
|
7
|
+
import Link from "../../src/utils/CmsLink";
|
|
8
|
+
|
|
9
|
+
// Custom document node forcing default top-level block to be a heading (H2)
|
|
10
|
+
const CustomDocument = Document.extend({
|
|
11
|
+
content: "heading block*",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const profile: RteProfile = {
|
|
15
|
+
extensions: [
|
|
16
|
+
CustomDocument,
|
|
17
|
+
StarterKit.configure({
|
|
18
|
+
document: false, // Replaces TipTap's default Document with CustomDocument
|
|
19
|
+
heading: { levels: [1, 2, 3, 4] },
|
|
20
|
+
}),
|
|
21
|
+
Subscript.configure(),
|
|
22
|
+
Superscript.configure(),
|
|
23
|
+
Link.configure({ openOnClick: false }),
|
|
24
|
+
],
|
|
25
|
+
toolbar: [
|
|
26
|
+
"heading-1",
|
|
27
|
+
"heading-2",
|
|
28
|
+
"heading-3",
|
|
29
|
+
"heading-4",
|
|
30
|
+
"bold",
|
|
31
|
+
"italic",
|
|
32
|
+
"superscript",
|
|
33
|
+
"subscript",
|
|
34
|
+
"link",
|
|
35
|
+
],
|
|
36
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
2
|
+
import type { RteProfile } from "../../utils/rteProfiles";
|
|
3
|
+
import Link from "../../src/utils/CmsLink";
|
|
4
|
+
|
|
5
|
+
export const profile: RteProfile = {
|
|
6
|
+
extensions: [StarterKit, Link.configure({ openOnClick: false })],
|
|
7
|
+
toolbar: [
|
|
8
|
+
"bold",
|
|
9
|
+
"italic",
|
|
10
|
+
"bullet-list",
|
|
11
|
+
"ordered-list",
|
|
12
|
+
"superscript",
|
|
13
|
+
"subscript",
|
|
14
|
+
],
|
|
15
|
+
};
|