@styleflow.app/flowpress-astro-core 1.0.0-beta.26 → 1.0.0-beta.27

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 (66) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/astro/BaseLayout.astro +3 -3
  3. package/dist/astro/DefaultTemplate.astro +6 -6
  4. package/dist/astro/GutenbergRenderer.astro +33 -33
  5. package/dist/astro/StyleflowElement.astro +19 -0
  6. package/dist/astro/blocks/CarouselBlock.astro +5 -5
  7. package/dist/astro/blocks/CarouselItemBlock.astro +3 -3
  8. package/dist/astro/blocks/ColumnBlock.astro +3 -3
  9. package/dist/astro/blocks/CoverBlock.astro +6 -6
  10. package/dist/astro/blocks/FormBlock.astro +6 -6
  11. package/dist/astro/blocks/GridBlock.astro +3 -3
  12. package/dist/astro/blocks/HeroBlock.astro +3 -3
  13. package/dist/astro/blocks/ImageBlock.astro +3 -3
  14. package/dist/astro/blocks/ListItemFallback.astro +5 -5
  15. package/dist/astro/blocks/NumberSpinnerBlock.astro +3 -3
  16. package/dist/astro/blocks/SemanticElement.astro +19 -19
  17. package/dist/astro/blocks/SiteLogoBlock.astro +3 -3
  18. package/dist/astro/blocks/TextBlock.astro +8 -8
  19. package/dist/astro/blocks/ThemeToggleBlock.astro +4 -4
  20. package/dist/astro/blocks/helpers.d.ts.map +1 -1
  21. package/dist/astro/blocks/helpers.js +4 -3
  22. package/dist/astro/blocks/helpers.js.map +1 -1
  23. package/dist/astro/blocks/helpers.ts +4 -3
  24. package/dist/astro/native/Blob.astro +6 -6
  25. package/dist/astro/native/CustomFieldValue.astro +21 -21
  26. package/dist/astro/native/LevelTag.astro +10 -10
  27. package/dist/astro/native/MapBlock.astro +5 -5
  28. package/dist/astro/native/NativeHtmlBlock.astro +2 -2
  29. package/dist/astro/native/NativeIconBlock.astro +2 -2
  30. package/dist/astro/native/ResolvedBlocks.astro +6 -6
  31. package/dist/astro/native/SyncedPatternContent.astro +6 -6
  32. package/dist/astro/native/TermFieldValue.astro +4 -4
  33. package/dist/astro/native/Timeline.astro +12 -12
  34. package/dist/astro/native/core-block.astro +2 -2
  35. package/dist/astro/native/core-button.astro +8 -8
  36. package/dist/astro/native/core-buttons.astro +2 -2
  37. package/dist/astro/native/core-group.astro +9 -9
  38. package/dist/astro/native/core-home-link.astro +2 -2
  39. package/dist/astro/native/core-image.astro +9 -9
  40. package/dist/astro/native/core-navigation-link.astro +8 -8
  41. package/dist/astro/native/core-navigation-submenu.astro +11 -11
  42. package/dist/astro/native/core-navigation.astro +17 -17
  43. package/dist/astro/native/core-page-list-data-item.astro +6 -6
  44. package/dist/astro/native/core-page-list-item.astro +2 -2
  45. package/dist/astro/native/core-page-list.astro +3 -3
  46. package/dist/astro/native/core-post-date.astro +5 -5
  47. package/dist/astro/native/core-post-excerpt.astro +7 -7
  48. package/dist/astro/native/core-post-featured-image.astro +5 -5
  49. package/dist/astro/native/core-post-template.astro +5 -5
  50. package/dist/astro/native/core-post-terms.astro +8 -8
  51. package/dist/astro/native/core-post-title.astro +2 -2
  52. package/dist/astro/native/core-query-no-results.astro +2 -2
  53. package/dist/astro/native/core-query.astro +6 -6
  54. package/dist/astro/native/core-site-title.astro +8 -8
  55. package/dist/astro/native/core-term-description.astro +2 -2
  56. package/dist/astro/native/core-term-name.astro +2 -2
  57. package/dist/astro/native/core-term-template.astro +5 -5
  58. package/dist/astro/native/core-terms-query.astro +5 -5
  59. package/dist/astro/native/core-transparent.astro +2 -2
  60. package/dist/astro/native/sf-block-binding.astro +3 -3
  61. package/dist/astro/preferences/AccessibilityPanel.astro +17 -17
  62. package/dist/astro/preferences/Toggle.astro +7 -7
  63. package/dist/styleflow.d.ts.map +1 -1
  64. package/dist/styleflow.js +11 -2
  65. package/dist/styleflow.js.map +1 -1
  66. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-beta.27 — 2026-10-08
