@documental-xyz/core 0.1.0 → 0.1.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.
- package/env.d.ts +1 -0
- package/integration.ts +3 -0
- package/package.json +10 -5
- package/public/admin/components.yml +38 -0
- package/public/admin/config/Cta_old.yml +137 -0
- package/public/admin/config/collections/pages.yml +24 -0
- package/public/admin/config/components/BigNumbers.yml +33 -0
- package/public/admin/config/components/Button.yml +49 -0
- package/public/admin/config/components/Card.yml +54 -0
- package/public/admin/config/components/Cards.yml +19 -0
- package/public/admin/config/components/CardsCall.yml +66 -0
- package/public/admin/config/components/ChartBar.yml +56 -0
- package/public/admin/config/components/ChartPercentage.yml +47 -0
- package/public/admin/config/components/Column.yml +45 -0
- package/public/admin/config/components/ColumnSticky.yml +70 -0
- package/public/admin/config/components/Columns.yml +90 -0
- package/public/admin/config/components/Compare.yml +29 -0
- package/public/admin/config/components/Cta.yml +194 -0
- package/public/admin/config/components/Gallery.yml +38 -0
- package/public/admin/config/components/Group.yml +143 -0
- package/public/admin/config/components/HtmlEmbed.yml +30 -0
- package/public/admin/config/components/ImageBlock.yml +33 -0
- package/public/admin/config/components/InnerColumns.yml +61 -0
- package/public/admin/config/components/LogosGroup.yml +50 -0
- package/public/admin/config/components/Map.yml +94 -0
- package/public/admin/config/components/MapBox.yml +175 -0
- package/public/admin/config/components/MapView.yml +32 -0
- package/public/admin/config/components/PageSettings.yml +69 -0
- package/public/admin/config/components/PageTheme.yml +71 -0
- package/public/admin/config/components/Pullquote.yml +36 -0
- package/public/admin/config/components/Slider.yml +28 -0
- package/public/admin/config/components/Spacer.yml +27 -0
- package/public/admin/config/components/Text.yml +22 -0
- package/public/admin/config/components/Timeline.yml +27 -0
- package/public/admin/config/components/TimelineBullet.yml +22 -0
- package/public/admin/config/components/VideoEmbed.yml +28 -0
- package/public/admin/config/main.yml +13 -0
- package/public/admin/config/main.yml.template +13 -0
- package/public/admin/config.yml +1775 -0
- package/public/admin/widgets/ColorPicker.svelte +0 -0
- package/public/admin/widgets/ColorSelectWidget.svelte +0 -0
- package/public/admin/widgets/index.js +0 -0
- package/public/favicon.svg +9 -0
- package/src/content/pages/{teste-layout.md → exemple.md} +4 -4
- package/src/vite/yaml-merge-plugin.ts +25 -1
- package/src/content/pages/alter-ameacada.md +0 -80
- package/src/content/pages/expulsions.md +0 -1447
- package/src/content/pages/home.md +0 -346
- package/src/content/pages/nhanderekoa-studio-autonoma.md +0 -3113
- package/src/content/pages/nhanderekoa-terra-ind/303/255gena-jaragu/303/241.md +0 -3806
- package/src/content/pages/nova-landing-page.md +0 -546
- package/src/content/pages/territ/303/263rios-de-exce/303/247/303/243o.md +0 -2199
- package/src/content/pages/teste-alter-do-chao.md +0 -955
- package/src/content/pages/thiago.md +0 -93
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
|
|
2
|
+
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
|
|
3
|
+
<style>
|
|
4
|
+
path { fill: #000; }
|
|
5
|
+
@media (prefers-color-scheme: dark) {
|
|
6
|
+
path { fill: #FFF; }
|
|
7
|
+
}
|
|
8
|
+
</style>
|
|
9
|
+
</svg>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Teste Layout
|
|
3
|
-
slug:
|
|
3
|
+
slug: home
|
|
4
4
|
pageSettings:
|
|
5
5
|
language: pt-BR
|
|
6
|
-
link_pt_br: /
|
|
7
|
-
link_en: /
|
|
8
|
-
link_es: /
|
|
6
|
+
link_pt_br: /home
|
|
7
|
+
link_en: /home-en
|
|
8
|
+
link_es: /home-es
|
|
9
9
|
animations: enable_all
|
|
10
10
|
direction: right
|
|
11
11
|
seoTitle: ''
|
|
@@ -52,6 +52,8 @@ export interface YamlMergePluginOptions {
|
|
|
52
52
|
mediaFolder?: string;
|
|
53
53
|
/** CMS public_folder. Defaults to `'uploads'`. Substitutes `${PUBLIC_FOLDER}`. */
|
|
54
54
|
publicFolder?: string;
|
|
55
|
+
/** Pages collection folder path. Defaults to `'src/content/pages'`. Substitutes `${PAGES_FOLDER}`. */
|
|
56
|
+
pagesFolder?: string;
|
|
55
57
|
/**
|
|
56
58
|
* Override the core package root for template resolution.
|
|
57
59
|
* Defaults to `CORE_ROOT` (resolved from this module's location).
|
|
@@ -67,6 +69,7 @@ interface ResolvedOptions {
|
|
|
67
69
|
authBaseUrl: string;
|
|
68
70
|
mediaFolder: string;
|
|
69
71
|
publicFolder: string;
|
|
72
|
+
pagesFolder: string;
|
|
70
73
|
coreRoot: string;
|
|
71
74
|
}
|
|
72
75
|
|
|
@@ -75,6 +78,7 @@ export const YAML_MERGE_DEFAULTS = {
|
|
|
75
78
|
branch: 'main',
|
|
76
79
|
mediaFolder: 'public/uploads',
|
|
77
80
|
publicFolder: 'uploads',
|
|
81
|
+
pagesFolder: 'src/content/pages',
|
|
78
82
|
} as const;
|
|
79
83
|
|
|
80
84
|
function resolveOptions(opts: YamlMergePluginOptions): ResolvedOptions {
|
|
@@ -89,6 +93,7 @@ function resolveOptions(opts: YamlMergePluginOptions): ResolvedOptions {
|
|
|
89
93
|
authBaseUrl: opts.authBaseUrl ?? '',
|
|
90
94
|
mediaFolder: opts.mediaFolder ?? YAML_MERGE_DEFAULTS.mediaFolder,
|
|
91
95
|
publicFolder: opts.publicFolder ?? YAML_MERGE_DEFAULTS.publicFolder,
|
|
96
|
+
pagesFolder: opts.pagesFolder ?? YAML_MERGE_DEFAULTS.pagesFolder,
|
|
92
97
|
coreRoot: opts.coreRoot ?? CORE_ROOT,
|
|
93
98
|
};
|
|
94
99
|
}
|
|
@@ -102,9 +107,27 @@ export function substitutePlaceholders(
|
|
|
102
107
|
text: string,
|
|
103
108
|
values: Record<string, string>
|
|
104
109
|
): string {
|
|
105
|
-
|
|
110
|
+
// First pass: remove entire lines where a placeholder is the sole value
|
|
111
|
+
// and the placeholder resolves to empty string (e.g. `base_url: ${AUTH_BASE_URL}`
|
|
112
|
+
// when AUTH_BASE_URL is unset → the line becomes `base_url: ` which YAML
|
|
113
|
+
// interprets as `null`, crashing Sveltia CMS).
|
|
114
|
+
let result = text.replace(
|
|
115
|
+
/^([ \t]*\w+:[\t ]*)\$\{([A-Z_][A-Z0-9_]*)\}[\t ]*$/gm,
|
|
116
|
+
(match, prefix, name) => {
|
|
117
|
+
if (
|
|
118
|
+
Object.prototype.hasOwnProperty.call(values, name) &&
|
|
119
|
+
values[name] === ''
|
|
120
|
+
) {
|
|
121
|
+
return ''; // Remove the line entirely
|
|
122
|
+
}
|
|
123
|
+
return match; // Leave it for the generic substitution below
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
// Second pass: substitute all remaining placeholders normally
|
|
127
|
+
result = result.replace(/\$\{([A-Z_][A-Z0-9_]*)\}/g, (match, name) =>
|
|
106
128
|
Object.prototype.hasOwnProperty.call(values, name) ? values[name] : match
|
|
107
129
|
);
|
|
130
|
+
return result;
|
|
108
131
|
}
|
|
109
132
|
|
|
110
133
|
/** Read a file, returning empty string if it does not exist. */
|
|
@@ -192,6 +215,7 @@ export async function buildMergedYamlText(
|
|
|
192
215
|
AUTH_BASE_URL: resolved.authBaseUrl,
|
|
193
216
|
MEDIA_FOLDER: resolved.mediaFolder,
|
|
194
217
|
PUBLIC_FOLDER: resolved.publicFolder,
|
|
218
|
+
PAGES_FOLDER: resolved.pagesFolder,
|
|
195
219
|
});
|
|
196
220
|
}
|
|
197
221
|
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Alter do chao
|
|
3
|
-
slug: alter-ameacada
|
|
4
|
-
pageSettings:
|
|
5
|
-
language: pt-BR
|
|
6
|
-
link_pt_br: /alter-ameacada
|
|
7
|
-
link_en: /alter-ameacada-en
|
|
8
|
-
link_es: /alter-ameacada-es
|
|
9
|
-
direction: left
|
|
10
|
-
seoTitle: ''
|
|
11
|
-
seoDescription: ''
|
|
12
|
-
animations: enable_all
|
|
13
|
-
pageTheme:
|
|
14
|
-
primaryColor: '#000009'
|
|
15
|
-
secondaryColor: '#f0ead9'
|
|
16
|
-
highlightColor: '#006949'
|
|
17
|
-
auxiliaryColor: '#6670ff'
|
|
18
|
-
displayFont: ''
|
|
19
|
-
textFont: ''
|
|
20
|
-
spacingPatterns:
|
|
21
|
-
- name: Teste
|
|
22
|
-
mobile: '10'
|
|
23
|
-
tablet: '11'
|
|
24
|
-
desktop: '12'
|
|
25
|
-
mapbox:
|
|
26
|
-
columnAlign: left
|
|
27
|
-
floatingText: false
|
|
28
|
-
style: mapbox://styles/comborari/ckr4wi3k80fpl17qo34th6kk2
|
|
29
|
-
center:
|
|
30
|
-
lng: -54.875
|
|
31
|
-
lat: -2.53
|
|
32
|
-
zoom: 1.1
|
|
33
|
-
bearing: 0
|
|
34
|
-
pitch: 0
|
|
35
|
-
layers: []
|
|
36
|
-
token: pk.eyJ1IjoiY29tYm9yYXJpIiwiYSI6ImNrcjR3OWczMjBhaWEyeHIyaWhwMnUzNHcifQ.Yv7o7kj1ImyC9Rn-egF0TQ
|
|
37
|
-
views:
|
|
38
|
-
- id: view_0
|
|
39
|
-
center:
|
|
40
|
-
lng: -58.911
|
|
41
|
-
lat: -6.315
|
|
42
|
-
duration: 4500
|
|
43
|
-
zoom: 4
|
|
44
|
-
bearing: 0
|
|
45
|
-
pitch: 0
|
|
46
|
-
mobile:
|
|
47
|
-
zoom: 3.5
|
|
48
|
-
captions:
|
|
49
|
-
title: false
|
|
50
|
-
notes: false
|
|
51
|
-
items:
|
|
52
|
-
- icon: <span class="material-symbols-outlined fill" style="color:white">show_chart</span>
|
|
53
|
-
text: Brazil's Legal Amazon
|
|
54
|
-
layers:
|
|
55
|
-
- amazonialegal
|
|
56
|
-
mapView: ''
|
|
57
|
-
components:
|
|
58
|
-
- type: Group
|
|
59
|
-
shortTitle: '-'
|
|
60
|
-
longTitle: '-'
|
|
61
|
-
description: ''
|
|
62
|
-
showInMenu: false
|
|
63
|
-
animations: false
|
|
64
|
-
id: '1'
|
|
65
|
-
layout: default
|
|
66
|
-
txtColor: Secondary
|
|
67
|
-
customTxtColor: ''
|
|
68
|
-
bgColor: Primary
|
|
69
|
-
customBgColor: ''
|
|
70
|
-
backgroundMedia: []
|
|
71
|
-
overlay: dark
|
|
72
|
-
components:
|
|
73
|
-
- type: HtmlEmbed
|
|
74
|
-
wideHtml: false
|
|
75
|
-
htmlCode: |-
|
|
76
|
-
<script>
|
|
77
|
-
window.location.href = "https://v1.documental.xyz/pt/alter-ameacada";
|
|
78
|
-
</script>
|
|
79
|
-
htmlCaption: ''
|
|
80
|
-
---
|