@styleflow.app/flowpress-astro-core 1.0.0-beta.30 → 1.0.0-beta.32

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 (112) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/astro/CompositionRenderer.astro +13 -2
  3. package/dist/astro/DefaultBlockAdapter.astro +3 -1
  4. package/dist/astro/FontStylesheets.astro +35 -0
  5. package/dist/astro/GutenbergRenderer.astro +59 -19
  6. package/dist/astro/Media.astro +24 -0
  7. package/dist/astro/StyleflowElement.astro +1 -0
  8. package/dist/astro/blocks/CarouselBlock.astro +3 -0
  9. package/dist/astro/blocks/CoverBlock.astro +2 -1
  10. package/dist/astro/blocks/HeroBlock.astro +2 -1
  11. package/dist/astro/blocks/ImageBlock.astro +2 -1
  12. package/dist/astro/blocks/ListItemFallback.astro +2 -1
  13. package/dist/astro/blocks/SiteLogoBlock.astro +3 -2
  14. package/dist/astro/blocks/helpers.d.ts +3 -1
  15. package/dist/astro/blocks/helpers.d.ts.map +1 -1
  16. package/dist/astro/blocks/helpers.js +5 -3
  17. package/dist/astro/blocks/helpers.js.map +1 -1
  18. package/dist/astro/blocks/helpers.ts +7 -4
  19. package/dist/astro/motion/AccordionRuntime.astro +9 -0
  20. package/dist/astro/motion/MotionBoot.astro +21 -0
  21. package/dist/astro/motion/MotionRuntime.astro +31 -0
  22. package/dist/astro/motion/accordion.css +163 -0
  23. package/dist/astro/motion/accordion.d.ts +3 -0
  24. package/dist/astro/motion/accordion.d.ts.map +1 -0
  25. package/dist/astro/motion/accordion.js +98 -0
  26. package/dist/astro/motion/accordion.js.map +1 -0
  27. package/dist/astro/motion/accordion.ts +109 -0
  28. package/dist/astro/motion/motion-controller.d.ts +12 -0
  29. package/dist/astro/motion/motion-controller.d.ts.map +1 -0
  30. package/dist/astro/motion/motion-controller.js +293 -0
  31. package/dist/astro/motion/motion-controller.js.map +1 -0
  32. package/dist/astro/motion/motion-controller.ts +377 -0
  33. package/dist/astro/motion/motion.css +546 -0
  34. package/dist/astro/motion/motion.d.ts +127 -0
  35. package/dist/astro/motion/motion.d.ts.map +1 -0
  36. package/dist/astro/motion/motion.js +255 -0
  37. package/dist/astro/motion/motion.js.map +1 -0
  38. package/dist/astro/motion/motion.ts +419 -0
  39. package/dist/astro/native/CustomFieldValue.astro +2 -1
  40. package/dist/astro/native/ReservedLogin.astro +107 -0
  41. package/dist/astro/native/ResolvedBlocks.astro +3 -1
  42. package/dist/astro/native/SyncedPatternContent.astro +3 -1
  43. package/dist/astro/native/TermFieldValue.astro +2 -1
  44. package/dist/astro/native/Timeline.astro +2 -1
  45. package/dist/astro/native/blob.css +1 -1
  46. package/dist/astro/native/button-template.d.ts +31 -0
  47. package/dist/astro/native/button-template.d.ts.map +1 -0
  48. package/dist/astro/native/button-template.js +54 -0
  49. package/dist/astro/native/button-template.js.map +1 -0
  50. package/dist/astro/native/button-template.ts +92 -0
  51. package/dist/astro/native/core-button-fallback.astro +43 -0
  52. package/dist/astro/native/core-button.astro +48 -26
  53. package/dist/astro/native/core-group.astro +3 -1
  54. package/dist/astro/native/core-image.astro +3 -2
  55. package/dist/astro/native/core-navigation.astro +9 -2
  56. package/dist/astro/native/core-post-featured-image.astro +3 -2
  57. package/dist/astro/native/core-post-template-fallback.astro +30 -0
  58. package/dist/astro/native/core-post-template.astro +17 -24
  59. package/dist/astro/native/grid-bleed.d.ts +2 -0
  60. package/dist/astro/native/grid-bleed.d.ts.map +1 -0
  61. package/dist/astro/native/grid-bleed.js +24 -7
  62. package/dist/astro/native/grid-bleed.js.map +1 -0
  63. package/dist/astro/native/group.css +36 -0
  64. package/dist/astro/native/group.d.ts +15 -0
  65. package/dist/astro/native/group.d.ts.map +1 -0
  66. package/dist/astro/native/group.js +66 -0
  67. package/dist/astro/native/group.js.map +1 -0
  68. package/dist/astro/native/group.ts +61 -0
  69. package/dist/astro/native/inline-text.css +15 -0
  70. package/dist/astro/native/query-carousel.d.ts +12 -0
  71. package/dist/astro/native/query-carousel.d.ts.map +1 -0
  72. package/dist/astro/native/query-carousel.js +36 -0
  73. package/dist/astro/native/query-carousel.js.map +1 -0
  74. package/dist/astro/native/query-carousel.ts +56 -0
  75. package/dist/astro/native/registry.d.ts.map +1 -1
  76. package/dist/astro/native/registry.js +3 -0
  77. package/dist/astro/native/registry.js.map +1 -1
  78. package/dist/astro/native/registry.ts +4 -0
  79. package/dist/astro/native/timeline.css +1 -1
  80. package/dist/astro/preferences/AccessibilityPanel.astro +73 -86
  81. package/dist/block-renderers.d.ts +3 -0
  82. package/dist/block-renderers.d.ts.map +1 -1
  83. package/dist/block-renderers.js.map +1 -1
  84. package/dist/composition.d.ts.map +1 -1
  85. package/dist/composition.js +2 -1
  86. package/dist/composition.js.map +1 -1
  87. package/dist/default-blocks.d.ts +1 -1
  88. package/dist/default-blocks.d.ts.map +1 -1
  89. package/dist/default-blocks.js +3 -1
  90. package/dist/default-blocks.js.map +1 -1
  91. package/dist/reserved-area.d.ts +10 -0
  92. package/dist/reserved-area.d.ts.map +1 -0
  93. package/dist/reserved-area.js +93 -0
  94. package/dist/reserved-area.js.map +1 -0
  95. package/dist/styleflow.d.ts +2 -0
  96. package/dist/styleflow.d.ts.map +1 -1
  97. package/dist/styleflow.js +6 -4
  98. package/dist/styleflow.js.map +1 -1
  99. package/dist/svg-media-runtime.d.ts +3 -0
  100. package/dist/svg-media-runtime.d.ts.map +1 -0
  101. package/dist/svg-media-runtime.js +33 -0
  102. package/dist/svg-media-runtime.js.map +1 -0
  103. package/dist/svg-media-types.d.ts +11 -0
  104. package/dist/svg-media-types.d.ts.map +1 -0
  105. package/dist/svg-media-types.js +2 -0
  106. package/dist/svg-media-types.js.map +1 -0
  107. package/dist/svg-media.d.ts +10 -0
  108. package/dist/svg-media.d.ts.map +1 -0
  109. package/dist/svg-media.js +34 -0
  110. package/dist/svg-media.js.map +1 -0
  111. package/dist/tsconfig.tsbuildinfo +1 -1
  112. package/package.json +30 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-beta.32 — 2026-10-15