4
+
5
+ - 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.
6
+ - [Canonical verification](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-08-tipografia-tag-mapping.md).
7
+
3
8
  ## 1.0.0-beta.26 — 2026-10-08
4
9
 
5
10
  - 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,6 @@
1
1
  ---
2
2
  import type { SfSeo } from "../types.js";
3
- import S from "@styleflow.app/astro/S.astro";
3
+ import StyleflowElement from "./StyleflowElement.astro";
4
4
  import ThemeRuntime from "./ThemeRuntime.astro";
5
5
  import AccessibilityPanel from "./preferences/AccessibilityPanel.astro";
6
6
  import PreferencesRuntime from "./preferences/PreferencesRuntime.astro";
@@ -65,9 +65,9 @@ const jsonLd = seo?.jsonLd ? JSON.stringify(seo.jsonLd) : null;
65
65
  <slot name="head" />
66
66
  </head>
67
67
  <body {...documentAttributes.body}>
68
- <S.main surface={siteDesign?.defaults.surface || "default"} layoutRole="none" density={siteDesign?.defaults.density || "regular"}>
68
+ <StyleflowElement as="main" surface={siteDesign?.defaults.surface || "default"} layoutRole="none" density={siteDesign?.defaults.density || "regular"}>
69
69
  <slot />
70
- </S.main>
70
+ </StyleflowElement>
71
71
  {showPreferences && <AccessibilityPanel themes={themes} />}
72
72
  </body>
73
73
  </html>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.section surface="default" layoutRole="section" density="regular">
28
- <S.h1>{isNotFound ? "Pagina non trovata" : title}</S.h1>
29
- {content?.excerpt && <S.p>{content.excerpt}</S.p>}
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
- <S.div
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
- </S.section>
43
+ </StyleflowElement>
44
44
  )}
45
45
 
46
46
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  import "./native/grid.css";
3
- import S from "@styleflow.app/astro/S.astro";
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
- <S.a
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
- </S.a>
342
+ </StyleflowElement>
343
343
  ) : (
344
- <S.span
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
- </S.span>
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
- <S.div {...semantic} {...htmlAttributes}>
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
- </S.div>
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
- <S.div {...semantic} {...htmlAttributes}>
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
- </S.div>
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
- <S.div {...semantic} {...htmlAttributes}>
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
- </S.div>
439
+ </StyleflowElement>
440
440
  ) : null;
441
441
  }
442
442
 
443
443
  if (name === "chip") {
444
444
  return (
445
- <S.span {...semantic} {...htmlAttributes}>
445
+ <StyleflowElement as="span" {...semantic} {...htmlAttributes}>
446
446
  {textValue(block, "label")}
447
- </S.span>
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
- <S.article {...semantic} {...htmlAttributes}>
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 && <S.h3>{String(block.attributes.title)}</S.h3>}
460
- {block.attributes.text && <S.p>{String(block.attributes.text)}</S.p>}
461
- {href && <S.a href={href}>Scopri</S.a>}
462
- </S.article>
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
- <S.ul {...semantic} {...htmlAttributes}>
474
+ <StyleflowElement as="ul" {...semantic} {...htmlAttributes}>
475
475
  {items.map((item, index) => (
476
- <S.li>
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
- </S.li>
488
+ </StyleflowElement>
489
489
  ))}
490
- </S.ul>
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
- <S.div {...semantic} {...htmlAttributes}>
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
- </S.div>
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
- <S.div {...semantic} {...htmlAttributes}>
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
- </S.div>
561
+ </StyleflowElement>
562
562
  );
563
563
  }
564
564
  return query ? (
565
- <S.div {...semantic} {...htmlAttributes}>
566
- <S.a
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
- </S.a>
572
- </S.div>
571
+ </StyleflowElement>
572
+ </StyleflowElement>
573
573
  ) : null;
