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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/CHANGELOG.md +249 -1
  2. package/README.md +104 -5
  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 +168 -0
  9. package/dist/astro/DefaultBlockAdapter.astro +37 -0
  10. package/dist/astro/FontStylesheets.astro +35 -0
  11. package/dist/astro/GutenbergRenderer.astro +267 -80
  12. package/dist/astro/Media.astro +27 -0
  13. package/dist/astro/StyleflowElement.astro +25 -0
  14. package/dist/astro/ThemeRuntime.astro +26 -0
  15. package/dist/astro/blocks/CarouselBlock.astro +11 -10
  16. package/dist/astro/blocks/CarouselItemBlock.astro +4 -4
  17. package/dist/astro/blocks/ColumnBlock.astro +4 -5
  18. package/dist/astro/blocks/CoverBlock.astro +158 -0
  19. package/dist/astro/blocks/FormBlock.astro +23 -20
  20. package/dist/astro/blocks/GridBlock.astro +5 -4
  21. package/dist/astro/blocks/HeroBlock.astro +6 -6
  22. package/dist/astro/blocks/ImageBlock.astro +6 -6
  23. package/dist/astro/blocks/ListItemFallback.astro +9 -7
  24. package/dist/astro/blocks/NumberSpinnerBlock.astro +29 -22
  25. package/dist/astro/blocks/SemanticElement.astro +35 -0
  26. package/dist/astro/blocks/SiteLogoBlock.astro +54 -0
  27. package/dist/astro/blocks/TextBlock.astro +33 -28
  28. package/dist/astro/blocks/ThemeToggleBlock.astro +13 -0
  29. package/dist/astro/blocks/cover.d.ts +13 -0
  30. package/dist/astro/blocks/cover.d.ts.map +1 -0
  31. package/dist/astro/blocks/cover.js +105 -0
  32. package/dist/astro/blocks/cover.js.map +1 -0
  33. package/dist/astro/blocks/cover.ts +119 -0
  34. package/dist/astro/blocks/helpers.d.ts +10 -1
  35. package/dist/astro/blocks/helpers.d.ts.map +1 -1
  36. package/dist/astro/blocks/helpers.js +55 -39
  37. package/dist/astro/blocks/helpers.js.map +1 -1
  38. package/dist/astro/blocks/helpers.ts +69 -44
  39. package/dist/astro/motion/AccordionRuntime.astro +9 -0
  40. package/dist/astro/motion/MotionBoot.astro +21 -0
  41. package/dist/astro/motion/MotionRuntime.astro +31 -0
  42. package/dist/astro/motion/accordion.css +163 -0
  43. package/dist/astro/motion/accordion.d.ts +3 -0
  44. package/dist/astro/motion/accordion.d.ts.map +1 -0
  45. package/dist/astro/motion/accordion.js +98 -0
  46. package/dist/astro/motion/accordion.js.map +1 -0
  47. package/dist/astro/motion/accordion.ts +109 -0
  48. package/dist/astro/motion/motion-controller.d.ts +12 -0
  49. package/dist/astro/motion/motion-controller.d.ts.map +1 -0
  50. package/dist/astro/motion/motion-controller.js +293 -0
  51. package/dist/astro/motion/motion-controller.js.map +1 -0
  52. package/dist/astro/motion/motion-controller.ts +377 -0
  53. package/dist/astro/motion/motion.css +546 -0
  54. package/dist/astro/motion/motion.d.ts +127 -0
  55. package/dist/astro/motion/motion.d.ts.map +1 -0
  56. package/dist/astro/motion/motion.js +255 -0
  57. package/dist/astro/motion/motion.js.map +1 -0
  58. package/dist/astro/motion/motion.ts +419 -0
  59. package/dist/astro/native/Blob.astro +113 -0
  60. package/dist/astro/native/BlobBlock.astro +52 -0
  61. package/dist/astro/native/CustomFieldValue.astro +88 -0
  62. package/dist/astro/native/LevelTag.astro +20 -0
  63. package/dist/astro/native/MapBlock.astro +41 -0
  64. package/dist/astro/native/NativeHtmlBlock.astro +12 -0
  65. package/dist/astro/native/NativeIconBlock.astro +42 -0
  66. package/dist/astro/native/ProjectTimelineBlock.astro +34 -0
  67. package/dist/astro/native/ReservedLogin.astro +107 -0
  68. package/dist/astro/native/ResolvedBlocks.astro +91 -0
  69. package/dist/astro/native/SyncedPatternContent.astro +94 -0
  70. package/dist/astro/native/TermFieldValue.astro +39 -0
  71. package/dist/astro/native/Timeline.astro +22 -0
  72. package/dist/astro/native/TimelineCardBlock.astro +7 -0
  73. package/dist/astro/native/blob/blob-shapes.generated.d.ts +2 -0
  74. package/dist/astro/native/blob/blob-shapes.generated.d.ts.map +1 -0
  75. package/dist/astro/native/blob/blob-shapes.generated.js +2 -0
  76. package/dist/astro/native/blob/blob-shapes.generated.js.map +1 -0
  77. package/dist/astro/native/blob/blob-shapes.generated.ts +1 -0
  78. package/dist/astro/native/blob/config.d.ts +49 -0
  79. package/dist/astro/native/blob/config.d.ts.map +1 -0
  80. package/dist/astro/native/blob/config.js +86 -0
  81. package/dist/astro/native/blob/config.js.map +1 -0
  82. package/dist/astro/native/blob/config.ts +132 -0
  83. package/dist/astro/native/blob/controller.d.ts +11 -0
  84. package/dist/astro/native/blob/controller.d.ts.map +1 -0
  85. package/dist/astro/native/blob/controller.js +240 -0
  86. package/dist/astro/native/blob/controller.js.map +1 -0
  87. package/dist/astro/native/blob/controller.ts +248 -0
  88. package/dist/astro/native/blob/geometry.d.ts +2 -0
  89. package/dist/astro/native/blob/geometry.d.ts.map +1 -0
  90. package/dist/astro/native/blob/geometry.js +2 -0
  91. package/dist/astro/native/blob/geometry.js.map +1 -0
  92. package/dist/astro/native/blob/geometry.ts +1 -0
  93. package/dist/astro/native/blob/ids.d.ts +7 -0
  94. package/dist/astro/native/blob/ids.d.ts.map +1 -0
  95. package/dist/astro/native/blob/ids.js +11 -0
  96. package/dist/astro/native/blob/ids.js.map +1 -0
  97. package/dist/astro/native/blob/ids.ts +11 -0
  98. package/dist/astro/native/blob.css +83 -0
  99. package/dist/astro/native/block-sizing.css +34 -0
  100. package/dist/astro/native/button-template.d.ts +31 -0
  101. package/dist/astro/native/button-template.d.ts.map +1 -0
  102. package/dist/astro/native/button-template.js +54 -0
  103. package/dist/astro/native/button-template.js.map +1 -0
  104. package/dist/astro/native/button-template.ts +92 -0
  105. package/dist/astro/native/button.d.ts +13 -0
  106. package/dist/astro/native/button.d.ts.map +1 -0
  107. package/dist/astro/native/button.js +26 -0
  108. package/dist/astro/native/button.js.map +1 -0
  109. package/dist/astro/native/button.ts +26 -0
  110. package/dist/astro/native/core-block.astro +18 -0
  111. package/dist/astro/native/core-button-fallback.astro +43 -0
  112. package/dist/astro/native/core-button.astro +65 -0
  113. package/dist/astro/native/core-buttons.astro +14 -0
  114. package/dist/astro/native/core-group.astro +25 -0
  115. package/dist/astro/native/core-home-link.astro +12 -0
  116. package/dist/astro/native/core-html.astro +8 -0
  117. package/dist/astro/native/core-icon.astro +7 -0
  118. package/dist/astro/native/core-image.astro +137 -0
  119. package/dist/astro/native/core-navigation-link.astro +71 -0
  120. package/dist/astro/native/core-navigation-submenu.astro +33 -0
  121. package/dist/astro/native/core-navigation.astro +101 -0
  122. package/dist/astro/native/core-page-list-data-item.astro +19 -0
  123. package/dist/astro/native/core-page-list-item.astro +8 -0
  124. package/dist/astro/native/core-page-list.astro +40 -0
  125. package/dist/astro/native/core-post-date.astro +21 -0
  126. package/dist/astro/native/core-post-excerpt.astro +26 -0
  127. package/dist/astro/native/core-post-featured-image.astro +40 -0
  128. package/dist/astro/native/core-post-template-fallback.astro +30 -0
  129. package/dist/astro/native/core-post-template.astro +23 -0
  130. package/dist/astro/native/core-post-terms.astro +47 -0
  131. package/dist/astro/native/core-post-title.astro +23 -0
  132. package/dist/astro/native/core-query-no-results.astro +12 -0
  133. package/dist/astro/native/core-query.astro +22 -0
  134. package/dist/astro/native/core-separator.astro +18 -0
  135. package/dist/astro/native/core-site-title.astro +16 -0
  136. package/dist/astro/native/core-term-description.astro +12 -0
  137. package/dist/astro/native/core-term-name.astro +21 -0
  138. package/dist/astro/native/core-term-template.astro +30 -0
  139. package/dist/astro/native/core-terms-query.astro +19 -0
  140. package/dist/astro/native/core-transparent.astro +11 -0
  141. package/dist/astro/native/flowpress-navigation-controller.d.ts +2 -0
  142. package/dist/astro/native/flowpress-navigation-controller.d.ts.map +1 -0
  143. package/dist/astro/native/flowpress-navigation-controller.js +217 -0
  144. package/dist/astro/native/flowpress-navigation-controller.js.map +1 -0
  145. package/dist/astro/native/flowpress-navigation-controller.ts +215 -0
  146. package/dist/astro/native/flowpress-navigation.css +17 -0
  147. package/dist/astro/native/grid-bleed.d.ts +2 -0
  148. package/dist/astro/native/grid-bleed.d.ts.map +1 -0
  149. package/dist/astro/native/grid-bleed.js +123 -0
  150. package/dist/astro/native/grid-bleed.js.map +1 -0
  151. package/dist/astro/native/grid.css +180 -0
  152. package/dist/astro/native/grid.d.ts +17 -0
  153. package/dist/astro/native/grid.d.ts.map +1 -0
  154. package/dist/astro/native/grid.js +103 -0
  155. package/dist/astro/native/grid.js.map +1 -0
  156. package/dist/astro/native/grid.ts +118 -0
  157. package/dist/astro/native/group.css +36 -0
  158. package/dist/astro/native/group.d.ts +15 -0
  159. package/dist/astro/native/group.d.ts.map +1 -0
  160. package/dist/astro/native/group.js +66 -0
  161. package/dist/astro/native/group.js.map +1 -0
  162. package/dist/astro/native/group.ts +61 -0
  163. package/dist/astro/native/html.d.ts +6 -0
  164. package/dist/astro/native/html.d.ts.map +1 -0
  165. package/dist/astro/native/html.js +10 -0
  166. package/dist/astro/native/html.js.map +1 -0
  167. package/dist/astro/native/html.ts +9 -0
  168. package/dist/astro/native/icon.d.ts +3 -0
  169. package/dist/astro/native/icon.d.ts.map +1 -0
  170. package/dist/astro/native/icon.js +23 -0
  171. package/dist/astro/native/icon.js.map +1 -0
  172. package/dist/astro/native/icon.ts +21 -0
  173. package/dist/astro/native/image.d.ts +5 -0
  174. package/dist/astro/native/image.d.ts.map +1 -0
  175. package/dist/astro/native/image.js +65 -0
  176. package/dist/astro/native/image.js.map +1 -0
  177. package/dist/astro/native/image.ts +56 -0
  178. package/dist/astro/native/inline-text.css +15 -0
  179. package/dist/astro/native/map.d.ts +14 -0
  180. package/dist/astro/native/map.d.ts.map +1 -0
  181. package/dist/astro/native/map.js +60 -0
  182. package/dist/astro/native/map.js.map +1 -0
  183. package/dist/astro/native/map.ts +70 -0
  184. package/dist/astro/native/motion-preference.d.ts +50 -0
  185. package/dist/astro/native/motion-preference.d.ts.map +1 -0
  186. package/dist/astro/native/motion-preference.js +132 -0
  187. package/dist/astro/native/motion-preference.js.map +1 -0
  188. package/dist/astro/native/motion-preference.ts +158 -0
  189. package/dist/astro/native/motion.d.ts +101 -0
  190. package/dist/astro/native/motion.d.ts.map +1 -0
  191. package/dist/astro/native/motion.js +168 -0
  192. package/dist/astro/native/motion.js.map +1 -0
  193. package/dist/astro/native/motion.ts +312 -0
  194. package/dist/astro/native/query-carousel.d.ts +12 -0
  195. package/dist/astro/native/query-carousel.d.ts.map +1 -0
  196. package/dist/astro/native/query-carousel.js +36 -0
  197. package/dist/astro/native/query-carousel.js.map +1 -0
  198. package/dist/astro/native/query-carousel.ts +56 -0
  199. package/dist/astro/native/query-loop.d.ts +38 -0
  200. package/dist/astro/native/query-loop.d.ts.map +1 -0
  201. package/dist/astro/native/query-loop.js +20 -0
  202. package/dist/astro/native/query-loop.js.map +1 -0
  203. package/dist/astro/native/query-loop.ts +67 -0
  204. package/dist/astro/native/registry.d.ts +3 -0
  205. package/dist/astro/native/registry.d.ts.map +1 -0
  206. package/dist/astro/native/registry.js +81 -0
  207. package/dist/astro/native/registry.js.map +1 -0
  208. package/dist/astro/native/registry.ts +82 -0
  209. package/dist/astro/native/sf-block-binding.astro +20 -0
  210. package/dist/astro/native/sf-post-field.astro +9 -0
  211. package/dist/astro/native/sf-term-field.astro +9 -0
  212. package/dist/astro/native/timeline.css +4 -0
  213. package/dist/astro/native/timeline.d.ts +28 -0
  214. package/dist/astro/native/timeline.d.ts.map +1 -0
  215. package/dist/astro/native/timeline.js +43 -0
  216. package/dist/astro/native/timeline.js.map +1 -0
  217. package/dist/astro/native/timeline.ts +79 -0
  218. package/dist/astro/preferences/AccessibilityPanel.astro +105 -0
  219. package/dist/astro/preferences/ColorModeToggle.astro +26 -0
  220. package/dist/astro/preferences/MotionToggle.astro +27 -0
  221. package/dist/astro/preferences/PreferencesRuntime.astro +9 -0
  222. package/dist/astro/preferences/ThemeToggle.astro +30 -0
  223. package/dist/astro/preferences/Toggle.astro +50 -0
  224. package/dist/astro/preferences/preferences.css +125 -0
  225. package/dist/block-renderers.d.ts +23 -3
  226. package/dist/block-renderers.d.ts.map +1 -1
  227. package/dist/block-renderers.js.map +1 -1
  228. package/dist/build-cache.d.ts +8 -0
  229. package/dist/build-cache.d.ts.map +1 -0
  230. package/dist/build-cache.js +81 -0
  231. package/dist/build-cache.js.map +1 -0
  232. package/dist/client.d.ts +23 -2
  233. package/dist/client.d.ts.map +1 -1
  234. package/dist/client.js +78 -39
  235. package/dist/client.js.map +1 -1
  236. package/dist/composition.d.ts +14 -0
  237. package/dist/composition.d.ts.map +1 -0
  238. package/dist/composition.js +125 -0
  239. package/dist/composition.js.map +1 -0
  240. package/dist/default-blocks.d.ts +9 -0
  241. package/dist/default-blocks.d.ts.map +1 -0
  242. package/dist/default-blocks.js +117 -0
  243. package/dist/default-blocks.js.map +1 -0
  244. package/dist/env.d.ts +9 -0
  245. package/dist/env.d.ts.map +1 -1
  246. package/dist/env.js +20 -0
  247. package/dist/env.js.map +1 -1
  248. package/dist/index.d.ts +7 -0
  249. package/dist/index.d.ts.map +1 -1
  250. package/dist/index.js +6 -0
  251. package/dist/index.js.map +1 -1
  252. package/dist/media.d.ts +20 -0
  253. package/dist/media.d.ts.map +1 -0
  254. package/dist/media.js +106 -0
  255. package/dist/media.js.map +1 -0
  256. package/dist/motion-preference.d.ts +50 -0
  257. package/dist/motion-preference.d.ts.map +1 -0
  258. package/dist/motion-preference.js +132 -0
  259. package/dist/motion-preference.js.map +1 -0
  260. package/dist/preferences-runtime.d.ts +3 -0
  261. package/dist/preferences-runtime.d.ts.map +1 -0
  262. package/dist/preferences-runtime.js +23 -0
  263. package/dist/preferences-runtime.js.map +1 -0
  264. package/dist/preferences-styleflow.d.ts +3 -0
  265. package/dist/preferences-styleflow.d.ts.map +1 -0
  266. package/dist/preferences-styleflow.js +14 -0
  267. package/dist/preferences-styleflow.js.map +1 -0
  268. package/dist/preferences.d.ts +4 -0
  269. package/dist/preferences.d.ts.map +1 -0
  270. package/dist/preferences.js +4 -0
  271. package/dist/preferences.js.map +1 -0
  272. package/dist/reserved-area.d.ts +10 -0
  273. package/dist/reserved-area.d.ts.map +1 -0
  274. package/dist/reserved-area.js +93 -0
  275. package/dist/reserved-area.js.map +1 -0
  276. package/dist/styleflow.d.ts +18 -1
  277. package/dist/styleflow.d.ts.map +1 -1
  278. package/dist/styleflow.js +82 -11
  279. package/dist/styleflow.js.map +1 -1
  280. package/dist/svg-media-runtime.d.ts +3 -0
  281. package/dist/svg-media-runtime.d.ts.map +1 -0
  282. package/dist/svg-media-runtime.js +33 -0
  283. package/dist/svg-media-runtime.js.map +1 -0
  284. package/dist/svg-media-types.d.ts +11 -0
  285. package/dist/svg-media-types.d.ts.map +1 -0
  286. package/dist/svg-media-types.js +2 -0
  287. package/dist/svg-media-types.js.map +1 -0
  288. package/dist/svg-media.d.ts +13 -0
  289. package/dist/svg-media.d.ts.map +1 -0
  290. package/dist/svg-media.js +47 -0
  291. package/dist/svg-media.js.map +1 -0
  292. package/dist/template-hierarchy.d.ts +0 -7
  293. package/dist/template-hierarchy.d.ts.map +1 -1
  294. package/dist/template-hierarchy.js +0 -21
  295. package/dist/template-hierarchy.js.map +1 -1
  296. package/dist/text.d.ts +3 -0
  297. package/dist/text.d.ts.map +1 -0
  298. package/dist/text.js +6 -0
  299. package/dist/text.js.map +1 -0
  300. package/dist/theme-runtime.d.ts +16 -0
  301. package/dist/theme-runtime.d.ts.map +1 -0
  302. package/dist/theme-runtime.js +100 -0
  303. package/dist/theme-runtime.js.map +1 -0
  304. package/dist/tsconfig.tsbuildinfo +1 -1
  305. package/dist/types.d.ts +75 -1
  306. package/dist/types.d.ts.map +1 -1
  307. package/dist/types.js.map +1 -1
  308. package/dist/vivid-colors-preference.d.ts +31 -0
  309. package/dist/vivid-colors-preference.d.ts.map +1 -0
  310. package/dist/vivid-colors-preference.js +102 -0
  311. package/dist/vivid-colors-preference.js.map +1 -0
  312. package/package.json +58 -7
  313. package/dist/astro/DefaultTemplate.astro +0 -42
  314. package/dist/templates.d.ts +0 -19
  315. package/dist/templates.d.ts.map +0 -1
  316. package/dist/templates.js +0 -20
  317. package/dist/templates.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/astro/native/registry.ts"],"names":[],"mappings":"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","sourcesContent":["import type { FlowpressBlockRenderers } from \"../../block-renderers.js\";\nimport Renderer0 from \"./core-term-name.astro\";\nimport Renderer2 from \"./core-post-terms.astro\";\nimport Renderer3 from \"./core-button.astro\";\nimport Renderer4 from \"./core-post-date.astro\";\nimport Renderer5 from \"./core-icon.astro\";\nimport Renderer6 from \"./core-post-excerpt.astro\";\nimport Renderer7 from \"./core-term-description.astro\";\nimport Renderer8 from \"./core-post-template.astro\";\nimport Renderer9 from \"./core-group.astro\";\nimport Renderer10 from \"./core-html.astro\";\nimport Renderer11 from \"./core-block.astro\";\nimport Renderer12 from \"./core-site-title.astro\";\nimport Renderer13 from \"./core-post-featured-image.astro\";\nimport Renderer14 from \"./core-page-list.astro\";\nimport Renderer15 from \"./core-terms-query.astro\";\nimport Renderer16 from \"./core-buttons.astro\";\nimport Renderer17 from \"./core-image.astro\";\nimport Renderer18 from \"./core-query-no-results.astro\";\nimport Renderer19 from \"./core-term-template.astro\";\nimport Renderer20 from \"./core-navigation.astro\";\nimport Renderer21 from \"./core-navigation-submenu.astro\";\nimport Renderer22 from \"./core-query.astro\";\nimport Renderer23 from \"./core-home-link.astro\";\nimport Renderer24 from \"./core-page-list-item.astro\";\nimport Renderer25 from \"./core-navigation-link.astro\";\nimport Renderer26 from \"./core-post-title.astro\";\nimport Renderer27 from \"./sf-post-field.astro\";\nimport Renderer28 from \"./sf-block-binding.astro\";\nimport Renderer29 from \"./sf-term-field.astro\";\nimport Renderer30 from \"./MapBlock.astro\";\nimport Renderer31 from \"./ProjectTimelineBlock.astro\";\nimport TimelineCardBlock from \"./TimelineCardBlock.astro\";\nimport BlobBlock from \"./BlobBlock.astro\";\nimport TransparentBlock from \"./core-transparent.astro\";\nimport SeparatorBlock from \"./core-separator.astro\";\nimport SiteLogoBlock from \"../blocks/SiteLogoBlock.astro\";\nimport ThemeToggleBlock from \"../blocks/ThemeToggleBlock.astro\";\nimport ReservedLogin from \"./ReservedLogin.astro\";\n\nexport const nativeBlockRenderers: FlowpressBlockRenderers = {\n \"core/separator\": SeparatorBlock,\n \"core/post-content\": TransparentBlock,\n \"core/template-part\": TransparentBlock,\n \"core/site-logo\": SiteLogoBlock,\n \"sf/theme-toggle\": ThemeToggleBlock,\n \"core/term-name\": Renderer0,\n \"core/post-terms\": Renderer2,\n \"core/button\": Renderer3,\n \"core/post-date\": Renderer4,\n \"core/icon\": Renderer5,\n \"core/post-excerpt\": Renderer6,\n \"core/term-description\": Renderer7,\n \"core/post-template\": Renderer8,\n \"core/group\": Renderer9,\n \"core/html\": Renderer10,\n \"core/block\": Renderer11,\n \"core/site-title\": Renderer12,\n \"core/post-featured-image\": Renderer13,\n \"core/page-list\": Renderer14,\n \"core/terms-query\": Renderer15,\n \"core/buttons\": Renderer16,\n \"core/image\": Renderer17,\n \"flowpress/login\": ReservedLogin,\n \"flowpress/reserved-pagination\": ReservedLogin,\n \"core/query-no-results\": Renderer18,\n \"core/term-template\": Renderer19,\n \"core/navigation\": Renderer20,\n \"core/navigation-submenu\": Renderer21,\n \"core/query\": Renderer22,\n \"core/home-link\": Renderer23,\n \"core/page-list-item\": Renderer24,\n \"core/navigation-link\": Renderer25,\n \"core/post-title\": Renderer26,\n \"sf/post-field\": Renderer27,\n \"sf/block-binding\": Renderer28,\n \"sf/term-field\": Renderer29,\n \"sf/blob\": BlobBlock,\n \"sf/map\": Renderer30,\n \"sf/timeline\": Renderer31,\n \"sf/timeline-card\": TimelineCardBlock,\n};\n"]}