4
+
5
+ - Preserve project renderer overrides through Query Loop, Query Carousel and synced-pattern resolved passes, including semantic rendering without a composition registry.
6
+ - Add an actual Astro build regression with custom renderers in all three paths.
7
+ - [Canonical integration report](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-14-consolidamento-tessari.md).
8
+
9
+ ## 1.0.0-beta.31 — 2026-10-14
10
+
11
+ - Official renderers, inline SVG, inherited color validation, preferences, portable motion and accordion runtimes.
12
+ - Preserve inline typography and explicit inherited tones; provide readable uninitialized carousels.
13
+ - [Canonical integration report](https://github.com/StyleFlow-App/styleflow-docs/blob/main/dev/rapporti/2026-10-14-consolidamento-tessari.md).
14
+
15
+
3
16
  ## 1.0.0-beta.30 — 2026-10-09
4
17
 
5
18
  - Ship native `core/icon` structural CSS with the Astro renderer: apply validated WordPress widths, proportional SVG dimensions and alignment, and paint icons from the StyleFlow foreground through `currentColor`.
@@ -1,5 +1,8 @@
1
1
  ---
2
+ import "./native/inline-text.css";
3
+ import { registerFlowpressSvgMedia, type FlowpressSvgMediaLocals } from "../svg-media.js";
2
4
  import "./native/grid.css";
5
+ import "./native/group.css";
3
6
  import { decorateGridBlocks } from "./native/grid.js";
4
7
  import type { FlowpressBlockAdapters } from "../block-renderers.js";
5
8
  import {
@@ -23,6 +26,7 @@ interface Props {
23
26
  parentBlockName?: string | undefined;
24
27
  production?: boolean | undefined;
25
28
  depth?: number | undefined;
29
+ inheritedTone?: string | undefined;
26
30
  media?: FlowpressFrontendMediaOptions | undefined;
27
31
  prepared?: { descriptors: ReadonlyMap<string, FlowpressBlockTypeDescriptor>; blocking: FlowpressCompositionV1["diagnostics"] } | undefined;
28
32
  }
@@ -34,9 +38,12 @@ const {
34
38
  contract,
35
39
  parentBlockName,
36
40
  production = import.meta.env.PROD,
37
- depth = 0
41
+ depth = 0,
42
+ inheritedTone
38
43
  } = Astro.props;
39
44
 
45
+ registerFlowpressSvgMedia(sourceComposition, Astro.locals as FlowpressSvgMediaLocals);
46
+
40
47
  const mediaOptions: FlowpressFrontendMediaOptions = Astro.props.media ?? {
41
48
  frontendOrigin: Astro.url.origin,
42
49
  backendUrl: import.meta.env.BACKEND_URL,
@@ -109,6 +116,7 @@ const logoStyles = parentBlockName === undefined
109
116
  {},
110
117
  {
111
118
  strict: production,
119
+ effectiveTone: inheritedTone,
112
120
  onDiagnostic: (diagnostic) => console.warn(
113
121
  `[${diagnostic.code}] ${diagnostic.message}`
114
122
  )
@@ -133,7 +141,9 @@ const logoStyles = parentBlockName === undefined
133
141
  context={{
134
142
  ...(parentBlockName ? { parentBlockName } : {}),
135
143
  depth,
136
- production
144
+ production,
145
+ inheritedTone,
146
+ effectiveTone: typeof styleflowProps.tone === "string" ? styleflowProps.tone : inheritedTone
137
147
  }}
138
148
  adapters={adapters}
139
149
  >
@@ -145,6 +155,7 @@ const logoStyles = parentBlockName === undefined
145
155
  parentBlockName={block.name}
146
156
  production={production}
147
157
  depth={depth + 1}
158
+ inheritedTone={typeof styleflowProps.tone === "string" ? styleflowProps.tone : inheritedTone}
148
159
  prepared={prepared}
149
160
  />
150
161
  </Adapter>
@@ -17,12 +17,13 @@ const {
17
17
  const blockRenderers = Object.fromEntries(
18
18
  Object.entries(adapters).map(([name, definition]) => [name, definition.renderer])
19
19
  ) as FlowpressBlockRenderers;
20
+ const scopedRenderers = { ...blockRenderers, ...context.blockRenderers };
20
21
  ---
21
22
 
22
23
  <GutenbergRenderer
23
24
  blocks={[block]}
24
25
  contract={contract}
25
- blockRenderers={blockRenderers}
26
+ blockRenderers={scopedRenderers}
26
27
  adapterDefinitions={adapters}
27
28
  composition={composition}
28
29
  rootHtmlProps={htmlProps}
@@ -30,6 +31,7 @@ const blockRenderers = Object.fromEntries(
30
31
  parentBlockName={context.parentBlockName}
31
32
  production={context.production}
32
33
  depth={context.depth}
34
+ inheritedTone={context.effectiveTone}
33
35
  skipCustomRendererFor={block.name}
34
36
  requireRegisteredAdapters={Boolean(composition)}
35
37
  />
@@ -0,0 +1,35 @@
1
+ ---
2
+ /**
3
+ * CDN font stylesheets from the generated font manifest, as head links rather
4
+ * than the `@import url()` of the generated fonts.css: an import inside the
5
+ * site bundle chains bundle → provider CSS → fonts. Render it once with
6
+ * `preconnect` early in the head (hints only) and once without at the end of
7
+ * the head, after the inline scripts a pending stylesheet would block.
8
+ * Self-hosted fonts are not handled here: re-import fonts.css if one is added.
9
+ * Portabile in FlowPress: docs/pilots/primo-paint-stabile.md
10
+ */
11
+
12
+
13
+ export interface Props { preconnect?: boolean; manifest?: { fonts: Array<{ source: {type: string; provider?: string; stylesheetUrl?: string} }> }; }
14
+
15
+ const { preconnect = false, manifest = {fonts: []} } = Astro.props;
16
+ const stylesheets = manifest.fonts.flatMap((font) =>
17
+ font.source.type === "cdn" && font.source.stylesheetUrl ? [{provider:font.source.provider,stylesheetUrl:font.source.stylesheetUrl}] : []
18
+ );
19
+ // Provider CSS loads without CORS and its font files with it: separate connections.
20
+ const hints = [...new Map(stylesheets.flatMap(({ provider, stylesheetUrl }) => {
21
+ const origin = new URL(stylesheetUrl).origin;
22
+ return [
23
+ { href: origin, crossorigin: false },
24
+ { href: origin, crossorigin: true },
25
+ // Adobe Fonts imports its usage-tracking CSS from a second origin.
26
+ ...(provider === "adobe-fonts" ? [{ href: "https://p.typekit.net", crossorigin: false }] : []),
27
+ ];
28
+ }).map((hint) => [`${hint.href} ${hint.crossorigin}`, hint] as const)).values()];
29
+ ---
30
+
31
+ {preconnect ? hints.map(({ href, crossorigin }) => (
32
+ <link rel="preconnect" href={href} crossorigin={crossorigin ? "anonymous" : undefined} />
33
+ )) : stylesheets.map(({ stylesheetUrl }) => (
34
+ <link rel="stylesheet" href={stylesheetUrl} />
35
+ ))}
@@ -1,6 +1,10 @@
1
1
  ---
2
+ import "./native/inline-text.css";
3
+ import { registerFlowpressSvgMedia, type FlowpressSvgMediaLocals } from "../svg-media.js";
4
+ import Media from "./Media.astro";
2
5
  import { decodeFlowpressText } from "../text.js";
3
6
  import "./native/grid.css";
7
+ import "./native/group.css";
4
8
  import StyleflowElement from "./StyleflowElement.astro";
5
9
  import type {
6
10
  FlowpressBlockAdapters,
@@ -51,8 +55,10 @@ interface Props {
51
55
  parentBlockName?: string | undefined;
52
56
  production?: boolean | undefined;
53
57
  depth?: number | undefined;
58
+ inheritedTone?: string | undefined;
54
59
  skipCustomRendererFor?: string | undefined;
55
60
  requireRegisteredAdapters?: boolean | undefined;
61
+ interactiveAncestor?: boolean | undefined;
56
62
  }
57
63
 
58
64
  const {
@@ -67,9 +73,13 @@ const {
67
73
  parentBlockName,
68
74
  production = import.meta.env.PROD,
69
75
  depth = 0,
76
+ inheritedTone,
70
77
  skipCustomRendererFor,
78
+ interactiveAncestor = false,
71
79
  requireRegisteredAdapters = false
72
80
  } = Astro.props;
81
+ registerFlowpressSvgMedia(rawBlocks, Astro.locals as FlowpressSvgMediaLocals);
82
+
73
83
  const { decorateGridBlocks } = await import("./native/grid.js");
74
84
  const blocks = decorateGridBlocks(rawBlocks);
75
85
  const { nativeBlockRenderers } = await import("./native/registry.js");
@@ -97,8 +107,10 @@ function youtubeEmbedUrl(value: unknown): string | null {
97
107
  }
98
108
  }
99
109
 
100
- function nestedRendererProps(nextParentBlockName: string) {
110
+ function nestedRendererProps(nextParentBlockName: string, attrs: Record<string, unknown> = {}) {
101
111
  return {
112
+ interactiveAncestor: interactiveAncestor || Boolean(attrs.interactivePriority && !["none", "inherit"].includes(String(attrs.interactivePriority))),
113
+ inheritedTone: typeof attrs.tone === "string" && attrs.tone !== "inherit" ? attrs.tone : inheritedTone,
102
114
  adapterDefinitions,
103
115
  composition,
104
116
  parentBlockName: nextParentBlockName,
@@ -112,9 +124,10 @@ function nestedRendererProps(nextParentBlockName: string) {
112
124
  {blocks.map((block, index) => {
113
125
  const name = block.name.replace(/^sf\//, "");
114
126
  const children = decorateGridBlocks(block.innerBlocks ?? []);
127
+ if (interactiveAncestor && /^(?:core|sf)\/(?:paragraph|heading)$/.test(block.name) && !block.attributes.foreground) block = {...block, attributes:{...block.attributes, foreground:"inherit"}};
115
128
  const semantic = index === 0 && blocks.length === 1 && rootStyleflowProps
116
129
  ? rootStyleflowProps
117
- : semanticProps(block.attributes, contract);
130
+ : semanticProps(block.attributes, contract, undefined, inheritedTone);
118
131
  const htmlAttributes = index === 0 && blocks.length === 1 && rootHtmlProps
119
132
  ? { ...rootHtmlProps, class: Array.from(new Set([rootHtmlProps.class, block.attributes.className].filter(Boolean).join(" ").split(/\s+/))).join(" ") }
120
133
  : blockHtmlAttributes(block.attributes);
@@ -159,13 +172,16 @@ function nestedRendererProps(nextParentBlockName: string) {
159
172
  contract={contract}
160
173
  composition={composition}
161
174
  adapters={adapterDefinitions ?? {}}
162
- htmlProps={htmlAttributes}
175
+ htmlProps={Object.fromEntries(Object.entries(htmlAttributes).filter((entry): entry is [string, string | number | boolean | undefined] => ["string", "number", "boolean", "undefined"].includes(typeof entry[1])))}
163
176
  styleflowProps={semantic}
164
177
  parentBlockName={parentBlockName}
165
178
  context={{
166
179
  ...(parentBlockName ? { parentBlockName } : {}),
167
180
  depth,
168
- production
181
+ production,
182
+ blockRenderers,
183
+ inheritedTone,
184
+ effectiveTone: typeof semantic.tone === "string" ? semantic.tone : inheritedTone
169
185
  }}
170
186
  >
171
187
  <Astro.self descriptorIndex={descriptors}
@@ -178,6 +194,8 @@ function nestedRendererProps(nextParentBlockName: string) {
178
194
  parentBlockName={block.name}
179
195
  production={production}
180
196
  depth={depth + 1}
197
+ inheritedTone={typeof semantic.tone === "string" ? semantic.tone : inheritedTone}
198
+ interactiveAncestor={interactiveAncestor || Boolean(block.attributes.interactivePriority && !["none", "inherit"].includes(String(block.attributes.interactivePriority)))}
181
199
  requireRegisteredAdapters={requireRegisteredAdapters}
182
200
  />
183
201
  </CustomBlockRenderer>
@@ -193,7 +211,7 @@ function nestedRendererProps(nextParentBlockName: string) {
193
211
  contract={contract}
194
212
  blockRenderers={blockRenderers}
195
213
  iconRenderer={IconRenderer}
196
- {...nestedRendererProps(block.name)}
214
+ {...nestedRendererProps(block.name, block.attributes)}
197
215
  />
198
216
  </HeroBlock>
199
217
  );
@@ -207,7 +225,7 @@ function nestedRendererProps(nextParentBlockName: string) {
207
225
  contract={contract}
208
226
  blockRenderers={blockRenderers}
209
227
  iconRenderer={IconRenderer}
210
- {...nestedRendererProps(block.name)}
228
+ {...nestedRendererProps(block.name, block.attributes)}
211
229
  />
212
230
  </GridBlock>
213
231
  );
@@ -221,7 +239,7 @@ function nestedRendererProps(nextParentBlockName: string) {
221
239
  contract={contract}
222
240
  blockRenderers={blockRenderers}
223
241
  iconRenderer={IconRenderer}
224
- {...nestedRendererProps(block.name)}
242
+ {...nestedRendererProps(block.name, block.attributes)}
225
243
  />
226
244
  </ColumnBlock>
227
245
  );
@@ -243,7 +261,7 @@ function nestedRendererProps(nextParentBlockName: string) {
243
261
  contract={contract}
244
262
  blockRenderers={blockRenderers}
245
263
  iconRenderer={IconRenderer}
246
- {...nestedRendererProps(block.name)}
264
+ {...nestedRendererProps(block.name, block.attributes)}
247
265
  />
248
266
  </CarouselBlock>
249
267
  );
@@ -257,7 +275,7 @@ function nestedRendererProps(nextParentBlockName: string) {
257
275
  contract={contract}
258
276
  blockRenderers={blockRenderers}
259
277
  iconRenderer={IconRenderer}
260
- {...nestedRendererProps(block.name)}
278
+ {...nestedRendererProps(block.name, block.attributes)}
261
279
  />
262
280
  </CarouselItemBlock>
263
281
  );
@@ -272,7 +290,7 @@ function nestedRendererProps(nextParentBlockName: string) {
272
290
  <CoverBlock
273
291
  block={block}
274
292
  contract={contract}
275
- htmlProps={htmlAttributes}
293
+ htmlProps={Object.fromEntries(Object.entries(htmlAttributes).filter((entry): entry is [string, string | number | boolean | undefined] => ["string", "number", "boolean", "undefined"].includes(typeof entry[1])))}
276
294
  styleflowProps={semantic}
277
295
  >
278
296
  <Astro.self descriptorIndex={descriptors}
@@ -280,7 +298,7 @@ function nestedRendererProps(nextParentBlockName: string) {
280
298
  contract={contract}
281
299
  blockRenderers={blockRenderers}
282
300
  iconRenderer={IconRenderer}
283
- {...nestedRendererProps(block.name)}
301
+ {...nestedRendererProps(block.name, block.attributes)}
284
302
  />
285
303
  </CoverBlock>
286
304
  );
@@ -303,7 +321,7 @@ function nestedRendererProps(nextParentBlockName: string) {
303
321
  contract={contract}
304
322
  blockRenderers={blockRenderers}
305
323
  iconRenderer={IconRenderer}
306
- {...nestedRendererProps(block.name)}
324
+ {...nestedRendererProps(block.name, block.attributes)}
307
325
  />
308
326
  </TextBlock>
309
327
  );
@@ -398,7 +416,7 @@ function nestedRendererProps(nextParentBlockName: string) {
398
416
  return (
399
417
  <StyleflowElement as="div" {...semantic} {...htmlAttributes}>
400
418
  {images.map((image) => image.url ? (
401
- <img
419
+ <Media
402
420
  src={String(image.url)}
403
421
  alt={decodeFlowpressText(image.alt)}
404
422
  loading="lazy"
@@ -441,6 +459,19 @@ function nestedRendererProps(nextParentBlockName: string) {
441
459
  ) : null;
442
460
  }
443
461
 
462
+ if (name === "media-text") {
463
+ const media = objectValue(block, "media");
464
+ const mediaNode = media.url ? <Media src={String(media.url)} alt={decodeFlowpressText(media.alt)} width={media.width} height={media.height} loading="lazy" /> : null;
465
+ const contentNode = <StyleflowElement as="div">
466
+ <Astro.self descriptorIndex={descriptors} blocks={children} contract={contract} blockRenderers={blockRenderers} iconRenderer={IconRenderer} {...nestedRendererProps(block.name, block.attributes)} />
467
+ </StyleflowElement>;
468
+ return (
469
+ <StyleflowElement as="div" {...semantic} {...htmlAttributes} data-flowpress-media-text>
470
+ {block.attributes.mediaPosition === "right" ? [contentNode, mediaNode] : [mediaNode, contentNode]}
471
+ </StyleflowElement>
472
+ );
473
+ }
474
+
444
475
  if (name === "chip") {
445
476
  return (
446
477
  <StyleflowElement as="span" {...semantic} {...htmlAttributes}>
@@ -455,7 +486,7 @@ function nestedRendererProps(nextParentBlockName: string) {
455
486
  return (
456
487
  <StyleflowElement as="article" {...semantic} {...htmlAttributes}>
457
488
  {media.url && (
458
- <img src={String(media.url)} alt={decodeFlowpressText(media.alt)} loading="lazy" />
489
+ <Media src={String(media.url)} alt={decodeFlowpressText(media.alt)} loading="lazy" />
459
490
  )}
460
491
  {block.attributes.title && <StyleflowElement as="h3">{decodeFlowpressText(block.attributes.title)}</StyleflowElement>}
461
492
  {block.attributes.text && <StyleflowElement as="p">{decodeFlowpressText(block.attributes.text)}</StyleflowElement>}
@@ -481,7 +512,7 @@ function nestedRendererProps(nextParentBlockName: string) {
481
512
  contract={contract}
482
513
  blockRenderers={blockRenderers}
483
514
  iconRenderer={IconRenderer}
484
- {...nestedRendererProps(block.name)}
515
+ {...nestedRendererProps(block.name, block.attributes)}
485
516
  />
486
517
  ) : (
487
518
  <ListItemFallback item={item} />
@@ -500,7 +531,7 @@ function nestedRendererProps(nextParentBlockName: string) {
500
531
  contract={contract}
501
532
  blockRenderers={blockRenderers}
502
533
  iconRenderer={IconRenderer}
503
- {...nestedRendererProps(block.name)}
534
+ {...nestedRendererProps(block.name, block.attributes)}
504
535
  />
505
536
  </div>
506
537
  ) : (
@@ -509,7 +540,7 @@ function nestedRendererProps(nextParentBlockName: string) {
509
540
  contract={contract}
510
541
  blockRenderers={blockRenderers}
511
542
  iconRenderer={IconRenderer}
512
- {...nestedRendererProps(block.name)}
543
+ {...nestedRendererProps(block.name, block.attributes)}
513
544
  />
514
545
  );
515
546
  }
@@ -528,7 +559,7 @@ function nestedRendererProps(nextParentBlockName: string) {
528
559
  contract={contract}
529
560
  blockRenderers={blockRenderers}
530
561
  iconRenderer={IconRenderer}
531
- {...nestedRendererProps(block.name)}
562
+ {...nestedRendererProps(block.name, block.attributes)}
532
563
  />
533
564
  </details>
534
565
  </StyleflowElement>
@@ -582,7 +613,7 @@ function nestedRendererProps(nextParentBlockName: string) {
582
613
  contract={contract}
583
614
  blockRenderers={blockRenderers}
584
615
  iconRenderer={IconRenderer}
585
- {...nestedRendererProps(block.name)}
616
+ {...nestedRendererProps(block.name, block.attributes)}
586
617
  />
587
618
  );
588
619
  return name === "section" ? (
@@ -595,3 +626,12 @@ function nestedRendererProps(nextParentBlockName: string) {
595
626
  <script>
596
627
  import "./native/grid-bleed.js";
597
628
  </script>
629
+
630
+ <style is:global>
631
+ [data-flowpress-media-text] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
632
+ @media (max-width: 40rem) { [data-flowpress-media-text] { grid-template-columns: minmax(0, 1fr); } }
633
+ </style>
634
+
635
+ <style is:global>
636
+ .flowpress-carousel:not(.is-initialized), .sf-carousel:not(.is-initialized), .flowpress-query-carousel:not(.is-initialized) { visibility: visible; }
637
+ </style>
@@ -0,0 +1,24 @@
1
+ ---
2
+ import StyleflowElement from "./StyleflowElement.astro";
3
+ import { resolveStyleFlowAstroPrimitive } from "@styleflow.app/astro";
4
+ import { decodeFlowpressText } from "../text.js";
5
+ import { flowpressSvgMediaProps, type FlowpressSvgMediaLocals } from "../svg-media.js";
6
+ interface Props { src?: unknown; [key: string]: unknown; }
7
+ const props = { ...Astro.props };
8
+ if (typeof props.alt === "string") props.alt = decodeFlowpressText(props.alt);
9
+ if (typeof props["aria-label"] === "string") props["aria-label"] = decodeFlowpressText(props["aria-label"]);
10
+ const svg = flowpressSvgMediaProps(props.src, props, Astro.locals as FlowpressSvgMediaLocals);
11
+ const svgAttributes = svg ? resolveStyleFlowAstroPrimitive({ ...svg.attributes, as: "img" }).attributes : {};
12
+ ---
13
+ {svg ? (
14
+ <svg {...svgAttributes}><Fragment set:html={svg.content} /></svg>
15
+ ) : (
16
+ <StyleflowElement as="img" {...props} />
17
+ )}
18
+ <script>
19
+ import { initializeFlowpressSvgMedia } from "../svg-media-runtime.js";
20
+ initializeFlowpressSvgMedia();
21
+ </script>
22
+ <style is:global>
23
+ :where(.flowpress-svg-media) { max-inline-size: 100%; block-size: auto; overflow: hidden; vertical-align: middle; }
24
+ </style>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import "./native/inline-text.css";
2
3
  import { decodeFlowpressText } from "../text.js";
3
4
  import { resolveStyleFlowAstroPrimitive } from "@styleflow.app/astro";
4
5
 
@@ -125,6 +125,7 @@ if (!validChildren && import.meta.env.DEV) {
125
125
  <style>
126
126
  flowpress-carousel { display: block; }
127
127
  .flowpress-carousel { min-width: 0; }
128
+ .flowpress-carousel:not(.is-initialized) { visibility: visible; }
128
129
  .flowpress-carousel:not(.is-initialized) .splide__list {
129
130
  display: grid;
130
131
  grid-template-columns: repeat(var(--flowpress-carousel-base), minmax(0, 1fr));
@@ -196,3 +197,5 @@ if (!validChildren && import.meta.env.DEV) {
196
197
  .flowpress-carousel * { scroll-behavior: auto !important; }
197
198
  }
198
199
  </style>
200
+
201
+ <style is:global>.flowpress-carousel:not(.is-initialized) { visibility: visible; }</style>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import Media from "../Media.astro";
2
3
  import StyleflowElement from "../StyleflowElement.astro";
3
4
  import type { DynamicStyleflowProps, StyleflowContract } from "../../styleflow.js";
4
5
  import { resolvePrefixedFlowpressBlockStyleflowProps } from "../../styleflow.js";
@@ -77,7 +78,7 @@ const tagName = coverTagName(attributes.tagName);
77
78
 
78
79
  <StyleflowElement as={tagName} {...rootStyleflowProps} {...rootHtmlProps} style={rootStyle}>
79
80
  {backgroundType === "image" && source ? (
80
- <img
81
+ <Media
81
82
  class="wp-block-cover__image-background flowpress-cover__media"
82
83
  src={source}
83
84
  width={width}
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import Media from "../Media.astro";
2
3
  import StyleflowElement from "../StyleflowElement.astro";
3
4
  import type { FlowpressBlock } from "../../types.js";
4
5
  import type { StyleflowContract } from "../../styleflow.js";
@@ -43,7 +44,7 @@ const scrimIntensity = Math.min(10, Math.max(1, Number(attributes.scrimIntensity
43
44
  ].join(";")}
44
45
  >
45
46
  {backgroundType === "image" && imageSrc ? (
46
- <img
47
+ <Media
47
48
  class="flowpress-hero__media"
48
49
  src={imageSrc}
49
50
  alt=""
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import Media from "../Media.astro";
2
3
  import StyleflowElement from "../StyleflowElement.astro";
3
4
  import type { StyleflowContract } from "../../styleflow.js";
4
5
  import type { FlowpressBlock } from "../../types.js";
@@ -73,7 +74,7 @@ const fetchPriority = fetchPriorityValue(attributes.fetchPriority);
73
74
  {...semanticProps(attributes, contract)}
74
75
  {...blockHtmlAttributes(attributes)}
75
76
  >
76
- <img
77
+ <Media
77
78
  src={src}
78
79
  srcset={srcSet || undefined}
79
80
  sizes={sizes}
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import Media from "../Media.astro";
2
3
  import { decodeFlowpressText } from "../../text.js";
3
4
  import StyleflowElement from "../StyleflowElement.astro";
4
5
  import { flowpressLinkHref } from "../../links.js";
@@ -15,7 +16,7 @@ const href = flowpressLinkHref(item.uri);
15
16
  ---
16
17
 
17
18
  {image.url ? (
18
- <img
19
+ <Media
19
20
  src={String(image.url)}
20
21
  alt={decodeFlowpressText(image.alt)}
21
22
  loading="lazy"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import Media from "../Media.astro";
2
3
  import StyleflowElement from "../StyleflowElement.astro";
3
4
  import type { FlowpressBlockRendererProps } from "../../block-renderers.js";
4
5
 
@@ -32,7 +33,7 @@ const rootHtmlProps = {
32
33
  aria-label="Home"
33
34
  >
34
35
  {positive.url ? (
35
- <img
36
+ <Media
36
37
  class="flowpress-site-logo__image flowpress-site-logo__image--positive"
37
38
  src={positive.url}
38
39
  width={positive.width || undefined}
@@ -41,7 +42,7 @@ const rootHtmlProps = {
41
42
  />
42
43
  ) : null}
43
44
  {negative.url ? (
44
- <img
45
+ <Media
45
46
  class="flowpress-site-logo__image flowpress-site-logo__image--negative"
46
47
  src={negative.url}
47
48
  width={negative.width || undefined}
@@ -10,6 +10,8 @@ export declare function heroObjectPosition(value: unknown): string;
10
10
  export declare function blockHtmlAttributes(attributes: Record<string, unknown>, baseClass?: string): {
11
11
  id?: string;
12
12
  class?: string;
13
+ style?: string;
14
+ [key: string]: unknown;
13
15
  };
14
16
  export declare const TEXT_HTML_TAGS: readonly ["span", "p", "h1", "h2", "h3", "h4", "h5", "h6", "strong", "em", "small", "mark"];
15
17
  export type TextHtmlTag = (typeof TEXT_HTML_TAGS)[number];
@@ -21,7 +23,7 @@ export type TextHtmlTag = (typeof TEXT_HTML_TAGS)[number];
21
23
  export declare function compatibleTypographyVariant(type: string, preferred: string, contract?: StyleflowContract): string;
22
24
  export declare function textBlockSemanticDefaults(blockName: string, attributes: Record<string, unknown>, contract?: StyleflowContract): Record<string, unknown>;
23
25
  export declare function textHtmlTag(value: unknown): TextHtmlTag;
24
- export declare function semanticProps(attributes: Record<string, unknown>, contract?: StyleflowContract, defaults?: Record<string, unknown>): Record<string, unknown>;
26
+ export declare function semanticProps(attributes: Record<string, unknown>, contract?: StyleflowContract, defaults?: Record<string, unknown>, effectiveTone?: string): Record<string, unknown>;
25
27
  /** Resolve only Gutenberg's supported text-alignment values to inline CSS. */
26
28
  export declare function textAlignmentStyle(attributes: Record<string, unknown>): string | undefined;
27
29
  export declare function prefixedTextSemanticProps(attributes: Record<string, unknown>, prefix: string, contract?: StyleflowContract, defaults?: Record<string, unknown>): Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/astro/blocks/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,eAAO,MAAM,4BAA4B,YAAY,CAAC;AAEtD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAmBzD;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,SAAS,SAAK,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AAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,SAAS,GAAG,MAAM,CAErE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoB5D;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,SAAS,GAAG,MAAM,CAErE;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,MAAM,EAAE,SAAS,GAAG,MAAM,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,MAAM,CAAC,CAe5D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKnD"}
@@ -1,3 +1,4 @@
1
+ import { nativeFlexItemProps } from "../native/group.js";
1
2
  import { resolveFlowpressBlockStyleflowProps } from "../../styleflow.js";
2
3
  import { flowpressLinkHref } from "../../links.js";
3
4
  export const DEFAULT_SEMANTIC_PROPS = {
@@ -31,10 +32,10 @@ export function blockHtmlAttributes(attributes, baseClass = "") {
31
32
  .filter(Boolean)
32
33
  .join(" ")
33
34
  .replace(/\s+/g, " ");
34
- return {
35
+ return nativeFlexItemProps(attributes, {
35
36
  ...(anchor ? { id: anchor } : {}),
36
37
  ...(className ? { class: className } : {})
37
- };
38
+ });
38
39
  }
39
40
  export const TEXT_HTML_TAGS = [
40
41
  "span",
@@ -101,8 +102,9 @@ export function textHtmlTag(value) {
101
102
  ? candidate
102
103
  : "span";
103
104
  }
104
- export function semanticProps(attributes, contract, defaults = DEFAULT_SEMANTIC_PROPS) {
105
+ export function semanticProps(attributes, contract, defaults = DEFAULT_SEMANTIC_PROPS, effectiveTone) {
105
106
  return resolveFlowpressBlockStyleflowProps(attributes, contract, defaults, {
107
+ effectiveTone,
106
108
  strict: process.env.NODE_ENV === "production" || process.env.STYLEFLOW_STRICT === "1",
107
109
  onDiagnostic: (diagnostic) => console.warn(`[${diagnostic.code}] ${diagnostic.message}`)
108
110
  });