@styleflow.app/flowpress-astro-core 1.0.0-beta.2 → 1.0.0-beta.20

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 (205) hide show
  1. package/CHANGELOG.md +146 -1
  2. package/README.md +111 -3
  3. package/dist/astro/BaseLayout.astro +10 -6
  4. package/dist/astro/CompositionRenderer.astro +148 -0
  5. package/dist/astro/DefaultBlockAdapter.astro +35 -0
  6. package/dist/astro/DefaultTemplate.astro +6 -1
  7. package/dist/astro/GutenbergRenderer.astro +231 -72
  8. package/dist/astro/ThemeRuntime.astro +24 -0
  9. package/dist/astro/blocks/CarouselBlock.astro +7 -9
  10. package/dist/astro/blocks/CarouselItemBlock.astro +3 -3
  11. package/dist/astro/blocks/ColumnBlock.astro +3 -4
  12. package/dist/astro/blocks/CoverBlock.astro +155 -0
  13. package/dist/astro/blocks/FormBlock.astro +18 -16
  14. package/dist/astro/blocks/GridBlock.astro +3 -3
  15. package/dist/astro/blocks/HeroBlock.astro +3 -4
  16. package/dist/astro/blocks/ImageBlock.astro +3 -4
  17. package/dist/astro/blocks/ListItemFallback.astro +7 -5
  18. package/dist/astro/blocks/NumberSpinnerBlock.astro +25 -19
  19. package/dist/astro/blocks/SemanticElement.astro +35 -0
  20. package/dist/astro/blocks/SiteLogoBlock.astro +53 -0
  21. package/dist/astro/blocks/TextBlock.astro +29 -25
  22. package/dist/astro/blocks/ThemeToggleBlock.astro +23 -0
  23. package/dist/astro/blocks/cover.d.ts +13 -0
  24. package/dist/astro/blocks/cover.d.ts.map +1 -0
  25. package/dist/astro/blocks/cover.js +105 -0
  26. package/dist/astro/blocks/cover.js.map +1 -0
  27. package/dist/astro/blocks/cover.ts +119 -0
  28. package/dist/astro/blocks/helpers.d.ts +7 -0
  29. package/dist/astro/blocks/helpers.d.ts.map +1 -1
  30. package/dist/astro/blocks/helpers.js +51 -41
  31. package/dist/astro/blocks/helpers.js.map +1 -1
  32. package/dist/astro/blocks/helpers.ts +63 -45
  33. package/dist/astro/native/Blob.astro +113 -0
  34. package/dist/astro/native/BlobBlock.astro +52 -0
  35. package/dist/astro/native/CustomFieldValue.astro +86 -0
  36. package/dist/astro/native/LevelTag.astro +20 -0
  37. package/dist/astro/native/MapBlock.astro +41 -0
  38. package/dist/astro/native/NativeHtmlBlock.astro +12 -0
  39. package/dist/astro/native/NativeIconBlock.astro +33 -0
  40. package/dist/astro/native/ProjectTimelineBlock.astro +34 -0
  41. package/dist/astro/native/ResolvedBlocks.astro +89 -0
  42. package/dist/astro/native/SyncedPatternContent.astro +92 -0
  43. package/dist/astro/native/TermFieldValue.astro +37 -0
  44. package/dist/astro/native/Timeline.astro +20 -0
  45. package/dist/astro/native/TimelineCardBlock.astro +7 -0
  46. package/dist/astro/native/blob/blob-shapes.generated.d.ts +2 -0
  47. package/dist/astro/native/blob/blob-shapes.generated.d.ts.map +1 -0
  48. package/dist/astro/native/blob/blob-shapes.generated.js +2 -0
  49. package/dist/astro/native/blob/blob-shapes.generated.js.map +1 -0
  50. package/dist/astro/native/blob/blob-shapes.generated.ts +1 -0
  51. package/dist/astro/native/blob/config.d.ts +49 -0
  52. package/dist/astro/native/blob/config.d.ts.map +1 -0
  53. package/dist/astro/native/blob/config.js +86 -0
  54. package/dist/astro/native/blob/config.js.map +1 -0
  55. package/dist/astro/native/blob/config.ts +132 -0
  56. package/dist/astro/native/blob/controller.d.ts +11 -0
  57. package/dist/astro/native/blob/controller.d.ts.map +1 -0
  58. package/dist/astro/native/blob/controller.js +240 -0
  59. package/dist/astro/native/blob/controller.js.map +1 -0
  60. package/dist/astro/native/blob/controller.ts +248 -0
  61. package/dist/astro/native/blob/geometry.d.ts +2 -0
  62. package/dist/astro/native/blob/geometry.d.ts.map +1 -0
  63. package/dist/astro/native/blob/geometry.js +2 -0
  64. package/dist/astro/native/blob/geometry.js.map +1 -0
  65. package/dist/astro/native/blob/geometry.ts +1 -0
  66. package/dist/astro/native/blob/ids.d.ts +7 -0
  67. package/dist/astro/native/blob/ids.d.ts.map +1 -0
  68. package/dist/astro/native/blob/ids.js +11 -0
  69. package/dist/astro/native/blob/ids.js.map +1 -0
  70. package/dist/astro/native/blob/ids.ts +11 -0
  71. package/dist/astro/native/blob.css +83 -0
  72. package/dist/astro/native/button.d.ts +13 -0
  73. package/dist/astro/native/button.d.ts.map +1 -0
  74. package/dist/astro/native/button.js +26 -0
  75. package/dist/astro/native/button.js.map +1 -0
  76. package/dist/astro/native/button.ts +26 -0
  77. package/dist/astro/native/core-block.astro +18 -0
  78. package/dist/astro/native/core-button.astro +43 -0
  79. package/dist/astro/native/core-buttons.astro +14 -0
  80. package/dist/astro/native/core-group.astro +23 -0
  81. package/dist/astro/native/core-home-link.astro +11 -0
  82. package/dist/astro/native/core-html.astro +8 -0
  83. package/dist/astro/native/core-icon.astro +7 -0
  84. package/dist/astro/native/core-image.astro +124 -0
  85. package/dist/astro/native/core-navigation-link.astro +70 -0
  86. package/dist/astro/native/core-navigation-submenu.astro +32 -0
  87. package/dist/astro/native/core-navigation.astro +94 -0
  88. package/dist/astro/native/core-page-list-data-item.astro +18 -0
  89. package/dist/astro/native/core-page-list-item.astro +7 -0
  90. package/dist/astro/native/core-page-list.astro +40 -0
  91. package/dist/astro/native/core-post-date.astro +20 -0
  92. package/dist/astro/native/core-post-excerpt.astro +25 -0
  93. package/dist/astro/native/core-post-featured-image.astro +37 -0
  94. package/dist/astro/native/core-post-template.astro +30 -0
  95. package/dist/astro/native/core-post-terms.astro +46 -0
  96. package/dist/astro/native/core-post-title.astro +23 -0
  97. package/dist/astro/native/core-query-no-results.astro +12 -0
  98. package/dist/astro/native/core-query.astro +22 -0
  99. package/dist/astro/native/core-site-title.astro +15 -0
  100. package/dist/astro/native/core-term-description.astro +12 -0
  101. package/dist/astro/native/core-term-name.astro +20 -0
  102. package/dist/astro/native/core-term-template.astro +30 -0
  103. package/dist/astro/native/core-terms-query.astro +19 -0
  104. package/dist/astro/native/flowpress-navigation-controller.d.ts +2 -0
  105. package/dist/astro/native/flowpress-navigation-controller.d.ts.map +1 -0
  106. package/dist/astro/native/flowpress-navigation-controller.js +217 -0
  107. package/dist/astro/native/flowpress-navigation-controller.js.map +1 -0
  108. package/dist/astro/native/flowpress-navigation-controller.ts +215 -0
  109. package/dist/astro/native/flowpress-navigation.css +17 -0
  110. package/dist/astro/native/grid-bleed.js +106 -0
  111. package/dist/astro/native/grid.css +180 -0
  112. package/dist/astro/native/grid.d.ts +17 -0
  113. package/dist/astro/native/grid.d.ts.map +1 -0
  114. package/dist/astro/native/grid.js +103 -0
  115. package/dist/astro/native/grid.js.map +1 -0
  116. package/dist/astro/native/grid.ts +118 -0
  117. package/dist/astro/native/html.d.ts +6 -0
  118. package/dist/astro/native/html.d.ts.map +1 -0
  119. package/dist/astro/native/html.js +10 -0
  120. package/dist/astro/native/html.js.map +1 -0
  121. package/dist/astro/native/html.ts +9 -0
  122. package/dist/astro/native/icon.d.ts +3 -0
  123. package/dist/astro/native/icon.d.ts.map +1 -0
  124. package/dist/astro/native/icon.js +23 -0
  125. package/dist/astro/native/icon.js.map +1 -0
  126. package/dist/astro/native/icon.ts +21 -0
  127. package/dist/astro/native/map.d.ts +14 -0
  128. package/dist/astro/native/map.d.ts.map +1 -0
  129. package/dist/astro/native/map.js +60 -0
  130. package/dist/astro/native/map.js.map +1 -0
  131. package/dist/astro/native/map.ts +70 -0
  132. package/dist/astro/native/motion-preference.d.ts +50 -0
  133. package/dist/astro/native/motion-preference.d.ts.map +1 -0
  134. package/dist/astro/native/motion-preference.js +132 -0
  135. package/dist/astro/native/motion-preference.js.map +1 -0
  136. package/dist/astro/native/motion-preference.ts +158 -0
  137. package/dist/astro/native/motion.d.ts +101 -0
  138. package/dist/astro/native/motion.d.ts.map +1 -0
  139. package/dist/astro/native/motion.js +168 -0
  140. package/dist/astro/native/motion.js.map +1 -0
  141. package/dist/astro/native/motion.ts +312 -0
  142. package/dist/astro/native/query-loop.d.ts +38 -0
  143. package/dist/astro/native/query-loop.d.ts.map +1 -0
  144. package/dist/astro/native/query-loop.js +20 -0
  145. package/dist/astro/native/query-loop.js.map +1 -0
  146. package/dist/astro/native/query-loop.ts +67 -0
  147. package/dist/astro/native/registry.d.ts +3 -0
  148. package/dist/astro/native/registry.d.ts.map +1 -0
  149. package/dist/astro/native/registry.js +72 -0
  150. package/dist/astro/native/registry.js.map +1 -0
  151. package/dist/astro/native/registry.ts +72 -0
  152. package/dist/astro/native/sf-block-binding.astro +20 -0
  153. package/dist/astro/native/sf-post-field.astro +9 -0
  154. package/dist/astro/native/sf-term-field.astro +9 -0
  155. package/dist/astro/native/timeline.css +4 -0
  156. package/dist/astro/native/timeline.d.ts +28 -0
  157. package/dist/astro/native/timeline.d.ts.map +1 -0
  158. package/dist/astro/native/timeline.js +43 -0
  159. package/dist/astro/native/timeline.js.map +1 -0
  160. package/dist/astro/native/timeline.ts +79 -0
  161. package/dist/block-renderers.d.ts +20 -3
  162. package/dist/block-renderers.d.ts.map +1 -1
  163. package/dist/block-renderers.js.map +1 -1
  164. package/dist/client.d.ts +17 -1
  165. package/dist/client.d.ts.map +1 -1
  166. package/dist/client.js +63 -9
  167. package/dist/client.js.map +1 -1
  168. package/dist/composition.d.ts +14 -0
  169. package/dist/composition.d.ts.map +1 -0
  170. package/dist/composition.js +124 -0
  171. package/dist/composition.js.map +1 -0
  172. package/dist/default-blocks.d.ts +9 -0
  173. package/dist/default-blocks.d.ts.map +1 -0
  174. package/dist/default-blocks.js +107 -0
  175. package/dist/default-blocks.js.map +1 -0
  176. package/dist/env.d.ts +9 -0
  177. package/dist/env.d.ts.map +1 -1
  178. package/dist/env.js +20 -0
  179. package/dist/env.js.map +1 -1
  180. package/dist/index.d.ts +5 -0
  181. package/dist/index.d.ts.map +1 -1
  182. package/dist/index.js +5 -0
  183. package/dist/index.js.map +1 -1
  184. package/dist/links.d.ts +5 -0
  185. package/dist/links.d.ts.map +1 -0
  186. package/dist/links.js +32 -0
  187. package/dist/links.js.map +1 -0
  188. package/dist/media.d.ts +28 -0
  189. package/dist/media.d.ts.map +1 -0
  190. package/dist/media.js +212 -0
  191. package/dist/media.js.map +1 -0
  192. package/dist/styleflow.d.ts +16 -1
  193. package/dist/styleflow.d.ts.map +1 -1
  194. package/dist/styleflow.js +67 -7
  195. package/dist/styleflow.js.map +1 -1
  196. package/dist/templates.d.ts +16 -16
  197. package/dist/theme-runtime.d.ts +16 -0
  198. package/dist/theme-runtime.d.ts.map +1 -0
  199. package/dist/theme-runtime.js +77 -0
  200. package/dist/theme-runtime.js.map +1 -0
  201. package/dist/tsconfig.tsbuildinfo +1 -1
  202. package/dist/types.d.ts +84 -1
  203. package/dist/types.d.ts.map +1 -1
  204. package/dist/types.js.map +1 -1
  205. package/package.json +13 -4