@@ -0,0 +1,82 @@
1
+ import type { FlowpressBlockRenderers } from "../../block-renderers.js";
2
+ import Renderer0 from "./core-term-name.astro";
3
+ import Renderer2 from "./core-post-terms.astro";
4
+ import Renderer3 from "./core-button.astro";
5
+ import Renderer4 from "./core-post-date.astro";
6
+ import Renderer5 from "./core-icon.astro";
7
+ import Renderer6 from "./core-post-excerpt.astro";
8
+ import Renderer7 from "./core-term-description.astro";
9
+ import Renderer8 from "./core-post-template.astro";
10
+ import Renderer9 from "./core-group.astro";
11
+ import Renderer10 from "./core-html.astro";
12
+ import Renderer11 from "./core-block.astro";
13
+ import Renderer12 from "./core-site-title.astro";
14
+ import Renderer13 from "./core-post-featured-image.astro";
15
+ import Renderer14 from "./core-page-list.astro";
16
+ import Renderer15 from "./core-terms-query.astro";
17
+ import Renderer16 from "./core-buttons.astro";
18
+ import Renderer17 from "./core-image.astro";
19
+ import Renderer18 from "./core-query-no-results.astro";
20
+ import Renderer19 from "./core-term-template.astro";
21
+ import Renderer20 from "./core-navigation.astro";
22
+ import Renderer21 from "./core-navigation-submenu.astro";
23
+ import Renderer22 from "./core-query.astro";
24
+ import Renderer23 from "./core-home-link.astro";
25
+ import Renderer24 from "./core-page-list-item.astro";
26
+ import Renderer25 from "./core-navigation-link.astro";
27
+ import Renderer26 from "./core-post-title.astro";
28
+ import Renderer27 from "./sf-post-field.astro";
29
+ import Renderer28 from "./sf-block-binding.astro";
30
+ import Renderer29 from "./sf-term-field.astro";
31
+ import Renderer30 from "./MapBlock.astro";
32
+ import Renderer31 from "./ProjectTimelineBlock.astro";
33
+ import TimelineCardBlock from "./TimelineCardBlock.astro";
34
+ import BlobBlock from "./BlobBlock.astro";
35
+ import TransparentBlock from "./core-transparent.astro";
36
+ import SeparatorBlock from "./core-separator.astro";
37
+ import SiteLogoBlock from "../blocks/SiteLogoBlock.astro";
38
+ import ThemeToggleBlock from "../blocks/ThemeToggleBlock.astro";
39
+ import ReservedLogin from "./ReservedLogin.astro";
40
+
41
+ export const nativeBlockRenderers: FlowpressBlockRenderers = {
42
+ "core/separator": SeparatorBlock,
43
+ "core/post-content": TransparentBlock,
44
+ "core/template-part": TransparentBlock,
45
+ "core/site-logo": SiteLogoBlock,
46
+ "sf/theme-toggle": ThemeToggleBlock,
47
+ "core/term-name": Renderer0,
48
+ "core/post-terms": Renderer2,
49
+ "core/button": Renderer3,
50
+ "core/post-date": Renderer4,
51
+ "core/icon": Renderer5,
52
+ "core/post-excerpt": Renderer6,
53
+ "core/term-description": Renderer7,
54
+ "core/post-template": Renderer8,
55
+ "core/group": Renderer9,
56
+ "core/html": Renderer10,
57
+ "core/block": Renderer11,
58
+ "core/site-title": Renderer12,
59
+ "core/post-featured-image": Renderer13,
60
+ "core/page-list": Renderer14,
61
+ "core/terms-query": Renderer15,
62
+ "core/buttons": Renderer16,
63
+ "core/image": Renderer17,
64
+ "flowpress/login": ReservedLogin,
65
+ "flowpress/reserved-pagination": ReservedLogin,
66
+ "core/query-no-results": Renderer18,
67
+ "core/term-template": Renderer19,
68
+ "core/navigation": Renderer20,
69
+ "core/navigation-submenu": Renderer21,
70
+ "core/query": Renderer22,
71
+ "core/home-link": Renderer23,
72
+ "core/page-list-item": Renderer24,
73
+ "core/navigation-link": Renderer25,
74
+ "core/post-title": Renderer26,
75
+ "sf/post-field": Renderer27,
76
+ "sf/block-binding": Renderer28,
77
+ "sf/term-field": Renderer29,
78
+ "sf/blob": BlobBlock,
79
+ "sf/map": Renderer30,
80
+ "sf/timeline": Renderer31,
81
+ "sf/timeline-card": TimelineCardBlock,
82
+ };
@@ -0,0 +1,20 @@
1
+ ---
2
+ import StyleflowElement from "../StyleflowElement.astro";
3
+ import type { FlowpressBlock, FlowpressBlockRendererProps } from "../../index.js";
4
+ import ResolvedBlocks from "./ResolvedBlocks.astro";
5
+ import type { NestedPass } from "./query-loop.js";
6
+
7
+ const props = Astro.props as FlowpressBlockRendererProps;
8
+ const { block, htmlProps, styleflowProps } = props;
9
+ const data = (block.resolvedData ?? {}) as NestedPass & {
10
+ blocks?: FlowpressBlock[] | undefined;
11
+ items?: { blocks: FlowpressBlock[] }[] | undefined;
12
+ };
13
+ const items = data.items ?? [];
14
+ ---
15
+
16
+ <StyleflowElement as="div" {...htmlProps} {...styleflowProps} class:list={["wp-block-project-block-binding", htmlProps.class]}>
17
+ {items.length > 0 ? items.map((item, index) => (
18
+ <ResolvedBlocks {...props} blocks={item.blocks} pass={data} renderPassOutput={index === 0} />
19
+ )) : <ResolvedBlocks {...props} blocks={data.blocks ?? []} pass={data} />}
20
+ </StyleflowElement>
@@ -0,0 +1,9 @@
1
+ ---
2
+ import type { FlowpressBlockRendererProps } from "../../index.js";
3
+ import CustomFieldValue from "./CustomFieldValue.astro";
4
+
5
+ // sf/post-field: ACF / meta field of the current post (custom-fields.php).
6
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
7
+ ---
8
+
9
+ <CustomFieldValue block={block} htmlProps={htmlProps} styleflowProps={styleflowProps} baseClass="wp-block-project-post-field" />
@@ -0,0 +1,9 @@
1
+ ---
2
+ import type { FlowpressBlockRendererProps } from "../../index.js";
3
+ import CustomFieldValue from "./CustomFieldValue.astro";
4
+
5
+ // sf/term-field: ACF / meta field of the current term (custom-fields.php).
6
+ const { block, htmlProps, styleflowProps } = Astro.props as FlowpressBlockRendererProps;
7
+ ---
8
+
9
+ <CustomFieldValue block={block} htmlProps={htmlProps} styleflowProps={styleflowProps} baseClass="wp-block-project-term-field" />
@@ -0,0 +1,4 @@
1
+ .flowpress-timeline__list { list-style:none; padding-inline-start:var(--fp-timeline-inset,1.5rem); border-inline-start:var(--fp-timeline-line-width,2px) solid currentColor; }
2
+ .flowpress-timeline__item { position:relative; }
3
+ .flowpress-timeline__item::before { content:""; position:absolute; inline-size:var(--fp-timeline-marker-size,.5rem); block-size:var(--fp-timeline-marker-size,.5rem); border-radius:50%; background:currentColor; inset-inline-start:calc(-1 * var(--fp-timeline-inset,1.5rem) - var(--fp-timeline-marker-size,.5rem) / 2 - var(--fp-timeline-line-width,2px) / 2); }
4
+ .flowpress-timeline__item :is(img, svg.flowpress-svg-media) { max-inline-size:100%; block-size:auto; }
@@ -0,0 +1,28 @@
1
+ export type TimelineTone = string;
2
+ export type TimelineIntensity = string;
3
+ export interface TimelineMedia {
4
+ url?: string | undefined;
5
+ sourceUrl?: string | undefined;
6
+ alt?: string | undefined;
7
+ altText?: string | undefined;
8
+ width?: number | undefined;
9
+ height?: number | undefined;
10
+ }
11
+ export interface TimelineItem {
12
+ year: string;
13
+ description: string;
14
+ image?: TimelineMedia | undefined;
15
+ metric?: string | undefined;
16
+ statisticValue?: string | undefined;
17
+ statisticLabel?: string | undefined;
18
+ tone?: TimelineTone | "inherit" | undefined;
19
+ intensity?: TimelineIntensity | "inherit" | undefined;
20
+ }
21
+ export interface TimelineBlockLike {
22
+ name?: string;
23
+ attributes?: Record<string, unknown>;
24
+ }
25
+ export declare function normalizeTimelineTone(value: unknown): string;
26
+ export declare const normalizeTimelineIntensity: typeof normalizeTimelineTone;
27
+ export declare function timelineItemsFromBlocks(blocks: TimelineBlockLike[]): TimelineItem[];
28
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/astro/native/timeline.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5C,SAAS,CAAC,EAAE,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;CACvD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAOD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAG5D;AACD,eAAO,MAAM,0BAA0B,8BAAwB,CAAC;AAuBhE,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,EAAE,GAC1B,YAAY,EAAE,CAgBhB"}
@@ -0,0 +1,43 @@
1
+ function optionalText(value) {
2
+ const normalized = String(value ?? "").trim();
3
+ return normalized || undefined;
4
+ }
5
+ export function normalizeTimelineTone(value) {
6
+ const normalized = String(value ?? "inherit").trim();
7
+ return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : "inherit";
8
+ }
9
+ export const normalizeTimelineIntensity = normalizeTimelineTone;
10
+ function mediaValue(value) {
11
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
12
+ return undefined;
13
+ }
14
+ const media = value;
15
+ const url = optionalText(media.url) ?? optionalText(media.sourceUrl);
16
+ if (!url) {
17
+ return undefined;
18
+ }
19
+ return {
20
+ url: optionalText(media.url),
21
+ sourceUrl: optionalText(media.sourceUrl),
22
+ alt: optionalText(media.alt),
23
+ altText: optionalText(media.altText),
24
+ width: Number(media.width) || undefined,
25
+ height: Number(media.height) || undefined
26
+ };
27
+ }
28
+ export function timelineItemsFromBlocks(blocks) {
29
+ return blocks
30
+ .filter(({ name }) => name === "sf/timeline-card")
31
+ .map(({ attributes = {} }) => ({
32
+ year: String(attributes.year ?? "").trim(),
33
+ description: String(attributes.description ?? "").trim(),
34
+ image: mediaValue(attributes.image),
35
+ metric: optionalText(attributes.metric),
36
+ statisticValue: optionalText(attributes.statisticValue),
37
+ statisticLabel: optionalText(attributes.statisticLabel),
38
+ tone: normalizeTimelineTone(attributes.tone),
39
+ intensity: normalizeTimelineIntensity(attributes.intensity)
40
+ }))
41
+ .filter(({ year, description, image, metric, statisticValue }) => (Boolean(year || description || image || metric || statisticValue)));
42
+ }
43
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../src/astro/native/timeline.ts"],"names":[],"mappings":"AA4BA,SAAS,YAAY,CAAC,KAAc;IAClC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,OAAO,UAAU,IAAI,SAAS,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,OAAO,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AACvE,CAAC;AACD,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAEhE,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,KAAgC,CAAC;IAC/C,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrE,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5B,SAAS,EAAE,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC;QACxC,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5B,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC;QACpC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,SAAS;QACvC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,SAAS;KAC1C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,MAA2B;IAE3B,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,kBAAkB,CAAC;SACjD,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QAC1C,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QACxD,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC;QACnC,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC;QACvC,cAAc,EAAE,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC;QACvD,cAAc,EAAE,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC;QACvD,IAAI,EAAE,qBAAqB,CAAC,UAAU,CAAC,IAAI,CAAC;QAC5C,SAAS,EAAE,0BAA0B,CAAC,UAAU,CAAC,SAAS,CAAC;KAC5D,CAAC,CAAC;SACF,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAChE,OAAO,CAAC,IAAI,IAAI,WAAW,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,CAAC,CAClE,CAAC,CAAC;AACP,CAAC","sourcesContent":["export type TimelineTone = string;\nexport type TimelineIntensity = string;\n\nexport interface TimelineMedia {\n url?: string | undefined;\n sourceUrl?: string | undefined;\n alt?: string | undefined;\n altText?: string | undefined;\n width?: number | undefined;\n height?: number | undefined;\n}\n\nexport interface TimelineItem {\n year: string;\n description: string;\n image?: TimelineMedia | undefined;\n metric?: string | undefined;\n statisticValue?: string | undefined;\n statisticLabel?: string | undefined;\n tone?: TimelineTone | \"inherit\" | undefined;\n intensity?: TimelineIntensity | \"inherit\" | undefined;\n}\n\nexport interface TimelineBlockLike {\n name?: string;\n attributes?: Record<string, unknown>;\n}\n\nfunction optionalText(value: unknown): string | undefined {\n const normalized = String(value ?? \"\").trim();\n return normalized || undefined;\n}\n\nexport function normalizeTimelineTone(value: unknown): string {\n const normalized = String(value ?? \"inherit\").trim();\n return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : \"inherit\";\n}\nexport const normalizeTimelineIntensity = normalizeTimelineTone;\n\nfunction mediaValue(value: unknown): TimelineMedia | undefined {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return undefined;\n }\n\n const media = value as Record<string, unknown>;\n const url = optionalText(media.url) ?? optionalText(media.sourceUrl);\n if (!url) {\n return undefined;\n }\n\n return {\n url: optionalText(media.url),\n sourceUrl: optionalText(media.sourceUrl),\n alt: optionalText(media.alt),\n altText: optionalText(media.altText),\n width: Number(media.width) || undefined,\n height: Number(media.height) || undefined\n };\n}\n\nexport function timelineItemsFromBlocks(\n blocks: TimelineBlockLike[]\n): TimelineItem[] {\n return blocks\n .filter(({ name }) => name === \"sf/timeline-card\")\n .map(({ attributes = {} }) => ({\n year: String(attributes.year ?? \"\").trim(),\n description: String(attributes.description ?? \"\").trim(),\n image: mediaValue(attributes.image),\n metric: optionalText(attributes.metric),\n statisticValue: optionalText(attributes.statisticValue),\n statisticLabel: optionalText(attributes.statisticLabel),\n tone: normalizeTimelineTone(attributes.tone),\n intensity: normalizeTimelineIntensity(attributes.intensity)\n }))\n .filter(({ year, description, image, metric, statisticValue }) => (\n Boolean(year || description || image || metric || statisticValue)\n ));\n}\n"]}
@@ -0,0 +1,79 @@
1
+ export type TimelineTone = string;
2
+ export type TimelineIntensity = string;
3
+
4
+ export interface TimelineMedia {
5
+ url?: string | undefined;
6
+ sourceUrl?: string | undefined;
7
+ alt?: string | undefined;
8
+ altText?: string | undefined;
9
+ width?: number | undefined;
10
+ height?: number | undefined;
11
+ }
12
+
13
+ export interface TimelineItem {
14
+ year: string;
15
+ description: string;
16
+ image?: TimelineMedia | undefined;
17
+ metric?: string | undefined;
18
+ statisticValue?: string | undefined;
19
+ statisticLabel?: string | undefined;
20
+ tone?: TimelineTone | "inherit" | undefined;
21
+ intensity?: TimelineIntensity | "inherit" | undefined;
22
+ }
23
+
24
+ export interface TimelineBlockLike {
25
+ name?: string;
26
+ attributes?: Record<string, unknown>;
27
+ }
28
+
29
+ function optionalText(value: unknown): string | undefined {
30
+ const normalized = String(value ?? "").trim();
31
+ return normalized || undefined;
32
+ }
33
+
34
+ export function normalizeTimelineTone(value: unknown): string {
35
+ const normalized = String(value ?? "inherit").trim();
36
+ return /^[a-z][a-z0-9-]*$/.test(normalized) ? normalized : "inherit";
37
+ }
38
+ export const normalizeTimelineIntensity = normalizeTimelineTone;
39
+
40
+ function mediaValue(value: unknown): TimelineMedia | undefined {
41
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
42
+ return undefined;
43
+ }
44
+
45
+ const media = value as Record<string, unknown>;
46
+ const url = optionalText(media.url) ?? optionalText(media.sourceUrl);
47
+ if (!url) {
48
+ return undefined;
49
+ }
50
+
51
+ return {
52
+ url: optionalText(media.url),
53
+ sourceUrl: optionalText(media.sourceUrl),
54
+ alt: optionalText(media.alt),
55
+ altText: optionalText(media.altText),
56
+ width: Number(media.width) || undefined,
57
+ height: Number(media.height) || undefined
58
+ };
59
+ }
60
+
61
+ export function timelineItemsFromBlocks(
62
+ blocks: TimelineBlockLike[]
63
+ ): TimelineItem[] {
64
+ return blocks
65
+ .filter(({ name }) => name === "sf/timeline-card")
66
+ .map(({ attributes = {} }) => ({
67
+ year: String(attributes.year ?? "").trim(),
68
+ description: String(attributes.description ?? "").trim(),
69
+ image: mediaValue(attributes.image),
70
+ metric: optionalText(attributes.metric),
71
+ statisticValue: optionalText(attributes.statisticValue),
72
+ statisticLabel: optionalText(attributes.statisticLabel),
73
+ tone: normalizeTimelineTone(attributes.tone),
74
+ intensity: normalizeTimelineIntensity(attributes.intensity)
75
+ }))
76
+ .filter(({ year, description, image, metric, statisticValue }) => (
77
+ Boolean(year || description || image || metric || statisticValue)
78
+ ));
79
+ }
@@ -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>