@bygghammar/cms-platform 0.43.0 → 0.43.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bygghammar/cms-platform",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -44,6 +44,11 @@ import {
|
|
|
44
44
|
type BlockPatchProps,
|
|
45
45
|
} from "./blocks";
|
|
46
46
|
|
|
47
|
+
/** Link target for a shared-section editor; paths are site-configured strings. */
|
|
48
|
+
function sectionEditorPath(key: string) {
|
|
49
|
+
return `${backofficePaths().sections}/${key}` as never;
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
/** Localized string map as the form block stores its copy. */
|
|
48
53
|
type FormBlockCopy = {
|
|
49
54
|
formKey?: string;
|
|
@@ -125,7 +130,7 @@ function SharedSectionEditor({ sectionKey }: { sectionKey: string }) {
|
|
|
125
130
|
<InspectorSection title="Shared content">
|
|
126
131
|
{known ? (
|
|
127
132
|
<Link
|
|
128
|
-
to={
|
|
133
|
+
to={sectionEditorPath(sectionKey)}
|
|
129
134
|
className="inline-flex items-center gap-2 border border-ink/20 px-3 py-1.5 text-sm hover:border-sea"
|
|
130
135
|
>
|
|
131
136
|
Open “{sectionKey}” section
|
|
@@ -193,7 +198,7 @@ function SharedSectionEditor({ sectionKey }: { sectionKey: string }) {
|
|
|
193
198
|
<RotateCcw className="size-3.5" /> Reset to default
|
|
194
199
|
</button>
|
|
195
200
|
<Link
|
|
196
|
-
to={
|
|
201
|
+
to={sectionEditorPath(sectionKey)}
|
|
197
202
|
className="ml-auto text-[0.7rem] underline text-ink/60 hover:text-ink"
|
|
198
203
|
>
|
|
199
204
|
Open full editor
|
|
@@ -395,7 +400,7 @@ function GlobalContentNotice({ blockType }: { blockType: string }) {
|
|
|
395
400
|
editor for consistent styling across every page.
|
|
396
401
|
</p>
|
|
397
402
|
<Link
|
|
398
|
-
to={
|
|
403
|
+
to={sectionEditorPath(blockType)}
|
|
399
404
|
className="inline-flex items-center gap-2 border border-ink/20 px-3 py-1.5 text-sm hover:border-sea"
|
|
400
405
|
>
|
|
401
406
|
Open “{blockType}” section
|