574
574
  }
575
575
 
576
576
  const fallbackContent = block.innerHtml && children.length === 0
577
- ? <S.div set:html={block.innerHtml} />
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
- <S.section {...semantic} {...htmlAttributes}>{fallbackContent}</S.section>
588
+ <StyleflowElement as="section" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
589
589
  ) : (
590
- <S.div {...semantic} {...htmlAttributes}>{fallbackContent}</S.div>
590
+ <StyleflowElement as="div" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
591
591
  );
592
592
  })}
593
593
 
@@ -0,0 +1,19 @@
1
+ ---
2
+ import { resolveStyleFlowAstroPrimitive } from "@styleflow.app/astro";
3
+
4
+ interface Props {
5
+ as: string;
6
+ [attribute: string]: unknown;
7
+ }
8
+ const props = { ...Astro.props } as Props;
9
+ for (const key of ["ty", "v", "w"]) {
10
+ if (props[key] === "" || props[key] === null) delete props[key];
11
+ }
12
+ const { tag, attributes } = resolveStyleFlowAstroPrimitive(props);
13
+ if (["ty", "v", "w"].every((key) => props[key] === undefined)) {
14
+ for (const name of ["type", "variant", "weight", "style"]) delete attributes[`data-text-${name}`];
15
+ }
16
+ const Element = tag;
17
+ ---
18
+
19
+ <Element {...attributes}><slot /></Element>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  import "@splidejs/splide/css/core";
3
- import S from "@styleflow.app/astro/S.astro";
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
- <S.section
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
- </S.section>
81
+ </StyleflowElement>
82
82
  </flowpress-carousel>
83
83
  ) : (
84
- <S.section
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
- </S.section>
93
+ </StyleflowElement>
94
94
  )}
95
95
 
96
96
  <script>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.li {...semantic} {...htmlAttributes}>
20
+ <StyleflowElement as="li" {...semantic} {...htmlAttributes}>
21
21
  <slot />
22
- </S.li>
22
+ </StyleflowElement>
23
23
 
24
24
  <style>
25
25
  .flowpress-carousel-item { min-width: 0; }
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.div
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
- </S.div>
44
+ </StyleflowElement>
45
45
 
46
46
  <style>
47
47
  .flowpress-column {
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S as={tagName} {...rootStyleflowProps} {...rootHtmlProps} style={rootStyle}>
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
- <S.span
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
- <S.div class="wp-block-cover__inner-container flowpress-cover__content">
113
+ <StyleflowElement as="div" class="wp-block-cover__inner-container flowpress-cover__content">
114
114
  <slot />
115
- </S.div>
116
- </S>
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 S from "@styleflow.app/astro/S.astro";
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
- <S.div {...semantic} {...htmlAttributes}>
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
- <S.h2>{String(block.attributes.title || schema.title)}</S.h2>
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
- </S.div>
135
+ </StyleflowElement>
136
136
  ) : (
137
- <S.p {...semantic} {...htmlAttributes} role="status">
137
+ <StyleflowElement as="p" {...semantic} {...htmlAttributes} role="status">
138
138
  Il modulo non è temporaneamente disponibile.
139
- </S.p>
139
+ </StyleflowElement>
140
140
  )}
141
141
 
142
142
  <script>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.div {...semantic} {...htmlAttributes} data-align={align} style={style}>
41
+ <StyleflowElement as="div" {...semantic} {...htmlAttributes} data-align={align} style={style}>
42
42
  <slot />
43
- </S.div>
43
+ </StyleflowElement>
44
44
 
45
45
  <style>
46
46
  .flowpress-grid {
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.section
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
- </S.section>
73
+ </StyleflowElement>
74
74
 
75
75
  <style>
76
76
  .flowpress-hero {
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.div
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
- </S.div>
88
+ </StyleflowElement>
89
89
  ) : null}
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
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
- <S.a href={href}>{String(item.title ?? "")}</S.a>
25
+ <StyleflowElement as="a" href={href}>{String(item.title ?? "")}</StyleflowElement>
26
26
  ) : (
27
- <S.span>{String(item.title ?? "")}</S.span>
27
+ <StyleflowElement as="span">{String(item.title ?? "")}</StyleflowElement>
28
28
  )}
