@styleflow.app/flowpress-astro-core 1.0.0-beta.4 → 1.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +242 -1
- package/README.md +104 -5
- package/dist/accessibility-panel.d.ts +2 -0
- package/dist/accessibility-panel.d.ts.map +1 -0
- package/dist/accessibility-panel.js +81 -0
- package/dist/accessibility-panel.js.map +1 -0
- package/dist/astro/BaseLayout.astro +34 -17
- package/dist/astro/CompositionRenderer.astro +168 -0
- package/dist/astro/DefaultBlockAdapter.astro +37 -0
- package/dist/astro/FontStylesheets.astro +35 -0
- package/dist/astro/GutenbergRenderer.astro +267 -80
- package/dist/astro/Media.astro +24 -0
- package/dist/astro/StyleflowElement.astro +24 -0
- package/dist/astro/ThemeRuntime.astro +26 -0
- package/dist/astro/blocks/CarouselBlock.astro +11 -10
- package/dist/astro/blocks/CarouselItemBlock.astro +4 -4
- package/dist/astro/blocks/ColumnBlock.astro +4 -5
- package/dist/astro/blocks/CoverBlock.astro +169 -0
- package/dist/astro/blocks/FormBlock.astro +23 -20
- package/dist/astro/blocks/GridBlock.astro +6 -4
- package/dist/astro/blocks/HeroBlock.astro +6 -6
- package/dist/astro/blocks/ImageBlock.astro +6 -6
- package/dist/astro/blocks/ListItemFallback.astro +9 -7
- package/dist/astro/blocks/NumberSpinnerBlock.astro +29 -22
- package/dist/astro/blocks/SemanticElement.astro +35 -0
- package/dist/astro/blocks/SiteLogoBlock.astro +54 -0
- package/dist/astro/blocks/TextBlock.astro +33 -28
- package/dist/astro/blocks/ThemeToggleBlock.astro +13 -0
- package/dist/astro/blocks/cover.d.ts +13 -0
- package/dist/astro/blocks/cover.d.ts.map +1 -0
- package/dist/astro/blocks/cover.js +105 -0
- package/dist/astro/blocks/cover.js.map +1 -0
- package/dist/astro/blocks/cover.ts +119 -0
- package/dist/astro/blocks/helpers.d.ts +10 -1
- package/dist/astro/blocks/helpers.d.ts.map +1 -1
- package/dist/astro/blocks/helpers.js +55 -39
- package/dist/astro/blocks/helpers.js.map +1 -1
- package/dist/astro/blocks/helpers.ts +69 -44
- package/dist/astro/motion/AccordionRuntime.astro +9 -0
- package/dist/astro/motion/MotionBoot.astro +21 -0
- package/dist/astro/motion/MotionRuntime.astro +31 -0
- package/dist/astro/motion/accordion.css +163 -0
- package/dist/astro/motion/accordion.d.ts +3 -0
- package/dist/astro/motion/accordion.d.ts.map +1 -0
- package/dist/astro/motion/accordion.js +98 -0
- package/dist/astro/motion/accordion.js.map +1 -0
- package/dist/astro/motion/accordion.ts +109 -0
- package/dist/astro/motion/motion-controller.d.ts +12 -0
- package/dist/astro/motion/motion-controller.d.ts.map +1 -0
- package/dist/astro/motion/motion-controller.js +293 -0
- package/dist/astro/motion/motion-controller.js.map +1 -0
- package/dist/astro/motion/motion-controller.ts +377 -0
- package/dist/astro/motion/motion.css +546 -0
- package/dist/astro/motion/motion.d.ts +127 -0
- package/dist/astro/motion/motion.d.ts.map +1 -0
- package/dist/astro/motion/motion.js +255 -0
- package/dist/astro/motion/motion.js.map +1 -0
- package/dist/astro/motion/motion.ts +419 -0
- package/dist/astro/native/Blob.astro +113 -0
- package/dist/astro/native/BlobBlock.astro +52 -0
- package/dist/astro/native/CustomFieldValue.astro +88 -0
- package/dist/astro/native/LevelTag.astro +20 -0
- package/dist/astro/native/MapBlock.astro +41 -0
- package/dist/astro/native/NativeHtmlBlock.astro +12 -0
- package/dist/astro/native/NativeIconBlock.astro +42 -0
- package/dist/astro/native/ProjectTimelineBlock.astro +34 -0
- package/dist/astro/native/ReservedLogin.astro +107 -0
- package/dist/astro/native/ResolvedBlocks.astro +91 -0
- package/dist/astro/native/SyncedPatternContent.astro +94 -0
- package/dist/astro/native/TermFieldValue.astro +39 -0
- package/dist/astro/native/Timeline.astro +22 -0
- package/dist/astro/native/TimelineCardBlock.astro +7 -0
- package/dist/astro/native/blob/blob-shapes.generated.d.ts +2 -0
- package/dist/astro/native/blob/blob-shapes.generated.d.ts.map +1 -0
- package/dist/astro/native/blob/blob-shapes.generated.js +2 -0
- package/dist/astro/native/blob/blob-shapes.generated.js.map +1 -0
- package/dist/astro/native/blob/blob-shapes.generated.ts +1 -0
- package/dist/astro/native/blob/config.d.ts +49 -0
- package/dist/astro/native/blob/config.d.ts.map +1 -0
- package/dist/astro/native/blob/config.js +86 -0
- package/dist/astro/native/blob/config.js.map +1 -0
- package/dist/astro/native/blob/config.ts +132 -0
- package/dist/astro/native/blob/controller.d.ts +11 -0
- package/dist/astro/native/blob/controller.d.ts.map +1 -0
- package/dist/astro/native/blob/controller.js +240 -0
- package/dist/astro/native/blob/controller.js.map +1 -0
- package/dist/astro/native/blob/controller.ts +248 -0
- package/dist/astro/native/blob/geometry.d.ts +2 -0
- package/dist/astro/native/blob/geometry.d.ts.map +1 -0
- package/dist/astro/native/blob/geometry.js +2 -0
- package/dist/astro/native/blob/geometry.js.map +1 -0
- package/dist/astro/native/blob/geometry.ts +1 -0
- package/dist/astro/native/blob/ids.d.ts +7 -0
- package/dist/astro/native/blob/ids.d.ts.map +1 -0
- package/dist/astro/native/blob/ids.js +11 -0
- package/dist/astro/native/blob/ids.js.map +1 -0
- package/dist/astro/native/blob/ids.ts +11 -0
- package/dist/astro/native/blob.css +83 -0
- package/dist/astro/native/button-template.d.ts +31 -0
- package/dist/astro/native/button-template.d.ts.map +1 -0
- package/dist/astro/native/button-template.js +54 -0
- package/dist/astro/native/button-template.js.map +1 -0
- package/dist/astro/native/button-template.ts +92 -0
- package/dist/astro/native/button.d.ts +13 -0
- package/dist/astro/native/button.d.ts.map +1 -0
- package/dist/astro/native/button.js +26 -0
- package/dist/astro/native/button.js.map +1 -0
- package/dist/astro/native/button.ts +26 -0
- package/dist/astro/native/core-block.astro +18 -0
- package/dist/astro/native/core-button-fallback.astro +43 -0
- package/dist/astro/native/core-button.astro +65 -0
- package/dist/astro/native/core-buttons.astro +14 -0
- package/dist/astro/native/core-group.astro +25 -0
- package/dist/astro/native/core-home-link.astro +12 -0
- package/dist/astro/native/core-html.astro +8 -0
- package/dist/astro/native/core-icon.astro +7 -0
- package/dist/astro/native/core-image.astro +139 -0
- package/dist/astro/native/core-navigation-link.astro +71 -0
- package/dist/astro/native/core-navigation-submenu.astro +33 -0
- package/dist/astro/native/core-navigation.astro +101 -0
- package/dist/astro/native/core-page-list-data-item.astro +19 -0
- package/dist/astro/native/core-page-list-item.astro +8 -0
- package/dist/astro/native/core-page-list.astro +40 -0
- package/dist/astro/native/core-post-date.astro +21 -0
- package/dist/astro/native/core-post-excerpt.astro +26 -0
- package/dist/astro/native/core-post-featured-image.astro +38 -0
- package/dist/astro/native/core-post-template-fallback.astro +30 -0
- package/dist/astro/native/core-post-template.astro +23 -0
- package/dist/astro/native/core-post-terms.astro +47 -0
- package/dist/astro/native/core-post-title.astro +23 -0
- package/dist/astro/native/core-query-no-results.astro +12 -0
- package/dist/astro/native/core-query.astro +22 -0
- package/dist/astro/native/core-separator.astro +20 -0
- package/dist/astro/native/core-site-title.astro +16 -0
- package/dist/astro/native/core-term-description.astro +12 -0
- package/dist/astro/native/core-term-name.astro +21 -0
- package/dist/astro/native/core-term-template.astro +30 -0
- package/dist/astro/native/core-terms-query.astro +19 -0
- package/dist/astro/native/core-transparent.astro +11 -0
- package/dist/astro/native/flowpress-navigation-controller.d.ts +2 -0
- package/dist/astro/native/flowpress-navigation-controller.d.ts.map +1 -0
- package/dist/astro/native/flowpress-navigation-controller.js +217 -0
- package/dist/astro/native/flowpress-navigation-controller.js.map +1 -0
- package/dist/astro/native/flowpress-navigation-controller.ts +215 -0
- package/dist/astro/native/flowpress-navigation.css +17 -0
- package/dist/astro/native/grid-bleed.d.ts +2 -0
- package/dist/astro/native/grid-bleed.d.ts.map +1 -0
- package/dist/astro/native/grid-bleed.js +123 -0
- package/dist/astro/native/grid-bleed.js.map +1 -0
- package/dist/astro/native/grid.css +180 -0
- package/dist/astro/native/grid.d.ts +17 -0
- package/dist/astro/native/grid.d.ts.map +1 -0
- package/dist/astro/native/grid.js +103 -0
- package/dist/astro/native/grid.js.map +1 -0
- package/dist/astro/native/grid.ts +118 -0
- package/dist/astro/native/group.css +36 -0
- package/dist/astro/native/group.d.ts +15 -0
- package/dist/astro/native/group.d.ts.map +1 -0
- package/dist/astro/native/group.js +66 -0
- package/dist/astro/native/group.js.map +1 -0
- package/dist/astro/native/group.ts +61 -0
- package/dist/astro/native/html.d.ts +6 -0
- package/dist/astro/native/html.d.ts.map +1 -0
- package/dist/astro/native/html.js +10 -0
- package/dist/astro/native/html.js.map +1 -0
- package/dist/astro/native/html.ts +9 -0
- package/dist/astro/native/icon.d.ts +3 -0
- package/dist/astro/native/icon.d.ts.map +1 -0
- package/dist/astro/native/icon.js +23 -0
- package/dist/astro/native/icon.js.map +1 -0
- package/dist/astro/native/icon.ts +21 -0
- package/dist/astro/native/image.d.ts +5 -0
- package/dist/astro/native/image.d.ts.map +1 -0
- package/dist/astro/native/image.js +65 -0
- package/dist/astro/native/image.js.map +1 -0
- package/dist/astro/native/image.ts +56 -0
- package/dist/astro/native/inline-text.css +15 -0
- package/dist/astro/native/map.d.ts +14 -0
- package/dist/astro/native/map.d.ts.map +1 -0
- package/dist/astro/native/map.js +60 -0
- package/dist/astro/native/map.js.map +1 -0
- package/dist/astro/native/map.ts +70 -0
- package/dist/astro/native/motion-preference.d.ts +50 -0
- package/dist/astro/native/motion-preference.d.ts.map +1 -0
- package/dist/astro/native/motion-preference.js +132 -0
- package/dist/astro/native/motion-preference.js.map +1 -0
- package/dist/astro/native/motion-preference.ts +158 -0
- package/dist/astro/native/motion.d.ts +101 -0
- package/dist/astro/native/motion.d.ts.map +1 -0
- package/dist/astro/native/motion.js +168 -0
- package/dist/astro/native/motion.js.map +1 -0
- package/dist/astro/native/motion.ts +312 -0
- package/dist/astro/native/query-carousel.d.ts +12 -0
- package/dist/astro/native/query-carousel.d.ts.map +1 -0
- package/dist/astro/native/query-carousel.js +36 -0
- package/dist/astro/native/query-carousel.js.map +1 -0
- package/dist/astro/native/query-carousel.ts +56 -0
- package/dist/astro/native/query-loop.d.ts +38 -0
- package/dist/astro/native/query-loop.d.ts.map +1 -0
- package/dist/astro/native/query-loop.js +20 -0
- package/dist/astro/native/query-loop.js.map +1 -0
- package/dist/astro/native/query-loop.ts +67 -0
- package/dist/astro/native/registry.d.ts +3 -0
- package/dist/astro/native/registry.d.ts.map +1 -0
- package/dist/astro/native/registry.js +81 -0
- package/dist/astro/native/registry.js.map +1 -0
- package/dist/astro/native/registry.ts +82 -0
- package/dist/astro/native/sf-block-binding.astro +20 -0
- package/dist/astro/native/sf-post-field.astro +9 -0
- package/dist/astro/native/sf-term-field.astro +9 -0
- package/dist/astro/native/timeline.css +4 -0
- package/dist/astro/native/timeline.d.ts +28 -0
- package/dist/astro/native/timeline.d.ts.map +1 -0
- package/dist/astro/native/timeline.js +43 -0
- package/dist/astro/native/timeline.js.map +1 -0
- package/dist/astro/native/timeline.ts +79 -0
- package/dist/astro/preferences/AccessibilityPanel.astro +105 -0
- package/dist/astro/preferences/ColorModeToggle.astro +26 -0
- package/dist/astro/preferences/MotionToggle.astro +27 -0
- package/dist/astro/preferences/PreferencesRuntime.astro +9 -0
- package/dist/astro/preferences/ThemeToggle.astro +30 -0
- package/dist/astro/preferences/Toggle.astro +50 -0
- package/dist/astro/preferences/preferences.css +125 -0
- package/dist/block-renderers.d.ts +23 -3
- package/dist/block-renderers.d.ts.map +1 -1
- package/dist/block-renderers.js.map +1 -1
- package/dist/build-cache.d.ts +8 -0
- package/dist/build-cache.d.ts.map +1 -0
- package/dist/build-cache.js +81 -0
- package/dist/build-cache.js.map +1 -0
- package/dist/client.d.ts +23 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +78 -39
- package/dist/client.js.map +1 -1
- package/dist/composition.d.ts +14 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +125 -0
- package/dist/composition.js.map +1 -0
- package/dist/default-blocks.d.ts +9 -0
- package/dist/default-blocks.d.ts.map +1 -0
- package/dist/default-blocks.js +117 -0
- package/dist/default-blocks.js.map +1 -0
- package/dist/env.d.ts +9 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +20 -0
- package/dist/env.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/media.d.ts +20 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +106 -0
- package/dist/media.js.map +1 -0
- package/dist/motion-preference.d.ts +50 -0
- package/dist/motion-preference.d.ts.map +1 -0
- package/dist/motion-preference.js +132 -0
- package/dist/motion-preference.js.map +1 -0
- package/dist/preferences-runtime.d.ts +3 -0
- package/dist/preferences-runtime.d.ts.map +1 -0
- package/dist/preferences-runtime.js +23 -0
- package/dist/preferences-runtime.js.map +1 -0
- package/dist/preferences-styleflow.d.ts +3 -0
- package/dist/preferences-styleflow.d.ts.map +1 -0
- package/dist/preferences-styleflow.js +14 -0
- package/dist/preferences-styleflow.js.map +1 -0
- package/dist/preferences.d.ts +4 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +4 -0
- package/dist/preferences.js.map +1 -0
- package/dist/reserved-area.d.ts +10 -0
- package/dist/reserved-area.d.ts.map +1 -0
- package/dist/reserved-area.js +93 -0
- package/dist/reserved-area.js.map +1 -0
- package/dist/styleflow.d.ts +18 -1
- package/dist/styleflow.d.ts.map +1 -1
- package/dist/styleflow.js +82 -11
- package/dist/styleflow.js.map +1 -1
- package/dist/svg-media-runtime.d.ts +3 -0
- package/dist/svg-media-runtime.d.ts.map +1 -0
- package/dist/svg-media-runtime.js +33 -0
- package/dist/svg-media-runtime.js.map +1 -0
- package/dist/svg-media-types.d.ts +11 -0
- package/dist/svg-media-types.d.ts.map +1 -0
- package/dist/svg-media-types.js +2 -0
- package/dist/svg-media-types.js.map +1 -0
- package/dist/svg-media.d.ts +13 -0
- package/dist/svg-media.d.ts.map +1 -0
- package/dist/svg-media.js +47 -0
- package/dist/svg-media.js.map +1 -0
- package/dist/template-hierarchy.d.ts +0 -7
- package/dist/template-hierarchy.d.ts.map +1 -1
- package/dist/template-hierarchy.js +0 -21
- package/dist/template-hierarchy.js.map +1 -1
- package/dist/text.d.ts +3 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +6 -0
- package/dist/text.js.map +1 -0
- package/dist/theme-runtime.d.ts +16 -0
- package/dist/theme-runtime.d.ts.map +1 -0
- package/dist/theme-runtime.js +100 -0
- package/dist/theme-runtime.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +75 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/vivid-colors-preference.d.ts +31 -0
- package/dist/vivid-colors-preference.d.ts.map +1 -0
- package/dist/vivid-colors-preference.js +102 -0
- package/dist/vivid-colors-preference.js.map +1 -0
- package/package.json +58 -7
- package/dist/astro/DefaultTemplate.astro +0 -42
- package/dist/templates.d.ts +0 -19
- package/dist/templates.d.ts.map +0 -1
- package/dist/templates.js +0 -20
- package/dist/templates.js.map +0 -1
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,YAAY,GACZ,mBAAmB,GACnB,UAAU,GACV,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,OAAO,GACP,SAAS,GACT,KAAK,CAAC;AAEV,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,UAAU,GACV,UAAU,GACV,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,m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E,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type FlowpressQueryType =\n | \"front-page\"\n | \"home\"\n | \"page\"\n | \"privacy-policy\"\n | \"single\"\n | \"attachment\"\n | \"post-type-archive\"\n | \"category\"\n | \"tag\"\n | \"taxonomy\"\n | \"author\"\n | \"date\"\n | \"search\"\n | \"embed\"\n | \"archive\"\n | \"404\";\n\nexport type FlowpressLinkResolution =\n | \"resolved\"\n | \"missing_translation\"\n | \"missing_entity\"\n | \"invalid\"\n | \"legacy_raw\"\n | \"external\"\n | \"fragment\"\n | \"media\"\n | \"binding\";\n\nexport interface FlowpressLinkValue {\n kind: \"post-type\" | \"taxonomy\" | \"post-type-archive\" | \"media\" | \"custom\" | string;\n type: string;\n id: number | string | null;\n url: string | null;\n opensInNewTab: boolean;\n resolution: FlowpressLinkResolution;\n}\n\nexport interface SfSeoImage {\n url: string;\n alt?: string | null;\n width?: number | null;\n height?: number | null;\n}\n\nexport interface SfSeoSocial {\n title?: string | null;\n description?: string | null;\n image?: SfSeoImage | null;\n}\n\nexport interface SfSeo {\n title?: string | null;\n description?: string | null;\n canonicalUrl?: string | null;\n robots?: string[] | null;\n openGraph?: SfSeoSocial | null;\n twitter?: SfSeoSocial | null;\n jsonLd?: unknown;\n headHtml?: string | null;\n hreflang?: Array<{ locale: string; url: string }> | null;\n}\n\nexport interface FlowpressContentReference {\n loader: string;\n databaseId?: number | null;\n termId?: number | null;\n}\n\nexport interface FlowpressRoute {\n uri: string;\n status: number;\n queryType: FlowpressQueryType;\n locale?: string | null;\n isFrontPage?: boolean;\n isPostsPage?: boolean;\n frontPageMode?: \"page\" | \"posts\" | null;\n postType?: string | null;\n taxonomy?: string | null;\n slug?: string | null;\n term?: string | null;\n databaseId?: number | null;\n termId?: number | null;\n authorNicename?: string | null;\n authorId?: number | null;\n pageTemplate?: string | null;\n mimeType?: string | null;\n postFormat?: string | null;\n templateCandidates: string[];\n content?: FlowpressContentReference | null;\n seo?: SfSeo | null;\n}\n\nexport interface FlowpressLocale {\n code: string;\n slug: string;\n homeUrl?: string | null;\n}\n\nexport interface FlowpressFeature {\n id: string;\n version?: string | null;\n enabled: boolean;\n capabilities: string[];\n config: Record<string, unknown>;\n}\n\nexport interface FlowpressCapabilities {\n schemaVersion: string;\n wpGraphql: boolean;\n acfPro: boolean;\n wpGraphqlAcf: boolean;\n rankMath: boolean;\n wpml: boolean;\n woocommerce: boolean;\n contactForm7: boolean;\n defaultLocale?: string | null;\n locales: FlowpressLocale[];\n features: FlowpressFeature[];\n}\n\nexport interface FlowpressContent {\n title?: string | null;\n excerpt?: string | null;\n content?: string | null;\n contentBlocks?: unknown[] | null;\n projectFields?: Record<string, unknown> | null;\n [key: string]: unknown;\n}\n\nexport interface FlowpressBlock {\n name: string;\n attributes: Record<string, unknown
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type FlowpressQueryType =\n | \"front-page\"\n | \"home\"\n | \"page\"\n | \"privacy-policy\"\n | \"single\"\n | \"attachment\"\n | \"post-type-archive\"\n | \"category\"\n | \"tag\"\n | \"taxonomy\"\n | \"author\"\n | \"date\"\n | \"search\"\n | \"embed\"\n | \"archive\"\n | \"404\";\n\nexport type FlowpressLinkResolution =\n | \"resolved\"\n | \"missing_translation\"\n | \"missing_entity\"\n | \"invalid\"\n | \"legacy_raw\"\n | \"external\"\n | \"fragment\"\n | \"media\"\n | \"binding\";\n\nexport interface FlowpressLinkValue {\n kind: \"post-type\" | \"taxonomy\" | \"post-type-archive\" | \"media\" | \"custom\" | string;\n type: string;\n id: number | string | null;\n url: string | null;\n opensInNewTab: boolean;\n resolution: FlowpressLinkResolution;\n}\n\nexport interface SfSeoImage {\n url: string;\n alt?: string | null;\n width?: number | null;\n height?: number | null;\n}\n\nexport interface SfSeoSocial {\n title?: string | null;\n description?: string | null;\n image?: SfSeoImage | null;\n}\n\nexport interface SfSeo {\n title?: string | null;\n description?: string | null;\n canonicalUrl?: string | null;\n robots?: string[] | null;\n openGraph?: SfSeoSocial | null;\n twitter?: SfSeoSocial | null;\n jsonLd?: unknown;\n headHtml?: string | null;\n hreflang?: Array<{ locale: string; url: string }> | null;\n}\n\nexport interface FlowpressContentReference {\n loader: string;\n databaseId?: number | null;\n termId?: number | null;\n}\n\nexport interface FlowpressRoute {\n uri: string;\n status: number;\n queryType: FlowpressQueryType;\n locale?: string | null;\n isFrontPage?: boolean;\n isPostsPage?: boolean;\n frontPageMode?: \"page\" | \"posts\" | null;\n postType?: string | null;\n taxonomy?: string | null;\n slug?: string | null;\n term?: string | null;\n databaseId?: number | null;\n termId?: number | null;\n authorNicename?: string | null;\n authorId?: number | null;\n pageTemplate?: string | null;\n mimeType?: string | null;\n postFormat?: string | null;\n templateCandidates: string[];\n content?: FlowpressContentReference | null;\n seo?: SfSeo | null;\n}\n\nexport interface FlowpressLocale {\n code: string;\n slug: string;\n homeUrl?: string | null;\n}\n\nexport interface FlowpressFeature {\n id: string;\n version?: string | null;\n enabled: boolean;\n capabilities: string[];\n config: Record<string, unknown>;\n}\n\nexport interface FlowpressCapabilities {\n schemaVersion: string;\n wpGraphql: boolean;\n acfPro: boolean;\n wpGraphqlAcf: boolean;\n rankMath: boolean;\n wpml: boolean;\n woocommerce: boolean;\n contactForm7: boolean;\n defaultLocale?: string | null;\n locales: FlowpressLocale[];\n features: FlowpressFeature[];\n}\n\nexport interface FlowpressContent {\n title?: string | null;\n excerpt?: string | null;\n content?: string | null;\n contentBlocks?: unknown[] | null;\n projectFields?: Record<string, unknown> | null;\n [key: string]: unknown;\n}\n\nexport interface FlowpressBlockAuthoringAttributes extends Record<string, unknown> {\n anchor?: string;\n className?: string;\n style?: { css?: string; [key: string]: unknown };\n theme?: string;\n tone?: string;\n intensity?: string;\n surface?: string;\n foreground?: string;\n layoutRole?: string;\n density?: string;\n ty?: string;\n v?: string;\n w?: string;\n interactivePriority?: string;\n noBackground?: boolean;\n noBorder?: boolean;\n noPadding?: boolean;\n noGap?: boolean;\n noRadius?: boolean;\n noForeground?: boolean;\n htmlAttributes?: Record<string, unknown>;\n}\n\nexport interface FlowpressBlockHtmlProps {\n id?: string;\n class?: string;\n [name: string]: string | number | boolean | undefined;\n}\n\nexport interface FlowpressBlock {\n name: string;\n attributes: FlowpressBlockAuthoringAttributes;\n resolvedData?: Record<string, unknown> | null;\n innerHtml?: string | null;\n innerBlocks?: FlowpressBlock[];\n}\n\nexport interface FlowpressCompositionStylesheet {\n id: string;\n css: string;\n}\n\nexport type FlowpressBlockAdapterStatus = \"draft\" | \"ready\";\nexport type FlowpressBlockClass = \"static\" | \"entity\" | \"query\" | \"interactive\";\n\nexport interface FlowpressBlockTypeDescriptor {\n blockName: string;\n fingerprint: string;\n apiVersion?: number | null;\n dynamic: boolean;\n}\n\nexport interface FlowpressCompositionDiagnostic {\n code: string;\n message: string;\n blocking: boolean;\n blockName?: string | null;\n path?: string | null;\n command?: string | null;\n}\n\nexport interface FlowpressCompositionTemplate {\n id: string;\n slug: string;\n theme: string;\n type: \"wp_template\";\n source?: string | null;\n status: string;\n title?: string | null;\n}\n\nexport interface FlowpressCompositionV1 {\n version: \"1\";\n sourceDigest: string;\n template: FlowpressCompositionTemplate;\n blocks: FlowpressBlock[];\n stylesheets: FlowpressCompositionStylesheet[];\n blockTypes: FlowpressBlockTypeDescriptor[];\n diagnostics: FlowpressCompositionDiagnostic[];\n route: FlowpressRoute;\n locale?: string | null;\n content?: FlowpressContent | null;\n}\n\nexport interface FlowpressTemplateProps {\n route: FlowpressRoute;\n content: FlowpressContent | null;\n capabilities: FlowpressCapabilities;\n templateName: string;\n templateCandidates: string[];\n styleflowContract?: import(\"./styleflow.js\").StyleflowContract;\n composition?: FlowpressCompositionV1 | null;\n}\n\nexport interface TemplateContext {\n queryType: FlowpressQueryType;\n frontPageMode?: \"page\" | \"posts\";\n postType?: string | null;\n taxonomy?: string | null;\n slug?: string | null;\n term?: string | null;\n databaseId?: number | null;\n termId?: number | null;\n authorNicename?: string | null;\n authorId?: number | null;\n pageTemplate?: string | null;\n mimeType?: string | null;\n postFormat?: string | null;\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the vivid-colors accessibility preference.
|
|
3
|
+
*
|
|
4
|
+
* Vivid colors are on by default. A visitor can turn them off from the
|
|
5
|
+
* accessibility panel; the explicit choice is stored in localStorage and
|
|
6
|
+
* mirrored on `<html data-sf-vivid-colors="true|false">`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VIVID_COLORS_STORAGE_KEY = "sf:vivid-colors";
|
|
9
|
+
export declare const VIVID_COLORS_ATTRIBUTE = "data-sf-vivid-colors";
|
|
10
|
+
export declare const VIVID_COLORS_CHANGE_EVENT = "sf:vivid-colors-change";
|
|
11
|
+
export declare const VIVID_COLORS_TOGGLE_SELECTOR = "[data-sf-vivid-colors-toggle]";
|
|
12
|
+
export type VividColorsPreference = "true" | "false";
|
|
13
|
+
export declare function isVividColorsPreference(value: unknown): value is VividColorsPreference;
|
|
14
|
+
/** Missing or invalid values intentionally fall back to vivid colors. */
|
|
15
|
+
export declare function resolveVividColorsPreference(stored: unknown): VividColorsPreference;
|
|
16
|
+
/**
|
|
17
|
+
* Inline script for `<head>`: applies a saved reduced-saturation choice before
|
|
18
|
+
* first paint. Visitors without a saved choice always start with vivid colors.
|
|
19
|
+
*/
|
|
20
|
+
export declare function vividColorsBootstrapScript(): string;
|
|
21
|
+
export interface VividColorsEnvironment {
|
|
22
|
+
document: Pick<Document, "documentElement" | "dispatchEvent" | "addEventListener" | "removeEventListener">;
|
|
23
|
+
storage: Pick<Storage, "getItem" | "setItem"> | null;
|
|
24
|
+
}
|
|
25
|
+
export declare function browserVividColorsEnvironment(): VividColorsEnvironment;
|
|
26
|
+
export declare function getVividColorsPreference(env?: VividColorsEnvironment): VividColorsPreference;
|
|
27
|
+
export declare function setVividColorsPreference(preference: VividColorsPreference, env?: VividColorsEnvironment): void;
|
|
28
|
+
export declare function subscribeVividColorsPreference(listener: (preference: VividColorsPreference) => void, env?: VividColorsEnvironment): () => void;
|
|
29
|
+
/** Checked means vivid colors are on. */
|
|
30
|
+
export declare function initializeVividColorsToggles(scope?: ParentNode, env?: VividColorsEnvironment): () => void;
|
|
31
|
+
//# sourceMappingURL=vivid-colors-preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vivid-colors-preference.d.ts","sourceRoot":"","sources":["../src/vivid-colors-preference.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAClE,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,OAAO,CAAC;AAErD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAEtF;AAED,yEAAyE;AACzE,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAEnF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAInD;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,iBAAiB,GAAG,eAAe,GAAG,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;IAC3G,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;CACtD;AAED,wBAAgB,6BAA6B,IAAI,sBAAsB,CAQtE;AAeD,wBAAgB,wBAAwB,CACtC,GAAG,GAAE,sBAAwD,GAC5D,qBAAqB,CAEvB;AAUD,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,qBAAqB,EACjC,GAAG,GAAE,sBAAwD,GAC5D,IAAI,CAON;AAED,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,CAAC,UAAU,EAAE,qBAAqB,KAAK,IAAI,EACrD,GAAG,GAAE,sBAAwD,GAC5D,MAAM,IAAI,CAOZ;AAID,yCAAyC;AACzC,wBAAgB,4BAA4B,CAC1C,KAAK,GAAE,UAAqB,EAC5B,GAAG,GAAE,sBAAwD,GAC5D,MAAM,IAAI,CAwBZ"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the vivid-colors accessibility preference.
|
|
3
|
+
*
|
|
4
|
+
* Vivid colors are on by default. A visitor can turn them off from the
|
|
5
|
+
* accessibility panel; the explicit choice is stored in localStorage and
|
|
6
|
+
* mirrored on `<html data-sf-vivid-colors="true|false">`.
|
|
7
|
+
*/
|
|
8
|
+
export const VIVID_COLORS_STORAGE_KEY = "sf:vivid-colors";
|
|
9
|
+
export const VIVID_COLORS_ATTRIBUTE = "data-sf-vivid-colors";
|
|
10
|
+
export const VIVID_COLORS_CHANGE_EVENT = "sf:vivid-colors-change";
|
|
11
|
+
export const VIVID_COLORS_TOGGLE_SELECTOR = "[data-sf-vivid-colors-toggle]";
|
|
12
|
+
export function isVividColorsPreference(value) {
|
|
13
|
+
return value === "true" || value === "false";
|
|
14
|
+
}
|
|
15
|
+
/** Missing or invalid values intentionally fall back to vivid colors. */
|
|
16
|
+
export function resolveVividColorsPreference(stored) {
|
|
17
|
+
return isVividColorsPreference(stored) ? stored : "true";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Inline script for `<head>`: applies a saved reduced-saturation choice before
|
|
21
|
+
* first paint. Visitors without a saved choice always start with vivid colors.
|
|
22
|
+
*/
|
|
23
|
+
export function vividColorsBootstrapScript() {
|
|
24
|
+
const key = JSON.stringify(VIVID_COLORS_STORAGE_KEY);
|
|
25
|
+
const attribute = JSON.stringify(VIVID_COLORS_ATTRIBUTE);
|
|
26
|
+
return `(()=>{let s=null;try{s=localStorage.getItem(${key})}catch{}document.documentElement.setAttribute(${attribute},s==="false"?"false":"true")})()`;
|
|
27
|
+
}
|
|
28
|
+
export function browserVividColorsEnvironment() {
|
|
29
|
+
let storage = null;
|
|
30
|
+
try {
|
|
31
|
+
storage = localStorage;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// Blocked storage keeps the preference in memory for the page only.
|
|
35
|
+
}
|
|
36
|
+
return { document, storage };
|
|
37
|
+
}
|
|
38
|
+
function readStored(env) {
|
|
39
|
+
try {
|
|
40
|
+
return env.storage?.getItem(VIVID_COLORS_STORAGE_KEY) ?? null;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function mirrored(env) {
|
|
47
|
+
const value = env.document.documentElement.getAttribute(VIVID_COLORS_ATTRIBUTE);
|
|
48
|
+
return isVividColorsPreference(value) ? value : null;
|
|
49
|
+
}
|
|
50
|
+
export function getVividColorsPreference(env = browserVividColorsEnvironment()) {
|
|
51
|
+
return mirrored(env) ?? resolveVividColorsPreference(readStored(env));
|
|
52
|
+
}
|
|
53
|
+
function apply(preference, env) {
|
|
54
|
+
if (mirrored(env) === preference)
|
|
55
|
+
return;
|
|
56
|
+
env.document.documentElement.setAttribute(VIVID_COLORS_ATTRIBUTE, preference);
|
|
57
|
+
env.document.dispatchEvent(new CustomEvent(VIVID_COLORS_CHANGE_EVENT, { detail: { preference } }));
|
|
58
|
+
}
|
|
59
|
+
export function setVividColorsPreference(preference, env = browserVividColorsEnvironment()) {
|
|
60
|
+
try {
|
|
61
|
+
env.storage?.setItem(VIVID_COLORS_STORAGE_KEY, preference);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// The choice still applies to this page.
|
|
65
|
+
}
|
|
66
|
+
apply(preference, env);
|
|
67
|
+
}
|
|
68
|
+
export function subscribeVividColorsPreference(listener, env = browserVividColorsEnvironment()) {
|
|
69
|
+
const onChange = (event) => {
|
|
70
|
+
const preference = event.detail?.preference;
|
|
71
|
+
if (isVividColorsPreference(preference))
|
|
72
|
+
listener(preference);
|
|
73
|
+
};
|
|
74
|
+
env.document.addEventListener(VIVID_COLORS_CHANGE_EVENT, onChange);
|
|
75
|
+
return () => env.document.removeEventListener(VIVID_COLORS_CHANGE_EVENT, onChange);
|
|
76
|
+
}
|
|
77
|
+
const TOGGLE_BOUND = "sfVividColorsToggleBound";
|
|
78
|
+
/** Checked means vivid colors are on. */
|
|
79
|
+
export function initializeVividColorsToggles(scope = document, env = browserVividColorsEnvironment()) {
|
|
80
|
+
const toggles = [...scope.querySelectorAll(VIVID_COLORS_TOGGLE_SELECTOR)]
|
|
81
|
+
.filter((toggle) => toggle.dataset[TOGGLE_BOUND] !== "true");
|
|
82
|
+
const sync = (preference) => {
|
|
83
|
+
toggles.forEach((toggle) => toggle.setAttribute("aria-checked", preference));
|
|
84
|
+
};
|
|
85
|
+
const flip = () => {
|
|
86
|
+
setVividColorsPreference(getVividColorsPreference(env) === "true" ? "false" : "true", env);
|
|
87
|
+
};
|
|
88
|
+
toggles.forEach((toggle) => {
|
|
89
|
+
toggle.dataset[TOGGLE_BOUND] = "true";
|
|
90
|
+
toggle.addEventListener("click", flip);
|
|
91
|
+
});
|
|
92
|
+
sync(getVividColorsPreference(env));
|
|
93
|
+
const unsubscribe = subscribeVividColorsPreference(sync, env);
|
|
94
|
+
return () => {
|
|
95
|
+
unsubscribe();
|
|
96
|
+
toggles.forEach((toggle) => {
|
|
97
|
+
toggle.removeEventListener("click", flip);
|
|
98
|
+
delete toggle.dataset[TOGGLE_BOUND];
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=vivid-colors-preference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vivid-colors-preference.js","sourceRoot":"","sources":["../src/vivid-colors-preference.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AAC1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAC7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC;AAClE,MAAM,CAAC,MAAM,4BAA4B,GAAG,+BAA+B,CAAC;AAI5E,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,CAAC;AAC/C,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,4BAA4B,CAAC,MAAe;IAC1D,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B;IACxC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACrD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACzD,OAAO,+CAA+C,GAAG,kDAAkD,SAAS,kCAAkC,CAAC;AACzJ,CAAC;AAOD,MAAM,UAAU,6BAA6B;IAC3C,IAAI,OAAO,GAAsC,IAAI,CAAC;IACtD,IAAI,CAAC;QACH,OAAO,GAAG,YAAY,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,oEAAoE;IACtE,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED,SAAS,UAAU,CAAC,GAA2B;IAC7C,IAAI,CAAC;QACH,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,IAAI,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H,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,WAAW,GAAG,8BAA8B,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAE9D,OAAO,GAAG,EAAE;QACV,WAAW,EAAE,CAAC;QACd,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Single source of truth for the vivid-colors accessibility preference.\n *\n * Vivid colors are on by default. A visitor can turn them off from the\n * accessibility panel; the explicit choice is stored in localStorage and\n * mirrored on `<html data-sf-vivid-colors=\"true|false\">`.\n */\n\nexport const VIVID_COLORS_STORAGE_KEY = \"sf:vivid-colors\";\nexport const VIVID_COLORS_ATTRIBUTE = \"data-sf-vivid-colors\";\nexport const VIVID_COLORS_CHANGE_EVENT = \"sf:vivid-colors-change\";\nexport const VIVID_COLORS_TOGGLE_SELECTOR = \"[data-sf-vivid-colors-toggle]\";\n\nexport type VividColorsPreference = \"true\" | \"false\";\n\nexport function isVividColorsPreference(value: unknown): value is VividColorsPreference {\n return value === \"true\" || value === \"false\";\n}\n\n/** Missing or invalid values intentionally fall back to vivid colors. */\nexport function resolveVividColorsPreference(stored: unknown): VividColorsPreference {\n return isVividColorsPreference(stored) ? stored : \"true\";\n}\n\n/**\n * Inline script for `<head>`: applies a saved reduced-saturation choice before\n * first paint. Visitors without a saved choice always start with vivid colors.\n */\nexport function vividColorsBootstrapScript(): string {\n const key = JSON.stringify(VIVID_COLORS_STORAGE_KEY);\n const attribute = JSON.stringify(VIVID_COLORS_ATTRIBUTE);\n return `(()=>{let s=null;try{s=localStorage.getItem(${key})}catch{}document.documentElement.setAttribute(${attribute},s===\"false\"?\"false\":\"true\")})()`;\n}\n\nexport interface VividColorsEnvironment {\n document: Pick<Document, \"documentElement\" | \"dispatchEvent\" | \"addEventListener\" | \"removeEventListener\">;\n storage: Pick<Storage, \"getItem\" | \"setItem\"> | null;\n}\n\nexport function browserVividColorsEnvironment(): VividColorsEnvironment {\n let storage: VividColorsEnvironment[\"storage\"] = null;\n try {\n storage = localStorage;\n } catch {\n // Blocked storage keeps the preference in memory for the page only.\n }\n return { document, storage };\n}\n\nfunction readStored(env: VividColorsEnvironment): string | null {\n try {\n return env.storage?.getItem(VIVID_COLORS_STORAGE_KEY) ?? null;\n } catch {\n return null;\n }\n}\n\nfunction mirrored(env: VividColorsEnvironment): VividColorsPreference | null {\n const value = env.document.documentElement.getAttribute(VIVID_COLORS_ATTRIBUTE);\n return isVividColorsPreference(value) ? value : null;\n}\n\nexport function getVividColorsPreference(\n env: VividColorsEnvironment = browserVividColorsEnvironment(),\n): VividColorsPreference {\n return mirrored(env) ?? resolveVividColorsPreference(readStored(env));\n}\n\nfunction apply(preference: VividColorsPreference, env: VividColorsEnvironment): void {\n if (mirrored(env) === preference) return;\n env.document.documentElement.setAttribute(VIVID_COLORS_ATTRIBUTE, preference);\n env.document.dispatchEvent(\n new CustomEvent(VIVID_COLORS_CHANGE_EVENT, { detail: { preference } }),\n );\n}\n\nexport function setVividColorsPreference(\n preference: VividColorsPreference,\n env: VividColorsEnvironment = browserVividColorsEnvironment(),\n): void {\n try {\n env.storage?.setItem(VIVID_COLORS_STORAGE_KEY, preference);\n } catch {\n // The choice still applies to this page.\n }\n apply(preference, env);\n}\n\nexport function subscribeVividColorsPreference(\n listener: (preference: VividColorsPreference) => void,\n env: VividColorsEnvironment = browserVividColorsEnvironment(),\n): () => void {\n const onChange = (event: Event) => {\n const preference = (event as CustomEvent<{ preference?: unknown }>).detail?.preference;\n if (isVividColorsPreference(preference)) listener(preference);\n };\n env.document.addEventListener(VIVID_COLORS_CHANGE_EVENT, onChange);\n return () => env.document.removeEventListener(VIVID_COLORS_CHANGE_EVENT, onChange);\n}\n\nconst TOGGLE_BOUND = \"sfVividColorsToggleBound\";\n\n/** Checked means vivid colors are on. */\nexport function initializeVividColorsToggles(\n scope: ParentNode = document,\n env: VividColorsEnvironment = browserVividColorsEnvironment(),\n): () => void {\n const toggles = [...scope.querySelectorAll<HTMLElement>(VIVID_COLORS_TOGGLE_SELECTOR)]\n .filter((toggle) => toggle.dataset[TOGGLE_BOUND] !== \"true\");\n const sync = (preference: VividColorsPreference) => {\n toggles.forEach((toggle) => toggle.setAttribute(\"aria-checked\", preference));\n };\n const flip = () => {\n setVividColorsPreference(getVividColorsPreference(env) === \"true\" ? \"false\" : \"true\", env);\n };\n\n toggles.forEach((toggle) => {\n toggle.dataset[TOGGLE_BOUND] = \"true\";\n toggle.addEventListener(\"click\", flip);\n });\n sync(getVividColorsPreference(env));\n const unsubscribe = subscribeVividColorsPreference(sync, env);\n\n return () => {\n unsubscribe();\n toggles.forEach((toggle) => {\n toggle.removeEventListener(\"click\", flip);\n delete toggle.dataset[TOGGLE_BOUND];\n });\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@styleflow.app/flowpress-astro-core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.40",
|
|
4
4
|
"description": "Project-agnostic WordPress routing, templates, SEO and GraphQL runtime for FlowPress Astro apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -21,12 +21,61 @@
|
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
|
-
"import": "./dist/index.js"
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"default": "./dist/index.js"
|
|
25
26
|
},
|
|
26
|
-
"./templates": "./dist/templates.js",
|
|
27
27
|
"./BaseLayout.astro": "./dist/astro/BaseLayout.astro",
|
|
28
|
-
"./
|
|
29
|
-
"./
|
|
28
|
+
"./GutenbergRenderer.astro": "./dist/astro/GutenbergRenderer.astro",
|
|
29
|
+
"./CompositionRenderer.astro": "./dist/astro/CompositionRenderer.astro",
|
|
30
|
+
"./DefaultBlockAdapter.astro": "./dist/astro/DefaultBlockAdapter.astro",
|
|
31
|
+
"./ThemeRuntime.astro": "./dist/astro/ThemeRuntime.astro",
|
|
32
|
+
"./blocks/ThemeToggleBlock.astro": "./dist/astro/blocks/ThemeToggleBlock.astro",
|
|
33
|
+
"./blocks/CoverBlock.astro": "./dist/astro/blocks/CoverBlock.astro",
|
|
34
|
+
"./blocks/SiteLogoBlock.astro": "./dist/astro/blocks/SiteLogoBlock.astro",
|
|
35
|
+
"./native/*": "./dist/astro/native/*",
|
|
36
|
+
"./preferences": {
|
|
37
|
+
"types": "./dist/preferences.d.ts",
|
|
38
|
+
"import": "./dist/preferences.js",
|
|
39
|
+
"default": "./dist/preferences.js"
|
|
40
|
+
},
|
|
41
|
+
"./Toggle.astro": "./dist/astro/preferences/Toggle.astro",
|
|
42
|
+
"./ThemeToggle.astro": "./dist/astro/preferences/ThemeToggle.astro",
|
|
43
|
+
"./MotionToggle.astro": "./dist/astro/preferences/MotionToggle.astro",
|
|
44
|
+
"./ColorModeToggle.astro": "./dist/astro/preferences/ColorModeToggle.astro",
|
|
45
|
+
"./AccessibilityPanel.astro": "./dist/astro/preferences/AccessibilityPanel.astro",
|
|
46
|
+
"./PreferencesRuntime.astro": "./dist/astro/preferences/PreferencesRuntime.astro",
|
|
47
|
+
"./preferences.css": "./dist/astro/preferences/preferences.css",
|
|
48
|
+
"./svg-media": {
|
|
49
|
+
"types": "./dist/svg-media.d.ts",
|
|
50
|
+
"import": "./dist/svg-media.js",
|
|
51
|
+
"default": "./dist/svg-media.js"
|
|
52
|
+
},
|
|
53
|
+
"./Media.astro": "./dist/astro/Media.astro",
|
|
54
|
+
"./MotionRuntime.astro": "./dist/astro/motion/MotionRuntime.astro",
|
|
55
|
+
"./MotionBoot.astro": "./dist/astro/motion/MotionBoot.astro",
|
|
56
|
+
"./AccordionRuntime.astro": "./dist/astro/motion/AccordionRuntime.astro",
|
|
57
|
+
"./motion": {
|
|
58
|
+
"types": "./dist/astro/motion/motion.d.ts",
|
|
59
|
+
"import": "./dist/astro/motion/motion.js",
|
|
60
|
+
"default": "./dist/astro/motion/motion.js"
|
|
61
|
+
},
|
|
62
|
+
"./FontStylesheets.astro": "./dist/astro/FontStylesheets.astro",
|
|
63
|
+
"./PreferencesPanel.astro": "./dist/astro/preferences/AccessibilityPanel.astro",
|
|
64
|
+
"./reserved-area": {
|
|
65
|
+
"types": "./dist/reserved-area.d.ts",
|
|
66
|
+
"import": "./dist/reserved-area.js",
|
|
67
|
+
"default": "./dist/reserved-area.js"
|
|
68
|
+
},
|
|
69
|
+
"./motion-controller": {
|
|
70
|
+
"types": "./dist/astro/motion/motion-controller.d.ts",
|
|
71
|
+
"import": "./dist/astro/motion/motion-controller.js",
|
|
72
|
+
"default": "./dist/astro/motion/motion-controller.js"
|
|
73
|
+
},
|
|
74
|
+
"./motion.css": "./dist/astro/motion/motion.css",
|
|
75
|
+
"./build-cache": {
|
|
76
|
+
"types": "./dist/build-cache.d.ts",
|
|
77
|
+
"import": "./dist/build-cache.js"
|
|
78
|
+
}
|
|
30
79
|
},
|
|
31
80
|
"files": [
|
|
32
81
|
"dist",
|
|
@@ -34,7 +83,7 @@
|
|
|
34
83
|
"CHANGELOG.md"
|
|
35
84
|
],
|
|
36
85
|
"scripts": {
|
|
37
|
-
"build": "tsc -b && node ./scripts/copy-astro.mjs",
|
|
86
|
+
"build": "node -e \"require('node:fs').rmSync('dist', {recursive:true,force:true})\" && tsc -b --force && node ./scripts/copy-astro.mjs",
|
|
38
87
|
"typecheck": "tsc -b --pretty false && node ./scripts/copy-astro.mjs && astro check",
|
|
39
88
|
"test": "vitest run && npm run test:renderer",
|
|
40
89
|
"test:renderer": "node ./scripts/test-custom-renderer.mjs",
|
|
@@ -45,7 +94,9 @@
|
|
|
45
94
|
},
|
|
46
95
|
"dependencies": {
|
|
47
96
|
"@splidejs/splide": "4.1.4",
|
|
48
|
-
"@styleflow.app/astro": "1.0.0-beta.
|
|
97
|
+
"@styleflow.app/astro": "1.0.0-beta.11",
|
|
98
|
+
"@styleflow.app/flowpress-components": "1.0.0-beta.16",
|
|
99
|
+
"entities": "8.1.0"
|
|
49
100
|
},
|
|
50
101
|
"peerDependencies": {
|
|
51
102
|
"astro": ">=7.0.0"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import S from "@styleflow.app/astro/S.astro";
|
|
3
|
-
import BaseLayout from "./BaseLayout.astro";
|
|
4
|
-
import GutenbergRenderer from "./GutenbergRenderer.astro";
|
|
5
|
-
import type { FlowpressTemplateProps } from "../types.js";
|
|
6
|
-
|
|
7
|
-
const { route, content, styleflowContract } = Astro.props as FlowpressTemplateProps;
|
|
8
|
-
const title = content?.title || route.seo?.title || "Contenuto";
|
|
9
|
-
const isNotFound = route.queryType === "404" || route.status === 404;
|
|
10
|
-
const hasGutembergBlocks = Array.isArray(content?.contentBlocks) && content.contentBlocks.length > 0 ? true : false;
|
|
11
|
-
//TODO SET GLOBAL LOCAL ON ENV
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<BaseLayout lang={route.locale || "it"} seo={route.seo} theme={styleflowContract?.defaultTheme}>
|
|
15
|
-
|
|
16
|
-
{hasGutembergBlocks ? (
|
|
17
|
-
<GutenbergRenderer
|
|
18
|
-
blocks={content?.contentBlocks as import("../types.js").FlowpressBlock[]}
|
|
19
|
-
contract={styleflowContract}
|
|
20
|
-
/>
|
|
21
|
-
) : (
|
|
22
|
-
<S.section surface="default" layoutRole="section" density="regular">
|
|
23
|
-
<S.h1>{isNotFound ? "Pagina non trovata" : title}</S.h1>
|
|
24
|
-
{content?.excerpt && <S.p>{content.excerpt}</S.p>}
|
|
25
|
-
{Array.isArray(content?.contentBlocks) && content.contentBlocks.length > 0 ? (
|
|
26
|
-
<GutenbergRenderer
|
|
27
|
-
blocks={content.contentBlocks as import("../types.js").FlowpressBlock[]}
|
|
28
|
-
contract={styleflowContract}
|
|
29
|
-
/>
|
|
30
|
-
) : content?.content && (
|
|
31
|
-
<S.div
|
|
32
|
-
surface="default"
|
|
33
|
-
layoutRole="stack"
|
|
34
|
-
density="regular"
|
|
35
|
-
set:html={String(content.content)}
|
|
36
|
-
/>
|
|
37
|
-
)}
|
|
38
|
-
</S.section>
|
|
39
|
-
)}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</BaseLayout>
|
package/dist/templates.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const coreTemplates: {
|
|
2
|
-
readonly index: unknown;
|
|
3
|
-
readonly singular: unknown;
|
|
4
|
-
readonly single: unknown;
|
|
5
|
-
readonly page: unknown;
|
|
6
|
-
readonly archive: unknown;
|
|
7
|
-
readonly taxonomy: unknown;
|
|
8
|
-
readonly category: unknown;
|
|
9
|
-
readonly tag: unknown;
|
|
10
|
-
readonly author: unknown;
|
|
11
|
-
readonly date: unknown;
|
|
12
|
-
readonly search: unknown;
|
|
13
|
-
readonly home: unknown;
|
|
14
|
-
readonly attachment: unknown;
|
|
15
|
-
readonly embed: unknown;
|
|
16
|
-
readonly "privacy-policy": unknown;
|
|
17
|
-
readonly "404": unknown;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=templates.d.ts.map
|
package/dist/templates.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBhB,CAAC"}
|
package/dist/templates.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import DefaultTemplate from "./astro/DefaultTemplate.astro";
|
|
2
|
-
export const coreTemplates = {
|
|
3
|
-
index: DefaultTemplate,
|
|
4
|
-
singular: DefaultTemplate,
|
|
5
|
-
single: DefaultTemplate,
|
|
6
|
-
page: DefaultTemplate,
|
|
7
|
-
archive: DefaultTemplate,
|
|
8
|
-
taxonomy: DefaultTemplate,
|
|
9
|
-
category: DefaultTemplate,
|
|
10
|
-
tag: DefaultTemplate,
|
|
11
|
-
author: DefaultTemplate,
|
|
12
|
-
date: DefaultTemplate,
|
|
13
|
-
search: DefaultTemplate,
|
|
14
|
-
home: DefaultTemplate,
|
|
15
|
-
attachment: DefaultTemplate,
|
|
16
|
-
embed: DefaultTemplate,
|
|
17
|
-
"privacy-policy": DefaultTemplate,
|
|
18
|
-
"404": DefaultTemplate
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=templates.js.map
|
package/dist/templates.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,eAAe;IACzB,GAAG,EAAE,eAAe;IACpB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,eAAe;IAC3B,KAAK,EAAE,eAAe;IACtB,gBAAgB,EAAE,eAAe;IACjC,KAAK,EAAE,eAAe;CACd,CAAC","sourcesContent":["import DefaultTemplate from \"./astro/DefaultTemplate.astro\";\n\nexport const coreTemplates = {\n index: DefaultTemplate,\n singular: DefaultTemplate,\n single: DefaultTemplate,\n page: DefaultTemplate,\n archive: DefaultTemplate,\n taxonomy: DefaultTemplate,\n category: DefaultTemplate,\n tag: DefaultTemplate,\n author: DefaultTemplate,\n date: DefaultTemplate,\n search: DefaultTemplate,\n home: DefaultTemplate,\n attachment: DefaultTemplate,\n embed: DefaultTemplate,\n \"privacy-policy\": DefaultTemplate,\n \"404\": DefaultTemplate\n} as const;\n"]}
|