@styleflow.app/flowpress-astro-core 1.0.0-beta.5 → 1.0.0-beta.50

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 (340) hide show
  1. package/CHANGELOG.md +307 -1
  2. package/README.md +121 -6
  3. package/dist/accessibility-panel.d.ts +2 -0
  4. package/dist/accessibility-panel.d.ts.map +1 -0
  5. package/dist/accessibility-panel.js +81 -0
  6. package/dist/accessibility-panel.js.map +1 -0
  7. package/dist/astro/BaseLayout.astro +34 -17
  8. package/dist/astro/CompositionRenderer.astro +170 -0
  9. package/dist/astro/DefaultBlockAdapter.astro +37 -0
  10. package/dist/astro/EditorialMedia.astro +47 -0
  11. package/dist/astro/FontStylesheets.astro +35 -0
  12. package/dist/astro/GutenbergRenderer.astro +270 -84
  13. package/dist/astro/Media.astro +27 -0
  14. package/dist/astro/StyleflowElement.astro +25 -0
  15. package/dist/astro/ThemeRuntime.astro +26 -0
  16. package/dist/astro/blocks/CarouselBlock.astro +72 -101
  17. package/dist/astro/blocks/CarouselItemBlock.astro +4 -4
  18. package/dist/astro/blocks/ColumnBlock.astro +4 -5
  19. package/dist/astro/blocks/CoverBlock.astro +158 -0
  20. package/dist/astro/blocks/FormBlock.astro +23 -20
  21. package/dist/astro/blocks/GridBlock.astro +5 -4
  22. package/dist/astro/blocks/HeroBlock.astro +6 -6
  23. package/dist/astro/blocks/ImageBlock.astro +6 -6
  24. package/dist/astro/blocks/ListItemFallback.astro +9 -7
  25. package/dist/astro/blocks/NumberSpinnerBlock.astro +29 -22
  26. package/dist/astro/blocks/SemanticElement.astro +35 -0
  27. package/dist/astro/blocks/SiteLogoBlock.astro +54 -0
  28. package/dist/astro/blocks/TextBlock.astro +33 -28
  29. package/dist/astro/blocks/ThemeToggleBlock.astro +13 -0
  30. package/dist/astro/blocks/cover.d.ts +13 -0
  31. package/dist/astro/blocks/cover.d.ts.map +1 -0
  32. package/dist/astro/blocks/cover.js +105 -0
  33. package/dist/astro/blocks/cover.js.map +1 -0
  34. package/dist/astro/blocks/cover.ts +119 -0
  35. package/dist/astro/blocks/helpers.d.ts +10 -1
  36. package/dist/astro/blocks/helpers.d.ts.map +1 -1
  37. package/dist/astro/blocks/helpers.js +55 -39
  38. package/dist/astro/blocks/helpers.js.map +1 -1
  39. package/dist/astro/blocks/helpers.ts +69 -44
  40. package/dist/astro/motion/AccordionRuntime.astro +9 -0
  41. package/dist/astro/motion/MotionBoot.astro +21 -0
  42. package/dist/astro/motion/MotionRuntime.astro +31 -0
  43. package/dist/astro/motion/accordion.css +163 -0
  44. package/dist/astro/motion/accordion.d.ts +3 -0
  45. package/dist/astro/motion/accordion.d.ts.map +1 -0
  46. package/dist/astro/motion/accordion.js +98 -0
  47. package/dist/astro/motion/accordion.js.map +1 -0
  48. package/dist/astro/motion/accordion.ts +109 -0
  49. package/dist/astro/motion/motion-controller.d.ts +12 -0
  50. package/dist/astro/motion/motion-controller.d.ts.map +1 -0
  51. package/dist/astro/motion/motion-controller.js +312 -0
  52. package/dist/astro/motion/motion-controller.js.map +1 -0
  53. package/dist/astro/motion/motion-controller.ts +393 -0
  54. package/dist/astro/motion/motion.css +600 -0
  55. package/dist/astro/motion/motion.d.ts +132 -0
  56. package/dist/astro/motion/motion.d.ts.map +1 -0
  57. package/dist/astro/motion/motion.js +265 -0
  58. package/dist/astro/motion/motion.js.map +1 -0
  59. package/dist/astro/motion/motion.ts +430 -0
  60. package/dist/astro/native/AccordionRuntime.astro +11 -0
  61. package/dist/astro/native/Blob.astro +113 -0
  62. package/dist/astro/native/BlobBlock.astro +52 -0
  63. package/dist/astro/native/CustomFieldValue.astro +88 -0
  64. package/dist/astro/native/LevelTag.astro +20 -0
  65. package/dist/astro/native/MapBlock.astro +41 -0
  66. package/dist/astro/native/NativeHtmlBlock.astro +12 -0
  67. package/dist/astro/native/NativeIconBlock.astro +42 -0
  68. package/dist/astro/native/ProjectTimelineBlock.astro +34 -0
  69. package/dist/astro/native/ReservedLogin.astro +107 -0
  70. package/dist/astro/native/ResolvedBlocks.astro +91 -0
  71. package/dist/astro/native/SyncedPatternContent.astro +94 -0
  72. package/dist/astro/native/TermFieldValue.astro +39 -0
  73. package/dist/astro/native/Timeline.astro +22 -0
  74. package/dist/astro/native/TimelineCardBlock.astro +7 -0
  75. package/dist/astro/native/accordion-controller.d.ts +3 -0
  76. package/dist/astro/native/accordion-controller.d.ts.map +1 -0
  77. package/dist/astro/native/accordion-controller.js +143 -0
  78. package/dist/astro/native/accordion-controller.js.map +1 -0
  79. package/dist/astro/native/accordion-controller.ts +108 -0
  80. package/dist/astro/native/accordion.css +36 -0
  81. package/dist/astro/native/accordion.d.ts +24 -0
  82. package/dist/astro/native/accordion.d.ts.map +1 -0
  83. package/dist/astro/native/accordion.js +82 -0
  84. package/dist/astro/native/accordion.js.map +1 -0
  85. package/dist/astro/native/accordion.ts +91 -0
  86. package/dist/astro/native/blob/blob-shapes.generated.d.ts +2 -0
  87. package/dist/astro/native/blob/blob-shapes.generated.d.ts.map +1 -0
  88. package/dist/astro/native/blob/blob-shapes.generated.js +2 -0
  89. package/dist/astro/native/blob/blob-shapes.generated.js.map +1 -0
  90. package/dist/astro/native/blob/blob-shapes.generated.ts +1 -0
  91. package/dist/astro/native/blob/config.d.ts +49 -0
  92. package/dist/astro/native/blob/config.d.ts.map +1 -0
  93. package/dist/astro/native/blob/config.js +86 -0
  94. package/dist/astro/native/blob/config.js.map +1 -0
  95. package/dist/astro/native/blob/config.ts +132 -0
  96. package/dist/astro/native/blob/controller.d.ts +11 -0
  97. package/dist/astro/native/blob/controller.d.ts.map +1 -0
  98. package/dist/astro/native/blob/controller.js +240 -0
  99. package/dist/astro/native/blob/controller.js.map +1 -0
  100. package/dist/astro/native/blob/controller.ts +248 -0
  101. package/dist/astro/native/blob/geometry.d.ts +2 -0
  102. package/dist/astro/native/blob/geometry.d.ts.map +1 -0
  103. package/dist/astro/native/blob/geometry.js +2 -0
  104. package/dist/astro/native/blob/geometry.js.map +1 -0
  105. package/dist/astro/native/blob/geometry.ts +1 -0
  106. package/dist/astro/native/blob/ids.d.ts +7 -0
  107. package/dist/astro/native/blob/ids.d.ts.map +1 -0
  108. package/dist/astro/native/blob/ids.js +11 -0
  109. package/dist/astro/native/blob/ids.js.map +1 -0
  110. package/dist/astro/native/blob/ids.ts +11 -0
  111. package/dist/astro/native/blob.css +83 -0
  112. package/dist/astro/native/block-sizing.css +34 -0
  113. package/dist/astro/native/button-template.d.ts +31 -0
  114. package/dist/astro/native/button-template.d.ts.map +1 -0
  115. package/dist/astro/native/button-template.js +54 -0
  116. package/dist/astro/native/button-template.js.map +1 -0
  117. package/dist/astro/native/button-template.ts +92 -0
  118. package/dist/astro/native/button.d.ts +13 -0
  119. package/dist/astro/native/button.d.ts.map +1 -0
  120. package/dist/astro/native/button.js +26 -0
  121. package/dist/astro/native/button.js.map +1 -0
  122. package/dist/astro/native/button.ts +26 -0
  123. package/dist/astro/native/carousel.css +323 -0
  124. package/dist/astro/native/core-accordion-heading.astro +23 -0
  125. package/dist/astro/native/core-accordion-item.astro +8 -0
  126. package/dist/astro/native/core-accordion-panel.astro +8 -0
  127. package/dist/astro/native/core-accordion.astro +8 -0
  128. package/dist/astro/native/core-block.astro +18 -0
  129. package/dist/astro/native/core-button-fallback.astro +43 -0
  130. package/dist/astro/native/core-button.astro +65 -0
  131. package/dist/astro/native/core-buttons.astro +14 -0
  132. package/dist/astro/native/core-group.astro +25 -0
  133. package/dist/astro/native/core-home-link.astro +12 -0
  134. package/dist/astro/native/core-html.astro +8 -0
  135. package/dist/astro/native/core-icon.astro +7 -0
  136. package/dist/astro/native/core-image.astro +136 -0
  137. package/dist/astro/native/core-navigation-link.astro +71 -0
  138. package/dist/astro/native/core-navigation-submenu.astro +33 -0
  139. package/dist/astro/native/core-navigation.astro +101 -0
  140. package/dist/astro/native/core-page-list-data-item.astro +19 -0
  141. package/dist/astro/native/core-page-list-item.astro +8 -0
  142. package/dist/astro/native/core-page-list.astro +40 -0
  143. package/dist/astro/native/core-post-date.astro +21 -0
  144. package/dist/astro/native/core-post-excerpt.astro +26 -0
  145. package/dist/astro/native/core-post-featured-image.astro +40 -0
  146. package/dist/astro/native/core-post-template-fallback.astro +30 -0
  147. package/dist/astro/native/core-post-template.astro +23 -0
  148. package/dist/astro/native/core-post-terms.astro +47 -0
  149. package/dist/astro/native/core-post-title.astro +23 -0
  150. package/dist/astro/native/core-query-no-results.astro +12 -0
  151. package/dist/astro/native/core-query.astro +22 -0
  152. package/dist/astro/native/core-separator.astro +18 -0
  153. package/dist/astro/native/core-site-title.astro +16 -0
  154. package/dist/astro/native/core-term-description.astro +12 -0
  155. package/dist/astro/native/core-term-name.astro +21 -0
  156. package/dist/astro/native/core-term-template.astro +30 -0
  157. package/dist/astro/native/core-terms-query.astro +19 -0
  158. package/dist/astro/native/core-transparent.astro +11 -0
  159. package/dist/astro/native/flowpress-navigation-controller.d.ts +2 -0
  160. package/dist/astro/native/flowpress-navigation-controller.d.ts.map +1 -0
  161. package/dist/astro/native/flowpress-navigation-controller.js +217 -0
  162. package/dist/astro/native/flowpress-navigation-controller.js.map +1 -0
  163. package/dist/astro/native/flowpress-navigation-controller.ts +215 -0
  164. package/dist/astro/native/flowpress-navigation.css +18 -0
  165. package/dist/astro/native/grid-bleed.d.ts +2 -0
  166. package/dist/astro/native/grid-bleed.d.ts.map +1 -0
  167. package/dist/astro/native/grid-bleed.js +123 -0
  168. package/dist/astro/native/grid-bleed.js.map +1 -0
  169. package/dist/astro/native/grid.css +180 -0
  170. package/dist/astro/native/grid.d.ts +17 -0
  171. package/dist/astro/native/grid.d.ts.map +1 -0
  172. package/dist/astro/native/grid.js +108 -0
  173. package/dist/astro/native/grid.js.map +1 -0
  174. package/dist/astro/native/grid.ts +132 -0
  175. package/dist/astro/native/group.css +36 -0
  176. package/dist/astro/native/group.d.ts +15 -0
  177. package/dist/astro/native/group.d.ts.map +1 -0
  178. package/dist/astro/native/group.js +66 -0
  179. package/dist/astro/native/group.js.map +1 -0
  180. package/dist/astro/native/group.ts +61 -0
  181. package/dist/astro/native/html.d.ts +6 -0
  182. package/dist/astro/native/html.d.ts.map +1 -0
  183. package/dist/astro/native/html.js +10 -0
  184. package/dist/astro/native/html.js.map +1 -0
  185. package/dist/astro/native/html.ts +9 -0
  186. package/dist/astro/native/icon.d.ts +3 -0
  187. package/dist/astro/native/icon.d.ts.map +1 -0
  188. package/dist/astro/native/icon.js +23 -0
  189. package/dist/astro/native/icon.js.map +1 -0
  190. package/dist/astro/native/icon.ts +21 -0
  191. package/dist/astro/native/image.d.ts +5 -0
  192. package/dist/astro/native/image.d.ts.map +1 -0
  193. package/dist/astro/native/image.js +65 -0
  194. package/dist/astro/native/image.js.map +1 -0
  195. package/dist/astro/native/image.ts +56 -0
  196. package/dist/astro/native/inline-text.css +15 -0
  197. package/dist/astro/native/map.d.ts +14 -0
  198. package/dist/astro/native/map.d.ts.map +1 -0
  199. package/dist/astro/native/map.js +60 -0
  200. package/dist/astro/native/map.js.map +1 -0
  201. package/dist/astro/native/map.ts +70 -0
  202. package/dist/astro/native/motion-preference.d.ts +50 -0
  203. package/dist/astro/native/motion-preference.d.ts.map +1 -0
  204. package/dist/astro/native/motion-preference.js +132 -0
  205. package/dist/astro/native/motion-preference.js.map +1 -0
  206. package/dist/astro/native/motion-preference.ts +158 -0
  207. package/dist/astro/native/motion.d.ts +101 -0
  208. package/dist/astro/native/motion.d.ts.map +1 -0
  209. package/dist/astro/native/motion.js +168 -0
  210. package/dist/astro/native/motion.js.map +1 -0
  211. package/dist/astro/native/motion.ts +312 -0
  212. package/dist/astro/native/query-carousel.d.ts +13 -0
  213. package/dist/astro/native/query-carousel.d.ts.map +1 -0
  214. package/dist/astro/native/query-carousel.js +36 -0
  215. package/dist/astro/native/query-carousel.js.map +1 -0
  216. package/dist/astro/native/query-carousel.ts +60 -0
  217. package/dist/astro/native/query-loop.d.ts +38 -0
  218. package/dist/astro/native/query-loop.d.ts.map +1 -0
  219. package/dist/astro/native/query-loop.js +20 -0
  220. package/dist/astro/native/query-loop.js.map +1 -0
  221. package/dist/astro/native/query-loop.ts +67 -0
  222. package/dist/astro/native/registry.d.ts +3 -0
  223. package/dist/astro/native/registry.d.ts.map +1 -0
  224. package/dist/astro/native/registry.js +91 -0
  225. package/dist/astro/native/registry.js.map +1 -0
  226. package/dist/astro/native/registry.ts +93 -0
  227. package/dist/astro/native/sf-block-binding.astro +20 -0
  228. package/dist/astro/native/sf-post-field.astro +9 -0
  229. package/dist/astro/native/sf-slot.astro +6 -0
  230. package/dist/astro/native/sf-term-field.astro +9 -0
  231. package/dist/astro/native/timeline.css +4 -0
  232. package/dist/astro/native/timeline.d.ts +28 -0
  233. package/dist/astro/native/timeline.d.ts.map +1 -0
  234. package/dist/astro/native/timeline.js +43 -0
  235. package/dist/astro/native/timeline.js.map +1 -0
  236. package/dist/astro/native/timeline.ts +79 -0
  237. package/dist/astro/preferences/AccessibilityPanel.astro +105 -0
  238. package/dist/astro/preferences/ColorModeToggle.astro +26 -0
  239. package/dist/astro/preferences/MotionToggle.astro +27 -0
  240. package/dist/astro/preferences/PreferencesRuntime.astro +9 -0
  241. package/dist/astro/preferences/ThemeToggle.astro +30 -0
  242. package/dist/astro/preferences/Toggle.astro +50 -0
  243. package/dist/astro/preferences/preferences.css +125 -0
  244. package/dist/block-renderers.d.ts +23 -3
  245. package/dist/block-renderers.d.ts.map +1 -1
  246. package/dist/block-renderers.js.map +1 -1
  247. package/dist/build-cache.d.ts +8 -0
  248. package/dist/build-cache.d.ts.map +1 -0
  249. package/dist/build-cache.js +82 -0
  250. package/dist/build-cache.js.map +1 -0
  251. package/dist/carousel.d.ts +56 -6
  252. package/dist/carousel.d.ts.map +1 -1
  253. package/dist/carousel.js +183 -27
  254. package/dist/carousel.js.map +1 -1
  255. package/dist/client.d.ts +34 -2
  256. package/dist/client.d.ts.map +1 -1
  257. package/dist/client.js +124 -42
  258. package/dist/client.js.map +1 -1
  259. package/dist/composition.d.ts +14 -0
  260. package/dist/composition.d.ts.map +1 -0
  261. package/dist/composition.js +125 -0
  262. package/dist/composition.js.map +1 -0
  263. package/dist/default-blocks.d.ts +9 -0
  264. package/dist/default-blocks.d.ts.map +1 -0
  265. package/dist/default-blocks.js +122 -0
  266. package/dist/default-blocks.js.map +1 -0
  267. package/dist/env.d.ts +21 -0
  268. package/dist/env.d.ts.map +1 -1
  269. package/dist/env.js +53 -0
  270. package/dist/env.js.map +1 -1
  271. package/dist/index.d.ts +7 -0
  272. package/dist/index.d.ts.map +1 -1
  273. package/dist/index.js +6 -0
  274. package/dist/index.js.map +1 -1
  275. package/dist/media.d.ts +20 -0
  276. package/dist/media.d.ts.map +1 -0
  277. package/dist/media.js +106 -0
  278. package/dist/media.js.map +1 -0
  279. package/dist/motion-preference.d.ts +50 -0
  280. package/dist/motion-preference.d.ts.map +1 -0
  281. package/dist/motion-preference.js +132 -0
  282. package/dist/motion-preference.js.map +1 -0
  283. package/dist/preferences-runtime.d.ts +3 -0
  284. package/dist/preferences-runtime.d.ts.map +1 -0
  285. package/dist/preferences-runtime.js +23 -0
  286. package/dist/preferences-runtime.js.map +1 -0
  287. package/dist/preferences-styleflow.d.ts +3 -0
  288. package/dist/preferences-styleflow.d.ts.map +1 -0
  289. package/dist/preferences-styleflow.js +14 -0
  290. package/dist/preferences-styleflow.js.map +1 -0
  291. package/dist/preferences.d.ts +4 -0
  292. package/dist/preferences.d.ts.map +1 -0
  293. package/dist/preferences.js +4 -0
  294. package/dist/preferences.js.map +1 -0
  295. package/dist/reserved-area.d.ts +10 -0
  296. package/dist/reserved-area.d.ts.map +1 -0
  297. package/dist/reserved-area.js +93 -0
  298. package/dist/reserved-area.js.map +1 -0
  299. package/dist/styleflow.d.ts +18 -1
  300. package/dist/styleflow.d.ts.map +1 -1
  301. package/dist/styleflow.js +82 -11
  302. package/dist/styleflow.js.map +1 -1
  303. package/dist/svg-media-runtime.d.ts +3 -0
  304. package/dist/svg-media-runtime.d.ts.map +1 -0
  305. package/dist/svg-media-runtime.js +33 -0
  306. package/dist/svg-media-runtime.js.map +1 -0
  307. package/dist/svg-media-types.d.ts +11 -0
  308. package/dist/svg-media-types.d.ts.map +1 -0
  309. package/dist/svg-media-types.js +2 -0
  310. package/dist/svg-media-types.js.map +1 -0
  311. package/dist/svg-media.d.ts +13 -0
  312. package/dist/svg-media.d.ts.map +1 -0
  313. package/dist/svg-media.js +47 -0
  314. package/dist/svg-media.js.map +1 -0
  315. package/dist/template-hierarchy.d.ts +0 -7
  316. package/dist/template-hierarchy.d.ts.map +1 -1
  317. package/dist/template-hierarchy.js +0 -21
  318. package/dist/template-hierarchy.js.map +1 -1
  319. package/dist/text.d.ts +3 -0
  320. package/dist/text.d.ts.map +1 -0
  321. package/dist/text.js +6 -0
  322. package/dist/text.js.map +1 -0
  323. package/dist/theme-runtime.d.ts +16 -0
  324. package/dist/theme-runtime.d.ts.map +1 -0
  325. package/dist/theme-runtime.js +100 -0
  326. package/dist/theme-runtime.js.map +1 -0
  327. package/dist/tsconfig.tsbuildinfo +1 -1
  328. package/dist/types.d.ts +75 -1
  329. package/dist/types.d.ts.map +1 -1
  330. package/dist/types.js.map +1 -1
  331. package/dist/vivid-colors-preference.d.ts +31 -0
  332. package/dist/vivid-colors-preference.d.ts.map +1 -0
  333. package/dist/vivid-colors-preference.js +102 -0
  334. package/dist/vivid-colors-preference.js.map +1 -0
  335. package/package.json +58 -7
  336. package/dist/astro/DefaultTemplate.astro +0 -42
  337. package/dist/templates.d.ts +0 -19
  338. package/dist/templates.d.ts.map +0 -1
  339. package/dist/templates.js +0 -20
  340. package/dist/templates.js.map +0 -1