29
- {item.excerpt ? <S.p>{String(item.excerpt)}</S.p> : null}
30
- {item.priceHtml ? <S.div set:html={String(item.priceHtml)} /> : null}
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 S from "@styleflow.app/astro/S.astro";
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
- <S.div
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
- </S.div>
108
+ </StyleflowElement>
109
109
 
110
110
  <script>
111
111
  import { initializeNumberSpinners } from "../../number-spinner.js";
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
2
+ import StyleflowElement from "../StyleflowElement.astro";
3
3
 
4
4
  type SemanticElementTag =
5
5
  | "div" | "span" | "p" | "a" | "li" | "ol" | "ul" | "blockquote"
@@ -15,21 +15,21 @@ interface Props {
15
15
  const { tag, attributes = {}, html } = Astro.props;
16
16
  ---
17
17
 
18
- {tag === "div" ? <S.div {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.div>
19
- : tag === "span" ? <S.span {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.span>
20
- : tag === "p" ? <S.p {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.p>
21
- : tag === "a" ? <S.a {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.a>
22
- : tag === "li" ? <S.li {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.li>
23
- : tag === "ol" ? <S.ol {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.ol>
24
- : tag === "ul" ? <S.ul {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.ul>
25
- : tag === "blockquote" ? <S.blockquote {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.blockquote>
26
- : tag === "h1" ? <S.h1 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h1>
27
- : tag === "h2" ? <S.h2 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h2>
28
- : tag === "h3" ? <S.h3 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h3>
29
- : tag === "h4" ? <S.h4 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h4>
30
- : tag === "h5" ? <S.h5 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h5>
31
- : tag === "h6" ? <S.h6 {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.h6>
32
- : tag === "strong" ? <S.strong {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.strong>
33
- : tag === "em" ? <S.em {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.em>
34
- : tag === "small" ? <S.small {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.small>
35
- : <S.mark {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</S.mark>}
18
+ {tag === "div" ? <StyleflowElement as="div" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
19
+ : tag === "span" ? <StyleflowElement as="span" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
20
+ : tag === "p" ? <StyleflowElement as="p" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
21
+ : tag === "a" ? <StyleflowElement as="a" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
22
+ : tag === "li" ? <StyleflowElement as="li" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
23
+ : tag === "ol" ? <StyleflowElement as="ol" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
24
+ : tag === "ul" ? <StyleflowElement as="ul" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
25
+ : tag === "blockquote" ? <StyleflowElement as="blockquote" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
26
+ : tag === "h1" ? <StyleflowElement as="h1" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
27
+ : tag === "h2" ? <StyleflowElement as="h2" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
28
+ : tag === "h3" ? <StyleflowElement as="h3" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
29
+ : tag === "h4" ? <StyleflowElement as="h4" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
30
+ : tag === "h5" ? <StyleflowElement as="h5" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
31
+ : tag === "h6" ? <StyleflowElement as="h6" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
32
+ : tag === "strong" ? <StyleflowElement as="strong" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
33
+ : tag === "em" ? <StyleflowElement as="em" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
34
+ : tag === "small" ? <StyleflowElement as="small" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>
35
+ : <StyleflowElement as="mark" {...attributes}>{html === undefined ? <slot /> : <Fragment set:html={html} />}</StyleflowElement>}
@@ -1,5 +1,5 @@
1
1
  ---
2
- import S from "@styleflow.app/astro/S.astro";
2
+ import StyleflowElement from "../StyleflowElement.astro";
3
3
  import type { FlowpressBlockRendererProps } from "../../block-renderers.js";
4
4
 
5
5
  type LogoImage = { url?: string | undefined; width?: number | undefined; height?: number | undefined; alt?: string } | undefined;
@@ -24,7 +24,7 @@ const rootHtmlProps = {
24
24
  ---
25
25
 
26
26
  {positive.url || negative.url ? (
27
- <S.a
27
+ <StyleflowElement as="a"
28
28
  {...rootHtmlProps}
29
29
  {...styleflowProps}
30
30
  href={homeUrl}
@@ -49,5 +49,5 @@ const rootHtmlProps = {
49
49
  alt={negative.alt ?? ""}
50
50
  />
51
51
  ) : null}
52
- </S.a>
52
+ </StyleflowElement>
53
53
  ) : null}