@@ -0,0 +1,248 @@
1
+ /**
2
+ * Browser controller for morphing blobs. The server always renders a correct
3
+ * static shape; this only animates the `d` of the clip and outline paths.
4
+ *
5
+ * - `auto`: after each pause, morph into a random target and repeat.
6
+ * - `hover`: morph into a random target while hovered/focused, back on leave.
7
+ *
8
+ * One shared requestAnimationFrame loop drives every blob. Morphing pauses
9
+ * off-screen and in hidden tabs, and follows the shared motion preference
10
+ * (OS `prefers-reduced-motion`, overridable from the accessibility panel): with
11
+ * motion reduced every blob rests on its authored shape and never morphs, and
12
+ * it picks up again, live, when motion is allowed.
13
+ */
14
+ import {
15
+ getMotionPreference,
16
+ subscribeMotionPreference,
17
+ type MotionPreference,
18
+ } from "../motion-preference.js";
19
+ import { BLOB_BOX, BLOB_VARIANTS } from "./blob-shapes.generated.js";
20
+ import { pickMorphTarget, morphConfigFromDataset, type BlobMorphConfig } from "./config.js";
21
+ import { easeInOutCubic, lerpShape, shapeToPath, type BlobShape } from "./geometry.js";
22
+
23
+ export const BLOB_ROOT_SELECTOR = "[data-sf-blob]";
24
+ export const CARD_ANIMATION_CLASS = "card__animation";
25
+ export const CARD_ANIMATION_TRIGGER_SELECTOR = ".card__has_animations";
26
+ const INITIALIZED = "blobReady";
27
+
28
+ interface Transition {
29
+ startedAt: number;
30
+ from: { fill: BlobShape; ring: BlobShape };
31
+ to: number;
32
+ }
33
+
34
+ class MorphingBlob {
35
+ private fill: BlobShape;
36
+ private ring: BlobShape;
37
+ private settled: number;
38
+ private transition: Transition | null = null;
39
+ private timer: number | undefined;
40
+ private visible = true;
41
+ private hovered = false;
42
+ private allowed = false;
43
+ private readonly clipPath: SVGPathElement | null;
44
+ private readonly ringPath: SVGPathElement | null;
45
+ private readonly disposers: Array<() => void> = [];
46
+
47
+ constructor(
48
+ private readonly root: HTMLElement,
49
+ private readonly config: BlobMorphConfig,
50
+ private readonly scheduler: Scheduler,
51
+ ) {
52
+ const base = BLOB_VARIANTS[config.base] ?? (BLOB_VARIANTS[0] as (typeof BLOB_VARIANTS)[number]);
53
+ this.fill = base.fill;
54
+ this.ring = base.ring;
55
+ this.settled = config.base;
56
+ this.clipPath = root.querySelector<SVGPathElement>("[data-blob-clip-path]");
57
+ this.ringPath = root.querySelector<SVGPathElement>("[data-blob-ring-path]");
58
+ }
59
+
60
+ start(): void {
61
+ if (this.config.mode === "auto") {
62
+ this.watchVisibility();
63
+ this.queueNext();
64
+ } else if (this.config.mode === "hover") {
65
+ // A marked blob delegates its hover/focus state to the closest card.
66
+ // Unmarked blobs keep their original, local hover behaviour.
67
+ const card = this.root.classList.contains(CARD_ANIMATION_CLASS)
68
+ ? this.root.closest<HTMLElement>(CARD_ANIMATION_TRIGGER_SELECTOR)
69
+ : null;
70
+ const area = card ?? this.root.querySelector<HTMLElement>("[data-blob-shape]") ?? this.root;
71
+ this.listen(area, "pointerenter", () => this.hover(true));
72
+ this.listen(area, "pointerleave", () => this.hover(false));
73
+ this.listen(area, "focusin", () => this.hover(true));
74
+ this.listen(area, "focusout", (event) => {
75
+ const next = (event as FocusEvent).relatedTarget;
76
+ if (!(next instanceof Node) || !area.contains(next)) this.hover(false);
77
+ });
78
+ }
79
+ }
80
+
81
+ destroy(): void {
82
+ window.clearTimeout(this.timer);
83
+ this.scheduler.remove(this);
84
+ this.disposers.splice(0).forEach((dispose) => dispose());
85
+ delete this.root.dataset[INITIALIZED];
86
+ }
87
+
88
+ /**
89
+ * Motion allowed: resume the automatic cycle. Motion reduced: drop back to
90
+ * the authored shape at once, and stay there until allowed again.
91
+ */
92
+ setMotionAllowed(allowed: boolean): void {
93
+ if (this.allowed === allowed) return;
94
+ this.allowed = allowed;
95
+ if (allowed) {
96
+ this.queueNext();
97
+ return;
98
+ }
99
+ window.clearTimeout(this.timer);
100
+ this.scheduler.remove(this);
101
+ this.transition = null;
102
+ this.settled = this.config.base;
103
+ const base = BLOB_VARIANTS[this.config.base];
104
+ if (base) this.apply(base.fill, base.ring);
105
+ }
106
+
107
+ /** Jump to the resting state and stop: used off-screen and in hidden tabs. */
108
+ freeze(): void {
109
+ window.clearTimeout(this.timer);
110
+ this.scheduler.remove(this);
111
+ if (this.transition) {
112
+ const target = BLOB_VARIANTS[this.transition.to];
113
+ if (target) this.apply(target.fill, target.ring);
114
+ this.settled = this.transition.to;
115
+ this.transition = null;
116
+ }
117
+ }
118
+
119
+ /** Advance the active transition. Returns `false` once it has finished. */
120
+ step(now: number): boolean {
121
+ const transition = this.transition;
122
+ const target = transition ? BLOB_VARIANTS[transition.to] : undefined;
123
+ if (!transition || !target) return false;
124
+ const progress = Math.min(1, (now - transition.startedAt) / this.config.duration);
125
+ const eased = easeInOutCubic(progress);
126
+ this.apply(
127
+ lerpShape(transition.from.fill, target.fill, eased),
128
+ lerpShape(transition.from.ring, target.ring, eased),
129
+ );
130
+ if (progress < 1) return true;
131
+ this.settled = transition.to;
132
+ this.transition = null;
133
+ if (this.config.mode === "auto") this.queueNext();
134
+ return false;
135
+ }
136
+
137
+ private listen(target: EventTarget, type: string, handler: (event: Event) => void): void {
138
+ target.addEventListener(type, handler);
139
+ this.disposers.push(() => target.removeEventListener(type, handler));
140
+ }
141
+
142
+ private watchVisibility(): void {
143
+ if (typeof IntersectionObserver === "function") {
144
+ const observer = new IntersectionObserver((entries) => {
145
+ this.visible = entries[entries.length - 1]?.isIntersecting ?? true;
146
+ if (this.visible) this.queueNext();
147
+ else this.freeze();
148
+ });
149
+ observer.observe(this.root);
150
+ this.disposers.push(() => observer.disconnect());
151
+ }
152
+ const onVisibility = () => (document.hidden ? this.freeze() : this.queueNext());
153
+ document.addEventListener("visibilitychange", onVisibility);
154
+ this.disposers.push(() => document.removeEventListener("visibilitychange", onVisibility));
155
+ }
156
+
157
+ private queueNext(): void {
158
+ window.clearTimeout(this.timer);
159
+ if (!this.allowed || this.config.mode !== "auto" || this.transition || !this.visible || document.hidden) return;
160
+ this.timer = window.setTimeout(() => {
161
+ const next = pickMorphTarget(this.config.targets, this.settled);
162
+ if (next !== null) this.morphTo(next);
163
+ }, this.config.interval);
164
+ }
165
+
166
+ private hover(active: boolean): void {
167
+ if (this.hovered === active) return;
168
+ this.hovered = active;
169
+ if (!this.allowed) return;
170
+ if (active) {
171
+ const next = pickMorphTarget(this.config.targets, this.config.base);
172
+ if (next !== null) this.morphTo(next);
173
+ } else {
174
+ this.morphTo(this.config.base);
175
+ }
176
+ }
177
+
178
+ private morphTo(index: number): void {
179
+ if (!this.allowed || !BLOB_VARIANTS[index]) return;
180
+ // Restarting mid-flight continues from the shape currently on screen.
181
+ this.transition = {
182
+ startedAt: performance.now(),
183
+ from: { fill: this.fill, ring: this.ring },
184
+ to: index,
185
+ };
186
+ this.scheduler.add(this);
187
+ }
188
+
189
+ private apply(fill: BlobShape, ring: BlobShape): void {
190
+ this.fill = fill;
191
+ this.ring = ring;
192
+ this.clipPath?.setAttribute("d", shapeToPath(fill, BLOB_BOX));
193
+ this.ringPath?.setAttribute("d", shapeToPath(ring, BLOB_BOX));
194
+ }
195
+ }
196
+
197
+ /** A single rAF loop shared by every blob on the page. */
198
+ class Scheduler {
199
+ private readonly active = new Set<MorphingBlob>();
200
+ private frame = 0;
201
+
202
+ add(blob: MorphingBlob): void {
203
+ this.active.add(blob);
204
+ if (!this.frame) this.frame = requestAnimationFrame(this.tick);
205
+ }
206
+
207
+ remove(blob: MorphingBlob): void {
208
+ this.active.delete(blob);
209
+ }
210
+
211
+ private readonly tick = (now: number): void => {
212
+ this.frame = 0;
213
+ for (const blob of [...this.active]) {
214
+ if (!blob.step(now)) this.active.delete(blob);
215
+ }
216
+ if (this.active.size > 0) this.frame = requestAnimationFrame(this.tick);
217
+ };
218
+ }
219
+
220
+ /**
221
+ * Wire every `[data-sf-blob]` with `data-blob-morph` set to `auto` or `hover`.
222
+ * Blobs are wired even while motion is reduced, so allowing it again starts
223
+ * them without a reload. Returns a disposer that restores the static state
224
+ * (for tests and view swaps).
225
+ */
226
+ export function initializeSfBlobs(scope: ParentNode = document): () => void {
227
+ const scheduler = new Scheduler();
228
+ const blobs: MorphingBlob[] = [];
229
+ scope.querySelectorAll<HTMLElement>(BLOB_ROOT_SELECTOR).forEach((root) => {
230
+ if (root.dataset[INITIALIZED] === "true") return;
231
+ const config = morphConfigFromDataset(root.dataset, BLOB_VARIANTS.length);
232
+ if (config.mode === "none") return;
233
+ root.dataset[INITIALIZED] = "true";
234
+ const blob = new MorphingBlob(root, config, scheduler);
235
+ blobs.push(blob);
236
+ blob.start();
237
+ });
238
+
239
+ const applyPreference = (preference: MotionPreference) => {
240
+ blobs.forEach((blob) => blob.setMotionAllowed(preference === "full"));
241
+ };
242
+ applyPreference(getMotionPreference());
243
+ const unsubscribe = subscribeMotionPreference(applyPreference);
244
+ return () => {
245
+ unsubscribe();
246
+ blobs.forEach((blob) => blob.destroy());
247
+ };
248
+ }
@@ -0,0 +1,2 @@
1
+ export * from "@styleflow.app/flowpress-components/organic-geometry";
2
+ //# sourceMappingURL=geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../src/astro/native/blob/geometry.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "@styleflow.app/flowpress-components/organic-geometry";
2
+ //# sourceMappingURL=geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../../../src/astro/native/blob/geometry.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC","sourcesContent":["export * from \"@styleflow.app/flowpress-components/organic-geometry\";\n"]}
@@ -0,0 +1 @@
1
+ export * from "@styleflow.app/flowpress-components/organic-geometry";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Unique `<clipPath>` id per rendered blob. A module counter (instead of a
3
+ * random value) keeps the output deterministic for a given render order, and
4
+ * each blob needs its own clip because morphing rewrites the path's `d`.
5
+ */
6
+ export declare function nextBlobClipId(): string;
7
+ //# sourceMappingURL=ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../../src/astro/native/blob/ids.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAGvC"}
@@ -0,0 +1,11 @@
1
+ let sequence = 0;
2
+ /**
3
+ * Unique `<clipPath>` id per rendered blob. A module counter (instead of a
4
+ * random value) keeps the output deterministic for a given render order, and
5
+ * each blob needs its own clip because morphing rewrites the path's `d`.
6
+ */
7
+ export function nextBlobClipId() {
8
+ sequence += 1;
9
+ return `sf-blob-clip-${sequence}`;
10
+ }
11
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../../src/astro/native/blob/ids.ts"],"names":[],"mappings":"AAAA,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,QAAQ,IAAI,CAAC,CAAC;IACd,OAAO,gBAAgB,QAAQ,EAAE,CAAC;AACpC,CAAC","sourcesContent":["let sequence = 0;\n\n/**\n * Unique `<clipPath>` id per rendered blob. A module counter (instead of a\n * random value) keeps the output deterministic for a given render order, and\n * each blob needs its own clip because morphing rewrites the path's `d`.\n */\nexport function nextBlobClipId(): string {\n sequence += 1;\n return `sf-blob-clip-${sequence}`;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ let sequence = 0;
2
+
3
+ /**
4
+ * Unique `<clipPath>` id per rendered blob. A module counter (instead of a
5
+ * random value) keeps the output deterministic for a given render order, and
6
+ * each blob needs its own clip because morphing rewrites the path's `d`.
7
+ */
8
+ export function nextBlobClipId(): string {
9
+ sequence += 1;
10
+ return `sf-blob-clip-${sequence}`;
11
+ }
@@ -0,0 +1,83 @@
1
+ /* Blob: organic clipped container. Geometry only; colours come from Styleflow. */
2
+ .sf-blob {
3
+ position: relative;
4
+ display: block;
5
+ inline-size: 100%;
6
+ aspect-ratio: var(--fp-blob-aspect, 1 / 1);
7
+ }
8
+
9
+ .sf-blob[data-blob-aspect="square"] {
10
+ aspect-ratio: 1 / 1;
11
+ }
12
+
13
+ .sf-blob[data-blob-aspect="portrait"] {
14
+ aspect-ratio: 4 / 5;
15
+ }
16
+
17
+ .sf-blob[data-blob-aspect="landscape"] {
18
+ aspect-ratio: 5 / 4;
19
+ }
20
+
21
+ /* Holds the <clipPath>; it must stay rendered (display: none disables clipping). */
22
+ .sf-blob__defs {
23
+ position: absolute;
24
+ inline-size: 0;
25
+ block-size: 0;
26
+ overflow: hidden;
27
+ pointer-events: none;
28
+ }
29
+
30
+ .sf-blob__shape {
31
+ position: absolute;
32
+ inset: 0;
33
+ display: grid;
34
+ grid-template-columns: minmax(0, 1fr);
35
+ overflow: hidden;
36
+ isolation: isolate;
37
+ }
38
+
39
+ .sf-blob[data-blob-fit="cover"] .sf-blob__shape {
40
+ grid-auto-rows: minmax(0, 1fr);
41
+ }
42
+
43
+ .sf-blob[data-blob-fit="cover"] .sf-blob__shape > * {
44
+ min-inline-size: 0;
45
+ min-block-size: 0;
46
+ inline-size: 100%;
47
+ block-size: 100%;
48
+ }
49
+
50
+ .sf-blob[data-blob-fit="cover"] .sf-blob__shape :is(img, picture, video) {
51
+ display: block;
52
+ inline-size: 100%;
53
+ block-size: 100%;
54
+ object-fit: cover;
55
+ }
56
+
57
+ .sf-blob[data-blob-fit="center"] .sf-blob__shape {
58
+ place-content: center;
59
+ place-items: center;
60
+ text-align: center;
61
+ }
62
+
63
+ /* The outline sits above the content and may spill past the box edges. */
64
+ .sf-blob__ring {
65
+ position: absolute;
66
+ inset: 0;
67
+ display: block;
68
+ overflow: visible;
69
+ pointer-events: none;
70
+ }
71
+
72
+ .sf-blob__ring svg {
73
+ display: block;
74
+ inline-size: 100%;
75
+ block-size: 100%;
76
+ overflow: visible;
77
+ }
78
+
79
+ .sf-blob__ring path {
80
+ fill: none;
81
+ stroke: var(--sf-surface-default-background);
82
+ stroke-linejoin: round;
83
+ }
@@ -0,0 +1,13 @@
1
+ /** WordPress resolves the RichText; Astro restricts URL and control semantics. */
2
+ export declare function nativeButtonData(data?: Record<string, unknown> | null): {
3
+ empty: boolean;
4
+ tag: string;
5
+ label: string;
6
+ href: string | undefined;
7
+ target: string | undefined;
8
+ rel: string | undefined;
9
+ title: string | undefined;
10
+ type: "button" | "submit" | "reset";
11
+ };
12
+ export declare function nativeButtonsLayout(layout?: Record<string, unknown>): string;
13
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/astro/native/button.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;;;;;;;;UAgBwB,QAAQ,GAAG,QAAQ,GAAG,OAAO;EAE1H;AAED,wBAAgB,mBAAmB,CAAC,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,UAIvE"}
@@ -0,0 +1,26 @@
1
+ /** WordPress resolves the RichText; Astro restricts URL and control semantics. */
2
+ export function nativeButtonData(data) {
3
+ const value = data ?? {};
4
+ const text = (key) => typeof value[key] === "string" ? String(value[key]) : "";
5
+ const url = text("href").trim();
6
+ const href = /^(?:\/(?!\/)|#[^\s]*|https?:\/\/|mailto:|tel:)/i.test(url)
7
+ && !/[\u0000-\u0020\u007f]/u.test(url) ? url : undefined;
8
+ const target = ["_blank", "_self", "_parent", "_top"].includes(text("target")) ? text("target") : undefined;
9
+ const rel = [...new Set([
10
+ ...text("rel").split(/\s+/).filter(Boolean),
11
+ ...(target === "_blank" ? ["noopener", "noreferrer"] : []),
12
+ ])].join(" ") || undefined;
13
+ return {
14
+ empty: value.empty !== false,
15
+ tag: value.tag === "button" ? "button" : "a",
16
+ label: text("label"), href, target, rel,
17
+ title: text("title") || undefined,
18
+ type: (["button", "submit", "reset"].includes(text("type")) ? text("type") : "button"),
19
+ };
20
+ }
21
+ export function nativeButtonsLayout(layout = {}) {
22
+ const justify = { left: "flex-start", center: "center", right: "flex-end", "space-between": "space-between" }[String(layout.justifyContent ?? "left")] ?? "flex-start";
23
+ const vertical = layout.orientation === "vertical";
24
+ return `flex-direction:${vertical ? "column" : "row"};justify-content:${justify};align-items:${vertical ? justify === "space-between" ? "stretch" : justify : "center"};flex-wrap:${layout.flexWrap === "nowrap" ? "nowrap" : "wrap"}`;
25
+ }
26
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/astro/native/button.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,UAAU,gBAAgB,CAAC,IAAqC;IACpE,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvF,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,iDAAiD,CAAC,IAAI,CAAC,GAAG,CAAC;WACnE,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5G,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC;YACtB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;YAC3C,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IAC3B,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,KAAK;QAC5B,GAAG,EAAE,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG;QAC5C,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG;QACvC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS;QACjC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAkC;KACxH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,SAAkC,EAAE;IACtE,MAAM,OAAO,GAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAA6B,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,CAAC,IAAI,YAAY,CAAC;IACnM,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,KAAK,UAAU,CAAC;IACnD,OAAO,kBAAkB,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,oBAAoB,OAAO,gBAAgB,QAAQ,CAAC,CAAC,CAAC,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,cAAc,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;AACzO,CAAC","sourcesContent":["/** WordPress resolves the RichText; Astro restricts URL and control semantics. */\nexport function nativeButtonData(data?: Record<string, unknown> | null) {\n const value = data ?? {};\n const text = (key: string) => typeof value[key] === \"string\" ? String(value[key]) : \"\";\n const url = text(\"href\").trim();\n const href = /^(?:\\/(?!\\/)|#[^\\s]*|https?:\\/\\/|mailto:|tel:)/i.test(url)\n && !/[\\u0000-\\u0020\\u007f]/u.test(url) ? url : undefined;\n const target = [\"_blank\", \"_self\", \"_parent\", \"_top\"].includes(text(\"target\")) ? text(\"target\") : undefined;\n const rel = [...new Set([\n ...text(\"rel\").split(/\\s+/).filter(Boolean),\n ...(target === \"_blank\" ? [\"noopener\", \"noreferrer\"] : []),\n ])].join(\" \") || undefined;\n return {\n empty: value.empty !== false,\n tag: value.tag === \"button\" ? \"button\" : \"a\",\n label: text(\"label\"), href, target, rel,\n title: text(\"title\") || undefined,\n type: ([\"button\", \"submit\", \"reset\"].includes(text(\"type\")) ? text(\"type\") : \"button\") as \"button\" | \"submit\" | \"reset\",\n };\n}\n\nexport function nativeButtonsLayout(layout: Record<string, unknown> = {}) {\n const justify = ({ left: \"flex-start\", center: \"center\", right: \"flex-end\", \"space-between\": \"space-between\" } as Record<string, string>)[String(layout.justifyContent ?? \"left\")] ?? \"flex-start\";\n const vertical = layout.orientation === \"vertical\";\n return `flex-direction:${vertical ? \"column\" : \"row\"};justify-content:${justify};align-items:${vertical ? justify === \"space-between\" ? \"stretch\" : justify : \"center\"};flex-wrap:${layout.flexWrap === \"nowrap\" ? \"nowrap\" : \"wrap\"}`;\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /** WordPress resolves the RichText; Astro restricts URL and control semantics. */
2
+ export function nativeButtonData(data?: Record<string, unknown> | null) {
3
+ const value = data ?? {};
4
+ const text = (key: string) => typeof value[key] === "string" ? String(value[key]) : "";
5
+ const url = text("href").trim();
6
+ const href = /^(?:\/(?!\/)|#[^\s]*|https?:\/\/|mailto:|tel:)/i.test(url)
7
+ && !/[\u0000-\u0020\u007f]/u.test(url) ? url : undefined;
8
+ const target = ["_blank", "_self", "_parent", "_top"].includes(text("target")) ? text("target") : undefined;
9
+ const rel = [...new Set([
10
+ ...text("rel").split(/\s+/).filter(Boolean),
11
+ ...(target === "_blank" ? ["noopener", "noreferrer"] : []),
12
+ ])].join(" ") || undefined;
13
+ return {
14
+ empty: value.empty !== false,
15
+ tag: value.tag === "button" ? "button" : "a",
16
+ label: text("label"), href, target, rel,
17
+ title: text("title") || undefined,
18
+ type: (["button", "submit", "reset"].includes(text("type")) ? text("type") : "button") as "button" | "submit" | "reset",
19
+ };
20
+ }
21
+
22
+ export function nativeButtonsLayout(layout: Record<string, unknown> = {}) {
23
+ const justify = ({ left: "flex-start", center: "center", right: "flex-end", "space-between": "space-between" } as Record<string, string>)[String(layout.justifyContent ?? "left")] ?? "flex-start";
24
+ const vertical = layout.orientation === "vertical";
25
+ return `flex-direction:${vertical ? "column" : "row"};justify-content:${justify};align-items:${vertical ? justify === "space-between" ? "stretch" : justify : "center"};flex-wrap:${layout.flexWrap === "nowrap" ? "nowrap" : "wrap"}`;
26
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ import S from "@styleflow.app/astro/S.astro";
3
+ import type { FlowpressBlockRendererProps } from "../../index.js";
4
+ import SyncedPatternContent from "./SyncedPatternContent.astro";
5
+
6
+ // WordPress renders a synced pattern without a wrapper: keep the root only
7
+ // when the block authors something beyond the reference itself (anchor, class,
8
+ // Styleflow axes). Computed props are not enough, because the semantic
9
+ // renderer adds defaults to every block.
10
+ const props = Astro.props as FlowpressBlockRendererProps;
11
+ const { block, htmlProps, styleflowProps } = props;
12
+ const structural = new Set(["ref", "content", "lock", "metadata"]);
13
+ const ownsSemanticContext = Object.keys(block.attributes ?? {}).some((name) => !structural.has(name));
14
+ ---
15
+
16
+ {ownsSemanticContext
17
+ ? <S.div {...htmlProps} {...styleflowProps}><SyncedPatternContent {...props} selfRenderer={Astro.self}><slot /></SyncedPatternContent></S.div>
18
+ : <SyncedPatternContent {...props} selfRenderer={Astro.self}><slot /></SyncedPatternContent>}
@@ -0,0 +1,43 @@
1
+ ---
2
+ import S from "@styleflow.app/astro/S.astro";
3
+ import type { FlowpressBlockRendererProps } from "../../index.js";
4
+ import { nativeButtonData } from "./button.js";
5
+
6
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
7
+ const button = nativeButtonData(block.resolvedData);
8
+ const resolved = typeof block.resolvedData?.empty === "boolean";
9
+ const width = Number(block.attributes.width);
10
+ const rootProps = {
11
+ ...htmlProps,
12
+ class: ["wp-block-button", htmlProps.class].filter(Boolean).join(" "),
13
+ style: [htmlProps.style, [25, 50, 75, 100].includes(width) ? `width:${width}%` : ""].filter(Boolean).join(";"),
14
+ };
15
+ const controlProps = {
16
+ ...styleflowProps,
17
+ ...(!block.attributes.layoutRole ? { layoutRole: "control" as const } : {}),
18
+ ...(!block.attributes.density ? { density: "regular" as const } : {}),
19
+ class: "wp-block-button__link wp-element-button",
20
+ title: button.title,
21
+ };
22
+ ---
23
+
24
+ {!resolved ? (
25
+ block.innerHtml ? <S.div {...htmlProps} {...styleflowProps} data-flowpress-button-legacy set:html={block.innerHtml} /> : null
26
+ ) : !button.empty ? (
27
+ <S.div {...rootProps}>
28
+ {button.tag === "button" ? (
29
+ <S.button {...controlProps} type={button.type}><Fragment set:html={button.label} /></S.button>
30
+ ) : button.href ? (
31
+ <S.a {...controlProps} href={button.href} target={button.target} rel={button.rel}>
32
+ <Fragment set:html={button.label} />
33
+ </S.a>
34
+ ) : (
35
+ <S.span {...controlProps} aria-disabled="true"><Fragment set:html={button.label} /></S.span>
36
+ )}
37
+ </S.div>
38
+ ) : null}
39
+
40
+ <style>
41
+ .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
42
+ .wp-block-button[style*="width:"] .wp-block-button__link { width: 100%; }
43
+ </style>
@@ -0,0 +1,14 @@
1
+ ---
2
+ import S from "@styleflow.app/astro/S.astro";
3
+ import type { FlowpressBlockRendererProps } from "../../index.js";
4
+ import { nativeButtonsLayout } from "./button.js";
5
+
6
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
7
+ const layout = block.attributes.layout as Record<string, unknown> | undefined;
8
+ const rootProps = {
9
+ ...htmlProps,
10
+ class: ["wp-block-buttons flex flex-wrap gap-4", htmlProps.class].filter(Boolean).join(" "),
11
+ style: [htmlProps.style, nativeButtonsLayout(layout)].filter(Boolean).join(";"),
12
+ };
13
+ ---
14
+ <S.div {...rootProps} {...styleflowProps}><slot /></S.div>
@@ -0,0 +1,23 @@
1
+ ---
2
+ import S from "@styleflow.app/astro/S.astro";
3
+ import type { FlowpressBlockRendererProps } from "../../index.js";
4
+
5
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
6
+ const authored = String(block.attributes.tagName ?? "div");
7
+ const tag = (["div", "section", "article", "header", "footer", "main", "aside", "nav"].includes(authored)
8
+ ? authored
9
+ : "div");
10
+ const rootProps = {
11
+ ...htmlProps,
12
+ id: htmlProps.id || (tag === "main" ? "main-content" : undefined),
13
+ };
14
+ ---
15
+
16
+ {tag === "section" ? <S.section {...rootProps} {...styleflowProps}><slot /></S.section>
17
+ : tag === "article" ? <S.article {...rootProps} {...styleflowProps}><slot /></S.article>
18
+ : tag === "header" ? <S.header {...rootProps} {...styleflowProps}><slot /></S.header>
19
+ : tag === "footer" ? <S.footer {...rootProps} {...styleflowProps}><slot /></S.footer>
20
+ : tag === "main" ? <S.main {...rootProps} {...styleflowProps}><slot /></S.main>
21
+ : tag === "aside" ? <S.aside {...rootProps} {...styleflowProps}><slot /></S.aside>
22
+ : tag === "nav" ? <S.nav {...rootProps} {...styleflowProps}><slot /></S.nav>
23
+ : <S.div {...rootProps} {...styleflowProps}><slot /></S.div>}
@@ -0,0 +1,11 @@
1
+ ---
2
+ import S from "@styleflow.app/astro/S.astro";
3
+ import type { FlowpressBlockRendererProps } from "../../index.js";
4
+
5
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
6
+ const href = String(block.resolvedData?.url ?? block.attributes.url ?? "/");
7
+ const label = String(block.resolvedData?.label ?? block.attributes.label ?? "Home");
8
+ const rootProps = { ...htmlProps, class: ["wp-block-navigation-item", htmlProps.class].filter(Boolean).join(" ") };
9
+ ---
10
+
11
+ <S.li {...rootProps} {...styleflowProps}><S.a class="wp-block-navigation-item__content" href={href}><S.span class="wp-block-navigation-item__label">{label}</S.span></S.a></S.li>
@@ -0,0 +1,8 @@
1
+ ---
2
+ import type { FlowpressBlockRendererProps } from "../../index.js";
3
+ import NativeHtmlBlock from "./NativeHtmlBlock.astro";
4
+
5
+ const { htmlProps, styleflowProps, ...props } = Astro.props as FlowpressBlockRendererProps;
6
+ ---
7
+
8
+ <NativeHtmlBlock {...props} htmlProps={htmlProps} styleflowProps={styleflowProps} />
@@ -0,0 +1,7 @@
1
+ ---
2
+ import type { FlowpressBlockRendererProps } from "../../index.js";
3
+ import NativeIconBlock from "./NativeIconBlock.astro";
4
+ const { htmlProps, styleflowProps, ...props } = Astro.props as FlowpressBlockRendererProps;
5
+ ---
6
+
7
+ <NativeIconBlock {...props} htmlProps={htmlProps} styleflowProps={styleflowProps} />