@styleflow.app/flowpress-astro-core 1.0.0-beta.40 → 1.0.0-beta.41

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-beta.41 — 2026-10-27
4
+
5
+ - Fill the assigned layout space by default for structural blocks and editorial images, while allowing Styleflow recipes and responsive CSS widths to override the defaults.
6
+ - Preserve fixed flex sizing, grid spans, image crop/focal settings, and authored image dimensions; remove stronger Cover/Grid width resets.
7
+ - Keep normal and wide Separator widths consistent with the WordPress canvas.
8
+ - [Canonical report](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-27-larghezze-blocchi.md).
9
+
3
10
  ## 1.0.0-beta.40 — 2026-10-27
4
11
 
5
12
  - Honor native Image aspect ratios, cover/contain/fill scale and focal points on the actual media in Gutenberg and Site Editor rendering.
@@ -619,9 +619,9 @@ function nestedRendererProps(nextParentBlockName: string, attrs: Record<string,
619
619
  />
620
620
  );
621
621
  return name === "section" ? (
622
- <StyleflowElement as="section" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
622
+ <StyleflowElement as="section" {...semantic} {...htmlAttributes} data-flowpress-structural>{fallbackContent}</StyleflowElement>
623
623
  ) : (
624
- <StyleflowElement as="div" {...semantic} {...htmlAttributes}>{fallbackContent}</StyleflowElement>
624
+ <StyleflowElement as="div" {...semantic} {...htmlAttributes} data-flowpress-structural={["group", "flex"].includes(name) || undefined}>{fallbackContent}</StyleflowElement>
625
625
  );
626
626
  })}
627
627
 
