@styleflow.app/flowpress-astro-core 1.0.0-beta.26 → 1.0.0-beta.28
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/CHANGELOG.md +11 -0
- package/dist/astro/BaseLayout.astro +10 -9
- package/dist/astro/DefaultTemplate.astro +6 -6
- package/dist/astro/GutenbergRenderer.astro +33 -33
- package/dist/astro/StyleflowElement.astro +23 -0
- package/dist/astro/blocks/CarouselBlock.astro +5 -5
- package/dist/astro/blocks/CarouselItemBlock.astro +3 -3
- package/dist/astro/blocks/ColumnBlock.astro +3 -3
- package/dist/astro/blocks/CoverBlock.astro +6 -6
- package/dist/astro/blocks/FormBlock.astro +6 -6
- package/dist/astro/blocks/GridBlock.astro +3 -3
- package/dist/astro/blocks/HeroBlock.astro +3 -3
- package/dist/astro/blocks/ImageBlock.astro +3 -3
- package/dist/astro/blocks/ListItemFallback.astro +5 -5
- package/dist/astro/blocks/NumberSpinnerBlock.astro +3 -3
- package/dist/astro/blocks/SemanticElement.astro +19 -19
- package/dist/astro/blocks/SiteLogoBlock.astro +3 -3
- package/dist/astro/blocks/TextBlock.astro +10 -9
- package/dist/astro/blocks/ThemeToggleBlock.astro +4 -4
- package/dist/astro/blocks/helpers.d.ts.map +1 -1
- package/dist/astro/blocks/helpers.js +4 -3
- package/dist/astro/blocks/helpers.js.map +1 -1
- package/dist/astro/blocks/helpers.ts +4 -3
- package/dist/astro/native/Blob.astro +6 -6
- package/dist/astro/native/CustomFieldValue.astro +25 -24
- package/dist/astro/native/LevelTag.astro +10 -10
- package/dist/astro/native/MapBlock.astro +5 -5
- package/dist/astro/native/NativeHtmlBlock.astro +2 -2
- package/dist/astro/native/NativeIconBlock.astro +2 -2
- package/dist/astro/native/ResolvedBlocks.astro +6 -6
- package/dist/astro/native/SyncedPatternContent.astro +6 -6
- package/dist/astro/native/TermFieldValue.astro +5 -4
- package/dist/astro/native/Timeline.astro +12 -12
- package/dist/astro/native/core-block.astro +2 -2
- package/dist/astro/native/core-button.astro +8 -8
- package/dist/astro/native/core-buttons.astro +2 -2
- package/dist/astro/native/core-group.astro +9 -9
- package/dist/astro/native/core-home-link.astro +4 -3
- package/dist/astro/native/core-image.astro +9 -9
- package/dist/astro/native/core-navigation-link.astro +10 -9
- package/dist/astro/native/core-navigation-submenu.astro +13 -12
- package/dist/astro/native/core-navigation.astro +17 -17
- package/dist/astro/native/core-page-list-data-item.astro +7 -6
- package/dist/astro/native/core-page-list-item.astro +3 -2
- package/dist/astro/native/core-page-list.astro +3 -3
- package/dist/astro/native/core-post-date.astro +7 -6
- package/dist/astro/native/core-post-excerpt.astro +7 -7
- package/dist/astro/native/core-post-featured-image.astro +5 -5
- package/dist/astro/native/core-post-template.astro +5 -5
- package/dist/astro/native/core-post-terms.astro +13 -12
- package/dist/astro/native/core-post-title.astro +2 -2
- package/dist/astro/native/core-query-no-results.astro +2 -2
- package/dist/astro/native/core-query.astro +6 -6
- package/dist/astro/native/core-separator.astro +20 -0
- package/dist/astro/native/core-site-title.astro +10 -9
- package/dist/astro/native/core-term-description.astro +2 -2
- package/dist/astro/native/core-term-name.astro +4 -3
- package/dist/astro/native/core-term-template.astro +5 -5
- package/dist/astro/native/core-terms-query.astro +5 -5
- package/dist/astro/native/core-transparent.astro +2 -2
- package/dist/astro/native/registry.d.ts.map +1 -1
- package/dist/astro/native/registry.js +2 -0
- package/dist/astro/native/registry.js.map +1 -1
- package/dist/astro/native/registry.ts +2 -0
- package/dist/astro/native/sf-block-binding.astro +3 -3
- package/dist/astro/preferences/AccessibilityPanel.astro +17 -17
- package/dist/astro/preferences/Toggle.astro +7 -7
- package/dist/default-blocks.d.ts +1 -1
- package/dist/default-blocks.d.ts.map +1 -1
- package/dist/default-blocks.js +2 -1
- package/dist/default-blocks.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/styleflow.d.ts.map +1 -1
- package/dist/styleflow.js +11 -2
- package/dist/styleflow.js.map +1 -1
- package/dist/text.d.ts +3 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +6 -0
- package/dist/text.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.28 — 2026-10-08
|
|
4
|
+
|
|
5
|
+
- Decode WordPress entities once for escaped plain text across site titles, navigation, terms, custom fields and metadata.
|
|
6
|
+
- Add the official core/separator adapter with Styleflow props and a line painted from foreground via currentColor; preserve wide and dots variants.
|
|
7
|
+
- [Canonical verification](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-08-tipografia-tag-mapping.md).
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.27 — 2026-10-08
|
|
10
|
+
|
|
11
|
+
- Render Gutenberg defaults through HTML tag mapping without text data attributes across official blocks, native adapters and independent Number Spinner segments. Preserve explicit typography overrides.
|
|
12
|
+
- [Canonical verification](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-08-tipografia-tag-mapping.md).
|
|
13
|
+
|
|
3
14
|
## 1.0.0-beta.26 — 2026-10-08
|
|
4
15
|
|
|
5
16
|
- Keep inherited panel visibility out of generic transitions and disable transitions throughout the panel when motion is reduced, so every switch receives keyboard focus reliably.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { decodeFlowpressText } from "../text.js";
|
|
2
3
|
import type { SfSeo } from "../types.js";
|
|
3
|
-
import
|
|
4
|
+
import StyleflowElement from "./StyleflowElement.astro";
|
|
4
5
|
import ThemeRuntime from "./ThemeRuntime.astro";
|
|
5
6
|
import AccessibilityPanel from "./preferences/AccessibilityPanel.astro";
|
|
6
7
|
import PreferencesRuntime from "./preferences/PreferencesRuntime.astro";
|
|
@@ -28,8 +29,8 @@ const defaultTheme = siteDesign?.defaults.theme || theme;
|
|
|
28
29
|
const documentAttributes = siteDesign ? flowpressSiteDesignAttributes(siteDesign) : {
|
|
29
30
|
html: defaultTheme ? { "data-styleflow-theme": defaultTheme } : {}, body: {}
|
|
30
31
|
};
|
|
31
|
-
const title = seo?.title || siteName;
|
|
32
|
-
const description = seo?.description
|
|
32
|
+
const title = decodeFlowpressText(seo?.title || siteName);
|
|
33
|
+
const description = decodeFlowpressText(seo?.description);
|
|
33
34
|
const robots = seo?.robots?.join(",") || "";
|
|
34
35
|
const jsonLd = seo?.jsonLd ? JSON.stringify(seo.jsonLd) : null;
|
|
35
36
|
---
|
|
@@ -48,14 +49,14 @@ const jsonLd = seo?.jsonLd ? JSON.stringify(seo.jsonLd) : null;
|
|
|
48
49
|
{seo?.hreflang?.map((alternate) => (
|
|
49
50
|
<link rel="alternate" hreflang={alternate.locale} href={alternate.url} />
|
|
50
51
|
))}
|
|
51
|
-
{seo?.openGraph?.title && <meta property="og:title" content={seo.openGraph.title} />}
|
|
52
|
-
{seo?.openGraph?.description && <meta property="og:description" content={seo.openGraph.description} />}
|
|
52
|
+
{seo?.openGraph?.title && <meta property="og:title" content={decodeFlowpressText(seo.openGraph.title)} />}
|
|
53
|
+
{seo?.openGraph?.description && <meta property="og:description" content={decodeFlowpressText(seo.openGraph.description)} />}
|
|
53
54
|
{seo?.canonicalUrl && <meta property="og:url" content={seo.canonicalUrl} />}
|
|
54
55
|
{seo?.openGraph?.image?.url && <meta property="og:image" content={seo.openGraph.image.url} />}
|
|
55
56
|
{seo?.openGraph?.image?.alt && <meta property="og:image:alt" content={seo.openGraph.image.alt} />}
|
|
56
57
|
<meta name="twitter:card" content={seo?.twitter?.image?.url ? "summary_large_image" : "summary"} />
|
|
57
|
-
{seo?.twitter?.title && <meta name="twitter:title" content={seo.twitter.title} />}
|
|
58
|
-
{seo?.twitter?.description && <meta name="twitter:description" content={seo.twitter.description} />}
|
|
58
|
+
{seo?.twitter?.title && <meta name="twitter:title" content={decodeFlowpressText(seo.twitter.title)} />}
|
|
59
|
+
{seo?.twitter?.description && <meta name="twitter:description" content={decodeFlowpressText(seo.twitter.description)} />}
|
|
59
60
|
{seo?.twitter?.image?.url && <meta name="twitter:image" content={seo.twitter.image.url} />}
|
|
60
61
|
{seo?.twitter?.image?.alt && <meta name="twitter:image:alt" content={seo.twitter.image.alt} />}
|
|
61
62
|
{jsonLd && <script type="application/ld+json" set:html={jsonLd} />}
|
|
@@ -65,9 +66,9 @@ const jsonLd = seo?.jsonLd ? JSON.stringify(seo.jsonLd) : null;
|
|
|
65
66
|
<slot name="head" />
|
|
66
67
|
</head>
|
|
67
68
|
<body {...documentAttributes.body}>
|
|
68
|
-
<
|
|
69
|
+
<StyleflowElement as="main" surface={siteDesign?.defaults.surface || "default"} layoutRole="none" density={siteDesign?.defaults.density || "regular"}>
|
|
69
70
|
<slot />
|
|
70
|
-
</
|
|
71
|
+
</StyleflowElement>
|
|
71
72
|
{showPreferences && <AccessibilityPanel themes={themes} />}
|
|
72
73
|
</body>
|
|
73
74
|
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "./StyleflowElement.astro";
|
|
3
3
|
import BaseLayout from "./BaseLayout.astro";
|
|
4
4
|
import GutenbergRenderer from "./GutenbergRenderer.astro";
|
|
5
5
|
import type { FlowpressTemplateProps } from "../types.js";
|
|
@@ -24,23 +24,23 @@ const hasGutembergBlocks = Array.isArray(content?.contentBlocks) && content.cont
|
|
|
24
24
|
contract={styleflowContract}
|
|
25
25
|
/>
|
|
26
26
|
) : (
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
{content?.excerpt && <
|
|
27
|
+
<StyleflowElement as="section" surface="default" layoutRole="section" density="regular">
|
|
28
|
+
<StyleflowElement as="h1">{isNotFound ? "Pagina non trovata" : title}</StyleflowElement>
|
|
29
|
+
{content?.excerpt && <StyleflowElement as="p">{content.excerpt}</StyleflowElement>}
|
|
30
30
|
{Array.isArray(content?.contentBlocks) && content.contentBlocks.length > 0 ? (
|
|
31
31
|
<GutenbergRenderer
|
|
32
32
|
blocks={content.contentBlocks as import("../types.js").FlowpressBlock[]}
|
|
33
33
|
contract={styleflowContract}
|
|
34
34
|
/>
|
|
35
35
|
) : content?.content && (
|
|
36
|
-
<
|
|
36
|
+
<StyleflowElement as="div"
|
|
37
37
|
surface="default"
|
|
38
38
|
layoutRole="stack"
|
|
39
39
|
density="regular"
|
|
40
40
|
set:html={String(content.content)}
|
|
41
41
|
/>
|
|
42
42
|
)}
|
|
43
|
-
</
|
|
43
|
+
</StyleflowElement>
|
|
44
44
|
)}
|
|
45
45
|
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import "./native/grid.css";
|
|
3
|
-
import
|
|
3
|
+
import StyleflowElement from "./StyleflowElement.astro";
|
|
4
4
|
import type {
|
|
5
5
|
FlowpressBlockAdapters,
|
|
6
6
|
FlowpressBlockRenderers,
|
|
@@ -331,7 +331,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
331
331
|
</>
|
|
332
332
|
);
|
|
333
333
|
return href ? (
|
|
334
|
-
<
|
|
334
|
+
<StyleflowElement as="a"
|
|
335
335
|
href={href}
|
|
336
336
|
target={opensInNewTab ? "_blank" : undefined}
|
|
337
337
|
rel={opensInNewTab ? "noopener noreferrer" : undefined}
|
|
@@ -339,16 +339,16 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
339
339
|
{...htmlAttributes}
|
|
340
340
|
>
|
|
341
341
|
{buttonContent}
|
|
342
|
-
</
|
|
342
|
+
</StyleflowElement>
|
|
343
343
|
) : (
|
|
344
|
-
<
|
|
344
|
+
<StyleflowElement as="span"
|
|
345
345
|
aria-disabled="true"
|
|
346
346
|
data-flowpress-link-unresolved
|
|
347
347
|
{...buttonSemantic}
|
|
348
348
|
{...htmlAttributes}
|
|
349
349
|
>
|
|
350
350
|
{buttonContent}
|
|
351
|
-
</
|
|
351
|
+
</StyleflowElement>
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
354
|
|
|
@@ -395,7 +395,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
395
395
|
? objectCollection(block.attributes.images)
|
|
396
396
|
: [];
|
|
397
397
|
return (
|
|
398
|
-
<
|
|
398
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
399
399
|
{images.map((image) => image.url ? (
|
|
400
400
|
<img
|
|
401
401
|
src={String(image.url)}
|
|
@@ -404,7 +404,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
404
404
|
decoding="async"
|
|
405
405
|
/>
|
|
406
406
|
) : null)}
|
|
407
|
-
</
|
|
407
|
+
</StyleflowElement>
|
|
408
408
|
);
|
|
409
409
|
}
|
|
410
410
|
|
|
@@ -412,7 +412,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
412
412
|
const video = objectValue(block, "video");
|
|
413
413
|
const poster = objectValue(block, "poster");
|
|
414
414
|
return video.url ? (
|
|
415
|
-
<
|
|
415
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
416
416
|
<video
|
|
417
417
|
src={String(video.url)}
|
|
418
418
|
poster={poster.url ? String(poster.url) : undefined}
|
|
@@ -421,14 +421,14 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
421
421
|
muted={Boolean(block.attributes.autoplay)}
|
|
422
422
|
playsinline
|
|
423
423
|
/>
|
|
424
|
-
</
|
|
424
|
+
</StyleflowElement>
|
|
425
425
|
) : null;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
if (name === "video-youtube") {
|
|
429
429
|
const embed = youtubeEmbedUrl(block.attributes.url);
|
|
430
430
|
return embed ? (
|
|
431
|
-
<
|
|
431
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
432
432
|
<iframe
|
|
433
433
|
src={embed}
|
|
434
434
|
title={String(block.attributes.title ?? "YouTube video")}
|
|
@@ -436,15 +436,15 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
436
436
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
437
437
|
allowfullscreen
|
|
438
438
|
/>
|
|
439
|
-
</
|
|
439
|
+
</StyleflowElement>
|
|
440
440
|
) : null;
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
if (name === "chip") {
|
|
444
444
|
return (
|
|
445
|
-
<
|
|
445
|
+
<StyleflowElement as="span" {...semantic} {...htmlAttributes}>
|
|
446
446
|
{textValue(block, "label")}
|
|
447
|
-
</
|
|
447
|
+
</StyleflowElement>
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
450
|
|
|
@@ -452,14 +452,14 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
452
452
|
const media = objectValue(block, "image");
|
|
453
453
|
const href = linkValue(block);
|
|
454
454
|
return (
|
|
455
|
-
<
|
|
455
|
+
<StyleflowElement as="article" {...semantic} {...htmlAttributes}>
|
|
456
456
|
{media.url && (
|
|
457
457
|
<img src={String(media.url)} alt={String(media.alt ?? "")} loading="lazy" />
|
|
458
458
|
)}
|
|
459
|
-
{block.attributes.title && <
|
|
460
|
-
{block.attributes.text && <
|
|
461
|
-
{href && <
|
|
462
|
-
</
|
|
459
|
+
{block.attributes.title && <StyleflowElement as="h3">{String(block.attributes.title)}</StyleflowElement>}
|
|
460
|
+
{block.attributes.text && <StyleflowElement as="p">{String(block.attributes.text)}</StyleflowElement>}
|
|
461
|
+
{href && <StyleflowElement as="a" href={href}>Scopri</StyleflowElement>}
|
|
462
|
+
</StyleflowElement>
|
|
463
463
|
);
|
|
464
464
|
}
|
|
465
465
|
|
|
@@ -471,9 +471,9 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
471
471
|
? block.attributes.resolvedBlocks as FlowpressBlock[][]
|
|
472
472
|
: [];
|
|
473
473
|
return (
|
|
474
|
-
<
|
|
474
|
+
<StyleflowElement as="ul" {...semantic} {...htmlAttributes}>
|
|
475
475
|
{items.map((item, index) => (
|
|
476
|
-
<
|
|
476
|
+
<StyleflowElement as="li">
|
|
477
477
|
{resolvedBlocks[index]?.length ? (
|
|
478
478
|
<Astro.self descriptorIndex={descriptors}
|
|
479
479
|
blocks={resolvedBlocks[index]}
|
|
@@ -485,9 +485,9 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
485
485
|
) : (
|
|
486
486
|
<ListItemFallback item={item} />
|
|
487
487
|
)}
|
|
488
|
-
</
|
|
488
|
+
</StyleflowElement>
|
|
489
489
|
))}
|
|
490
|
-
</
|
|
490
|
+
</StyleflowElement>
|
|
491
491
|
);
|
|
492
492
|
}
|
|
493
493
|
|
|
@@ -519,7 +519,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
519
519
|
|
|
520
520
|
if (name === "accordion-item") {
|
|
521
521
|
return (
|
|
522
|
-
<
|
|
522
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
523
523
|
<details>
|
|
524
524
|
<summary>{String(block.attributes.title ?? "")}</summary>
|
|
525
525
|
<Astro.self descriptorIndex={descriptors}
|
|
@@ -530,7 +530,7 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
530
530
|
{...nestedRendererProps(block.name)}
|
|
531
531
|
/>
|
|
532
532
|
</details>
|
|
533
|
-
</
|
|
533
|
+
</StyleflowElement>
|
|
534
534
|
);
|
|
535
535
|
}
|
|
536
536
|
|
|
@@ -551,30 +551,30 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
551
551
|
+ `?key=${encodeURIComponent(googleMapsApiKey)}`
|
|
552
552
|
+ `&q=${encodeURIComponent(query)}`;
|
|
553
553
|
return (
|
|
554
|
-
<
|
|
554
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
555
555
|
<iframe
|
|
556
556
|
src={source}
|
|
557
557
|
title={address || "Map"}
|
|
558
558
|
loading="lazy"
|
|
559
559
|
referrerpolicy="no-referrer-when-downgrade"
|
|
560
560
|
/>
|
|
561
|
-
</
|
|
561
|
+
</StyleflowElement>
|
|
562
562
|
);
|
|
563
563
|
}
|
|
564
564
|
return query ? (
|
|
565
|
-
<
|
|
566
|
-
<
|
|
565
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
566
|
+
<StyleflowElement as="a"
|
|
567
567
|
href={`https://www.openstreetmap.org/search?query=${encodeURIComponent(query)}`}
|
|
568
568
|
rel="noreferrer"
|
|
569
569
|
>
|
|
570
570
|
{address || query}
|
|
571
|
-
</
|
|
572
|
-
</
|
|
571
|
+
</StyleflowElement>
|
|
572
|
+
</StyleflowElement>
|
|
573
573
|
) : null;
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
const fallbackContent = block.innerHtml && children.length === 0
|
|
577
|
-
? <
|
|
577
|
+
? <StyleflowElement as="div" set:html={block.innerHtml} />
|
|
578
578
|
: (
|
|
579
579
|
<Astro.self descriptorIndex={descriptors}
|
|
580
580
|
blocks={children}
|
|
@@ -585,9 +585,9 @@ function nestedRendererProps(nextParentBlockName: string) {
|
|
|
585
585
|
/>
|
|
586
586
|
);
|
|
587
587
|
return name === "section" ? (
|
|
588
|
-
<
|
|
588
|
+
<StyleflowElement as="section" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
|
|
589
589
|
) : (
|
|
590
|
-
<
|
|
590
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
|
|
591
591
|
);
|
|
592
592
|
})}
|
|
593
593
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { decodeFlowpressText } from "../text.js";
|
|
3
|
+
import { resolveStyleFlowAstroPrimitive } from "@styleflow.app/astro";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
as: string;
|
|
7
|
+
[attribute: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
const props = { ...Astro.props } as Props;
|
|
10
|
+
for (const key of ["ty", "v", "w"]) {
|
|
11
|
+
if (props[key] === "" || props[key] === null) delete props[key];
|
|
12
|
+
}
|
|
13
|
+
for (const name of ["alt", "title", "aria-label", "placeholder"]) {
|
|
14
|
+
if (typeof props[name] === "string") props[name] = decodeFlowpressText(props[name]);
|
|
15
|
+
}
|
|
16
|
+
const { tag, attributes } = resolveStyleFlowAstroPrimitive(props);
|
|
17
|
+
if (["ty", "v", "w"].every((key) => props[key] === undefined)) {
|
|
18
|
+
for (const name of ["type", "variant", "weight", "style"]) delete attributes[`data-text-${name}`];
|
|
19
|
+
}
|
|
20
|
+
const Element = tag;
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<Element {...attributes}><slot /></Element>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import "@splidejs/splide/css/core";
|
|
3
|
-
import
|
|
3
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
4
4
|
import { carouselOptions, carouselSettings } from "../../carousel.js";
|
|
5
5
|
import type { FlowpressBlock } from "../../types.js";
|
|
6
6
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
@@ -44,7 +44,7 @@ if (!validChildren && import.meta.env.DEV) {
|
|
|
44
44
|
|
|
45
45
|
{validChildren ? (
|
|
46
46
|
<flowpress-carousel>
|
|
47
|
-
<
|
|
47
|
+
<StyleflowElement as="section"
|
|
48
48
|
{...semantic}
|
|
49
49
|
{...htmlAttributes}
|
|
50
50
|
aria-label={settings.ariaLabel}
|
|
@@ -78,10 +78,10 @@ if (!validChildren && import.meta.env.DEV) {
|
|
|
78
78
|
<span class="splide__toggle__pause">Pausa</span>
|
|
79
79
|
</button>
|
|
80
80
|
) : null}
|
|
81
|
-
</
|
|
81
|
+
</StyleflowElement>
|
|
82
82
|
</flowpress-carousel>
|
|
83
83
|
) : (
|
|
84
|
-
<
|
|
84
|
+
<StyleflowElement as="section"
|
|
85
85
|
{...semantic}
|
|
86
86
|
{...htmlAttributes}
|
|
87
87
|
aria-label={settings.ariaLabel}
|
|
@@ -90,7 +90,7 @@ if (!validChildren && import.meta.env.DEV) {
|
|
|
90
90
|
style={style}
|
|
91
91
|
>
|
|
92
92
|
<slot />
|
|
93
|
-
</
|
|
93
|
+
</StyleflowElement>
|
|
94
94
|
)}
|
|
95
95
|
|
|
96
96
|
<script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { FlowpressBlock } from "../../types.js";
|
|
4
4
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
5
5
|
import { blockHtmlAttributes, semanticProps } from "./helpers.js";
|
|
@@ -17,9 +17,9 @@ const htmlAttributes = blockHtmlAttributes(
|
|
|
17
17
|
);
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<StyleflowElement as="li" {...semantic} {...htmlAttributes}>
|
|
21
21
|
<slot />
|
|
22
|
-
</
|
|
22
|
+
</StyleflowElement>
|
|
23
23
|
|
|
24
24
|
<style>
|
|
25
25
|
.flowpress-carousel-item { min-width: 0; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { FlowpressBlock } from "../../types.js";
|
|
4
4
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
5
5
|
import {
|
|
@@ -33,7 +33,7 @@ const style = [
|
|
|
33
33
|
].join(";");
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
<
|
|
36
|
+
<StyleflowElement as="div"
|
|
37
37
|
{...semantic}
|
|
38
38
|
{...htmlAttributes}
|
|
39
39
|
data-partial={partial}
|
|
@@ -41,7 +41,7 @@ const style = [
|
|
|
41
41
|
style={style}
|
|
42
42
|
>
|
|
43
43
|
<slot />
|
|
44
|
-
</
|
|
44
|
+
</StyleflowElement>
|
|
45
45
|
|
|
46
46
|
<style>
|
|
47
47
|
.flowpress-column {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { DynamicStyleflowProps, StyleflowContract } from "../../styleflow.js";
|
|
4
4
|
import { resolvePrefixedFlowpressBlockStyleflowProps } from "../../styleflow.js";
|
|
5
5
|
import type {
|
|
@@ -75,7 +75,7 @@ const scrimStyleflowProps = resolvePrefixedFlowpressBlockStyleflowProps(
|
|
|
75
75
|
const tagName = coverTagName(attributes.tagName);
|
|
76
76
|
---
|
|
77
77
|
|
|
78
|
-
<
|
|
78
|
+
<StyleflowElement as={tagName} {...rootStyleflowProps} {...rootHtmlProps} style={rootStyle}>
|
|
79
79
|
{backgroundType === "image" && source ? (
|
|
80
80
|
<img
|
|
81
81
|
class="wp-block-cover__image-background flowpress-cover__media"
|
|
@@ -103,17 +103,17 @@ const tagName = coverTagName(attributes.tagName);
|
|
|
103
103
|
/>
|
|
104
104
|
) : null}
|
|
105
105
|
{scrimEnabled ? (
|
|
106
|
-
<
|
|
106
|
+
<StyleflowElement as="span"
|
|
107
107
|
class="wp-block-cover__background flowpress-cover__scrim"
|
|
108
108
|
{...scrimStyleflowProps}
|
|
109
109
|
data-flowpress-cover-scrim
|
|
110
110
|
aria-hidden="true"
|
|
111
111
|
/>
|
|
112
112
|
) : null}
|
|
113
|
-
<
|
|
113
|
+
<StyleflowElement as="div" class="wp-block-cover__inner-container flowpress-cover__content">
|
|
114
114
|
<slot />
|
|
115
|
-
</
|
|
116
|
-
</
|
|
115
|
+
</StyleflowElement>
|
|
116
|
+
</StyleflowElement>
|
|
117
117
|
|
|
118
118
|
<style>
|
|
119
119
|
.flowpress-cover {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types";
|
|
3
3
|
type HTMLInputTypeAttribute = HTMLAttributes<"input">["type"];
|
|
4
|
-
import
|
|
4
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
5
5
|
import type { FlowpressBlock } from "../../types.js";
|
|
6
6
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
7
7
|
import { blockHtmlAttributes, semanticProps } from "./helpers.js";
|
|
@@ -41,11 +41,11 @@ const optionLabel = (field: FormField, index: number): string =>
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
43
|
{schema?.available ? (
|
|
44
|
-
<
|
|
44
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes}>
|
|
45
45
|
<flowpress-cf7-form>
|
|
46
46
|
<form action={schema.submitUrl} method="post" enctype="multipart/form-data" novalidate>
|
|
47
47
|
{block.attributes.title || schema.title ? (
|
|
48
|
-
<
|
|
48
|
+
<StyleflowElement as="h2">{String(block.attributes.title || schema.title)}</StyleflowElement>
|
|
49
49
|
) : null}
|
|
50
50
|
{schema.fields.map((field) => {
|
|
51
51
|
if (field.type === "submit") {
|
|
@@ -132,11 +132,11 @@ const optionLabel = (field: FormField, index: number): string =>
|
|
|
132
132
|
<p data-form-status role="status" aria-live="polite"></p>
|
|
133
133
|
</form>
|
|
134
134
|
</flowpress-cf7-form>
|
|
135
|
-
</
|
|
135
|
+
</StyleflowElement>
|
|
136
136
|
) : (
|
|
137
|
-
<
|
|
137
|
+
<StyleflowElement as="p" {...semantic} {...htmlAttributes} role="status">
|
|
138
138
|
Il modulo non è temporaneamente disponibile.
|
|
139
|
-
</
|
|
139
|
+
</StyleflowElement>
|
|
140
140
|
)}
|
|
141
141
|
|
|
142
142
|
<script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { FlowpressBlock } from "../../types.js";
|
|
4
4
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
5
5
|
import {
|
|
@@ -38,9 +38,9 @@ const style = [
|
|
|
38
38
|
].join(";");
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
-
<
|
|
41
|
+
<StyleflowElement as="div" {...semantic} {...htmlAttributes} data-align={align} style={style}>
|
|
42
42
|
<slot />
|
|
43
|
-
</
|
|
43
|
+
</StyleflowElement>
|
|
44
44
|
|
|
45
45
|
<style>
|
|
46
46
|
.flowpress-grid {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { FlowpressBlock } from "../../types.js";
|
|
4
4
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
5
5
|
import {
|
|
@@ -34,7 +34,7 @@ const scrimEnabled = Boolean(attributes.scrimEnabled) && backgroundType !== "col
|
|
|
34
34
|
const scrimIntensity = Math.min(10, Math.max(1, Number(attributes.scrimIntensity) || 6));
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
<
|
|
37
|
+
<StyleflowElement as="section"
|
|
38
38
|
{...semantic}
|
|
39
39
|
{...htmlAttributes}
|
|
40
40
|
style={[
|
|
@@ -70,7 +70,7 @@ const scrimIntensity = Math.min(10, Math.max(1, Number(attributes.scrimIntensity
|
|
|
70
70
|
<div class="flowpress-hero__content">
|
|
71
71
|
<slot />
|
|
72
72
|
</div>
|
|
73
|
-
</
|
|
73
|
+
</StyleflowElement>
|
|
74
74
|
|
|
75
75
|
<style>
|
|
76
76
|
.flowpress-hero {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import type { StyleflowContract } from "../../styleflow.js";
|
|
4
4
|
import type { FlowpressBlock } from "../../types.js";
|
|
5
5
|
import {
|
|
@@ -69,7 +69,7 @@ const fetchPriority = fetchPriorityValue(attributes.fetchPriority);
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
71
|
{src ? (
|
|
72
|
-
<
|
|
72
|
+
<StyleflowElement as="div"
|
|
73
73
|
{...semanticProps(attributes, contract)}
|
|
74
74
|
{...blockHtmlAttributes(attributes)}
|
|
75
75
|
>
|
|
@@ -85,5 +85,5 @@ const fetchPriority = fetchPriorityValue(attributes.fetchPriority);
|
|
|
85
85
|
decoding={decoding}
|
|
86
86
|
fetchpriority={fetchPriority}
|
|
87
87
|
/>
|
|
88
|
-
</
|
|
88
|
+
</StyleflowElement>
|
|
89
89
|
) : null}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import { flowpressLinkHref } from "../../links.js";
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
@@ -22,9 +22,9 @@ const href = flowpressLinkHref(item.uri);
|
|
|
22
22
|
/>
|
|
23
23
|
) : null}
|
|
24
24
|
{href ? (
|
|
25
|
-
<
|
|
25
|
+
<StyleflowElement as="a" href={href}>{String(item.title ?? "")}</StyleflowElement>
|
|
26
26
|
) : (
|
|
27
|
-
<
|
|
27
|
+
<StyleflowElement as="span">{String(item.title ?? "")}</StyleflowElement>
|
|
28
28
|
)}
|
|
29
|
-
{item.excerpt ? <
|
|
30
|
-
{item.priceHtml ? <
|
|
29
|
+
{item.excerpt ? <StyleflowElement as="p">{String(item.excerpt)}</StyleflowElement> : null}
|
|
30
|
+
{item.priceHtml ? <StyleflowElement as="div" set:html={String(item.priceHtml)} /> : null}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import StyleflowElement from "../StyleflowElement.astro";
|
|
3
3
|
import {
|
|
4
4
|
clampSpinnerDuration,
|
|
5
5
|
spinnerFractionDigits
|
|
@@ -57,7 +57,7 @@ const numberTag = textHtmlTag(attributes.numberTag);
|
|
|
57
57
|
const suffixTag = textHtmlTag(attributes.suffixTag);
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
-
<
|
|
60
|
+
<StyleflowElement as="div"
|
|
61
61
|
{...semantic}
|
|
62
62
|
{...htmlAttributes}
|
|
63
63
|
data-flowpress-number-spinner
|
|
@@ -105,7 +105,7 @@ const suffixTag = textHtmlTag(attributes.suffixTag);
|
|
|
105
105
|
{suffix}
|
|
106
106
|
</SemanticElement>
|
|
107
107
|
) : null}
|
|
108
|
-
</
|
|
108
|
+
</StyleflowElement>
|
|
109
109
|
|
|
110
110
|
<script>
|
|
111
111
|
import { initializeNumberSpinners } from "../../number-spinner.js";
|