@@ -0,0 +1,105 @@
1
+ ---
2
+ import S from "../StyleflowElement.astro";
3
+ import ThemeToggle from "./ThemeToggle.astro";
4
+ import MotionToggle from "./MotionToggle.astro";
5
+ import ColorModeToggle from "./ColorModeToggle.astro";
6
+ import { preferencesStyleflow } from "../../preferences-styleflow.js";
7
+
8
+ interface Props {
9
+ title?: string;
10
+ openLabel?: string;
11
+ closeLabel?: string;
12
+ themeLabel?: string;
13
+ motionLabel?: string;
14
+ vividColorLabel?: string;
15
+ showTheme?: boolean;
16
+ themes?: string[];
17
+ class?: string;
18
+ privacyPolicyUrl?: string;
19
+ cookiePolicyUrl?: string;
20
+ iubendaEnabled?: boolean;
21
+ }
22
+ const {
23
+ title = "Preferenze del sito",
24
+ openLabel = "Apri le preferenze del sito",
25
+ closeLabel = "Chiudi le preferenze del sito",
26
+ themeLabel = "Tema scuro",
27
+ motionLabel = "Animazioni",
28
+ vividColorLabel = "Colori vividi",
29
+ themes = ["light", "dark"],
30
+ showTheme = themes.includes("dark") && themes.some(theme => theme !== "dark"),
31
+ class: className,
32
+ privacyPolicyUrl,
33
+ cookiePolicyUrl,
34
+ iubendaEnabled = false,
35
+ } = Astro.props;
36
+ const triggerColors = preferencesStyleflow({tone:"main",intensity:"strong-1",surface:"raised"},{tone:"main",intensity:"base",surface:"raised"});
37
+ const panelColors = preferencesStyleflow({tone:"neutral",intensity:"soft-3",surface:"raised"},{tone:"neutral",intensity:"base",surface:"default"});
38
+ const id = `sf-a11y-${crypto.randomUUID()}`;
39
+ ---
40
+
41
+ <!-- Keep FlowPress's public panel hooks and toggle runtime; composition is project-owned. -->
42
+ <S as="div" data-sf-a11y hidden layoutRole="none" density="compact" noBackground noBorder noForeground noGap noPadding noRadius class:list={["sf-a11y", "flowpress-preferences", className]}>
43
+ <S as="button" type="button" data-sf-a11y-trigger data-open-label={openLabel} data-close-label={closeLabel}
44
+ aria-label={openLabel} title="Preferenze del sito" aria-haspopup="dialog" aria-expanded="false" aria-controls={`${id}-panel`}
45
+ {...triggerColors} foreground="primary" layoutRole="control" density="compact" interactivePriority="primary" noPadding class="sf-a11y__trigger">
46
+ <slot name="trigger-icon"><svg class="sf-a11y__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true" focusable="false">
47
+ <path d="M4 7h4m4 0h8M4 17h8m4 0h4"></path>
48
+ <circle cx="10" cy="7" r="2"></circle>
49
+ <circle cx="14" cy="17" r="2"></circle>
50
+ </svg></slot>
51
+ </S>
52
+ <S as="div" id={`${id}-panel`} role="dialog" aria-modal="false" aria-labelledby={`${id}-title`}
53
+ data-sf-a11y-panel data-state="closed" inert {...panelColors} layoutRole="panel" density="regular" class="sf-a11y__panel flowpress-preferences__panel">
54
+ <S as="h2" id={`${id}-title`} ty="body" v="lg" w="strong">{title}</S>
55
+ <S as="section" aria-labelledby={`${id}-accessibility`} layoutRole="none" noPadding class="flowpress-preferences__section">
56
+ <S as="h3" id={`${id}-accessibility`} ty="body" v="md" w="strong">Accessibilità</S>
57
+ {showTheme && <S as="div" layoutRole="none" class="sf-a11y__row">
58
+ <S as="span" id={`${id}-theme`} ty="body" v="md">{themeLabel}</S>
59
+ <ThemeToggle labelledby={`${id}-theme`} />
60
+ </S>}
61
+ <S as="div" layoutRole="none" class="sf-a11y__row">
62
+ <S as="span" id={`${id}-motion`} ty="body" v="md">{motionLabel}</S>
63
+ <MotionToggle labelledby={`${id}-motion`} />
64
+ </S>
65
+ <S as="div" layoutRole="none" class="sf-a11y__row">
66
+ <S as="span" id={`${id}-vivid`} ty="body" v="md">{vividColorLabel}</S>
67
+ <ColorModeToggle labelledby={`${id}-vivid`} />
68
+ </S>
69
+ </S>
70
+ {(privacyPolicyUrl || cookiePolicyUrl || iubendaEnabled) && <S as="section" aria-labelledby={`${id}-privacy`} layoutRole="none" noPadding class="flowpress-preferences__section flowpress-preferences__privacy">
71
+ <S as="h3" id={`${id}-privacy`} ty="body" v="md" w="strong">Privacy e cookie</S>
72
+ {iubendaEnabled && <>
73
+ <S as="button" type="button" data-flowpress-cookie-preferences aria-haspopup="dialog" aria-describedby={`${id}-cookie-status`}
74
+ tone="main" intensity="base" surface="raised" layoutRole="control" density="regular" interactivePriority="primary" class="iubenda-cs-preferences-link flowpress-preferences__cookie-button">Gestisci preferenze cookie</S>
75
+ <S as="p" id={`${id}-cookie-status`} data-flowpress-cookie-status role="status" aria-live="polite" ty="body" v="sm" class="flowpress-cookie-status" />
76
+ </>}
77
+ <S as="div" layoutRole="none" class="flowpress-preferences__documents">
78
+ {privacyPolicyUrl && <S as="a" href={privacyPolicyUrl}>Privacy Policy</S>}
79
+ {cookiePolicyUrl && <S as="a" href={cookiePolicyUrl}>Cookie Policy</S>}
80
+ </S>
81
+ </S>}
82
+ <slot name="sections" />
83
+ </S>
84
+ </S>
85
+
86
+ <script>
87
+ import { startFlowpressPreferencesRuntime } from "../../preferences-runtime.js";
88
+ startFlowpressPreferencesRuntime();
89
+ </script>
90
+
91
+ <style>
92
+ /* Only the trigger occupies the fixed wrapper; empty space must pass clicks through. */
93
+ .flowpress-preferences { max-inline-size: calc(100vw - 2 * var(--fp-preferences-inset, 1rem)); pointer-events: none; }
94
+ .flowpress-preferences .sf-a11y__trigger { pointer-events: auto; }
95
+ .flowpress-preferences__panel { position: absolute; inset-inline-end: 0; inset-block-end: calc(100% + .75rem); inline-size: 21rem; max-inline-size: calc(100vw - 2 * var(--fp-preferences-inset, 1rem)); max-block-size: calc(100dvh - 6.75rem - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; pointer-events: none; }
96
+ .flowpress-preferences__panel[data-state="open"] { pointer-events: auto; }
97
+ .flowpress-preferences__section { display: flex; flex-direction: column; gap: .75rem; }
98
+ .flowpress-preferences__privacy { border-block-start: 1px solid var(--sf-border); padding-block-start: 1rem; }
99
+ .flowpress-preferences__documents { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
100
+ .flowpress-preferences__cookie-button { min-block-size: 2.75rem; inline-size: 100%; white-space: normal; cursor: pointer; }
101
+ .flowpress-preferences :is(button, a):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
102
+ @supports (padding: env(safe-area-inset-bottom)) {
103
+ .flowpress-preferences { inset-block-end: calc(var(--fp-preferences-inset, 1rem) + env(safe-area-inset-bottom)); }
104
+ }
105
+ </style>
@@ -0,0 +1,26 @@
1
+ ---
2
+ import Toggle from "./Toggle.astro";
3
+
4
+ /**
5
+ * Vivid-colors switch (checked means full saturation). State and persistence
6
+ * live in vivid-colors-preference.ts and are mirrored on
7
+ * `<html data-sf-vivid-colors>`.
8
+ */
9
+ interface Props {
10
+ label?: string | undefined;
11
+ /** Id of a visible label; it then names the switch instead of `label`. */
12
+ labelledby?: string | undefined;
13
+ class?: string | undefined;
14
+ [attribute: string]: unknown;
15
+ }
16
+
17
+ const { label = "Vivid colors", labelledby, class: className, ...attributes } = Astro.props;
18
+ ---
19
+
20
+ <Toggle {...attributes} label={label} labelledby={labelledby} class={className} data-sf-vivid-colors-toggle />
21
+
22
+
23
+ <script>
24
+ import { startFlowpressPreferencesRuntime } from "../../preferences-runtime.js";
25
+ startFlowpressPreferencesRuntime();
26
+ </script>
@@ -0,0 +1,27 @@
1
+ ---
2
+ import Toggle from "./Toggle.astro";
3
+
4
+ /**
5
+ * Animations on/off switch (checked means animations on). State and
6
+ * persistence live in motion-preference.ts: the choice is stored, mirrored on
7
+ * `<html data-sf-motion-preference>` and picked up live by blobs, reveals and
8
+ * the navigation drawer.
9
+ */
10
+ interface Props {
11
+ label?: string | undefined;
12
+ /** Id of a visible label; it then names the switch instead of `label`. */
13
+ labelledby?: string | undefined;
14
+ class?: string | undefined;
15
+ [attribute: string]: unknown;
16
+ }
17
+
18
+ const { label = "Animations", labelledby, class: className, ...attributes } = Astro.props;
19
+ ---
20
+
21
+ <Toggle {...attributes} label={label} labelledby={labelledby} class={className} data-sf-motion-toggle />
22
+
23
+
24
+ <script>
25
+ import { startFlowpressPreferencesRuntime } from "../../preferences-runtime.js";
26
+ startFlowpressPreferencesRuntime();
27
+ </script>
@@ -0,0 +1,9 @@
1
+ ---
2
+ import { motionPreferenceBootstrapScript, vividColorsBootstrapScript } from "../../preferences.js";
3
+ ---
4
+ <script is:inline set:html={motionPreferenceBootstrapScript()}></script>
5
+ <script is:inline set:html={vividColorsBootstrapScript()}></script>
6
+ <script>
7
+ import { startFlowpressPreferencesRuntime } from "../../preferences-runtime.js";
8
+ startFlowpressPreferencesRuntime();
9
+ </script>
@@ -0,0 +1,30 @@
1
+ ---
2
+ import Toggle from "./Toggle.astro";
3
+
4
+ /**
5
+ * Dark/light switch. The theme itself belongs to the FlowPress theme runtime,
6
+ * which binds every `[data-styleflow-theme-toggle]` and flips
7
+ * `<html data-styleflow-theme>`; this component only renders the switch and
8
+ * keeps `aria-checked` in step (checked means the dark theme).
9
+ */
10
+ interface Props {
11
+ label?: string | undefined;
12
+ /** Id of a visible label; it then names the switch instead of `label`. */
13
+ labelledby?: string | undefined;
14
+ class?: string | undefined;
15
+ [attribute: string]: unknown;
16
+ }
17
+
18
+ const { label = "Change color theme", labelledby, class: className, ...attributes } = Astro.props;
19
+ ---
20
+
21
+ <Toggle {...attributes} label={label} labelledby={labelledby} class={className} data-styleflow-theme-toggle data-styleflow-theme-toggle-target="dark">
22
+ <svg slot="thumb" class="sf-toggle__glyph sf-toggle__glyph--off" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
23
+ <circle cx="12" cy="12" r="4.5"></circle>
24
+ <path d="M12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4L6 18M18 6l1.4-1.4"></path>
25
+ </svg>
26
+ <svg slot="thumb" class="sf-toggle__glyph sf-toggle__glyph--on" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
27
+ <path d="M20.5 13.2A8.5 8.5 0 1 1 10.8 3.5a6.7 6.7 0 0 0 9.7 9.7z"></path>
28
+ </svg>
29
+ </Toggle>
30
+
@@ -0,0 +1,50 @@
1
+ ---
2
+ import StyleflowElement from "../StyleflowElement.astro";
3
+ import "./preferences.css";
4
+ import { preferencesStyleflow } from "../../preferences-styleflow.js";
5
+
6
+ /**
7
+ * iOS-style switch: a track that cross-fades from neutral to the main tone and a
8
+ * thumb that slides across. It owns semantics (`role="switch"`, `aria-checked`)
9
+ * and looks, not state: whoever uses it flips `aria-checked` (see ThemeToggle,
10
+ * MotionToggle). Colours come from Styleflow props only; the "on" look lives
11
+ * in preferences.css so a toggle can also mirror document state before scripts run.
12
+ *
13
+ * Name it with `label` (aria-label) or, when a visible label sits next to it,
14
+ * with `labelledby` (id of that label).
15
+ */
16
+ interface Props {
17
+ label?: string | undefined;
18
+ labelledby?: string | undefined;
19
+ checked?: boolean | undefined;
20
+ class?: string | undefined;
21
+ [attribute: string]: unknown;
22
+ }
23
+
24
+ const { label, labelledby, checked = false, class: className, ...attributes } = Astro.props;
25
+ const off = preferencesStyleflow({tone:"neutral",intensity:"soft-1",surface:"sunken"},{tone:"neutral",intensity:"base",surface:"default"});
26
+ const on = preferencesStyleflow({tone:"main",intensity:"strong-2",surface:"default"},{tone:"main",intensity:"base",surface:"default"});
27
+ const thumb = preferencesStyleflow({tone:"neutral",intensity:"soft-3",surface:"raised"},{tone:"neutral",intensity:"soft-2",surface:"raised"},{tone:"neutral",intensity:"base",surface:"default"});
28
+ ---
29
+
30
+ <StyleflowElement as="button"
31
+ {...attributes}
32
+ type="button"
33
+ role="switch"
34
+ aria-checked={checked ? "true" : "false"}
35
+ aria-label={labelledby ? undefined : label}
36
+ aria-labelledby={labelledby}
37
+ foreground="primary"
38
+ layoutRole="none"
39
+ density="compact"
40
+ interactivePriority="tertiary"
41
+ noPadding
42
+ noBackground
43
+ class:list={["sf-toggle", className]}
44
+ >
45
+ <StyleflowElement as="span" aria-hidden="true" {...off} layoutRole="none" class="sf-toggle__track"></StyleflowElement>
46
+ <StyleflowElement as="span" aria-hidden="true" {...on} layoutRole="none" class="sf-toggle__track sf-toggle__track--on"></StyleflowElement>
47
+ <StyleflowElement as="span" aria-hidden="true" {...thumb} layoutRole="none" class="sf-toggle__thumb">
48
+ <slot name="thumb" />
49
+ </StyleflowElement>
50
+ </StyleflowElement>
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Toggle: state and geometry live here; colours come from StyleFlow props.
3
+ *
4
+ * `--sf-toggle-on` is 1 when the switch reads "on". Besides `aria-checked`, the
5
+ * theme and motion switches mirror the document (`<html>` attributes set by the
6
+ * head bootstrap scripts), so they are right from first paint and never slide
7
+ * into place after the page loads.
8
+ */
9
+ .sf-toggle {
10
+ --sf-toggle-on: 0;
11
+ --sf-toggle-travel: 1.25rem;
12
+ --sf-toggle-direction: 1;
13
+ }
14
+
15
+ .sf-toggle:dir(rtl) {
16
+ --sf-toggle-direction: -1;
17
+ }
18
+
19
+ .sf-toggle[aria-checked="true"],
20
+ html[data-styleflow-theme="dark"] .sf-toggle[data-styleflow-theme-toggle],
21
+ html[data-sf-motion-preference="full"] .sf-toggle[data-sf-motion-toggle],
22
+ html[data-sf-vivid-colors="true"] .sf-toggle[data-sf-vivid-colors-toggle] {
23
+ --sf-toggle-on: 1;
24
+ }
25
+
26
+ .sf-toggle__track--on {
27
+ opacity: var(--sf-toggle-on);
28
+ transition: opacity var(--sf-motion-duration-default, 180ms) var(--sf-motion-ease-standard, ease);
29
+ }
30
+
31
+ /* A ring keeps the "off" track readable against the panel in both themes. */
32
+ .sf-toggle__track:not(.sf-toggle__track--on) {
33
+ box-shadow: inset 0 0 0 0.0625rem var(--sf-border);
34
+ }
35
+
36
+ .sf-toggle__thumb {
37
+ box-shadow: 0 0.0625rem 0.25rem color-mix(in srgb, var(--sf-foreground-primary) 45%, transparent);
38
+ transform: translateX(calc(var(--sf-toggle-on) * var(--sf-toggle-travel) * var(--sf-toggle-direction)));
39
+ transition:
40
+ transform var(--sf-motion-duration-default, 180ms) var(--sf-motion-ease-out, ease-out),
41
+ scale var(--sf-motion-duration-fast, 120ms) var(--sf-motion-ease-out, ease-out);
42
+ }
43
+
44
+ .sf-toggle:active .sf-toggle__thumb {
45
+ scale: 1.08 1;
46
+ }
47
+
48
+ /* Optional thumb glyphs: one per state, cross-fading with the thumb. */
49
+ .sf-toggle__glyph {
50
+ position: absolute;
51
+ inline-size: 1rem;
52
+ block-size: 1rem;
53
+ transition: opacity var(--sf-motion-duration-default, 180ms) var(--sf-motion-ease-standard, ease);
54
+ }
55
+
56
+ .sf-toggle__glyph--off {
57
+ opacity: calc(1 - var(--sf-toggle-on));
58
+ }
59
+
60
+ .sf-toggle__glyph--on {
61
+ opacity: var(--sf-toggle-on);
62
+ }
63
+
64
+ /*
65
+ * Accessibility panel: the closed/open states and the lift under the round
66
+ * button. Colours are Styleflow tokens (set by the S props in the markup); the
67
+ * shadow is derived from the foreground token so it follows the theme.
68
+ * Transitions stop on their own when animations are off (motion.css).
69
+ */
70
+ html[data-sf-vivid-colors="false"] {
71
+ filter: saturate(30%);
72
+ }
73
+
74
+ .sf-a11y__trigger {
75
+ box-shadow: 0 0.375rem 1.25rem color-mix(in srgb, var(--sf-surface-default-foreground-primary) 28%, transparent);
76
+ transition: transform var(--sf-motion-duration-default, 180ms) var(--sf-motion-ease-out, ease-out);
77
+ }
78
+
79
+ .sf-a11y__trigger:active {
80
+ transform: scale(0.94);
81
+ }
82
+
83
+ .sf-a11y__panel {
84
+ box-shadow: 0 0.75rem 2rem color-mix(in srgb, var(--sf-surface-default-foreground-primary) 22%, transparent);
85
+ transform-origin: bottom right;
86
+ transition:
87
+ opacity var(--sf-motion-duration-fast, 120ms) var(--sf-motion-ease-soft, ease),
88
+ transform var(--sf-motion-duration-default, 180ms) var(--sf-motion-ease-out, ease-out),
89
+ visibility 0s linear var(--sf-motion-duration-default, 180ms);
90
+ }
91
+
92
+ .sf-a11y__panel[data-state="closed"] {
93
+ opacity: 0;
94
+ transform: translateY(0.5rem) scale(0.96);
95
+ visibility: hidden;
96
+ }
97
+
98
+ .sf-a11y__panel[data-state="open"] {
99
+ opacity: 1;
100
+ transform: none;
101
+ transition-delay: 0s;
102
+ visibility: visible;
103
+ }
104
+
105
+ .sf-a11y__panel[data-state="open"]:dir(rtl) {
106
+ transform-origin: bottom left;
107
+ }
108
+
109
+ /* Geometry formerly supplied by the pilot Tailwind classes. */
110
+ .sf-toggle { position: relative; display: inline-block; block-size: 2rem; inline-size: 3.25rem; flex-shrink: 0; cursor: pointer; border-radius: 9999px !important; }
111
+ .sf-toggle__track { position: absolute; inset: 0; border-radius: 9999px !important; }
112
+ .sf-toggle__thumb { position: absolute; inset-inline-start: .125rem; inset-block-start: .125rem; display: grid; inline-size: 1.75rem; block-size: 1.75rem; place-items: center; border-radius: 9999px !important; }
113
+ .sf-a11y { position: fixed; inset-inline-end: var(--fp-preferences-inset, 1rem); inset-block-end: var(--fp-preferences-inset, 1rem); z-index: var(--fp-preferences-z-index, var(--z-floating, 50)); display: flex; flex-direction: column-reverse; align-items: flex-end; gap: .75rem; }
114
+ .sf-a11y[hidden] { display: none !important; }
115
+ .sf-a11y__trigger { display: grid; inline-size: 3.5rem; block-size: 3.5rem; flex-shrink: 0; place-items: center; cursor: pointer; border-radius: 9999px !important; }
116
+ .sf-a11y__icon { inline-size: 1.75rem; block-size: 1.75rem; }
117
+ .sf-a11y__panel { display: flex; flex-direction: column; inline-size: var(--fp-preferences-width, 18rem); max-inline-size: calc(100vw - 2rem); gap: 1rem; }
118
+ .sf-a11y__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
119
+ /* Inherited visibility must become focusable immediately, without an all transition. */
120
+ .sf-a11y__row, .sf-toggle { transition-property: color, background-color, border-color, box-shadow; }
121
+ .sf-toggle:focus-visible, .sf-a11y__trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
122
+ html[data-sf-motion-preference="reduce"] :is(.sf-toggle, .sf-toggle *, .sf-a11y, .sf-a11y *) { transition: none !important; }
123
+ @media print { .sf-a11y { display: none !important; } }
124
+
125
+ .flowpress-theme-control { display: inline-flex; align-items: center; gap: .5rem; }
@@ -1,9 +1,22 @@
1
1
  import type { AstroComponentFactory } from "astro/runtime/server/index.js";
2
- import type { StyleflowContract } from "./styleflow.js";
3
- import type { FlowpressBlock } from "./types.js";
2
+ import type { DynamicStyleflowProps, StyleflowContract } from "./styleflow.js";
3
+ import type { FlowpressBlock, FlowpressBlockHtmlProps, FlowpressBlockAdapterStatus, FlowpressBlockClass, FlowpressCompositionV1 } from "./types.js";
4
4
  export interface FlowpressBlockRendererProps {
5
5
  block: FlowpressBlock;
6
- contract?: StyleflowContract;
6
+ styleflowProps: DynamicStyleflowProps;
7
+ htmlProps: FlowpressBlockHtmlProps;
8
+ composition?: FlowpressCompositionV1 | undefined;
9
+ context: {
10
+ parentBlockName?: string;
11
+ depth: number;
12
+ production: boolean;
13
+ effectiveTone?: string | undefined;
14
+ inheritedTone?: string | undefined;
15
+ blockRenderers?: FlowpressBlockRenderers | undefined;
16
+ };
17
+ parentBlockName?: string;
18
+ contract?: StyleflowContract | undefined;
19
+ adapters?: FlowpressBlockAdapters | undefined;
7
20
  }
8
21
  export interface FlowpressIconRendererProps {
9
22
  name: string;
@@ -19,4 +32,11 @@ export interface FlowpressIconRendererProps {
19
32
  export type FlowpressBlockRenderer = AstroComponentFactory;
20
33
  export type FlowpressIconRenderer = AstroComponentFactory;
21
34
  export type FlowpressBlockRenderers = Readonly<Record<string, FlowpressBlockRenderer>>;
35
+ export interface FlowpressBlockAdapterDefinition {
36
+ renderer: FlowpressBlockRenderer;
37
+ status: FlowpressBlockAdapterStatus;
38
+ class: FlowpressBlockClass;
39
+ fingerprint: string;
40
+ }
41
+ export type FlowpressBlockAdapters = Readonly<Record<string, FlowpressBlockAdapterDefinition>>;
22
42
  //# sourceMappingURL=block-renderers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block-renderers.d.ts","sourceRoot":"","sources":["../src/block-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,2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names":[],"mappings":"","sourcesContent":["import type { AstroComponentFactory } from \"astro/runtime/server/index.js\";\nimport type { StyleflowContract } from \"./styleflow.js\";\nimport type { FlowpressBlock } from \"./types.js\";\n\nexport interface FlowpressBlockRendererProps {\n block: FlowpressBlock;\n contract?: StyleflowContract;\n}\n\nexport interface FlowpressIconRendererProps {\n name: string;\n display?: \"inline\" | \"block\";\n foreground?: string;\n tone?: string;\n intensity?: string | number;\n size?: number;\n label?: string;\n id?: string;\n class?: string;\n}\n\nexport type FlowpressBlockRenderer = AstroComponentFactory;\n\nexport type FlowpressIconRenderer = AstroComponentFactory;\n\nexport type FlowpressBlockRenderers = Readonly<\n Record<string, FlowpressBlockRenderer>\n>;\n"]}
1
+ {"version":3,"file":"block-renderers.js","sourceRoot":"","sources":["../src/block-renderers.ts"],"names":[],"mappings":"","sourcesContent":["import type { AstroComponentFactory } from \"astro/runtime/server/index.js\";\nimport type { DynamicStyleflowProps, StyleflowContract } from \"./styleflow.js\";\nimport type {\n FlowpressBlock,\n FlowpressBlockHtmlProps,\n FlowpressBlockAdapterStatus,\n FlowpressBlockClass,\n FlowpressCompositionV1\n} from \"./types.js\";\n\nexport interface FlowpressBlockRendererProps {\n block: FlowpressBlock;\n styleflowProps: DynamicStyleflowProps;\n htmlProps: FlowpressBlockHtmlProps;\n composition?: FlowpressCompositionV1 | undefined;\n context: {\n parentBlockName?: string;\n depth: number;\n production: boolean;\n effectiveTone?: string | undefined;\n inheritedTone?: string | undefined;\n blockRenderers?: FlowpressBlockRenderers | undefined;\n };\n parentBlockName?: string;\n contract?: StyleflowContract | undefined;\n adapters?: FlowpressBlockAdapters | undefined;\n}\n\nexport interface FlowpressIconRendererProps {\n name: string;\n display?: \"inline\" | \"block\";\n foreground?: string;\n tone?: string;\n intensity?: string | number;\n size?: number;\n label?: string;\n id?: string;\n class?: string;\n}\n\nexport type FlowpressBlockRenderer = AstroComponentFactory;\n\nexport type FlowpressIconRenderer = AstroComponentFactory;\n\nexport type FlowpressBlockRenderers = Readonly<\n Record<string, FlowpressBlockRenderer>\n>;\n\nexport interface FlowpressBlockAdapterDefinition {\n renderer: FlowpressBlockRenderer;\n status: FlowpressBlockAdapterStatus;\n class: FlowpressBlockClass;\n fingerprint: string;\n}\n\nexport type FlowpressBlockAdapters = Readonly<\n Record<string, FlowpressBlockAdapterDefinition>\n>;\n"]}
@@ -0,0 +1,8 @@
1
+ import type { FlowpressRequestStore } from "./client.js";
2
+ export interface FlowpressBuildStoreOptions {
3
+ directory: string;
4
+ endpoint: string;
5
+ revision: string;
6
+ }
7
+ export declare function createBuildRequestStore(options: FlowpressBuildStoreOptions): Promise<FlowpressRequestStore>;
8
+ //# sourceMappingURL=build-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-cache.d.ts","sourceRoot":"","sources":["../src/build-cache.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAKzD,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAsDjH"}
@@ -0,0 +1,82 @@
1
+ /** Node-only, private store shared by the safelist and Astro build processes. */
2
+ import { createHash, randomUUID } from "node:crypto";
3
+ import { lstat, readFile, rename, writeFile, unlink, mkdir, rmdir } from "node:fs/promises";
4
+ import { setTimeout as delay } from "node:timers/promises";
5
+ import { isAbsolute, join } from "node:path";
6
+ import { FLOWPRESS_BUILD_STORE_LOCK_MS } from "./env.js";
7
+ const inFlight = new Map();
8
+ export async function createBuildRequestStore(options) {
9
+ const { directory, endpoint, revision } = options;
10
+ if (!isAbsolute(directory) || !/^[a-f0-9]{32}$/.test(revision)) {
11
+ throw new Error("A build request store requires a private absolute directory and content revision.");
12
+ }
13
+ const stat = await lstat(directory);
14
+ if (!stat.isDirectory() || stat.isSymbolicLink() || (stat.mode & 0o077)) {
15
+ throw new Error("The build request directory must be private and cannot be a symlink.");
16
+ }
17
+ const metadata = JSON.parse(await readFile(join(directory, "session.json"), "utf8"));
18
+ if (metadata.schemaVersion !== 1 || metadata.endpoint !== endpoint || metadata.revision !== revision) {
19
+ throw new Error("The build request store belongs to another backend or revision.");
20
+ }
21
+ return {
22
+ async getOrCreate(key, load) {
23
+ const identity = JSON.parse(key);
24
+ if (identity.endpoint !== endpoint)
25
+ throw new Error("Cross-backend build cache access refused.");
26
+ const digest = createHash("sha256").update(key).digest("hex");
27
+ const file = join(directory, digest + ".json");
28
+ const pending = inFlight.get(file);
29
+ if (pending)
30
+ return pending;
31
+ const result = (async () => {
32
+ const lock = file + ".lock";
33
+ const deadline = Date.now() + FLOWPRESS_BUILD_STORE_LOCK_MS;
34
+ while (true) {
35
+ try {
36
+ await mkdir(lock, { mode: 0o700 });
37
+ break;
38
+ }
39
+ catch (error) {
40
+ if (error.code !== "EEXIST")
41
+ throw error;
42
+ if (Date.now() > deadline)
43
+ throw new Error("Timed out waiting for another build process. Discard this attempt.");
44
+ await delay(20);
45
+ }
46
+ }
47
+ try {
48
+ try {
49
+ const cached = JSON.parse(await readFile(file, "utf8"));
50
+ if (cached.key === key && Object.hasOwn(cached, "value"))
51
+ return cached.value;
52
+ }
53
+ catch (error) {
54
+ if (!(error instanceof SyntaxError) && error.code !== "ENOENT")
55
+ throw error;
56
+ }
57
+ const value = await load();
58
+ const temporary = file + "." + randomUUID() + ".tmp";
59
+ try {
60
+ await writeFile(temporary, JSON.stringify({ key, value }), { mode: 0o600, flag: "wx" });
61
+ await rename(temporary, file);
62
+ }
63
+ finally {
64
+ await unlink(temporary).catch(() => { });
65
+ }
66
+ return value;
67
+ }
68
+ finally {
69
+ await rmdir(lock);
70
+ }
71
+ })();
72
+ inFlight.set(file, result);
73
+ try {
74
+ return await result;
75
+ }
76
+ finally {
77
+ inFlight.delete(file);
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,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC;gBAAC,OAAO,MAAM,MAAM,CAAC;YAAC,CAAC;oBAAS,CAAC;gBAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/** Node-only, private store shared by the safelist and Astro build processes. */\nimport { createHash, randomUUID } from \"node:crypto\";\nimport { lstat, readFile, rename, writeFile, unlink, mkdir, rmdir } from \"node:fs/promises\";\nimport { setTimeout as delay } from \"node:timers/promises\";\nimport { isAbsolute, join } from \"node:path\";\nimport type { FlowpressRequestStore } from \"./client.js\";\nimport { FLOWPRESS_BUILD_STORE_LOCK_MS } from \"./env.js\";\n\nconst inFlight = new Map<string, Promise<unknown>>();\n\nexport interface FlowpressBuildStoreOptions {\n directory: string;\n endpoint: string;\n revision: string;\n}\n\nexport async function createBuildRequestStore(options: FlowpressBuildStoreOptions): Promise<FlowpressRequestStore> {\n const { directory, endpoint, revision } = options;\n if (!isAbsolute(directory) || !/^[a-f0-9]{32}$/.test(revision)) {\n throw new Error(\"A build request store requires a private absolute directory and content revision.\");\n }\n const stat = await lstat(directory);\n if (!stat.isDirectory() || stat.isSymbolicLink() || (stat.mode & 0o077)) {\n throw new Error(\"The build request directory must be private and cannot be a symlink.\");\n }\n const metadata = JSON.parse(await readFile(join(directory, \"session.json\"), \"utf8\"));\n if (metadata.schemaVersion !== 1 || metadata.endpoint !== endpoint || metadata.revision !== revision) {\n throw new Error(\"The build request store belongs to another backend or revision.\");\n }\n return {\n async getOrCreate<T>(key: string, load: () => Promise<T>): Promise<T> {\n const identity = JSON.parse(key) as { endpoint?: string };\n if (identity.endpoint !== endpoint) throw new Error(\"Cross-backend build cache access refused.\");\n const digest = createHash(\"sha256\").update(key).digest(\"hex\");\n const file = join(directory, digest + \".json\");\n const pending = inFlight.get(file);\n if (pending) return pending as Promise<T>;\n const result = (async (): Promise<T> => {\n const lock = file + \".lock\";\n const deadline = Date.now() + FLOWPRESS_BUILD_STORE_LOCK_MS;\n while (true) {\n try { await mkdir(lock, { mode: 0o700 }); break; }\n catch (error) {\n if ((error as NodeJS.ErrnoException).code !== \"EEXIST\") throw error;\n if (Date.now() > deadline) throw new Error(\"Timed out waiting for another build process. Discard this attempt.\");\n await delay(20);\n }\n }\n try {\n try {\n const cached = JSON.parse(await readFile(file, \"utf8\"));\n if (cached.key === key && Object.hasOwn(cached, \"value\")) return cached.value as T;\n } catch (error) {\n if (!(error instanceof SyntaxError) && (error as NodeJS.ErrnoException).code !== \"ENOENT\") throw error;\n }\n const value = await load();\n const temporary = file + \".\" + randomUUID() + \".tmp\";\n try {\n await writeFile(temporary, JSON.stringify({ key, value }), { mode: 0o600, flag: \"wx\" });\n await rename(temporary, file);\n } finally {\n await unlink(temporary).catch(() => {});\n }\n return value;\n } finally { await rmdir(lock); }\n })();\n inFlight.set(file, result);\n try { return await result; } finally { inFlight.delete(file); }\n }\n };\n}\n"]}
@@ -1,22 +1,72 @@
1
1
  import type { Options } from "@splidejs/splide";
2
- declare const BREAKPOINTS: readonly ["base", "sm", "md", "lg", "xl", "2xl"];
2
+ export declare const CAROUSEL_BREAKPOINTS: readonly ["base", "sm", "md", "lg", "xl", "2xl"];
3
+ export type CarouselBreakpoint = (typeof CAROUSEL_BREAKPOINTS)[number];
4
+ declare const ARROWS_POSITIONS: readonly ["top", "top-end", "sides", "edges", "outside", "bottom", "bottom-end"];
5
+ declare const ARROWS_MOBILE_POSITIONS: readonly ["same", "bottom", "hidden"];
6
+ declare const ARROWS_SHAPES: readonly ["circle", "rounded", "square"];
7
+ declare const ARROWS_SIZES: readonly ["sm", "md", "lg"];
8
+ declare const PAGINATION_STYLES: readonly ["dots", "bars", "fraction"];
9
+ declare const PAGINATION_POSITIONS: readonly ["below", "overlay"];
10
+ /** Peek keyword aligned with the StyleFlow container padding. */
11
+ export declare const CAROUSEL_CONTAINER_PEEK = "var(--sf-layout-container-comfortable-padding-x, 2rem)";
3
12
  export interface FlowpressCarouselSettings {
4
13
  ariaLabel: string;
5
- itemsPerView: Record<(typeof BREAKPOINTS)[number], number>;
14
+ itemsPerView: Record<CarouselBreakpoint, number>;
15
+ /** Fixed slide width per breakpoint; "" sizes slides from `itemsPerView`. */
16
+ slideWidth: Record<CarouselBreakpoint, string>;
17
+ /** Visible part of the neighbouring slides per breakpoint, as a CSS length ("0" for none). */
18
+ peek: Record<CarouselBreakpoint, string>;
19
+ focus: "start" | "center";
6
20
  itemsPerMove: number;
7
21
  gap: number;
8
- showArrows: boolean;
9
- showPagination: boolean;
22
+ slideAspectRatio: string;
23
+ equalHeight: boolean;
24
+ effect: "slide" | "fade";
25
+ loop: boolean;
26
+ rewind: boolean;
27
+ startIndex: number;
28
+ speed: number;
10
29
  drag: boolean;
30
+ dragFree: boolean;
11
31
  keyboard: boolean;
32
+ wheel: boolean;
33
+ showArrows: boolean;
34
+ arrowsPosition: (typeof ARROWS_POSITIONS)[number];
35
+ arrowsPositionMobile: (typeof ARROWS_MOBILE_POSITIONS)[number];
36
+ arrowsShape: (typeof ARROWS_SHAPES)[number];
37
+ arrowsSize: (typeof ARROWS_SIZES)[number];
38
+ showPagination: boolean;
39
+ paginationStyle: (typeof PAGINATION_STYLES)[number];
40
+ paginationPosition: (typeof PAGINATION_POSITIONS)[number];
41
+ /** StyleFlow tone and intensity of the controls' background; "" keeps the carousel's context. */
42
+ controlsTone: string;
43
+ controlsIntensity: string;
12
44
  autoplay: boolean;
13
45
  autoplayInterval: number;
14
46
  pauseOnHover: boolean;
15
47
  pauseOnFocus: boolean;
16
- loop: boolean;
17
- speed: number;
48
+ }
49
+ export interface FlowpressCarouselLayout {
50
+ /** Custom properties for the carousel root, read by the shared carousel stylesheet. */
51
+ style: Record<string, string>;
52
+ /** `data-*` attributes for the carousel root. */
53
+ data: Record<string, string>;
18
54
  }
19
55
  export declare function carouselSettings(attributes: Record<string, unknown>): FlowpressCarouselSettings;
56
+ /** CSS length of a peek setting. */
57
+ export declare function carouselPeekLength(peek: string): string;
58
+ /**
59
+ * Splide options. Options for settings that keep their previous defaults are left out, so a
60
+ * carousel saved with the original contract mounts with exactly the options it had before.
61
+ */
20
62
  export declare function carouselOptions(settings: FlowpressCarouselSettings): Options;
63
+ /**
64
+ * Static geometry shared by the frontend before Splide mounts and by the block editor: the same
65
+ * slide widths, peeks and centring Splide applies at rest. Percentages in `slide` and `shift`
66
+ * resolve against the list, those in `edge` against the carousel root.
67
+ */
68
+ export declare function carouselLayout(settings: FlowpressCarouselSettings): FlowpressCarouselLayout;
69
+ /** Inline `style` text of a layout. */
70
+ export declare function carouselStyleText(layout: FlowpressCarouselLayout): string;
21
71
  export {};
22
72
  //# sourceMappingURL=carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,QAAA,MAAM,WAAW,kDAAmD,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAqBD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM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