@@ -20,5 +20,8 @@ const svgAttributes = svg ? resolveStyleFlowAstroPrimitive({ ...svg.attributes,
20
20
  initializeFlowpressSvgMedia();
21
21
  </script>
22
22
  <style is:global>
23
- :where(.flowpress-svg-media) { max-inline-size: 100%; block-size: auto; overflow: hidden; vertical-align: middle; }
23
+ @layer base {
24
+ :where(.flowpress-svg-media) { max-inline-size: 100%; block-size: auto; }
25
+ }
26
+ :where(.flowpress-svg-media) { overflow: hidden; vertical-align: middle; }
24
27
  </style>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import "./native/block-sizing.css";
2
3
  import "./native/inline-text.css";
3
4
  import { decodeFlowpressText } from "../text.js";
4
5
  import { resolveStyleFlowAstroPrimitive } from "@styleflow.app/astro";
@@ -156,14 +156,3 @@ const tagName = coverTagName(attributes.tagName);
156
156
  justify-items: var(--flowpress-cover-content-inline, center);
157
157
  }
158
158
  </style>
159
-
160
- <style>
161
- /* Structural blocks retain their authored constraints inside aligned Covers. */
162
- .flowpress-cover__content > :global(section),
163
- .flowpress-cover__content > :global(.wp-block-group),
164
- .flowpress-cover__content > :global(.flowpress-grid),
165
- .flowpress-cover__content :global(.fp-native-group[data-fp-group-layout="constrained"]) {
166
- width: 100%;
167
- min-width: 0;
168
- }
169
- </style>
@@ -45,7 +45,6 @@ const style = [
45
45
  <style>
46
46
  .flowpress-grid {
47
47
  display: grid;
48
- width: 100%;
49
48
  min-width: 0;
50
49
  grid-template-columns: repeat(var(--flowpress-grid-base), minmax(0, 1fr));
51
50
  align-items: var(--flowpress-grid-align, stretch);
@@ -70,7 +70,7 @@ const fetchPriority = fetchPriorityValue(attributes.fetchPriority);
70
70
  ---
71
71
 
72
72
  {src ? (
73
- <StyleflowElement as="div"
73
+ <StyleflowElement as="div" data-flowpress-image
74
74
  {...semanticProps(attributes, contract)}
75
75
  {...blockHtmlAttributes(attributes)}
76
76
  >
@@ -0,0 +1,34 @@
1
+ /* Geometry defaults, below Styleflow recipes and authored utilities.
2
+ Keep in sync with the corresponding FlowPress WordPress/Astro runtime. */
3
+ @layer theme, base, styleflow, components, utilities;
4
+ @layer base {
5
+ :where(.fp-native-group:not(.flowpress-button-template), .fp-grid, .flowpress-grid, .flowpress-column,
6
+ .flowpress-cover, .flowpress-hero, [data-flowpress-structural],
7
+ .wp-block-image, .wp-block-post-featured-image, [data-flowpress-image],
8
+ [data-type="sf/group"], [data-type="sf/flex"], [data-type="sf/section"],
9
+ [data-type="sf/grid"], [data-type="sf/column"], [data-type="sf/hero"],
10
+ [data-type="sf/image"]) {
11
+ width: 100%;
12
+ min-width: 0;
13
+ box-sizing: border-box;
14
+ }
15
+ /* Native flex sizing is an explicit editorial choice. */
16
+ :where([data-fp-flex-size="fit"], [data-fp-flex-size="fixed"]) { width: auto; }
17
+ :where([data-fp-flex-size="fixed"]) { flex-shrink: 0; }
18
+ :where(.wp-block-separator:not(.is-style-wide):not(.is-style-dots)) {
19
+ width: 100px;
20
+ max-width: 100%;
21
+ margin-inline: auto;
22
+ }
23
+ :where(.wp-block-separator.is-style-wide) { width: 100%; }
24
+ :where(.wp-block-image > a, .wp-block-post-featured-image > a) { width: 100%; }
25
+ :where(.wp-block-image > img, .wp-block-image > a > img,
26
+ .wp-block-image > svg, .wp-block-image > a > svg,
27
+ .wp-block-post-featured-image > img, .wp-block-post-featured-image > a > img,
28
+ .wp-block-post-featured-image > svg, .wp-block-post-featured-image > a > svg,
29
+ [data-flowpress-image] > img, [data-flowpress-image] > svg) {
30
+ width: 100%;
31
+ max-width: 100%;
32
+ height: auto;
33
+ }
34
+ }
@@ -132,8 +132,6 @@ const imageProps = {
132
132
  authored display box. Inline width/height retain the editor's units. */
133
133
  :where([data-flowpress-core-image] > img, [data-flowpress-core-image] > a > img,
134
134
  [data-flowpress-core-image] > svg, [data-flowpress-core-image] > a > svg) {
135
- max-width: 100%;
136
- height: auto;
137
135
  vertical-align: bottom;
138
136
  }
139
137
  </style>
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import Media from "../Media.astro";
3
+ import { imageMediaStyle } from "./image.js";
3
4
  import StyleflowElement from "../StyleflowElement.astro";
4
5
  import type { FlowpressBlockRendererProps } from "../../index.js";
5
6
  import { classNames, externalRel, text, type ResolvedImage } from "./query-loop.js";
@@ -26,6 +27,7 @@ const imageProps = {
26
27
  class: image.id ? `wp-image-${image.id}` : undefined,
27
28
  loading: "lazy" as const,
28
29
  decoding: "async" as const,
30
+ style: Object.entries(imageMediaStyle(attributes)).map(([name, value]) => `${name}:${value}`).join(";") || undefined,
29
31
  };
30
32
  ---
31
33
 
@@ -12,8 +12,6 @@ const { htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps
12
12
 
13
13
  <style is:global>
14
14
  .wp-block-separator { background: transparent; border: 0; border-top: 1px solid currentColor; height: 0; opacity: 1; }
15
- .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 100px; max-width: 100%; margin-inline: auto; }
16
- .wp-block-separator.is-style-wide { width: 100%; }
17
15
  .wp-block-separator.is-style-dots { border: 0; height: auto; text-align: center; }
18
16
  .wp-block-separator.is-style-dots::before { content: "···"; color: inherit; letter-spacing: 1em; padding-inline-start: 1em; }
19
17
  .wp-block-separator[data-sf-no-border="true"] { border: 0; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@styleflow.app/flowpress-astro-core",
3
- "version": "1.0.0-beta.40",
3
+ "version": "1.0.0-beta.41",
4
4
  "description": "Project-agnostic WordPress routing, templates, SEO and GraphQL runtime for FlowPress Astro apps.",
5
5
  "type": "module",
6
6
  "private": false,